From b3d6ae15b303df46d303d31bc18a38eaa32ce00f Mon Sep 17 00:00:00 2001 From: Comfy Org PR Bot Date: Sat, 15 Feb 2025 18:32:47 +0900 Subject: [PATCH] Update frontend to v1.9.17 (#6814) Co-authored-by: huchenlei <20929282+huchenlei@users.noreply.github.com> --- ...111_1A.js => BaseViewTemplate-DlGljfEG.js} | 6 +- web/assets/DesktopStartView-B2BMUZxW.js | 19 + web/assets/DesktopStartView-FKlxS2Lt.js | 22 - web/assets/DesktopUpdateView-CxchaIvw.css | 20 + web/assets/DesktopUpdateView-DWsew03S.js | 58 + ...VXUne-M.js => DownloadGitView-SPK8AXQU.js} | 6 +- ...iPOrhDVM.js => ExtensionPanel-1HZtMFvH.js} | 8 +- ...ew-CVCdiww1.css => GraphView-Bo28XDd0.css} | 123 +- ...View-D9ZzDQZV.js => GraphView-CLFBgoGf.js} | 2127 ++-- ...ew-CVZcZZXJ.js => InstallView-x9XCq0hC.js} | 52 +- ...eHhC2F4.js => KeybindingPanel-BIrxefrS.js} | 26 +- web/assets/KeybindingPanel-CDYVPYDp.css | 8 + web/assets/KeybindingPanel-DvrUYZ4S.css | 8 - ...f7CHNWW.js => MaintenanceView-BUmTZX1d.js} | 1426 +-- ..._Vr6o.css => MaintenanceView-DEJCj8SR.css} | 4 +- ...js => ManualConfigurationView-D3on5kXY.js} | 6 +- ...gqrS.js => MetricsConsentView-DK20ednB.js} | 6 +- ...pntA4x.js => NotSupportedView-BzM0uuqA.js} | 6 +- ...I5M9c.js => ServerConfigPanel-D0jTW_iX.js} | 6 +- ...pH4TXPO.js => ServerStartView-BENqs5bD.js} | 8 +- ...wVDQY.css => ServerStartView-BZ7uhZHv.css} | 2 +- web/assets/TerminalOutputDrawer-BgTEspHP.js | 1061 ++ ...wxa07xPk.js => UserSelectView-CRPNAEVJ.js} | 6 +- ...ew-BrXELNIm.js => WelcomeView-Cvtvw05C.js} | 6 +- .../{index-BNlqgrYT.js => index-A-dAhghd.js} | 4 +- web/assets/index-B0BQ8jlU.js | 618 + .../{index-DXE47DZl.js => index-BTHx8UHZ.js} | 4 +- ...{index-C1Hb_Yo9.css => index-CBxvvAzM.css} | 343 +- .../{index-BYzwFNH3.js => index-D9D9jjLT.js} | 1239 +- .../{index-DKIv7atk.js => index-DSWvxALN.js} | 1032 +- .../{index-DqqhYDnY.js => index-DqXp9vW4.js} | 10596 +++++++++------- .../{index-BapOFhAR.js => index-KUUE4Ew8.js} | 6 +- ...Cutrm.js => keybindingService-DgS0S2M6.js} | 6 +- ...DJVFt.js => serverConfigStore-C8uoM7Sm.js} | 4 +- web/index.html | 4 +- web/scripts/domWidget.js | 2 + web/templates/image2image.json | 6 +- 37 files changed, 10547 insertions(+), 8337 deletions(-) rename web/assets/{BaseViewTemplate-Cz111_1A.js => BaseViewTemplate-DlGljfEG.js} (82%) create mode 100644 web/assets/DesktopStartView-B2BMUZxW.js delete mode 100644 web/assets/DesktopStartView-FKlxS2Lt.js create mode 100644 web/assets/DesktopUpdateView-CxchaIvw.css create mode 100644 web/assets/DesktopUpdateView-DWsew03S.js rename web/assets/{DownloadGitView-DVXUne-M.js => DownloadGitView-SPK8AXQU.js} (92%) rename web/assets/{ExtensionPanel-iPOrhDVM.js => ExtensionPanel-1HZtMFvH.js} (93%) rename web/assets/{GraphView-CVCdiww1.css => GraphView-Bo28XDd0.css} (65%) rename web/assets/{GraphView-D9ZzDQZV.js => GraphView-CLFBgoGf.js} (88%) rename web/assets/{InstallView-CVZcZZXJ.js => InstallView-x9XCq0hC.js} (95%) rename web/assets/{KeybindingPanel-CeHhC2F4.js => KeybindingPanel-BIrxefrS.js} (90%) create mode 100644 web/assets/KeybindingPanel-CDYVPYDp.css delete mode 100644 web/assets/KeybindingPanel-DvrUYZ4S.css rename web/assets/{MaintenanceView-Df7CHNWW.js => MaintenanceView-BUmTZX1d.js} (97%) rename web/assets/{MaintenanceView-Bj5_Vr6o.css => MaintenanceView-DEJCj8SR.css} (95%) rename web/assets/{ManualConfigurationView-Cz0_f_T-.js => ManualConfigurationView-D3on5kXY.js} (92%) rename web/assets/{MetricsConsentView-B5NlgqrS.js => MetricsConsentView-DK20ednB.js} (88%) rename web/assets/{NotSupportedView-BUpntA4x.js => NotSupportedView-BzM0uuqA.js} (95%) rename web/assets/{ServerConfigPanel-B1lI5M9c.js => ServerConfigPanel-D0jTW_iX.js} (94%) rename web/assets/{ServerStartView-BpH4TXPO.js => ServerStartView-BENqs5bD.js} (92%) rename web/assets/{ServerStartView-CJiwVDQY.css => ServerStartView-BZ7uhZHv.css} (64%) create mode 100644 web/assets/TerminalOutputDrawer-BgTEspHP.js rename web/assets/{UserSelectView-wxa07xPk.js => UserSelectView-CRPNAEVJ.js} (91%) rename web/assets/{WelcomeView-BrXELNIm.js => WelcomeView-Cvtvw05C.js} (87%) rename web/assets/{index-BNlqgrYT.js => index-A-dAhghd.js} (98%) create mode 100644 web/assets/index-B0BQ8jlU.js rename web/assets/{index-DXE47DZl.js => index-BTHx8UHZ.js} (91%) rename web/assets/{index-C1Hb_Yo9.css => index-CBxvvAzM.css} (92%) rename web/assets/{index-BYzwFNH3.js => index-D9D9jjLT.js} (98%) rename web/assets/{index-DKIv7atk.js => index-DSWvxALN.js} (85%) rename web/assets/{index-DqqhYDnY.js => index-DqXp9vW4.js} (97%) rename web/assets/{index-BapOFhAR.js => index-KUUE4Ew8.js} (99%) rename web/assets/{keybindingService-DEgCutrm.js => keybindingService-DgS0S2M6.js} (93%) rename web/assets/{serverConfigStore-Kb5DJVFt.js => serverConfigStore-C8uoM7Sm.js} (95%) create mode 100644 web/scripts/domWidget.js diff --git a/web/assets/BaseViewTemplate-Cz111_1A.js b/web/assets/BaseViewTemplate-DlGljfEG.js similarity index 82% rename from web/assets/BaseViewTemplate-Cz111_1A.js rename to web/assets/BaseViewTemplate-DlGljfEG.js index 74515b87..9bf3787d 100644 --- a/web/assets/BaseViewTemplate-Cz111_1A.js +++ b/web/assets/BaseViewTemplate-DlGljfEG.js @@ -1,4 +1,4 @@ -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-DqqhYDnY.js"; +import { d as defineComponent, T as ref, p as onMounted, b8 as isElectron, V as nextTick, b9 as electronAPI, o as openBlock, f as createElementBlock, i as withDirectives, v as vShow, j as unref, ba as isNativeWindow, m as createBaseVNode, A as renderSlot, aj as normalizeClass } from "./index-DqXp9vW4.js"; const _hoisted_1 = { class: "flex-grow w-full flex items-center justify-center overflow-auto" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "BaseViewTemplate", @@ -27,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { - class: normalizeClass(["font-sans w-screen h-screen flex flex-col pointer-events-auto", [ + class: normalizeClass(["font-sans w-screen h-screen flex flex-col", [ props.dark ? "text-neutral-300 bg-neutral-900 dark-theme" : "text-neutral-900 bg-neutral-300" ]]) }, [ @@ -48,4 +48,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as _ }; -//# sourceMappingURL=BaseViewTemplate-Cz111_1A.js.map +//# sourceMappingURL=BaseViewTemplate-DlGljfEG.js.map diff --git a/web/assets/DesktopStartView-B2BMUZxW.js b/web/assets/DesktopStartView-B2BMUZxW.js new file mode 100644 index 00000000..7fdd1487 --- /dev/null +++ b/web/assets/DesktopStartView-B2BMUZxW.js @@ -0,0 +1,19 @@ +import { d as defineComponent, o as openBlock, y as createBlock, z as withCtx, k as createVNode, j as unref, bE as script } from "./index-DqXp9vW4.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-DlGljfEG.js"; +const _sfc_main = /* @__PURE__ */ defineComponent({ + __name: "DesktopStartView", + setup(__props) { + return (_ctx, _cache) => { + return openBlock(), createBlock(_sfc_main$1, { dark: "" }, { + default: withCtx(() => [ + createVNode(unref(script), { class: "m-8 w-48 h-48" }) + ]), + _: 1 + }); + }; + } +}); +export { + _sfc_main as default +}; +//# sourceMappingURL=DesktopStartView-B2BMUZxW.js.map diff --git a/web/assets/DesktopStartView-FKlxS2Lt.js b/web/assets/DesktopStartView-FKlxS2Lt.js deleted file mode 100644 index b8b84763..00000000 --- a/web/assets/DesktopStartView-FKlxS2Lt.js +++ /dev/null @@ -1,22 +0,0 @@ -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-DqqhYDnY.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cz111_1A.js"; -const _hoisted_1 = { class: "max-w-screen-sm w-screen p-8" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "DesktopStartView", - setup(__props) { - return (_ctx, _cache) => { - return openBlock(), createBlock(_sfc_main$1, { dark: "" }, { - default: withCtx(() => [ - createBaseVNode("div", _hoisted_1, [ - createVNode(unref(script), { mode: "indeterminate" }) - ]) - ]), - _: 1 - }); - }; - } -}); -export { - _sfc_main as default -}; -//# sourceMappingURL=DesktopStartView-FKlxS2Lt.js.map diff --git a/web/assets/DesktopUpdateView-CxchaIvw.css b/web/assets/DesktopUpdateView-CxchaIvw.css new file mode 100644 index 00000000..e85cbfae --- /dev/null +++ b/web/assets/DesktopUpdateView-CxchaIvw.css @@ -0,0 +1,20 @@ + +.download-bg[data-v-8d77828d]::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/DesktopUpdateView-DWsew03S.js b/web/assets/DesktopUpdateView-DWsew03S.js new file mode 100644 index 00000000..dec3d41f --- /dev/null +++ b/web/assets/DesktopUpdateView-DWsew03S.js @@ -0,0 +1,58 @@ +var __defProp = Object.defineProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +import { d as defineComponent, T as ref, d8 as onUnmounted, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, E as toDisplayString, j as unref, bg as t, k as createVNode, bE as script, l as script$1, b9 as electronAPI, _ as _export_sfc } from "./index-DqXp9vW4.js"; +import { s as script$2 } from "./index-B0BQ8jlU.js"; +import { _ as _sfc_main$1 } from "./TerminalOutputDrawer-BgTEspHP.js"; +import { _ as _sfc_main$2 } from "./BaseViewTemplate-DlGljfEG.js"; +const _hoisted_1 = { class: "h-screen w-screen grid items-center justify-around overflow-y-auto" }; +const _hoisted_2 = { class: "relative m-8 text-center" }; +const _hoisted_3 = { class: "download-bg pi-download text-4xl font-bold" }; +const _hoisted_4 = { class: "m-8" }; +const _sfc_main = /* @__PURE__ */ defineComponent({ + __name: "DesktopUpdateView", + setup(__props) { + const electron = electronAPI(); + const terminalVisible = ref(false); + const toggleConsoleDrawer = /* @__PURE__ */ __name(() => { + terminalVisible.value = !terminalVisible.value; + }, "toggleConsoleDrawer"); + onUnmounted(() => electron.Validation.dispose()); + return (_ctx, _cache) => { + return openBlock(), createBlock(_sfc_main$2, { dark: "" }, { + default: withCtx(() => [ + createBaseVNode("div", _hoisted_1, [ + createBaseVNode("div", _hoisted_2, [ + createBaseVNode("h1", _hoisted_3, toDisplayString(unref(t)("desktopUpdate.title")), 1), + createBaseVNode("div", _hoisted_4, [ + createBaseVNode("span", null, toDisplayString(unref(t)("desktopUpdate.description")), 1) + ]), + createVNode(unref(script), { class: "m-8 w-48 h-48" }), + createVNode(unref(script$1), { + style: { "transform": "translateX(-50%)" }, + class: "fixed bottom-0 left-1/2 my-8", + label: unref(t)("maintenance.consoleLogs"), + icon: "pi pi-desktop", + "icon-pos": "left", + severity: "secondary", + onClick: toggleConsoleDrawer + }, null, 8, ["label"]), + createVNode(_sfc_main$1, { + modelValue: terminalVisible.value, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => terminalVisible.value = $event), + header: unref(t)("g.terminal"), + "default-message": unref(t)("desktopUpdate.terminalDefaultMessage") + }, null, 8, ["modelValue", "header", "default-message"]) + ]) + ]), + createVNode(unref(script$2)) + ]), + _: 1 + }); + }; + } +}); +const DesktopUpdateView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8d77828d"]]); +export { + DesktopUpdateView as default +}; +//# sourceMappingURL=DesktopUpdateView-DWsew03S.js.map diff --git a/web/assets/DownloadGitView-DVXUne-M.js b/web/assets/DownloadGitView-SPK8AXQU.js similarity index 92% rename from web/assets/DownloadGitView-DVXUne-M.js rename to web/assets/DownloadGitView-SPK8AXQU.js index 9d879bd3..1b7d7e0c 100644 --- a/web/assets/DownloadGitView-DVXUne-M.js +++ b/web/assets/DownloadGitView-SPK8AXQU.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, 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-DqqhYDnY.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cz111_1A.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, bi as useRouter } from "./index-DqXp9vW4.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-DlGljfEG.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-DVXUne-M.js.map +//# sourceMappingURL=DownloadGitView-SPK8AXQU.js.map diff --git a/web/assets/ExtensionPanel-iPOrhDVM.js b/web/assets/ExtensionPanel-1HZtMFvH.js similarity index 93% rename from web/assets/ExtensionPanel-iPOrhDVM.js rename to web/assets/ExtensionPanel-1HZtMFvH.js index 4f466019..99adb239 100644 --- a/web/assets/ExtensionPanel-iPOrhDVM.js +++ b/web/assets/ExtensionPanel-1HZtMFvH.js @@ -1,8 +1,8 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -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-DqqhYDnY.js"; -import { g as script$2, h as script$6 } from "./index-BapOFhAR.js"; -import "./index-DXE47DZl.js"; +import { d as defineComponent, T as ref, dx as FilterMatchMode, dC as useExtensionStore, a as useSettingStore, p as onMounted, c as computed, o as openBlock, y as createBlock, z as withCtx, k as createVNode, dy as SearchBox, j as unref, bn as script, m as createBaseVNode, f as createElementBlock, D as renderList, E as toDisplayString, a8 as createTextVNode, F as Fragment, l as script$1, B as createCommentVNode, a5 as script$3, ay as script$4, br as script$5, dz as _sfc_main$1 } from "./index-DqXp9vW4.js"; +import { g as script$2, h as script$6 } from "./index-KUUE4Ew8.js"; +import "./index-BTHx8UHZ.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-iPOrhDVM.js.map +//# sourceMappingURL=ExtensionPanel-1HZtMFvH.js.map diff --git a/web/assets/GraphView-CVCdiww1.css b/web/assets/GraphView-Bo28XDd0.css similarity index 65% rename from web/assets/GraphView-CVCdiww1.css rename to web/assets/GraphView-Bo28XDd0.css index 765b2a0e..aab80799 100644 --- a/web/assets/GraphView-CVCdiww1.css +++ b/web/assets/GraphView-Bo28XDd0.css @@ -1,6 +1,5 @@ -.comfy-menu-hamburger[data-v-7ed57d1a] { - pointer-events: auto; +.comfy-menu-hamburger[data-v-82120b51] { position: fixed; z-index: 9999; display: flex; @@ -41,19 +40,19 @@ z-index: 999; } -.p-buttongroup-vertical[data-v-cb8f9a1a] { +.p-buttongroup-vertical[data-v-27a9500c] { display: flex; flex-direction: column; border-radius: var(--p-button-border-radius); overflow: hidden; border: 1px solid var(--p-panel-border-color); } -.p-buttongroup-vertical .p-button[data-v-cb8f9a1a] { +.p-buttongroup-vertical .p-button[data-v-27a9500c] { margin: 0; border-radius: 0; } -.node-tooltip[data-v-46859edf] { +.node-tooltip[data-v-f03142eb] { background: var(--comfy-input-bg); border-radius: 5px; box-shadow: 0 0 5px rgba(0, 0, 0, 0.4); @@ -133,13 +132,11 @@ border-right: 4px solid var(--p-button-text-primary-color); } -.side-tool-bar-container[data-v-33cac83a] { +.side-tool-bar-container[data-v-04875455] { display: flex; flex-direction: column; align-items: center; - pointer-events: auto; - width: var(--sidebar-width); height: 100%; @@ -150,16 +147,16 @@ --sidebar-width: 4rem; --sidebar-icon-size: 1.5rem; } -.side-tool-bar-container.small-sidebar[data-v-33cac83a] { +.side-tool-bar-container.small-sidebar[data-v-04875455] { --sidebar-width: 2.5rem; --sidebar-icon-size: 1rem; } -.side-tool-bar-end[data-v-33cac83a] { +.side-tool-bar-end[data-v-04875455] { align-self: flex-end; margin-top: auto; } -.status-indicator[data-v-8d011a31] { +.status-indicator[data-v-fd6ae3af] { position: absolute; font-weight: 700; font-size: 1.5rem; @@ -221,7 +218,7 @@ border-radius: 0px } -[data-v-38831d8e] .workflow-tabs { +[data-v-6ab68035] .workflow-tabs { background-color: var(--comfy-menu-bg); } @@ -235,31 +232,36 @@ border-bottom-right-radius: 0; } -.actionbar[data-v-915e5456] { +.actionbar[data-v-ebd56d51] { pointer-events: all; position: fixed; z-index: 1000; } -.actionbar.is-docked[data-v-915e5456] { +.actionbar.is-docked[data-v-ebd56d51] { position: static; border-style: none; background-color: transparent; padding: 0px; } -.actionbar.is-dragging[data-v-915e5456] { +.actionbar.is-dragging[data-v-ebd56d51] { -webkit-user-select: none; -moz-user-select: none; user-select: none; } -[data-v-915e5456] .p-panel-content { +[data-v-ebd56d51] .p-panel-content { padding: 0.25rem; } -.is-docked[data-v-915e5456] .p-panel-content { +.is-docked[data-v-ebd56d51] .p-panel-content { padding: 0px; } -[data-v-915e5456] .p-panel-header { +[data-v-ebd56d51] .p-panel-header { display: none; } +.drag-handle[data-v-ebd56d51] { + height: -moz-max-content; + height: max-content; + width: 0.75rem; +} .top-menubar[data-v-56df69d2] .p-menubar-item-link svg { display: none; @@ -275,7 +277,7 @@ border-style: solid; } -.comfyui-menu[data-v-929e7543] { +.comfyui-menu[data-v-68d3b5b9] { width: 100vw; height: var(--comfy-topbar-height); background: var(--comfy-menu-bg); @@ -288,19 +290,94 @@ order: 0; grid-column: 1/-1; } -.comfyui-menu.dropzone[data-v-929e7543] { +.comfyui-menu.dropzone[data-v-68d3b5b9] { background: var(--p-highlight-background); } -.comfyui-menu.dropzone-active[data-v-929e7543] { +.comfyui-menu.dropzone-active[data-v-68d3b5b9] { background: var(--p-highlight-background-focus); } -[data-v-929e7543] .p-menubar-item-label { +[data-v-68d3b5b9] .p-menubar-item-label { line-height: revert; } -.comfyui-logo[data-v-929e7543] { +.comfyui-logo[data-v-68d3b5b9] { font-size: 1.2em; -webkit-user-select: none; -moz-user-select: none; user-select: none; cursor: default; } + +.comfyui-body[data-v-e89d9273] { + grid-template-columns: auto 1fr auto; + grid-template-rows: auto 1fr auto; +} + +/** + +------------------+------------------+------------------+ + | | + | .comfyui-body- | + | top | + | (spans all cols) | + | | + +------------------+------------------+------------------+ + | | | | + | .comfyui-body- | #graph-canvas | .comfyui-body- | + | left | | right | + | | | | + | | | | + +------------------+------------------+------------------+ + | | + | .comfyui-body- | + | bottom | + | (spans all cols) | + | | + +------------------+------------------+------------------+ +*/ +.comfyui-body-top[data-v-e89d9273] { + order: -5; + /* Span across all columns */ + grid-column: 1/-1; + /* Position at the first row */ + grid-row: 1; + /* Top menu bar dropdown needs to be above of graph canvas splitter overlay which is z-index: 999 */ + /* Top menu bar z-index needs to be higher than bottom menu bar z-index as by default + pysssss's image feed is located at body-bottom, and it can overlap with the queue button, which + is located in body-top. */ + z-index: 1001; + display: flex; + flex-direction: column; +} +.comfyui-body-left[data-v-e89d9273] { + order: -4; + /* Position in the first column */ + grid-column: 1; + /* Position below the top element */ + grid-row: 2; + z-index: 10; + display: flex; +} +.graph-canvas-container[data-v-e89d9273] { + width: 100%; + height: 100%; + order: -3; + grid-column: 2; + grid-row: 2; + position: relative; + overflow: hidden; +} +.comfyui-body-right[data-v-e89d9273] { + order: -2; + z-index: 10; + grid-column: 3; + grid-row: 2; +} +.comfyui-body-bottom[data-v-e89d9273] { + order: 4; + /* Span across all columns */ + grid-column: 1/-1; + grid-row: 3; + /* Bottom menu bar dropdown needs to be above of graph canvas splitter overlay which is z-index: 999 */ + z-index: 1000; + display: flex; + flex-direction: column; +} diff --git a/web/assets/GraphView-D9ZzDQZV.js b/web/assets/GraphView-CLFBgoGf.js similarity index 88% rename from web/assets/GraphView-D9ZzDQZV.js rename to web/assets/GraphView-CLFBgoGf.js index 5083b86f..900a8cc8 100644 --- a/web/assets/GraphView-D9ZzDQZV.js +++ b/web/assets/GraphView-CLFBgoGf.js @@ -1,10 +1,11 @@ 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-DqqhYDnY.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-DKIv7atk.js"; -import { u as useKeybindingService } from "./keybindingService-DEgCutrm.js"; -import { u as useServerConfigStore } from "./serverConfigStore-Kb5DJVFt.js"; -import "./index-DXE47DZl.js"; +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 useI18n, J as useCommandStore, K as useCanvasStore, L as LiteGraph, M as useColorPaletteStore, N as watch, O as useNodeDefStore, P as BadgePosition, Q as LGraphBadge, R as _, S as NodeBadgeMode, T as ref, U as useEventListener, V as nextTick, W as st, X as normalizeI18nKey, Y as useTitleEditorStore, Z as LGraphGroup, $ as LGraphNode, a0 as EditableText, a1 as defineStore, a2 as useNodeFrequencyStore, a3 as useNodeBookmarkStore, a4 as highlightQuery, a5 as script$8, a6 as formatNumberWithSuffix, a7 as NodeSourceType, a8 as createTextVNode, a9 as script$9, aa as NodePreview, ab as NodeSearchFilter, ac as script$a, ad as SearchFilterChip, ae as useLitegraphService, af as storeToRefs, ag as isRef, ah as toRaw, ai as LinkReleaseTriggerAction, aj as normalizeClass, ak as useUserStore, al as useDialogStore, am as SettingDialogHeader, an as SettingDialogContent, ao as useKeybindingStore, ap as Teleport, aq as usePragmaticDraggable, ar as usePragmaticDroppable, as as withModifiers, at as mergeProps, au as useWorkflowService, av as useWorkflowBookmarkStore, aw as script$c, ax as script$d, ay as script$e, az as useModelToNodeStore, aA as ComfyNodeDefImpl, aB as ComfyModelDef, aC as ComfyWorkflow, aD as LGraphCanvas, aE as te, aF as LGraph, aG as LLink, aH as DragAndScale, aI as ContextMenu, aJ as CanvasPointer, aK as isImageNode, aL as api, aM as getStorageValue, aN as useModelStore, aO as setStorageValue, aP as LinkMarkerShape, aQ as IS_CONTROL_WIDGET, aR as updateControlWidgetLabel, aS as useColorPaletteService, aT as ChangeTracker, aU as i18n, aV as useToast, aW as useToastStore, aX as useQueueSettingsStore, aY as script$g, aZ as useQueuePendingTaskCountStore, a_ as useLocalStorage, a$ as useDraggable, b0 as watchDebounced, b1 as inject, b2 as useElementBounding, b3 as script$i, b4 as lodashExports, b5 as useEventBus, b6 as useMenuItemStore, b7 as provide, b8 as isElectron, b9 as electronAPI, ba as isNativeWindow, bb as useDialogService, bc as LGraphEventMode, bd as useQueueStore, be as DEFAULT_DARK_COLOR_PALETTE, bf as DEFAULT_LIGHT_COLOR_PALETTE, bg as t, bh as useErrorHandling } from "./index-DqXp9vW4.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$h, h as script$j } from "./index-DSWvxALN.js"; +import { s as script$f } from "./index-B0BQ8jlU.js"; +import { u as useKeybindingService } from "./keybindingService-DgS0S2M6.js"; +import { u as useServerConfigStore } from "./serverConfigStore-C8uoM7Sm.js"; +import "./index-BTHx8UHZ.js"; const DEFAULT_TITLE = "ComfyUI"; const TITLE_SUFFIX = " - ComfyUI"; const _sfc_main$u = /* @__PURE__ */ defineComponent({ @@ -39,7 +40,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({ }; } }); -const _hoisted_1$j = { class: "window-actions-spacer" }; +const _hoisted_1$k = { class: "window-actions-spacer" }; const _sfc_main$t = /* @__PURE__ */ defineComponent({ __name: "MenuHamburger", setup(__props) { @@ -84,7 +85,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({ }, null, 8, ["aria-label", "onContextmenu"]), [ [_directive_tooltip, { value: _ctx.$t("menu.showMenu"), showDelay: 300 }] ]), - withDirectives(createBaseVNode("div", _hoisted_1$j, null, 512), [ + withDirectives(createBaseVNode("div", _hoisted_1$k, null, 512), [ [vShow, menuSetting.value !== "Bottom"] ]) ], 4)), [ @@ -93,7 +94,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({ }; } }); -const MenuHamburger = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-7ed57d1a"]]); +const MenuHamburger = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-82120b51"]]); const _sfc_main$s = /* @__PURE__ */ defineComponent({ __name: "UnloadWindowConfirmDialog", setup(__props) { @@ -234,17 +235,17 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({ }; } }); -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_1$j = { class: "flex flex-col h-full" }; +const _hoisted_2$7 = { class: "w-full flex justify-between" }; +const _hoisted_3$6 = { class: "tabs-container" }; +const _hoisted_4$2 = { 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, [ + return openBlock(), createElementBlock("div", _hoisted_1$j, [ createVNode(unref(script$5), { value: unref(bottomPanelStore).activeBottomPanelTabId, "onUpdate:value": _cache[1] || (_cache[1] = ($event) => unref(bottomPanelStore).activeBottomPanelTabId = $event) @@ -252,8 +253,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({ default: withCtx(() => [ createVNode(unref(script$3), { "pt:tabList": "border-none" }, { default: withCtx(() => [ - createBaseVNode("div", _hoisted_2$6, [ - createBaseVNode("div", _hoisted_3$5, [ + createBaseVNode("div", _hoisted_2$7, [ + createBaseVNode("div", _hoisted_3$6, [ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(bottomPanelStore).bottomPanelTabs, (tab) => { return openBlock(), createBlock(unref(script$4), { key: tab.id, @@ -261,7 +262,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({ class: "p-3 border-none" }, { default: withCtx(() => [ - createBaseVNode("span", _hoisted_4$1, toDisplayString(tab.title.toUpperCase()), 1) + createBaseVNode("span", _hoisted_4$2, toDisplayString(tab.title.toUpperCase()), 1) ]), _: 2 }, 1032, ["value"]); @@ -292,13 +293,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({ }; } }); -const _hoisted_1$h = { +const _hoisted_1$i = { 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] = [ + return openBlock(), createElementBlock("svg", _hoisted_1$i, _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" @@ -307,13 +308,13 @@ function render$7(_ctx, _cache) { } __name(render$7, "render$7"); const __unplugin_components_1$2 = markRaw({ name: "simple-line-icons-cursor", render: render$7 }); -const _hoisted_1$g = { +const _hoisted_1$h = { 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] = [ + return openBlock(), createElementBlock("svg", _hoisted_1$h, _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" @@ -322,18 +323,6 @@ function render$6(_ctx, _cache) { } __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) { @@ -361,7 +350,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({ 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" }, { + return openBlock(), createBlock(unref(script$6), { class: "p-buttongroup-vertical absolute bottom-[10px] right-[10px] z-[1000]" }, { default: withCtx(() => [ withDirectives(createVNode(unref(script), { severity: "secondary", @@ -445,7 +434,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({ }; } }); -const GraphCanvasMenu = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-cb8f9a1a"]]); +const GraphCanvasMenu = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-27a9500c"]]); const _sfc_main$n = /* @__PURE__ */ defineComponent({ __name: "NodeBadge", setup(__props) { @@ -504,6 +493,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({ setup(__props) { let idleTimeout; const nodeDefStore = useNodeDefStore(); + const settingStore = useSettingStore(); const tooltipRef = ref(); const tooltipText = ref(""); const left = ref(); @@ -573,7 +563,10 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({ hideTooltip(); clearTimeout(idleTimeout); if (e.target.nodeName !== "CANVAS") return; - idleTimeout = window.setTimeout(onIdle, 500); + idleTimeout = window.setTimeout( + onIdle, + settingStore.get("LiteGraph.Node.TooltipDelay") + ); }, "onMouseMove"); useEventListener(window, "mousemove", onMouseMove); useEventListener(window, "click", hideTooltip); @@ -588,7 +581,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({ }; } }); -const NodeTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-46859edf"]]); +const NodeTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-f03142eb"]]); const _sfc_main$l = /* @__PURE__ */ defineComponent({ __name: "TitleEditor", setup(__props) { @@ -802,10 +795,10 @@ const _sfc_main$k = { } } }; -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_1$g = { class: "option-container flex justify-between items-center px-2 py-0 cursor-pointer overflow-hidden w-full" }; +const _hoisted_2$6 = { class: "option-display-name font-semibold flex flex-col" }; +const _hoisted_3$5 = { key: 0 }; +const _hoisted_4$1 = ["innerHTML"]; const _hoisted_5 = ["innerHTML"]; const _hoisted_6 = { key: 0, @@ -839,15 +832,15 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({ ); const props = __props; return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$f, [ - createBaseVNode("div", _hoisted_2$5, [ + return openBlock(), createElementBlock("div", _hoisted_1$g, [ + createBaseVNode("div", _hoisted_2$6, [ createBaseVNode("div", null, [ - isBookmarked.value ? (openBlock(), createElementBlock("span", _hoisted_3$4, _cache[0] || (_cache[0] = [ + isBookmarked.value ? (openBlock(), createElementBlock("span", _hoisted_3$5, _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), + }, null, 8, _hoisted_4$1), _cache[1] || (_cache[1] = createBaseVNode("span", null, " ", -1)), showIdName.value ? (openBlock(), createBlock(unref(script$8), { key: 1, @@ -894,12 +887,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({ } }); 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 = { +const _hoisted_1$f = { class: "comfy-vue-node-search-container flex justify-center items-center w-full min-w-96" }; +const _hoisted_2$5 = { key: 0, class: "comfy-vue-node-preview-container absolute left-[-350px] top-[50px]" }; -const _hoisted_3$3 = { class: "_dialog-body" }; +const _hoisted_3$4 = { class: "_dialog-body" }; const _sfc_main$i = /* @__PURE__ */ defineComponent({ __name: "NodeSearchBox", props: { @@ -962,8 +955,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({ hoveredSuggestion.value = value; }, "setHoverSuggestion"); return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$e, [ - enableNodePreview.value ? (openBlock(), createElementBlock("div", _hoisted_2$4, [ + return openBlock(), createElementBlock("div", _hoisted_1$f, [ + enableNodePreview.value ? (openBlock(), createElementBlock("div", _hoisted_2$5, [ hoveredSuggestion.value ? (openBlock(), createBlock(NodePreview, { nodeDef: hoveredSuggestion.value, key: hoveredSuggestion.value?.name || "" @@ -987,7 +980,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({ createBaseVNode("h3", null, "Add node filter condition", -1) ])), default: withCtx(() => [ - createBaseVNode("div", _hoisted_3$3, [ + createBaseVNode("div", _hoisted_3$4, [ createVNode(NodeSearchFilter, { onAddFilter }) ]) ]), @@ -1354,8 +1347,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({ }; } }); -const _hoisted_1$d = { class: "side-tool-bar-end" }; -const _hoisted_2$3 = { +const _hoisted_1$e = { class: "side-tool-bar-end" }; +const _hoisted_2$4 = { key: 0, class: "sidebar-content-container h-full overflow-y-auto overflow-x-hidden" }; @@ -1400,24 +1393,24 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({ onClick: /* @__PURE__ */ __name(($event) => onTabClick(tab), "onClick") }, null, 8, ["icon", "iconBadge", "tooltip", "selected", "class", "onClick"]); }), 128)), - createBaseVNode("div", _hoisted_1$d, [ + createBaseVNode("div", _hoisted_1$e, [ 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, [ + selectedTab.value ? (openBlock(), createElementBlock("div", _hoisted_2$4, [ 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 = { +const SideToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-04875455"]]); +const _hoisted_1$d = { class: "workflow-label text-sm max-w-[150px] truncate inline-block" }; +const _hoisted_2$3 = { class: "relative" }; +const _hoisted_3$3 = { key: 0, class: "status-indicator" }; @@ -1429,13 +1422,15 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({ }, setup(__props) { const props = __props; + const { t: t2 } = useI18n(); 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 + warnIfUnsaved: !workspaceStore.shiftDown, + hint: t2("sideToolbar.workflowTab.dirtyCloseHint") })) { break; } @@ -1477,7 +1472,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({ ref_key: "workflowTabRef", ref: workflowTabRef }, _ctx.$attrs), [ - withDirectives((openBlock(), createElementBlock("span", _hoisted_1$c, [ + withDirectives((openBlock(), createElementBlock("span", _hoisted_1$d, [ createTextVNode(toDisplayString(_ctx.workflowOption.workflow.filename), 1) ])), [ [ @@ -1487,8 +1482,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({ { 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), + createBaseVNode("div", _hoisted_2$3, [ + !unref(workspaceStore).shiftDown && (_ctx.workflowOption.workflow.isModified || !_ctx.workflowOption.workflow.isPersisted) ? (openBlock(), createElementBlock("span", _hoisted_3$3, "•")) : createCommentVNode("", true), createVNode(unref(script), { class: "close-button p-0 w-auto", icon: "pi pi-times", @@ -1502,8 +1497,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({ }; } }); -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 WorkflowTab = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-fd6ae3af"]]); +const _hoisted_1$c = { class: "workflow-tabs-container flex flex-row max-w-full h-full" }; const _sfc_main$a = /* @__PURE__ */ defineComponent({ __name: "WorkflowTabs", props: { @@ -1606,7 +1601,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({ }, "handleWheel"); return (_ctx, _cache) => { const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createElementBlock("div", _hoisted_1$b, [ + return openBlock(), createElementBlock("div", _hoisted_1$c, [ createVNode(unref(script$d), { class: "overflow-hidden no-drag", "pt:content": { @@ -1656,18 +1651,448 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({ } }); 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 _hoisted_1$b = { class: "absolute top-0 left-0 w-auto max-w-full" }; const _sfc_main$9 = /* @__PURE__ */ defineComponent({ __name: "SecondRowWorkflowTabs", setup(__props) { return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$a, [ + return openBlock(), createElementBlock("div", _hoisted_1$b, [ createVNode(WorkflowTabs) ]); }; } }); -const SecondRowWorkflowTabs = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-38831d8e"]]); +const SecondRowWorkflowTabs = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-6ab68035"]]); +const useCanvasDrop = /* @__PURE__ */ __name((canvasRef) => { + const modelToNodeStore = useModelToNodeStore(); + const litegraphService = useLitegraphService(); + const workflowService = useWorkflowService(); + 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; + } + } + } else if (node.data instanceof ComfyWorkflow) { + const workflow = node.data; + const position = app.clientPosToCanvasPos([ + loc.clientX, + loc.clientY + ]); + workflowService.insertWorkflow(workflow, { position }); + } + } + }, "onDrop") + }); +}, "useCanvasDrop"); +const useContextMenuTranslation = /* @__PURE__ */ __name(() => { + const f = LGraphCanvas.prototype.getCanvasMenuOptions; + const getCanvasCenterMenuOptions = /* @__PURE__ */ __name(function(...args) { + const res = f.apply(this, args); + for (const item of res) { + if (item?.content) { + item.content = st(`contextMenu.${item.content}`, item.content); + } + } + return res; + }, "getCanvasCenterMenuOptions"); + LGraphCanvas.prototype.getCanvasMenuOptions = getCanvasCenterMenuOptions; + function translateMenus(values, options) { + if (!values) return; + const reInput = /Convert (.*) to input/; + const reWidget = /Convert (.*) to widget/; + const cvt = st("contextMenu.Convert ", "Convert "); + const tinp = st("contextMenu. to input", " to input"); + const twgt = st("contextMenu. to widget", " to widget"); + for (const value of values) { + if (typeof value === "string") continue; + translateMenus(value?.submenu?.options, options); + if (!value?.content) { + continue; + } + if (te(`contextMenu.${value.content}`)) { + value.content = st(`contextMenu.${value.content}`, value.content); + } + const extraInfo = options.extra || options.parentMenu?.options?.extra; + const matchInput = value.content?.match(reInput); + if (matchInput) { + let match = matchInput[1]; + extraInfo?.inputs?.find((i) => { + if (i.name != match) return false; + match = i.label ? i.label : i.name; + }); + extraInfo?.widgets?.find((i) => { + if (i.name != match) return false; + match = i.label ? i.label : i.name; + }); + value.content = cvt + match + tinp; + continue; + } + const matchWidget = value.content?.match(reWidget); + if (matchWidget) { + let match = matchWidget[1]; + extraInfo?.inputs?.find((i) => { + if (i.name != match) return false; + match = i.label ? i.label : i.name; + }); + extraInfo?.widgets?.find((i) => { + if (i.name != match) return false; + match = i.label ? i.label : i.name; + }); + value.content = cvt + match + twgt; + continue; + } + } + } + __name(translateMenus, "translateMenus"); + const OriginalContextMenu = LiteGraph.ContextMenu; + function ContextMenu2(values, options) { + if (options.title) { + options.title = st( + `nodeDefs.${normalizeI18nKey(options.title)}.display_name`, + options.title + ); + } + translateMenus(values, options); + const ctx = new OriginalContextMenu(values, options); + return ctx; + } + __name(ContextMenu2, "ContextMenu"); + LiteGraph.ContextMenu = ContextMenu2; +}, "useContextMenuTranslation"); +const useCopy = /* @__PURE__ */ __name(() => { + const canvasStore = useCanvasStore(); + useEventListener(document, "copy", (e) => { + if (!(e.target instanceof Element)) { + return; + } + if (e.target instanceof HTMLTextAreaElement && e.target.type === "textarea" || e.target instanceof HTMLInputElement && e.target.type === "text") { + return; + } + const isTargetInGraph = e.target.classList.contains("litegraph") || e.target.classList.contains("graph-canvas-container") || e.target.id === "graph-canvas"; + const canvas = canvasStore.canvas; + if (isTargetInGraph && canvas?.selectedItems) { + canvas.copyToClipboard(); + e.clipboardData?.setData("text", " "); + e.preventDefault(); + e.stopImmediatePropagation(); + return false; + } + }); +}, "useCopy"); +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"); +const useLitegraphSettings = /* @__PURE__ */ __name(() => { + const settingStore = useSettingStore(); + const canvasStore = useCanvasStore(); + 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(() => { + const linkRenderMode = settingStore.get("Comfy.LinkRenderMode"); + if (canvasStore.canvas) { + canvasStore.canvas.links_render_mode = linkRenderMode; + canvasStore.canvas.setDirty( + /* fg */ + false, + /* bg */ + true + ); + } + }); + watchEffect(() => { + const lowQualityRenderingZoomThreshold = settingStore.get( + "LiteGraph.Canvas.LowQualityRenderingZoomThreshold" + ); + if (canvasStore.canvas) { + canvasStore.canvas.low_quality_zoom_threshold = lowQualityRenderingZoomThreshold; + canvasStore.canvas.setDirty( + /* fg */ + true, + /* 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(() => { + const dragZoomEnabled = settingStore.get("Comfy.Graph.CtrlShiftZoom"); + const { canvas } = canvasStore; + if (canvas) canvas.dragZoomEnabled = dragZoomEnabled; + }); + 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"); + }); + watchEffect(() => { + LiteGraph.context_menu_scaling = settingStore.get( + "LiteGraph.ContextMenu.Scaling" + ); + }); +}, "useLitegraphSettings"); +const usePaste = /* @__PURE__ */ __name(() => { + const workspaceStore = useWorkspaceStore(); + const canvasStore = useCanvasStore(); + useEventListener(document, "paste", async (e) => { + if (workspaceStore.shiftDown) return; + const canvas = canvasStore.canvas; + if (!canvas) return; + const graph = canvas.graph; + let data = e.clipboardData || window.clipboardData; + const items = data.items; + for (const item of items) { + if (item.type.startsWith("image/")) { + let imageNode = null; + const currentNode = canvas.current_node; + if (currentNode && currentNode.is_selected && isImageNode(currentNode)) { + imageNode = currentNode; + } + if (!imageNode) { + const newNode = LiteGraph.createNode("LoadImage"); + newNode.pos = [...canvas.graph_mouse]; + imageNode = graph.add(newNode) ?? null; + graph.change(); + } + const blob = item.getAsFile(); + imageNode?.pasteFile?.(blob); + return; + } + } + data = data.getData("text/plain"); + let workflow = null; + try { + data = data.slice(data.indexOf("{")); + workflow = JSON.parse(data); + } catch (err) { + try { + data = data.slice(data.indexOf("workflow\n")); + data = data.slice(data.indexOf("{")); + workflow = JSON.parse(data); + } catch (error) { + workflow = null; + } + } + if (workflow && workflow.version && workflow.nodes && workflow.extra) { + await app.loadGraphData(workflow); + } else { + if (e.target instanceof HTMLTextAreaElement && e.target.type === "textarea" || e.target instanceof HTMLInputElement && e.target.type === "text") { + return; + } + canvas.pasteFromClipboard(); + } + }); +}, "usePaste"); +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 CORE_SETTINGS = [ { id: "Comfy.Validation.Workflows", @@ -2018,6 +2443,18 @@ const CORE_SETTINGS = [ }, defaultValue: 0 }, + { + id: "LiteGraph.Node.TooltipDelay", + name: "Tooltip Delay", + type: "number", + attrs: { + min: 100, + max: 3e3, + step: 50 + }, + defaultValue: 500, + versionAdded: "1.9.0" + }, { id: "Comfy.EnableTooltips", category: ["LiteGraph", "Node", "EnableTooltips"], @@ -2296,7 +2733,7 @@ const CORE_SETTINGS = [ }, { id: "LiteGraph.Canvas.MaximumFps", - name: "Maxium FPS", + name: "Maximum 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: { @@ -2361,173 +2798,21 @@ const CORE_SETTINGS = [ defaultValue: false, type: "boolean", versionAdded: "1.8.8" + }, + { + id: "LiteGraph.Canvas.LowQualityRenderingZoomThreshold", + name: "Low quality rendering zoom threshold", + tooltip: "Render low quality shapes when zoomed out", + type: "slider", + attrs: { + min: 0.1, + max: 1, + step: 0.01 + }, + defaultValue: 0.6, + versionAdded: "1.9.1" } ]; -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"], @@ -2548,36 +2833,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({ () => 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"); }); @@ -2595,56 +2850,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({ 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"), () => { @@ -2680,11 +2885,6 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({ 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(); @@ -2698,8 +2898,12 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({ const comfyAppReady = ref(false); const workflowPersistence = useWorkflowPersistence(); useCanvasDrop(canvasRef); + useLitegraphSettings(); onMounted(async () => { useGlobalLitegraph(); + useContextMenuTranslation(); + useCopy(); + usePaste(); app.vueAppReady = true; workspaceStore.spinner = true; ChangeTracker.init(app); @@ -2731,31 +2935,36 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({ }); 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) - ])), + 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, + class: "pointer-events-auto" + })) : createCommentVNode("", true), + canvasMenuEnabled.value ? (openBlock(), createBlock(GraphCanvasMenu, { + key: 1, + class: "pointer-events-auto" + })) : 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", + class: "w-full h-full touch-none" + }, null, 512), createVNode(_sfc_main$h), - tooltipEnabled.value ? (openBlock(), createBlock(NodeTooltip, { key: 0 })) : createCommentVNode("", true), + tooltipEnabled.value ? (openBlock(), createBlock(NodeTooltip, { key: 2 })) : createCommentVNode("", true), createVNode(_sfc_main$n) ], 64); }; @@ -2835,13 +3044,13 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({ }; } }); -const _hoisted_1$9 = { +const _hoisted_1$a = { 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] = [ + return openBlock(), createElementBlock("svg", _hoisted_1$a, _cache[0] || (_cache[0] = [ createBaseVNode("path", { fill: "none", stroke: "currentColor", @@ -2854,13 +3063,13 @@ function render$5(_ctx, _cache) { } __name(render$5, "render$5"); const __unplugin_components_3 = markRaw({ name: "lucide-step-forward", render: render$5 }); -const _hoisted_1$8 = { +const _hoisted_1$9 = { 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] = [ + return openBlock(), createElementBlock("svg", _hoisted_1$9, _cache[0] || (_cache[0] = [ createBaseVNode("path", { fill: "none", stroke: "currentColor", @@ -2873,13 +3082,13 @@ function render$4(_ctx, _cache) { } __name(render$4, "render$4"); const __unplugin_components_2 = markRaw({ name: "lucide-fast-forward", render: render$4 }); -const _hoisted_1$7 = { +const _hoisted_1$8 = { 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] = [ + return openBlock(), createElementBlock("svg", _hoisted_1$8, _cache[0] || (_cache[0] = [ createBaseVNode("path", { fill: "none", stroke: "currentColor", @@ -2892,13 +3101,13 @@ function render$3(_ctx, _cache) { } __name(render$3, "render$3"); const __unplugin_components_1$1 = markRaw({ name: "lucide-play", render: render$3 }); -const _hoisted_1$6 = { +const _hoisted_1$7 = { 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] = [ + return openBlock(), createElementBlock("svg", _hoisted_1$7, _cache[0] || (_cache[0] = [ createBaseVNode("g", { fill: "none", stroke: "currentColor", @@ -2913,7 +3122,7 @@ function render$2(_ctx, _cache) { } __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 _hoisted_1$6 = ["aria-label"]; const minQueueCount = 1; const _sfc_main$6 = /* @__PURE__ */ defineComponent({ __name: "BatchCountEdit", @@ -2968,7 +3177,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({ } } }, null, 8, ["modelValue", "max", "pt"]) - ], 10, _hoisted_1$5)), [ + ], 10, _hoisted_1$6)), [ [ _directive_tooltip, _ctx.$t("menu.batchCount"), @@ -2980,7 +3189,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({ } }); const BatchCountEdit = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-26957f1f"]]); -const _hoisted_1$4 = { class: "queue-button-group flex" }; +const _hoisted_1$5 = { class: "queue-button-group flex" }; const _sfc_main$5 = /* @__PURE__ */ defineComponent({ __name: "ComfyQueueButton", setup(__props) { @@ -3033,7 +3242,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({ 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, [ + return openBlock(), createElementBlock("div", _hoisted_1$5, [ withDirectives((openBlock(), createBlock(unref(script$h), { class: "comfyui-queue-button", label: activeQueueModeMenuItem.value.label, @@ -3263,7 +3472,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({ }, { default: withCtx(() => [ createBaseVNode("div", { - class: "actionbar-content flex items-center", + class: "actionbar-content flex items-center select-none", ref_key: "panelRef", ref: panelRef }, [ @@ -3280,14 +3489,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({ }; } }); -const Actionbar = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-915e5456"]]); -const _hoisted_1$3 = { +const Actionbar = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ebd56d51"]]); +const _hoisted_1$4 = { 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] = [ + return openBlock(), createElementBlock("svg", _hoisted_1$4, _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" @@ -3296,13 +3505,13 @@ function render$1(_ctx, _cache) { } __name(render$1, "render$1"); const __unplugin_components_1 = markRaw({ name: "material-symbols-dock-to-bottom-outline", render: render$1 }); -const _hoisted_1$2 = { +const _hoisted_1$3 = { 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] = [ + 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-7h14V5H5z" @@ -3336,9 +3545,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({ }; } }); -const _hoisted_1$1 = ["href"]; -const _hoisted_2$1 = { class: "p-menubar-item-label" }; -const _hoisted_3$1 = { +const _hoisted_1$2 = ["href"]; +const _hoisted_2$2 = { class: "p-menubar-item-label" }; +const _hoisted_3$2 = { key: 1, class: "ml-auto border border-surface rounded text-muted text-xs text-nowrap p-1 keybinding-tag" }; @@ -3382,9 +3591,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({ 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) + createBaseVNode("span", _hoisted_2$2, toDisplayString(item.label), 1), + item?.comfyCommand?.keybinding ? (openBlock(), createElementBlock("span", _hoisted_3$2, toDisplayString(item.comfyCommand.keybinding.combo.toString()), 1)) : createCommentVNode("", true) + ], 16, _hoisted_1$2) ]), _: 1 }, 8, ["model", "pt"]); @@ -3392,9 +3601,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({ } }); 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 _hoisted_1$1 = { class: "flex-grow min-w-0 app-drag h-full" }; +const _hoisted_2$1 = { class: "window-actions-spacer flex-shrink-0" }; +const _hoisted_3$1 = { 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) { @@ -3405,9 +3614,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({ ); 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 ); @@ -3438,50 +3644,577 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({ 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] + 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$1, [ + workflowTabsPosition.value === "Topbar" ? (openBlock(), createBlock(WorkflowTabs, { key: 0 })) : createCommentVNode("", true) + ]), + createBaseVNode("div", { + class: "comfyui-menu-right flex-shrink-0", + 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$1, null, 512), [ + [vShow, menuSetting.value !== "Bottom"] ]) - ], 8, ["to"])), - withDirectives(createBaseVNode("div", _hoisted_3, null, 512), [ + ], 2), [ + [vShow, showTopMenu.value] + ]), + withDirectives(createBaseVNode("div", _hoisted_3$1, null, 512), [ [vShow, unref(isNativeWindow)() && !showTopMenu.value] ]) ], 64); }; } }); -const TopMenubar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-929e7543"]]); +const TopMenubar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-68d3b5b9"]]); +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(() => { + useLitegraphService().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"); var LatentPreviewMethod = /* @__PURE__ */ ((LatentPreviewMethod2) => { LatentPreviewMethod2["NoPreviews"] = "none"; LatentPreviewMethod2["Auto"] = "auto"; @@ -3959,535 +4692,6 @@ const SERVER_CONFIG_ITEMS = [ 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(); @@ -4518,6 +4722,19 @@ function setupAutoQueueHandler() { ); } __name(setupAutoQueueHandler, "setupAutoQueueHandler"); +const _hoisted_1 = { class: "comfyui-body grid h-screen w-screen overflow-hidden" }; +const _hoisted_2 = { + class: "comfyui-body-top", + id: "comfyui-body-top" +}; +const _hoisted_3 = { + class: "comfyui-body-bottom", + id: "comfyui-body-bottom" +}; +const _hoisted_4 = { + class: "graph-canvas-container", + id: "graph-canvas-container" +}; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "GraphView", setup(__props) { @@ -4588,9 +4805,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ i18n.global.locale.value = locale; } }); + const useNewMenu = computed(() => { + return settingStore.get("Comfy.UseNewMenu"); + }); watchEffect(() => { - const useNewMenu = settingStore.get("Comfy.UseNewMenu"); - if (useNewMenu === "Disabled") { + if (useNewMenu.value === "Disabled") { app.ui.menuContainer.style.setProperty("display", "block"); app.ui.restoreMenuPosition(); } else { @@ -4666,8 +4885,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ }, "onGraphReady"); return (_ctx, _cache) => { return openBlock(), createElementBlock(Fragment, null, [ - createVNode(TopMenubar), - createVNode(_sfc_main$8, { onReady: onGraphReady }), + createBaseVNode("div", _hoisted_1, [ + createBaseVNode("div", _hoisted_2, [ + useNewMenu.value === "Top" ? (openBlock(), createBlock(TopMenubar, { key: 0 })) : createCommentVNode("", true) + ]), + createBaseVNode("div", _hoisted_3, [ + useNewMenu.value === "Bottom" ? (openBlock(), createBlock(TopMenubar, { key: 0 })) : createCommentVNode("", true) + ]), + _cache[0] || (_cache[0] = createBaseVNode("div", { + class: "comfyui-body-left", + id: "comfyui-body-left" + }, null, -1)), + _cache[1] || (_cache[1] = createBaseVNode("div", { + class: "comfyui-body-right", + id: "comfyui-body-right" + }, null, -1)), + createBaseVNode("div", _hoisted_4, [ + 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), @@ -4676,7 +4912,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ }; } }); +const GraphView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e89d9273"]]); export { - _sfc_main as default + GraphView as default }; -//# sourceMappingURL=GraphView-D9ZzDQZV.js.map +//# sourceMappingURL=GraphView-CLFBgoGf.js.map diff --git a/web/assets/InstallView-CVZcZZXJ.js b/web/assets/InstallView-x9XCq0hC.js similarity index 95% rename from web/assets/InstallView-CVZcZZXJ.js rename to web/assets/InstallView-x9XCq0hC.js index 25d05f5f..9487ebf2 100644 --- a/web/assets/InstallView-CVZcZZXJ.js +++ b/web/assets/InstallView-x9XCq0hC.js @@ -1,9 +1,9 @@ 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-DqqhYDnY.js"; -import { s as script$b, a as script$c, b as script$d, c as script$e, d as script$f } from "./index-BNlqgrYT.js"; +import { d as defineComponent, T as ref, bq as useModel, o as openBlock, f as createElementBlock, m as createBaseVNode, E as toDisplayString, k as createVNode, j as unref, br as script, bl as script$1, as as withModifiers, z as withCtx, ac as script$2, I as useI18n, c as computed, aj as normalizeClass, B as createCommentVNode, a5 as script$3, a8 as createTextVNode, b9 as electronAPI, _ as _export_sfc, p as onMounted, r as resolveDirective, bk as script$4, i as withDirectives, bs as script$5, bt as script$6, l as script$7, y as createBlock, bn as script$8, bu as MigrationItems, w as watchEffect, F as Fragment, D as renderList, bv as script$9, bw as mergeModels, bx as ValidationState, X as normalizeI18nKey, N as watch, by as checkMirrorReachable, bz as _sfc_main$7, bA as isInChina, bB as mergeValidationStates, bg as t, b3 as script$a, bC as CUDA_TORCH_URL, bD as NIGHTLY_CPU_TORCH_URL, bi as useRouter, ah as toRaw } from "./index-DqXp9vW4.js"; +import { s as script$b, a as script$c, b as script$d, c as script$e, d as script$f } from "./index-A-dAhghd.js"; import { P as PYTHON_MIRROR, a as PYPI_MIRROR } from "./uvMirrors-B-HKMf6X.js"; -import { _ as _sfc_main$8 } from "./BaseViewTemplate-Cz111_1A.js"; +import { _ as _sfc_main$8 } from "./BaseViewTemplate-DlGljfEG.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" }; @@ -314,6 +314,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({ const pathExists = ref(false); const appData = ref(""); const appPath = ref(""); + const inputTouched = ref(false); const electron = electronAPI(); onMounted(async () => { const paths = await electron.getSystemPaths(); @@ -355,6 +356,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({ pathError.value = t2("install.failedToSelectDirectory"); } }, "browsePath"); + const onFocus = /* @__PURE__ */ __name(() => { + if (!inputTouched.value) { + inputTouched.value = true; + return; + } + validatePath(installPath.value); + }, "onFocus"); return (_ctx, _cache) => { const _directive_tooltip = resolveDirective("tooltip"); return openBlock(), createElementBlock("div", _hoisted_1$3, [ @@ -370,10 +378,16 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({ _cache[0] || (_cache[0] = ($event) => installPath.value = $event), validatePath ], - class: normalizeClass(["w-full", { "p-invalid": pathError.value }]) + class: normalizeClass(["w-full", { "p-invalid": pathError.value }]), + onFocus }, null, 8, ["modelValue", "class"]), withDirectives(createVNode(unref(script$5), { class: "pi pi-info-circle" }, null, 512), [ - [_directive_tooltip, _ctx.$t("install.installLocationTooltip")] + [ + _directive_tooltip, + _ctx.$t("install.installLocationTooltip"), + void 0, + { top: true } + ] ]) ]), _: 1 @@ -595,13 +609,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({ } }); 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, { + createVNode(_sfc_main$7, { 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"), @@ -653,11 +666,24 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({ }; } }, "getTorchMirrorItem"); - const mirrors = computed(() => [ - [PYTHON_MIRROR, pythonMirror], - [PYPI_MIRROR, pypiMirror], - [getTorchMirrorItem(__props.device), torchMirror] - ]); + const userIsInChina = ref(false); + onMounted(async () => { + userIsInChina.value = await isInChina(); + }); + const useFallbackMirror = /* @__PURE__ */ __name((mirror) => ({ + ...mirror, + mirror: mirror.fallbackMirror + }), "useFallbackMirror"); + const mirrors = computed( + () => [ + [PYTHON_MIRROR, pythonMirror], + [PYPI_MIRROR, pypiMirror], + [getTorchMirrorItem(__props.device), torchMirror] + ].map(([item, modelValue]) => [ + userIsInChina.value ? useFallbackMirror(item) : item, + modelValue + ]) + ); const validationStates = ref( mirrors.value.map(() => ValidationState.IDLE) ); @@ -942,4 +968,4 @@ const InstallView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data- export { InstallView as default }; -//# sourceMappingURL=InstallView-CVZcZZXJ.js.map +//# sourceMappingURL=InstallView-x9XCq0hC.js.map diff --git a/web/assets/KeybindingPanel-CeHhC2F4.js b/web/assets/KeybindingPanel-BIrxefrS.js similarity index 90% rename from web/assets/KeybindingPanel-CeHhC2F4.js rename to web/assets/KeybindingPanel-BIrxefrS.js index c14bb763..dc8d2ae3 100644 --- a/web/assets/KeybindingPanel-CeHhC2F4.js +++ b/web/assets/KeybindingPanel-BIrxefrS.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, 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-DqqhYDnY.js"; -import { g as script$1, h as script$3 } from "./index-BapOFhAR.js"; -import { u as useKeybindingService } from "./keybindingService-DEgCutrm.js"; -import "./index-DXE47DZl.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, a8 as createTextVNode, E as toDisplayString, j as unref, a5 as script, B as createCommentVNode, T as ref, dx as FilterMatchMode, ao as useKeybindingStore, J as useCommandStore, I as useI18n, X as normalizeI18nKey, w as watchEffect, aV as useToast, r as resolveDirective, y as createBlock, dy as SearchBox, m as createBaseVNode, l as script$2, bk as script$4, as as withModifiers, bn as script$5, ac as script$6, i as withDirectives, dz as _sfc_main$2, dA as KeyComboImpl, dB as KeybindingImpl, _ as _export_sfc } from "./index-DqXp9vW4.js"; +import { g as script$1, h as script$3 } from "./index-KUUE4Ew8.js"; +import { u as useKeybindingService } from "./keybindingService-DgS0S2M6.js"; +import "./index-BTHx8UHZ.js"; const _hoisted_1$1 = { key: 0, class: "px-2" @@ -96,6 +96,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ } __name(removeKeybinding, "removeKeybinding"); function captureKeybinding(event) { + if (!event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey) { + switch (event.key) { + case "Escape": + cancelEdit(); + return; + case "Enter": + saveKeybinding(); + return; + } + } const keyCombo = KeyComboImpl.fromEvent(event); newBindingKeyCombo.value = keyCombo; } @@ -151,7 +161,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ value: commandsData.value, selection: selectedCommandData.value, "onUpdate:selection": _cache[1] || (_cache[1] = ($event) => selectedCommandData.value = $event), - "global-filter-fields": ["id"], + "global-filter-fields": ["id", "label"], filters: filters.value, selectionMode: "single", stripedRows: "", @@ -216,7 +226,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ visible: editDialogVisible.value, "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => editDialogVisible.value = $event), modal: "", - header: currentEditingCommand.value?.id, + header: currentEditingCommand.value?.label, onHide: cancelEdit }, { footer: withCtx(() => [ @@ -275,8 +285,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ }; } }); -const KeybindingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2554ab36"]]); +const KeybindingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8454e24f"]]); export { KeybindingPanel as default }; -//# sourceMappingURL=KeybindingPanel-CeHhC2F4.js.map +//# sourceMappingURL=KeybindingPanel-BIrxefrS.js.map diff --git a/web/assets/KeybindingPanel-CDYVPYDp.css b/web/assets/KeybindingPanel-CDYVPYDp.css new file mode 100644 index 00000000..2392e4f5 --- /dev/null +++ b/web/assets/KeybindingPanel-CDYVPYDp.css @@ -0,0 +1,8 @@ + +[data-v-8454e24f] .p-datatable-tbody > tr > td { + padding: 0.25rem; + min-height: 2rem +} +[data-v-8454e24f] .p-datatable-row-selected .actions,[data-v-8454e24f] .p-datatable-selectable-row:hover .actions { + visibility: visible +} diff --git a/web/assets/KeybindingPanel-DvrUYZ4S.css b/web/assets/KeybindingPanel-DvrUYZ4S.css deleted file mode 100644 index 8f714bcd..00000000 --- a/web/assets/KeybindingPanel-DvrUYZ4S.css +++ /dev/null @@ -1,8 +0,0 @@ - -[data-v-2554ab36] .p-datatable-tbody > tr > td { - padding: 0.25rem; - min-height: 2rem -} -[data-v-2554ab36] .p-datatable-row-selected .actions,[data-v-2554ab36] .p-datatable-selectable-row:hover .actions { - visibility: visible -} diff --git a/web/assets/MaintenanceView-Df7CHNWW.js b/web/assets/MaintenanceView-BUmTZX1d.js similarity index 97% rename from web/assets/MaintenanceView-Df7CHNWW.js rename to web/assets/MaintenanceView-BUmTZX1d.js index 88056ab2..f52e9b16 100644 --- a/web/assets/MaintenanceView-Df7CHNWW.js +++ b/web/assets/MaintenanceView-BUmTZX1d.js @@ -1,396 +1,13 @@ 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-DqqhYDnY.js"; -import { j as script$1C, k as script$1E, g as script$20 } from "./index-DKIv7atk.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-BapOFhAR.js"; -import { s as script$1I } from "./index-DXE47DZl.js"; -import "./index-BNlqgrYT.js"; -import { _ as _sfc_main$7 } from "./BaseViewTemplate-Cz111_1A.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; +import { d as defineComponent, bw as mergeModels, bq as useModel, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, aj as normalizeClass, i as withDirectives, v as vShow, k as createVNode, j as unref, bE as script$1c, l as script$1d, c as computed, bF as PrimeIcons, bg as t, a5 as script$1e, b1 as inject, bG as BaseStyle, bH as script$1f, at as mergeProps, bI as Transition, C as resolveDynamicComponent, A as renderSlot, B as createCommentVNode, bJ as findSingle, bK as getAttribute, bL as focus, bM as script$1g, bN as script$1h, bO as Ripple, r as resolveDirective, bP as UniqueComponentId, bQ as script$1i, bR as resolveComponent, f as createElementBlock, F as Fragment, D as renderList, E as toDisplayString, bS as BaseDirective, bT as removeClass, bU as addClass, bV as createElement, bW as hasClass, bX as script$1j, bY as script$1k, bZ as ZIndex, b_ as addStyle, b$ as ConnectedOverlayScrollHandler, c0 as isTouchDevice, c1 as relativePosition, c2 as getOuterWidth, c3 as absolutePosition, c4 as find, c5 as getIndex, c6 as getFocusableElements, c7 as OverlayEventBus, c8 as setAttribute, c9 as localeComparator, bk as script$1l, ca as script$1m, cb as script$1n, n as normalizeStyle, a8 as createTextVNode, bj as withKeys, cc as resolveFieldData, cd as isNotEmpty, ce as equals, cf as script$1o, cg as isString, ch as isPrintableCharacter, ci as isEmpty, cj as findLastIndex, ck as script$1p, cl as script$1q, cm as script$1r, cn as uuid, a9 as script$1s, co as sort, cp as createSlots, cq as EventBus, H as markRaw, cr as resolve, cs as Tooltip, bm as script$1u, ac as script$1v, ct as script$1w, cu as script$1x, cv as script$1y, cw as script$1z, bn as script$1A, cx as normalizeProps, cy as blockBodyScroll, cz as isAttributeEquals, cA as unblockBodyScroll, cB as FocusTrap, cC as guardReactiveProps, cD as setCSSProperty, cE as $dt, cF as script$1C, cG as script$1E, cH as getUserAgent, br as script$1F, cI as script$1G, cJ as getFirstFocusableElement, cK as getLastFocusableElement, cL as FilterService, bv as script$1I, cM as script$1J, bt as script$1K, bs as script$1L, cN as script$1M, cO as findIndexInList, cP as scrollInView, cQ as script$1N, cR as script$1O, cS as script$1P, cT as findLast, cU as getWindowScrollTop, cV as getWidth, cW as getOffset, cX as vModelText, cY as script$1U, as as withModifiers, cZ as getVNodeProp, c_ as getNextElementSibling, c$ as getPreviousElementSibling, d0 as isClickable, d1 as _default, d2 as clearSelection, d3 as isRTL, b9 as electronAPI, a1 as defineStore, T as ref, d4 as useTimeout, N as watch, d5 as script$1Y, _ as _export_sfc, aV as useToast, d6 as useConfirm, bl as script$1Z, d7 as script$1_, p as onMounted, d8 as onUnmounted, aw as script$1$, ag as isRef } from "./index-DqXp9vW4.js"; +import { a as script$1B, b as script$1D, s as script$20 } from "./index-B0BQ8jlU.js"; +import "./index-DSWvxALN.js"; +import { s as script$1t, a as script$1Q, b as script$1R, c as script$1S, d as script$1V, e as script$1W, f as script$1X } from "./index-KUUE4Ew8.js"; +import { s as script$1T, _ as _sfc_main$7 } from "./TerminalOutputDrawer-BgTEspHP.js"; +import { s as script$1H } from "./index-BTHx8UHZ.js"; +import "./index-A-dAhghd.js"; +import { _ as _sfc_main$8 } from "./BaseViewTemplate-DlGljfEG.js"; const _sfc_main$6 = /* @__PURE__ */ defineComponent({ __name: "RefreshButton", props: /* @__PURE__ */ mergeModels({ @@ -406,7 +23,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({ const props = __props; const active3 = useModel(__props, "modelValue"); return (_ctx, _cache) => { - return openBlock(), createBlock(unref(script$1e), { + return openBlock(), createBlock(unref(script$1d), { class: "relative p-button-icon-only", outlined: props.outlined, severity: props.severity, @@ -422,7 +39,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({ class: "p-button-label", "data-pc-section": "label" }, " ", -1)), - withDirectives(createVNode(unref(script$1h), { class: "absolute w-1/2 h-1/2" }, null, 512), [ + withDirectives(createVNode(unref(script$1c), { class: "absolute w-1/2 h-1/2" }, null, 512), [ [vShow, active3.value] ]) ]), @@ -455,7 +72,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({ return t("maintenance.OK"); }); return (_ctx, _cache) => { - return openBlock(), createBlock(unref(script$1i), { + return openBlock(), createBlock(unref(script$1e), { icon: icon2.value, severity: severity.value, value: value2.value @@ -482,7 +99,7 @@ var AccordionContentStyle = BaseStyle.extend({ }); var script$1$N = { name: "BaseAccordionContent", - "extends": script$1d, + "extends": script$1f, props: { as: { type: [String, Object], @@ -494,7 +111,7 @@ var script$1$N = { } }, style: AccordionContentStyle, - provide: /* @__PURE__ */ __name(function provide2() { + provide: /* @__PURE__ */ __name(function provide() { return { $pcAccordionContent: this, $parentInstance: this @@ -572,7 +189,7 @@ var AccordionHeaderStyle = BaseStyle.extend({ }); var script$1$M = { name: "BaseAccordionHeader", - "extends": script$1d, + "extends": script$1f, props: { as: { type: [String, Object], @@ -584,7 +201,7 @@ var script$1$M = { } }, style: AccordionHeaderStyle, - provide: /* @__PURE__ */ __name(function provide3() { + provide: /* @__PURE__ */ __name(function provide2() { return { $pcAccordionHeader: this, $parentInstance: this @@ -603,7 +220,7 @@ var script$1a = { onClick: /* @__PURE__ */ __name(function onClick() { this.changeActiveValue(); }, "onClick"), - onKeydown: /* @__PURE__ */ __name(function onKeydown2(event2) { + onKeydown: /* @__PURE__ */ __name(function onKeydown(event2) { switch (event2.code) { case "ArrowDown": this.onArrowDownKey(event2); @@ -715,8 +332,8 @@ var script$1a = { }, "ptParams") }, components: { - ChevronUpIcon: script$1j, - ChevronDownIcon: script$1k + ChevronUpIcon: script$1g, + ChevronDownIcon: script$1h }, directives: { ripple: Ripple @@ -759,7 +376,7 @@ function render$11(_ctx, _cache, $props, $setup, $data, $options) { __name(render$11, "render$11"); script$1a.render = render$11; var classes$J = { - root: /* @__PURE__ */ __name(function root2(_ref) { + root: /* @__PURE__ */ __name(function root(_ref) { var instance = _ref.instance, props = _ref.props; return ["p-accordionpanel", { "p-accordionpanel-active": instance.active, @@ -773,7 +390,7 @@ var AccordionPanelStyle = BaseStyle.extend({ }); var script$1$L = { name: "BaseAccordionPanel", - "extends": script$1d, + "extends": script$1f, props: { value: { type: [String, Number], @@ -793,7 +410,7 @@ var script$1$L = { } }, style: AccordionPanelStyle, - provide: /* @__PURE__ */ __name(function provide4() { + provide: /* @__PURE__ */ __name(function provide3() { return { $pcAccordionPanel: this, $parentInstance: this @@ -846,7 +463,7 @@ function render$10(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$10, "render$10"); script$19.render = render$10; -var theme$C = /* @__PURE__ */ __name(function theme2(_ref) { +var theme$C = /* @__PURE__ */ __name(function theme(_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"); @@ -860,7 +477,7 @@ var AccordionStyle = BaseStyle.extend({ }); var script$1$K = { name: "BaseAccordion", - "extends": script$1d, + "extends": script$1f, props: { value: { type: [String, Number, Array], @@ -897,7 +514,7 @@ var script$1$K = { } }, style: AccordionStyle, - provide: /* @__PURE__ */ __name(function provide5() { + provide: /* @__PURE__ */ __name(function provide4() { return { $pcAccordion: this, $parentInstance: this @@ -909,7 +526,7 @@ var script$18 = { "extends": script$1$K, inheritAttrs: false, emits: ["update:value", "update:activeIndex", "tab-open", "tab-close", "tab-click"], - data: /* @__PURE__ */ __name(function data2() { + data: /* @__PURE__ */ __name(function data() { return { id: this.$attrs.id, d_value: this.value @@ -1040,8 +657,8 @@ var script$18 = { AccordionPanel: script$19, AccordionHeader: script$1a, AccordionContent: script$1b, - ChevronUpIcon: script$1j, - ChevronRightIcon: script$1l + ChevronUpIcon: script$1g, + ChevronRightIcon: script$1i } }; function render$$(_ctx, _cache, $props, $setup, $data, $options) { @@ -1115,7 +732,7 @@ var AccordionTabStyle = BaseStyle.extend({ }); var script$1$J = { name: "BaseAccordionTab", - "extends": script$1d, + "extends": script$1f, props: { header: null, headerStyle: null, @@ -1128,7 +745,7 @@ var script$1$J = { disabled: Boolean }, style: AccordionTabStyle, - provide: /* @__PURE__ */ __name(function provide6() { + provide: /* @__PURE__ */ __name(function provide5() { return { $pcAccordionTab: this, $parentInstance: this @@ -1284,9 +901,9 @@ var AnimateOnScroll = BaseAnimateOnScroll.extend("animateonscroll", { }, "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 _this$$value = this.$value, root34 = _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, + root: root34, rootMargin, threshold }; @@ -1349,12 +966,12 @@ var AnimateOnScroll = BaseAnimateOnScroll.extend("animateonscroll", { }, "unbindIntersectionObserver") } }); -var theme$B = /* @__PURE__ */ __name(function theme3(_ref) { +var theme$B = /* @__PURE__ */ __name(function theme2(_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) { + root: /* @__PURE__ */ __name(function root2(_ref2) { var props = _ref2.props; return ["p-avatar p-component", { "p-avatar-image": props.image != null, @@ -1373,7 +990,7 @@ var AvatarStyle = BaseStyle.extend({ }); var script$1$I = { name: "BaseAvatar", - "extends": script$1d, + "extends": script$1f, props: { label: { type: String, @@ -1405,7 +1022,7 @@ var script$1$I = { } }, style: AvatarStyle, - provide: /* @__PURE__ */ __name(function provide7() { + provide: /* @__PURE__ */ __name(function provide6() { return { $pcAvatar: this, $parentInstance: this @@ -1461,9 +1078,9 @@ var AvatarGroupStyle = BaseStyle.extend({ }); var script$1$H = { name: "BaseAvatarGroup", - "extends": script$1d, + "extends": script$1f, style: AvatarGroupStyle, - provide: /* @__PURE__ */ __name(function provide8() { + provide: /* @__PURE__ */ __name(function provide7() { return { $pcAvatarGroup: this, $parentInstance: this @@ -1577,7 +1194,7 @@ var BadgeDirective = BaseBadgeDirective.extend("badge", { el.appendChild(badge); this.$el = badge; }, "mounted"), - updated: /* @__PURE__ */ __name(function updated2(el, binding) { + updated: /* @__PURE__ */ __name(function updated(el, binding) { !this.isUnstyled() && addClass(el, "p-overlay-badge"); el.setAttribute("data-p-overlay-badge", "true"); if (binding.oldValue !== binding.value) { @@ -1598,7 +1215,7 @@ var BadgeDirective = BaseBadgeDirective.extend("badge", { } }, "updated") }); -var theme$A = /* @__PURE__ */ __name(function theme4(_ref) { +var theme$A = /* @__PURE__ */ __name(function theme3(_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"); @@ -1625,7 +1242,7 @@ var BreadcrumbStyle = BaseStyle.extend({ }); var script$2$9 = { name: "BaseBreadcrumb", - "extends": script$1d, + "extends": script$1f, props: { model: { type: Array, @@ -1637,7 +1254,7 @@ var script$2$9 = { } }, style: BreadcrumbStyle, - provide: /* @__PURE__ */ __name(function provide9() { + provide: /* @__PURE__ */ __name(function provide8() { return { $pcBreadcrumb: this, $parentInstance: this @@ -1647,7 +1264,7 @@ var script$2$9 = { var script$1$G = { name: "BreadcrumbItem", hostName: "Breadcrumb", - "extends": script$1d, + "extends": script$1f, props: { item: null, templates: null, @@ -1745,7 +1362,7 @@ var script$14 = { inheritAttrs: false, components: { BreadcrumbItem: script$1$G, - ChevronRightIcon: script$1l + ChevronRightIcon: script$1i } }; function render$X(_ctx, _cache, $props, $setup, $data, $options) { @@ -1788,7 +1405,7 @@ __name(render$X, "render$X"); script$14.render = render$X; var script$13 = { name: "CalendarIcon", - "extends": script$1m + "extends": script$1j }; function render$W(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -1804,12 +1421,12 @@ function render$W(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$W, "render$W"); script$13.render = render$W; -var theme$z = /* @__PURE__ */ __name(function theme5(_ref) { +var theme$z = /* @__PURE__ */ __name(function theme4(_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) { + root: /* @__PURE__ */ __name(function root3(_ref2) { var props = _ref2.props; return { position: props.appendTo === "self" ? "relative" : void 0 @@ -1817,7 +1434,7 @@ var inlineStyles$8 = { }, "root") }; var classes$D = { - root: /* @__PURE__ */ __name(function root5(_ref3) { + root: /* @__PURE__ */ __name(function root4(_ref3) { var instance = _ref3.instance, state = _ref3.state; return ["p-datepicker p-component p-inputwrapper", { "p-invalid": instance.$invalid, @@ -1908,7 +1525,7 @@ var DatePickerStyle = BaseStyle.extend({ }); var script$1$F = { name: "BaseDatePicker", - "extends": script$1n, + "extends": script$1k, props: { selectionMode: { type: String, @@ -2097,7 +1714,7 @@ var script$1$F = { }, todayButtonProps: { type: Object, - "default": /* @__PURE__ */ __name(function _default3() { + "default": /* @__PURE__ */ __name(function _default2() { return { severity: "secondary", text: true, @@ -2107,7 +1724,7 @@ var script$1$F = { }, clearButtonProps: { type: Object, - "default": /* @__PURE__ */ __name(function _default4() { + "default": /* @__PURE__ */ __name(function _default3() { return { severity: "secondary", text: true, @@ -2117,7 +1734,7 @@ var script$1$F = { }, navigatorButtonProps: { type: Object, - "default": /* @__PURE__ */ __name(function _default5() { + "default": /* @__PURE__ */ __name(function _default4() { return { severity: "secondary", text: true, @@ -2127,7 +1744,7 @@ var script$1$F = { }, timepickerButtonProps: { type: Object, - "default": /* @__PURE__ */ __name(function _default6() { + "default": /* @__PURE__ */ __name(function _default5() { return { severity: "secondary", text: true, @@ -2145,7 +1762,7 @@ var script$1$F = { } }, style: DatePickerStyle, - provide: /* @__PURE__ */ __name(function provide10() { + provide: /* @__PURE__ */ __name(function provide9() { return { $pcDatePicker: this, $parentInstance: this @@ -2246,7 +1863,7 @@ var script$12 = { timePickerTimer: null, preventFocus: false, typeUpdate: false, - data: /* @__PURE__ */ __name(function data3() { + data: /* @__PURE__ */ __name(function data2() { return { d_id: this.id, currentMonth: null, @@ -2326,7 +1943,7 @@ var script$12 = { this.input.value = this.inputFieldValue; } }, "mounted"), - updated: /* @__PURE__ */ __name(function updated3() { + updated: /* @__PURE__ */ __name(function updated2() { if (this.overlay) { this.preventFocus = true; setTimeout(this.updateFocus, 0); @@ -2338,7 +1955,7 @@ var script$12 = { this.selectionEnd = null; } }, "updated"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount2() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount() { if (this.timePickerTimer) { clearTimeout(this.timePickerTimer); } @@ -2674,7 +2291,7 @@ var script$12 = { 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() { + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener() { var _this3 = this; if (!this.outsideClickListener) { this.outsideClickListener = function(event2) { @@ -2685,7 +2302,7 @@ var script$12 = { document.addEventListener("mousedown", this.outsideClickListener); } }, "bindOutsideClickListener"), - unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener2() { + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener() { if (this.outsideClickListener) { document.removeEventListener("mousedown", this.outsideClickListener); this.outsideClickListener = null; @@ -2743,7 +2360,7 @@ var script$12 = { this.matchMediaListener = null; } }, "unbindMatchMediaListener"), - isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked2(event2) { + isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked(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) { @@ -4405,14 +4022,14 @@ var script$12 = { }, "panelId") }, components: { - InputText: script$1o, - Button: script$1e, - Portal: script$1f, + InputText: script$1l, + Button: script$1d, + Portal: script$1m, CalendarIcon: script$13, - ChevronLeftIcon: script$1p, - ChevronRightIcon: script$1l, - ChevronUpIcon: script$1j, - ChevronDownIcon: script$1k + ChevronLeftIcon: script$1n, + ChevronRightIcon: script$1i, + ChevronUpIcon: script$1g, + ChevronDownIcon: script$1h }, directives: { ripple: Ripple @@ -4425,7 +4042,7 @@ 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_8$2 = ["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"]; @@ -4704,7 +4321,7 @@ function render$V(_ctx, _cache, $props, $setup, $data, $options) { }), { "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) { + })], 16, _hoisted_8$2)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList($options.weekDays, function(weekDay) { return openBlock(), createElementBlock("th", mergeProps({ key: weekDay, scope: "col", @@ -4780,7 +4397,7 @@ function render$V(_ctx, _cache, $props, $setup, $data, $options) { return $options.onDateSelect($event, date); }, "onClick"), draggable: "false", - onKeydown: /* @__PURE__ */ __name(function onKeydown6($event) { + onKeydown: /* @__PURE__ */ __name(function onKeydown5($event) { return $options.onDateCellKeydown($event, date, groupIndex); }, "onKeydown"), "aria-selected": $options.isSelected(date), @@ -4824,7 +4441,7 @@ function render$V(_ctx, _cache, $props, $setup, $data, $options) { index: i }); }, "onClick"), - onKeydown: /* @__PURE__ */ __name(function onKeydown6($event) { + onKeydown: /* @__PURE__ */ __name(function onKeydown5($event) { return $options.onMonthCellKeydown($event, { month: m, index: i @@ -4862,7 +4479,7 @@ function render$V(_ctx, _cache, $props, $setup, $data, $options) { onClick: /* @__PURE__ */ __name(function onClick11($event) { return $options.onYearSelect($event, y); }, "onClick"), - onKeydown: /* @__PURE__ */ __name(function onKeydown6($event) { + onKeydown: /* @__PURE__ */ __name(function onKeydown5($event) { return $options.onYearCellKeydown($event, y); }, "onKeydown"), "class": _ctx.cx("year", { @@ -5250,12 +4867,12 @@ var script$11 = { var CalendarStyle = BaseStyle.extend({ name: "calendar" }); -var theme$y = /* @__PURE__ */ __name(function theme6(_ref) { +var theme$y = /* @__PURE__ */ __name(function theme5(_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) { + root: /* @__PURE__ */ __name(function root5(_ref2) { var props = _ref2.props; return { position: props.appendTo === "self" ? "relative" : void 0 @@ -5263,7 +4880,7 @@ var inlineStyles$7 = { }, "root") }; var classes$C = { - root: /* @__PURE__ */ __name(function root7(_ref3) { + root: /* @__PURE__ */ __name(function root6(_ref3) { var instance = _ref3.instance, props = _ref3.props; return ["p-cascadeselect p-component p-inputwrapper", { "p-cascadeselect-mobile": instance.queryMatches, @@ -5321,7 +4938,7 @@ var CascadeSelectStyle = BaseStyle.extend({ }); var script$2$8 = { name: "BaseCascadeSelect", - "extends": script$1n, + "extends": script$1k, props: { options: Array, optionLabel: null, @@ -5453,7 +5070,7 @@ var script$2$8 = { } }, style: CascadeSelectStyle, - provide: /* @__PURE__ */ __name(function provide11() { + provide: /* @__PURE__ */ __name(function provide10() { return { $pcCascadeSelect: this, $parentInstance: this @@ -5463,7 +5080,7 @@ var script$2$8 = { var script$1$E = { name: "CascadeSelectSub", hostName: "CascadeSelect", - "extends": script$1d, + "extends": script$1f, emits: ["option-change", "option-focus-change", "option-focus-enter-change"], container: null, props: { @@ -5552,7 +5169,7 @@ var script$1$E = { processedOption }); }, "onOptionMouseMove"), - containerRef: /* @__PURE__ */ __name(function containerRef2(el) { + containerRef: /* @__PURE__ */ __name(function containerRef(el) { this.container = el; }, "containerRef"), listAriaLabel: /* @__PURE__ */ __name(function listAriaLabel() { @@ -5563,7 +5180,7 @@ var script$1$E = { ripple: Ripple }, components: { - AngleRightIcon: script$1q + AngleRightIcon: script$1o } }; 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"]; @@ -5728,7 +5345,7 @@ var script$10 = { overlay: null, searchTimeout: null, searchValue: null, - data: /* @__PURE__ */ __name(function data4() { + data: /* @__PURE__ */ __name(function data3() { return { id: this.$attrs.id, clicked: false, @@ -5759,7 +5376,7 @@ var script$10 = { this.autoUpdateModel(); this.bindMatchMediaListener(); }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount3() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount2() { this.unbindOutsideClickListener(); this.unbindResizeListener(); this.unbindMatchMediaListener(); @@ -5822,7 +5439,7 @@ var script$10 = { } isFocus && focus(this.$refs.focusInput); }, "show"), - hide: /* @__PURE__ */ __name(function hide2(isFocus) { + hide: /* @__PURE__ */ __name(function hide(isFocus) { var _this = this; var _hide = /* @__PURE__ */ __name(function _hide2() { _this.$emit("before-hide"); @@ -6068,13 +5685,13 @@ var script$10 = { 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); + var root34 = 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) { + if (!root34) { this.focusedOptionInfo = { index: -1, parentKey: parentOption ? parentOption.parentKey : "" @@ -6191,7 +5808,7 @@ var script$10 = { absolutePosition(this.overlay, this.$el); } }, "alignOverlay"), - bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener3() { + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener2() { var _this3 = this; if (!this.outsideClickListener) { this.outsideClickListener = function(event2) { @@ -6202,7 +5819,7 @@ var script$10 = { document.addEventListener("click", this.outsideClickListener); } }, "bindOutsideClickListener"), - unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener3() { + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener2() { if (this.outsideClickListener) { document.removeEventListener("click", this.outsideClickListener); this.outsideClickListener = null; @@ -6507,11 +6124,11 @@ var script$10 = { }, components: { CascadeSelectSub: script$1$E, - Portal: script$1f, - ChevronDownIcon: script$1k, - SpinnerIcon: script$1r, - AngleRightIcon: script$1q, - TimesIcon: script$1g + Portal: script$1m, + ChevronDownIcon: script$1h, + SpinnerIcon: script$1p, + AngleRightIcon: script$1o, + TimesIcon: script$1q } }; function _typeof$k(o) { @@ -6729,7 +6346,7 @@ function render$U(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$U, "render$U"); script$10.render = render$U; -var theme$x = /* @__PURE__ */ __name(function theme7(_ref) { +var theme$x = /* @__PURE__ */ __name(function theme6(_ref) { _ref.dt; return "\n.p-checkbox-group {\n display: inline-flex;\n}\n"; }, "theme"); @@ -6743,9 +6360,9 @@ var CheckboxGroupStyle = BaseStyle.extend({ }); var script$1$D = { name: "BaseCheckboxGroup", - "extends": script$1s, + "extends": script$1r, style: CheckboxGroupStyle, - provide: /* @__PURE__ */ __name(function provide12() { + provide: /* @__PURE__ */ __name(function provide11() { return { $pcCheckboxGroup: this, $parentInstance: this @@ -6756,7 +6373,7 @@ var script$$ = { name: "CheckboxGroup", "extends": script$1$D, inheritAttrs: false, - data: /* @__PURE__ */ __name(function data5() { + data: /* @__PURE__ */ __name(function data4() { return { groupName: this.name }; @@ -6777,12 +6394,12 @@ function render$T(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$T, "render$T"); script$$.render = render$T; -var theme$w = /* @__PURE__ */ __name(function theme8(_ref) { +var theme$w = /* @__PURE__ */ __name(function theme7(_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) { + root: /* @__PURE__ */ __name(function root7(_ref2) { var instance = _ref2.instance, props = _ref2.props; return ["p-inputchips p-component p-inputwrapper", { "p-disabled": props.disabled, @@ -6815,7 +6432,7 @@ var InputChipsStyle = BaseStyle.extend({ }); var script$1$C = { name: "BaseInputChips", - "extends": script$1d, + "extends": script$1f, props: { modelValue: { type: Array, @@ -6887,7 +6504,7 @@ var script$1$C = { } }, style: InputChipsStyle, - provide: /* @__PURE__ */ __name(function provide13() { + provide: /* @__PURE__ */ __name(function provide12() { return { $pcInputChips: this, $parentInstance: this @@ -6929,7 +6546,7 @@ var script$_ = { "extends": script$1$C, inheritAttrs: false, emits: ["update:modelValue", "add", "remove", "focus", "blur"], - data: /* @__PURE__ */ __name(function data6() { + data: /* @__PURE__ */ __name(function data5() { return { id: this.$attrs.id, inputValue: null, @@ -7106,7 +6723,7 @@ var script$_ = { }, "focusedOptionId") }, components: { - Chip: script$1t + Chip: script$1s } }; function _typeof$j(o) { @@ -7281,7 +6898,7 @@ var ColumnGroupStyle = BaseStyle.extend({ }); var script$1$B = { name: "BaseColumnGroup", - "extends": script$1d, + "extends": script$1f, props: { type: { type: String, @@ -7289,7 +6906,7 @@ var script$1$B = { } }, style: ColumnGroupStyle, - provide: /* @__PURE__ */ __name(function provide14() { + provide: /* @__PURE__ */ __name(function provide13() { return { $pcColumnGroup: this, $parentInstance: this @@ -7313,12 +6930,12 @@ var script$Y = { return null; }, "render") }; -var theme$v = /* @__PURE__ */ __name(function theme9(_ref) { +var theme$v = /* @__PURE__ */ __name(function theme8(_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) { + root: /* @__PURE__ */ __name(function root8(_ref2) { var props = _ref2.props; return ["p-dataview p-component", { "p-dataview-list": props.layout === "list", @@ -7342,7 +6959,7 @@ var DataViewStyle = BaseStyle.extend({ }); var script$1$A = { name: "BaseDataView", - "extends": script$1d, + "extends": script$1f, props: { value: { type: Array, @@ -7410,7 +7027,7 @@ var script$1$A = { } }, style: DataViewStyle, - provide: /* @__PURE__ */ __name(function provide15() { + provide: /* @__PURE__ */ __name(function provide14() { return { $pcDataView: this, $parentInstance: this @@ -7452,7 +7069,7 @@ var script$X = { "extends": script$1$A, inheritAttrs: false, emits: ["update:first", "update:rows", "page"], - data: /* @__PURE__ */ __name(function data7() { + data: /* @__PURE__ */ __name(function data6() { return { d_first: this.first, d_rows: this.rows @@ -7523,15 +7140,15 @@ var script$X = { }, "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(); + var data40 = this.value; + if (data40 && data40.length && this.sortField) { + data40 = this.sort(); } if (this.paginator) { var first3 = this.lazy ? 0 : this.d_first; - return data41.slice(first3, first3 + this.d_rows); + return data40.slice(first3, first3 + this.d_rows); } else { - return data41; + return data40; } } else { return null; @@ -7539,7 +7156,7 @@ var script$X = { }, "items") }, components: { - DVPaginator: script$1u + DVPaginator: script$1t } }; function render$R(_ctx, _cache, $props, $setup, $data, $options) { @@ -7678,11 +7295,11 @@ var DeferredContentStyle = BaseStyle.extend({ }); var script$W = { name: "DeferredContent", - "extends": script$1d, + "extends": script$1f, inheritAttrs: false, emits: ["load"], style: DeferredContentStyle, - data: /* @__PURE__ */ __name(function data8() { + data: /* @__PURE__ */ __name(function data7() { return { loaded: false }; @@ -7693,7 +7310,7 @@ var script$W = { else this.bindScrollListener(); } }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount4() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount3() { this.unbindScrollListener(); }, "beforeUnmount"), methods: { @@ -7764,12 +7381,12 @@ var DialogService = { app.provide(PrimeVueDialogSymbol, DialogService2); }, "install") }; -var theme$u = /* @__PURE__ */ __name(function theme10(_ref) { +var theme$u = /* @__PURE__ */ __name(function theme9(_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) { + root: /* @__PURE__ */ __name(function root9(_ref2) { var instance = _ref2.instance, props = _ref2.props; return ["p-dock p-component", "p-dock-".concat(props.position), { "p-dock-mobile": instance.queryMatches @@ -7795,7 +7412,7 @@ var DockStyle = BaseStyle.extend({ }); var script$2$7 = { name: "BaseDock", - "extends": script$1d, + "extends": script$1f, props: { position: { type: String, @@ -7827,7 +7444,7 @@ var script$2$7 = { } }, style: DockStyle, - provide: /* @__PURE__ */ __name(function provide16() { + provide: /* @__PURE__ */ __name(function provide15() { return { $pcDock: this, $parentInstance: this @@ -7867,7 +7484,7 @@ __name(_arrayLikeToArray$b, "_arrayLikeToArray$b"); var script$1$z = { name: "DockSub", hostName: "Dock", - "extends": script$1d, + "extends": script$1f, emits: ["focus", "blur"], props: { position: { @@ -7900,7 +7517,7 @@ var script$1$z = { "default": null } }, - data: /* @__PURE__ */ __name(function data9() { + data: /* @__PURE__ */ __name(function data8() { return { id: this.menuId, currentIndex: -3, @@ -8156,7 +7773,7 @@ var script$V = { "extends": script$2$7, inheritAttrs: false, matchMediaListener: null, - data: /* @__PURE__ */ __name(function data10() { + data: /* @__PURE__ */ __name(function data9() { return { query: null, queryMatches: false @@ -8165,7 +7782,7 @@ var script$V = { mounted: /* @__PURE__ */ __name(function mounted14() { this.bindMatchMediaListener(); }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount5() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount4() { this.unbindMatchMediaListener(); }, "beforeUnmount"), methods: { @@ -8220,7 +7837,7 @@ __name(render$P, "render$P"); script$V.render = render$P; var script$U = { name: "Dropdown", - "extends": script$1v, + "extends": script$1u, mounted: /* @__PURE__ */ __name(function mounted15() { console.warn("Deprecated since v4. Use Select component instead."); }, "mounted") @@ -8233,10 +7850,10 @@ var DynamicDialogStyle = BaseStyle.extend({ }); var script$1$y = { name: "BaseDynamicDialog", - "extends": script$1d, + "extends": script$1f, props: {}, style: DynamicDialogStyle, - provide: /* @__PURE__ */ __name(function provide17() { + provide: /* @__PURE__ */ __name(function provide16() { return { $pcDynamicDialog: this, $parentInstance: this @@ -8247,7 +7864,7 @@ var script$T = { name: "DynamicDialog", "extends": script$1$y, inheritAttrs: false, - data: /* @__PURE__ */ __name(function data11() { + data: /* @__PURE__ */ __name(function data10() { return { instanceMap: {} }; @@ -8280,7 +7897,7 @@ var script$T = { DynamicDialogEventBus.on("open", this.openListener); DynamicDialogEventBus.on("close", this.closeListener); }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount6() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount5() { DynamicDialogEventBus.off("open", this.openListener); DynamicDialogEventBus.off("close", this.closeListener); }, "beforeUnmount"), @@ -8300,7 +7917,7 @@ var script$T = { }, "getTemplateItems") }, components: { - DDialog: script$1w + DDialog: script$1v } }; function render$O(_ctx, _cache, $props, $setup, $data, $options) { @@ -8353,12 +7970,12 @@ function render$O(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$O, "render$O"); script$T.render = render$O; -var theme$t = /* @__PURE__ */ __name(function theme11(_ref) { +var theme$t = /* @__PURE__ */ __name(function theme10(_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) { + root: /* @__PURE__ */ __name(function root10(_ref2) { var props = _ref2.props; return ["p-fieldset p-component", { "p-fieldset-toggleable": props.toggleable @@ -8378,7 +7995,7 @@ var FieldsetStyle = BaseStyle.extend({ }); var script$1$x = { name: "BaseFieldset", - "extends": script$1d, + "extends": script$1f, props: { legend: String, toggleable: Boolean, @@ -8389,7 +8006,7 @@ var script$1$x = { } }, style: FieldsetStyle, - provide: /* @__PURE__ */ __name(function provide18() { + provide: /* @__PURE__ */ __name(function provide17() { return { $pcFieldset: this, $parentInstance: this @@ -8401,7 +8018,7 @@ var script$S = { "extends": script$1$x, inheritAttrs: false, emits: ["update:collapsed", "toggle"], - data: /* @__PURE__ */ __name(function data12() { + data: /* @__PURE__ */ __name(function data11() { return { id: this.$attrs.id, d_collapsed: this.collapsed @@ -8443,8 +8060,8 @@ var script$S = { ripple: Ripple }, components: { - PlusIcon: script$1x, - MinusIcon: script$1y + PlusIcon: script$1w, + MinusIcon: script$1x } }; function _typeof$i(o) { @@ -8559,7 +8176,7 @@ __name(render$N, "render$N"); script$S.render = render$N; var script$R = { name: "UploadIcon", - "extends": script$1m + "extends": script$1j }; function render$M(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -8577,12 +8194,12 @@ function render$M(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$M, "render$M"); script$R.render = render$M; -var theme$s = /* @__PURE__ */ __name(function theme12(_ref) { +var theme$s = /* @__PURE__ */ __name(function theme11(_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) { + root: /* @__PURE__ */ __name(function root11(_ref2) { var props = _ref2.props; return ["p-fileupload p-fileupload-".concat(props.mode, " p-component")]; }, "root"), @@ -8608,7 +8225,7 @@ var FileUploadStyle = BaseStyle.extend({ }); var script$2$6 = { name: "BaseFileUpload", - "extends": script$1d, + "extends": script$1f, props: { name: { type: String, @@ -8710,7 +8327,7 @@ var script$2$6 = { }, uploadButtonProps: { type: Object, - "default": /* @__PURE__ */ __name(function _default7() { + "default": /* @__PURE__ */ __name(function _default6() { return { severity: "secondary" }; @@ -8718,7 +8335,7 @@ var script$2$6 = { }, cancelButtonProps: { type: Object, - "default": /* @__PURE__ */ __name(function _default8() { + "default": /* @__PURE__ */ __name(function _default7() { return { severity: "secondary" }; @@ -8726,7 +8343,7 @@ var script$2$6 = { } }, style: FileUploadStyle, - provide: /* @__PURE__ */ __name(function provide19() { + provide: /* @__PURE__ */ __name(function provide18() { return { $pcFileUpload: this, $parentInstance: this @@ -8736,12 +8353,12 @@ var script$2$6 = { var script$1$w = { name: "FileContent", hostName: "FileUpload", - "extends": script$1d, + "extends": script$1f, emits: ["remove"], props: { files: { type: Array, - "default": /* @__PURE__ */ __name(function _default9() { + "default": /* @__PURE__ */ __name(function _default8() { return []; }, "_default") }, @@ -8777,9 +8394,9 @@ var script$1$w = { }, "formatSize") }, components: { - Button: script$1e, - Badge: script$1z, - TimesIcon: script$1g + Button: script$1d, + Badge: script$1y, + TimesIcon: script$1q } }; var _hoisted_1$1$5 = ["alt", "src", "width"]; @@ -8915,7 +8532,7 @@ var script$Q = { inheritAttrs: false, emits: ["select", "uploader", "before-upload", "progress", "upload", "error", "before-send", "clear", "remove", "remove-uploaded-file"], duplicateIEEvent: false, - data: /* @__PURE__ */ __name(function data13() { + data: /* @__PURE__ */ __name(function data12() { return { uploadedFileCount: 0, files: [], @@ -9262,13 +8879,13 @@ var script$Q = { }, "pendingLabel") }, components: { - Button: script$1e, - ProgressBar: script$1A, - Message: script$1B, + Button: script$1d, + ProgressBar: script$1z, + Message: script$1A, FileContent: script$1$w, - PlusIcon: script$1x, + PlusIcon: script$1w, UploadIcon: script$R, - TimesIcon: script$1g + TimesIcon: script$1q }, directives: { ripple: Ripple @@ -9512,9 +9129,9 @@ var FluidStyle = BaseStyle.extend({ }); var script$1$v = { name: "BaseFluid", - "extends": script$1d, + "extends": script$1f, style: FluidStyle, - provide: /* @__PURE__ */ __name(function provide20() { + provide: /* @__PURE__ */ __name(function provide19() { return { $pcFluid: this, $parentInstance: this @@ -9533,7 +9150,7 @@ function render$K(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$K, "render$K"); script$P.render = render$K; -var theme$r = /* @__PURE__ */ __name(function theme13(_ref) { +var theme$r = /* @__PURE__ */ __name(function theme12(_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"); @@ -9547,9 +9164,9 @@ var IftaLabelStyle = BaseStyle.extend({ }); var script$1$u = { name: "BaseIftaLabel", - "extends": script$1d, + "extends": script$1f, style: IftaLabelStyle, - provide: /* @__PURE__ */ __name(function provide21() { + provide: /* @__PURE__ */ __name(function provide20() { return { $pcIftaLabel: this, $parentInstance: this @@ -9570,7 +9187,7 @@ __name(render$J, "render$J"); script$O.render = render$J; var script$N = { name: "EyeIcon", - "extends": script$1m + "extends": script$1j }; function render$I(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -9590,7 +9207,7 @@ __name(render$I, "render$I"); script$N.render = render$I; var script$M = { name: "RefreshIcon", - "extends": script$1m + "extends": script$1j }; function render$H(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -9610,7 +9227,7 @@ __name(render$H, "render$H"); script$M.render = render$H; var script$L = { name: "SearchMinusIcon", - "extends": script$1m + "extends": script$1j }; function render$G(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -9630,7 +9247,7 @@ __name(render$G, "render$G"); script$L.render = render$G; var script$K = { name: "SearchPlusIcon", - "extends": script$1m + "extends": script$1j }; function render$F(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -9650,7 +9267,7 @@ __name(render$F, "render$F"); script$K.render = render$F; var script$J = { name: "UndoIcon", - "extends": script$1m + "extends": script$1j }; function render$E(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -9668,12 +9285,12 @@ function render$E(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$E, "render$E"); script$J.render = render$E; -var theme$q = /* @__PURE__ */ __name(function theme14(_ref) { +var theme$q = /* @__PURE__ */ __name(function theme13(_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) { + root: /* @__PURE__ */ __name(function root12(_ref2) { var props = _ref2.props; return ["p-image p-component", { "p-image-preview": props.preview @@ -9707,7 +9324,7 @@ var ImageStyle = BaseStyle.extend({ }); var script$1$t = { name: "BaseImage", - "extends": script$1d, + "extends": script$1f, props: { preview: { type: Boolean, @@ -9751,7 +9368,7 @@ var script$1$t = { } }, style: ImageStyle, - provide: /* @__PURE__ */ __name(function provide22() { + provide: /* @__PURE__ */ __name(function provide21() { return { $pcImage: this, $parentInstance: this @@ -9764,7 +9381,7 @@ var script$I = { inheritAttrs: false, emits: ["show", "hide", "error"], mask: null, - data: /* @__PURE__ */ __name(function data14() { + data: /* @__PURE__ */ __name(function data13() { return { maskVisible: false, previewVisible: false, @@ -9772,13 +9389,13 @@ var script$I = { scale: 1 }; }, "data"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount7() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount6() { if (this.mask) { ZIndex.clear(this.container); } }, "beforeUnmount"), methods: { - maskRef: /* @__PURE__ */ __name(function maskRef2(el) { + maskRef: /* @__PURE__ */ __name(function maskRef(el) { this.mask = el; }, "maskRef"), toolbarRef: /* @__PURE__ */ __name(function toolbarRef(el) { @@ -9797,7 +9414,7 @@ var script$I = { onPreviewImageClick: /* @__PURE__ */ __name(function onPreviewImageClick() { this.previewClick = true; }, "onPreviewImageClick"), - onMaskClick: /* @__PURE__ */ __name(function onMaskClick2(event2) { + onMaskClick: /* @__PURE__ */ __name(function onMaskClick(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; @@ -9840,18 +9457,18 @@ var script$I = { onBeforeEnter: /* @__PURE__ */ __name(function onBeforeEnter() { ZIndex.set("modal", this.mask, this.$primevue.config.zIndex.modal); }, "onBeforeEnter"), - onEnter: /* @__PURE__ */ __name(function onEnter2() { + onEnter: /* @__PURE__ */ __name(function onEnter() { this.focus(); this.$emit("show"); }, "onEnter"), - onBeforeLeave: /* @__PURE__ */ __name(function onBeforeLeave2() { + onBeforeLeave: /* @__PURE__ */ __name(function onBeforeLeave() { !this.isUnstyled && addClass(this.mask, "p-overlay-mask-leave"); }, "onBeforeLeave"), - onLeave: /* @__PURE__ */ __name(function onLeave2() { + onLeave: /* @__PURE__ */ __name(function onLeave() { unblockBodyScroll(); this.$emit("hide"); }, "onLeave"), - onAfterLeave: /* @__PURE__ */ __name(function onAfterLeave2(el) { + onAfterLeave: /* @__PURE__ */ __name(function onAfterLeave(el) { ZIndex.clear(el); this.maskVisible = false; }, "onAfterLeave"), @@ -9901,18 +9518,18 @@ var script$I = { 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() { + closeAriaLabel: /* @__PURE__ */ __name(function closeAriaLabel() { return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : void 0; }, "closeAriaLabel") }, components: { - Portal: script$1f, + Portal: script$1m, EyeIcon: script$N, RefreshIcon: script$M, UndoIcon: script$J, SearchMinusIcon: script$L, SearchPlusIcon: script$K, - TimesIcon: script$1g + TimesIcon: script$1q }, directives: { focustrap: FocusTrap @@ -9977,7 +9594,7 @@ 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"]; +var _hoisted_8$1 = ["src"]; function render$D(_ctx, _cache, $props, $setup, $data, $options) { var _component_RefreshIcon = resolveComponent("RefreshIcon"); var _component_UndoIcon = resolveComponent("UndoIcon"); @@ -10109,7 +9726,7 @@ function render$D(_ctx, _cache, $props, $setup, $data, $options) { onClick: _cache[7] || (_cache[7] = function() { return $options.onPreviewImageClick && $options.onPreviewImageClick.apply($options, arguments); }) - }, _ctx.ptm("original")), null, 16, _hoisted_8)]; + }, _ctx.ptm("original")), null, 16, _hoisted_8$1)]; })], 16)) : createCommentVNode("", true)]; }), _: 3 @@ -10120,7 +9737,7 @@ function render$D(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$D, "render$D"); script$I.render = render$D; -var theme$p = /* @__PURE__ */ __name(function theme15(_ref) { +var theme$p = /* @__PURE__ */ __name(function theme14(_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"); @@ -10135,7 +9752,7 @@ var ImageCompareStyle = BaseStyle.extend({ }); var script$1$s = { name: "BaseImageCompare", - "extends": script$1d, + "extends": script$1f, props: { tabindex: { type: Number, @@ -10151,7 +9768,7 @@ var script$1$s = { } }, style: ImageCompareStyle, - provide: /* @__PURE__ */ __name(function provide23() { + provide: /* @__PURE__ */ __name(function provide22() { return { $pcImageCompare: this, $parentInstance: this @@ -10188,12 +9805,12 @@ function render$C(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$C, "render$C"); script$H.render = render$C; -var theme$o = /* @__PURE__ */ __name(function theme16(_ref) { +var theme$o = /* @__PURE__ */ __name(function theme15(_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) { + root: /* @__PURE__ */ __name(function root13(_ref2) { var props = _ref2.props, instance = _ref2.instance; return ["p-inlinemessage p-component p-inlinemessage-" + props.severity, { "p-inlinemessage-icon-only": !instance.$slots["default"] @@ -10212,7 +9829,7 @@ var InlineMessageStyle = BaseStyle.extend({ }); var script$1$r = { name: "BaseInlineMessage", - "extends": script$1d, + "extends": script$1f, props: { severity: { type: String, @@ -10224,7 +9841,7 @@ var script$1$r = { } }, style: InlineMessageStyle, - provide: /* @__PURE__ */ __name(function provide24() { + provide: /* @__PURE__ */ __name(function provide23() { return { $pcInlineMessage: this, $parentInstance: this @@ -10236,7 +9853,7 @@ var script$G = { "extends": script$1$r, inheritAttrs: false, timeout: null, - data: /* @__PURE__ */ __name(function data15() { + data: /* @__PURE__ */ __name(function data14() { return { visible: true }; @@ -10252,10 +9869,10 @@ var script$G = { computed: { iconComponent: /* @__PURE__ */ __name(function iconComponent() { return { - info: script$1C, - success: script$1D, - warn: script$1E, - error: script$1F + info: script$1B, + success: script$1C, + warn: script$1D, + error: script$1E }[this.severity]; }, "iconComponent") } @@ -10277,7 +9894,7 @@ function render$B(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$B, "render$B"); script$G.render = render$B; -var theme$n = /* @__PURE__ */ __name(function theme17(_ref) { +var theme$n = /* @__PURE__ */ __name(function theme16(_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"); @@ -10298,7 +9915,7 @@ var InplaceStyle = BaseStyle.extend({ }); var script$1$q = { name: "BaseInplace", - "extends": script$1d, + "extends": script$1f, props: { active: { type: Boolean, @@ -10314,7 +9931,7 @@ var script$1$q = { } }, style: InplaceStyle, - provide: /* @__PURE__ */ __name(function provide25() { + provide: /* @__PURE__ */ __name(function provide24() { return { $pcInplace: this, $parentInstance: this @@ -10326,7 +9943,7 @@ var script$F = { "extends": script$1$q, inheritAttrs: false, emits: ["open", "close", "update:active"], - data: /* @__PURE__ */ __name(function data16() { + data: /* @__PURE__ */ __name(function data15() { return { d_active: this.active }; @@ -10434,7 +10051,7 @@ function render$A(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$A, "render$A"); script$F.render = render$A; -var theme$m = /* @__PURE__ */ __name(function theme18(_ref) { +var theme$m = /* @__PURE__ */ __name(function theme17(_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"); @@ -10448,9 +10065,9 @@ var InputGroupStyle = BaseStyle.extend({ }); var script$1$p = { name: "BaseInputGroup", - "extends": script$1d, + "extends": script$1f, style: InputGroupStyle, - provide: /* @__PURE__ */ __name(function provide26() { + provide: /* @__PURE__ */ __name(function provide25() { return { $pcInputGroup: this, $parentInstance: this @@ -10478,9 +10095,9 @@ var InputGroupAddonStyle = BaseStyle.extend({ }); var script$1$o = { name: "BaseInputGroupAddon", - "extends": script$1d, + "extends": script$1f, style: InputGroupAddonStyle, - provide: /* @__PURE__ */ __name(function provide27() { + provide: /* @__PURE__ */ __name(function provide26() { return { $pcInputGroupAddon: this, $parentInstance: this @@ -10500,7 +10117,7 @@ function render$y(_ctx, _cache, $props, $setup, $data, $options) { __name(render$y, "render$y"); script$D.render = render$y; var classes$n = { - root: /* @__PURE__ */ __name(function root15(_ref) { + root: /* @__PURE__ */ __name(function root14(_ref) { var instance = _ref.instance; return ["p-inputmask", { "p-filled": instance.$filled @@ -10513,7 +10130,7 @@ var InputMaskStyle = BaseStyle.extend({ }); var script$1$n = { name: "BaseInputMask", - "extends": script$1n, + "extends": script$1k, props: { slotChar: { type: String, @@ -10549,7 +10166,7 @@ var script$1$n = { } }, style: InputMaskStyle, - provide: /* @__PURE__ */ __name(function provide28() { + provide: /* @__PURE__ */ __name(function provide27() { return { $pcInputMask: this, $parentInstance: this @@ -10566,13 +10183,13 @@ var script$C = { "default": null } }, - data: /* @__PURE__ */ __name(function data17() { + data: /* @__PURE__ */ __name(function data16() { return { currentVal: "" }; }, "data"), watch: { - mask: /* @__PURE__ */ __name(function mask3(newMask, oldMask) { + mask: /* @__PURE__ */ __name(function mask(newMask, oldMask) { if (oldMask !== newMask) { this.initMask(); } @@ -10581,7 +10198,7 @@ var script$C = { mounted: /* @__PURE__ */ __name(function mounted19() { this.initMask(); }, "mounted"), - updated: /* @__PURE__ */ __name(function updated4() { + updated: /* @__PURE__ */ __name(function updated3() { if (this.isValueUpdated()) { this.updateValue(); } @@ -10978,7 +10595,7 @@ var script$C = { }, "ptmParams") }, components: { - InputText: script$1o + InputText: script$1l } }; function render$x(_ctx, _cache, $props, $setup, $data, $options) { @@ -11008,7 +10625,7 @@ function render$x(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$x, "render$x"); script$C.render = render$x; -var theme$l = /* @__PURE__ */ __name(function theme19(_ref) { +var theme$l = /* @__PURE__ */ __name(function theme18(_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"); @@ -11023,7 +10640,7 @@ var InputOtpStyle = BaseStyle.extend({ }); var script$1$m = { name: "BaseInputOtp", - "extends": script$1n, + "extends": script$1k, props: { readonly: { type: Boolean, @@ -11047,7 +10664,7 @@ var script$1$m = { } }, style: InputOtpStyle, - provide: /* @__PURE__ */ __name(function provide29() { + provide: /* @__PURE__ */ __name(function provide28() { return { $pcInputOtp: this, $parentInstance: this @@ -11059,7 +10676,7 @@ var script$B = { "extends": script$1$m, inheritAttrs: false, emits: ["change", "focus", "blur"], - data: /* @__PURE__ */ __name(function data18() { + data: /* @__PURE__ */ __name(function data17() { return { tokens: [] }; @@ -11206,7 +10823,7 @@ var script$B = { }, "inputType") }, components: { - OtpInputText: script$1o + OtpInputText: script$1l } }; function render$w(_ctx, _cache, $props, $setup, $data, $options) { @@ -11260,7 +10877,7 @@ __name(render$w, "render$w"); script$B.render = render$w; var script$A = { name: "InputSwitch", - "extends": script$1G, + "extends": script$1F, mounted: /* @__PURE__ */ __name(function mounted20() { console.warn("Deprecated since v4. Use ToggleSwitch component instead."); }, "mounted") @@ -11326,7 +10943,7 @@ var KeyFilter = BaseKeyFilter.extend("keyfilter", { this.bindEvents(target); target.setAttribute("data-pd-keyfilter", true); }, "beforeMount"), - updated: /* @__PURE__ */ __name(function updated5(el, options4) { + updated: /* @__PURE__ */ __name(function updated4(el, options4) { var target = this.getTarget(el); if (!target) return; target.$_pkeyfilterModifier = this.getModifiers(options4); @@ -11382,7 +10999,7 @@ var KeyFilter = BaseKeyFilter.extend("keyfilter", { el.$_keyfilterKeydownEvent = null; el.$_keyfilterPasteEvent = null; }, "unbindEvents"), - onKeydown: /* @__PURE__ */ __name(function onKeydown3(event2, target) { + onKeydown: /* @__PURE__ */ __name(function onKeydown2(event2, target) { if (event2.ctrlKey || event2.altKey || event2.metaKey || event2.key === "Tab") { return; } @@ -11419,12 +11036,12 @@ var KeyFilter = BaseKeyFilter.extend("keyfilter", { }, "onPaste") } }); -var theme$k = /* @__PURE__ */ __name(function theme20(_ref) { +var theme$k = /* @__PURE__ */ __name(function theme19(_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) { + root: /* @__PURE__ */ __name(function root15(_ref2) { var instance = _ref2.instance, props = _ref2.props; return ["p-knob p-component", { "p-disabled": props.disabled, @@ -11442,7 +11059,7 @@ var KnobStyle = BaseStyle.extend({ }); var script$1$l = { name: "BaseKnob", - "extends": script$1s, + "extends": script$1r, props: { size: { type: Number, @@ -11466,19 +11083,19 @@ var script$1$l = { }, valueColor: { type: String, - "default": /* @__PURE__ */ __name(function _default10() { + "default": /* @__PURE__ */ __name(function _default9() { return $dt("knob.value.background").variable; }, "_default") }, rangeColor: { type: String, - "default": /* @__PURE__ */ __name(function _default11() { + "default": /* @__PURE__ */ __name(function _default10() { return $dt("knob.range.background").variable; }, "_default") }, textColor: { type: String, - "default": /* @__PURE__ */ __name(function _default12() { + "default": /* @__PURE__ */ __name(function _default11() { return $dt("knob.text.color").variable; }, "_default") }, @@ -11508,7 +11125,7 @@ var script$1$l = { } }, style: KnobStyle, - provide: /* @__PURE__ */ __name(function provide30() { + provide: /* @__PURE__ */ __name(function provide29() { return { $pcKnob: this, $parentInstance: this @@ -11521,7 +11138,7 @@ var script$z = { "extends": script$1$l, inheritAttrs: false, emits: ["change"], - data: /* @__PURE__ */ __name(function data19() { + data: /* @__PURE__ */ __name(function data18() { return { radius: 40, midX: 50, @@ -11759,7 +11376,7 @@ function render$v(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$v, "render$v"); script$z.render = render$v; -var theme$j = /* @__PURE__ */ __name(function theme21(_ref) { +var theme$j = /* @__PURE__ */ __name(function theme20(_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"); @@ -11773,7 +11390,7 @@ var inlineStyles$6 = { }, "rootList") }; var classes$k = { - root: /* @__PURE__ */ __name(function root17(_ref3) { + root: /* @__PURE__ */ __name(function root16(_ref3) { var instance = _ref3.instance; return ["p-megamenu p-component", { "p-megamenu-mobile": instance.queryMatches, @@ -11844,7 +11461,7 @@ var MegaMenuStyle = BaseStyle.extend({ }); var script$2$5 = { name: "BaseMegaMenu", - "extends": script$1d, + "extends": script$1f, props: { model: { type: Array, @@ -11880,7 +11497,7 @@ var script$2$5 = { } }, style: MegaMenuStyle, - provide: /* @__PURE__ */ __name(function provide31() { + provide: /* @__PURE__ */ __name(function provide30() { return { $pcMegaMenu: this, $parentInstance: this @@ -11890,7 +11507,7 @@ var script$2$5 = { var script$1$k = { name: "MegaMenuSub", hostName: "MegaMenu", - "extends": script$1d, + "extends": script$1f, emits: ["item-click", "item-mouseenter"], props: { menuId: { @@ -12027,8 +11644,8 @@ var script$1$k = { }, "getMenuItemProps") }, components: { - AngleRightIcon: script$1q, - AngleDownIcon: script$1H + AngleRightIcon: script$1o, + AngleDownIcon: script$1G }, directives: { ripple: Ripple @@ -12182,7 +11799,7 @@ var script$y = { menubar: null, searchTimeout: null, searchValue: null, - data: /* @__PURE__ */ __name(function data20() { + data: /* @__PURE__ */ __name(function data19() { return { id: this.$attrs.id, mobileActive: false, @@ -12216,7 +11833,7 @@ var script$y = { this.id = this.id || UniqueComponentId(); this.bindMatchMediaListener(); }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount8() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount7() { this.mobileActive = false; this.unbindOutsideClickListener(); this.unbindResizeListener(); @@ -12271,7 +11888,7 @@ var script$y = { }; focus(this.menubar); }, "show"), - hide: /* @__PURE__ */ __name(function hide3(event2, isFocus) { + hide: /* @__PURE__ */ __name(function hide2(event2, isFocus) { var _this2 = this; if (this.mobileActive) { this.mobileActive = false; @@ -12382,7 +11999,7 @@ var script$y = { onItemClick: /* @__PURE__ */ __name(function onItemClick3(event2) { var originalEvent = event2.originalEvent, processedItem = event2.processedItem; var grouped = this.isProccessedItemGroup(processedItem); - var root35 = isEmpty(processedItem.parent); + var root34 = isEmpty(processedItem.parent); var selected3 = this.isSelected(processedItem); if (selected3) { var index = processedItem.index, key = processedItem.key, parentKey = processedItem.parentKey; @@ -12392,7 +12009,7 @@ var script$y = { key, parentKey }; - this.dirty = !root35; + this.dirty = !root34; if (!this.mobileActive) { focus(this.menubar, { preventScroll: true @@ -12580,7 +12197,7 @@ var script$y = { } this.hide(); }, "onTabKey"), - bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener4() { + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener3() { var _this3 = this; if (!this.outsideClickListener) { this.outsideClickListener = function(event2) { @@ -12593,7 +12210,7 @@ var script$y = { document.addEventListener("click", this.outsideClickListener); } }, "bindOutsideClickListener"), - unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener4() { + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener3() { if (this.outsideClickListener) { document.removeEventListener("click", this.outsideClickListener); this.outsideClickListener = null; @@ -12775,7 +12392,7 @@ var script$y = { }); return processedItems3; }, "createProcessedItems"), - containerRef: /* @__PURE__ */ __name(function containerRef3(el) { + containerRef: /* @__PURE__ */ __name(function containerRef2(el) { this.container = el; }, "containerRef"), menubarRef: /* @__PURE__ */ __name(function menubarRef(el) { @@ -12809,7 +12426,7 @@ var script$y = { }, components: { MegaMenuSub: script$1$k, - BarsIcon: script$1I + BarsIcon: script$1H } }; var _hoisted_1$i = ["id"]; @@ -12884,12 +12501,12 @@ function render$u(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$u, "render$u"); script$y.render = render$u; -var theme$i = /* @__PURE__ */ __name(function theme22(_ref) { +var theme$i = /* @__PURE__ */ __name(function theme21(_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) { + root: /* @__PURE__ */ __name(function root17(_ref2) { var props = _ref2.props; return ["p-menu p-component", { "p-menu-overlay": props.popup @@ -12919,7 +12536,7 @@ var MenuStyle = BaseStyle.extend({ }); var script$2$4 = { name: "BaseMenu", - "extends": script$1d, + "extends": script$1f, props: { popup: { type: Boolean, @@ -12955,7 +12572,7 @@ var script$2$4 = { } }, style: MenuStyle, - provide: /* @__PURE__ */ __name(function provide32() { + provide: /* @__PURE__ */ __name(function provide31() { return { $pcMenu: this, $parentInstance: this @@ -12965,7 +12582,7 @@ var script$2$4 = { var script$1$j = { name: "Menuitem", hostName: "Menu", - "extends": script$1d, + "extends": script$1f, inheritAttrs: false, emits: ["item-click", "item-mousemove"], props: { @@ -13121,7 +12738,7 @@ var script$x = { "extends": script$2$4, inheritAttrs: false, emits: ["show", "hide", "focus", "blur"], - data: /* @__PURE__ */ __name(function data21() { + data: /* @__PURE__ */ __name(function data20() { return { id: this.$attrs.id, overlayVisible: false, @@ -13148,7 +12765,7 @@ var script$x = { this.bindOutsideClickListener(); } }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount9() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount8() { this.unbindResizeListener(); this.unbindOutsideClickListener(); if (this.scrollHandler) { @@ -13282,11 +12899,11 @@ var script$x = { this.overlayVisible = true; this.target = event2.currentTarget; }, "show"), - hide: /* @__PURE__ */ __name(function hide4() { + hide: /* @__PURE__ */ __name(function hide3() { this.overlayVisible = false; this.target = null; }, "hide"), - onEnter: /* @__PURE__ */ __name(function onEnter3(el) { + onEnter: /* @__PURE__ */ __name(function onEnter2(el) { addStyle(el, { position: "absolute", top: "0", @@ -13304,13 +12921,13 @@ var script$x = { } this.$emit("show"); }, "onEnter"), - onLeave: /* @__PURE__ */ __name(function onLeave3() { + onLeave: /* @__PURE__ */ __name(function onLeave2() { this.unbindOutsideClickListener(); this.unbindResizeListener(); this.unbindScrollListener(); this.$emit("hide"); }, "onLeave"), - onAfterLeave: /* @__PURE__ */ __name(function onAfterLeave3(el) { + onAfterLeave: /* @__PURE__ */ __name(function onAfterLeave2(el) { if (this.autoZIndex) { ZIndex.clear(el); } @@ -13322,7 +12939,7 @@ var script$x = { this.container.style.minWidth = getOuterWidth(this.target) + "px"; } }, "alignOverlay"), - bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener5() { + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener4() { var _this = this; if (!this.outsideClickListener) { this.outsideClickListener = function(event2) { @@ -13337,7 +12954,7 @@ var script$x = { document.addEventListener("click", this.outsideClickListener); } }, "bindOutsideClickListener"), - unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener5() { + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener4() { if (this.outsideClickListener) { document.removeEventListener("click", this.outsideClickListener); this.outsideClickListener = null; @@ -13391,7 +13008,7 @@ var script$x = { target: this.target }); }, "onOverlayClick"), - containerRef: /* @__PURE__ */ __name(function containerRef4(el) { + containerRef: /* @__PURE__ */ __name(function containerRef3(el) { this.container = el; }, "containerRef"), listRef: /* @__PURE__ */ __name(function listRef(el) { @@ -13405,7 +13022,7 @@ var script$x = { }, components: { PVMenuitem: script$1$j, - Portal: script$1f + Portal: script$1m } }; var _hoisted_1$h = ["id"]; @@ -13521,12 +13138,12 @@ function render$t(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$t, "render$t"); script$x.render = render$t; -var theme$h = /* @__PURE__ */ __name(function theme23(_ref) { +var theme$h = /* @__PURE__ */ __name(function theme22(_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) { + root: /* @__PURE__ */ __name(function root18(_ref2) { var props = _ref2.props; return ["p-metergroup p-component", { "p-metergroup-horizontal": props.orientation === "horizontal", @@ -13554,7 +13171,7 @@ var MeterGroupStyle = BaseStyle.extend({ }); var script$2$3 = { name: "MeterGroup", - "extends": script$1d, + "extends": script$1f, props: { value: { type: Array, @@ -13582,7 +13199,7 @@ var script$2$3 = { } }, style: MeterGroupStyle, - provide: /* @__PURE__ */ __name(function provide33() { + provide: /* @__PURE__ */ __name(function provide32() { return { $pcMeterGroup: this, $parentInstance: this @@ -13592,7 +13209,7 @@ var script$2$3 = { var script$1$i = { name: "MeterGroupLabel", hostName: "MeterGroup", - "extends": script$1d, + "extends": script$1f, inheritAttrs: false, props: { value: { @@ -13759,12 +13376,12 @@ function render$s(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$s, "render$s"); script$w.render = render$s; -var theme$g = /* @__PURE__ */ __name(function theme24(_ref) { +var theme$g = /* @__PURE__ */ __name(function theme23(_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) { + root: /* @__PURE__ */ __name(function root19(_ref2) { var props = _ref2.props; return { position: props.appendTo === "self" ? "relative" : void 0 @@ -13772,7 +13389,7 @@ var inlineStyles$5 = { }, "root") }; var classes$h = { - root: /* @__PURE__ */ __name(function root21(_ref3) { + root: /* @__PURE__ */ __name(function root20(_ref3) { var instance = _ref3.instance, props = _ref3.props; return ["p-multiselect p-component p-inputwrapper", { "p-multiselect-display-chip": props.display === "chip", @@ -13828,7 +13445,7 @@ var MultiSelectStyle = BaseStyle.extend({ }); var script$1$h = { name: "BaseMultiSelect", - "extends": script$1n, + "extends": script$1k, props: { options: Array, optionLabel: null, @@ -13999,7 +13616,7 @@ var script$1$h = { } }, style: MultiSelectStyle, - provide: /* @__PURE__ */ __name(function provide34() { + provide: /* @__PURE__ */ __name(function provide33() { return { $pcMultiSelect: this, $parentInstance: this @@ -14108,7 +13725,7 @@ var script$v = { searchTimeout: null, searchValue: "", selectOnFocus: false, - data: /* @__PURE__ */ __name(function data22() { + data: /* @__PURE__ */ __name(function data21() { return { id: this.$attrs.id, clicked: false, @@ -14130,7 +13747,7 @@ var script$v = { this.id = this.id || UniqueComponentId(); this.autoUpdateModel(); }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount10() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount9() { this.unbindOutsideClickListener(); this.unbindResizeListener(); if (this.scrollHandler) { @@ -14198,7 +13815,7 @@ var script$v = { 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) { + hide: /* @__PURE__ */ __name(function hide4(isFocus) { var _this2 = this; var _hide = /* @__PURE__ */ __name(function _hide2() { _this2.$emit("before-hide"); @@ -14570,7 +14187,7 @@ var script$v = { absolutePosition(this.overlay, this.$el); } }, "alignOverlay"), - bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener6() { + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener5() { var _this6 = this; if (!this.outsideClickListener) { this.outsideClickListener = function(event2) { @@ -14581,7 +14198,7 @@ var script$v = { document.addEventListener("click", this.outsideClickListener); } }, "bindOutsideClickListener"), - unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener6() { + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener5() { if (this.outsideClickListener) { document.removeEventListener("click", this.outsideClickListener); this.outsideClickListener = null; @@ -14620,7 +14237,7 @@ var script$v = { this.resizeListener = null; } }, "unbindResizeListener"), - isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked3(event2) { + isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked2(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) { @@ -14871,9 +14488,9 @@ var script$v = { overlayRef: /* @__PURE__ */ __name(function overlayRef3(el) { this.overlay = el; }, "overlayRef"), - listRef: /* @__PURE__ */ __name(function listRef2(el, contentRef2) { + listRef: /* @__PURE__ */ __name(function listRef2(el, contentRef) { this.list = el; - contentRef2 && contentRef2(el); + contentRef && contentRef(el); }, "listRef"), virtualScrollerRef: /* @__PURE__ */ __name(function virtualScrollerRef(el) { this.virtualScroller = el; @@ -14992,18 +14609,18 @@ var script$v = { 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 + InputText: script$1l, + Checkbox: script$1I, + VirtualScroller: script$1J, + Portal: script$1m, + Chip: script$1s, + IconField: script$1K, + InputIcon: script$1L, + TimesIcon: script$1q, + SearchIcon: script$1M, + ChevronDownIcon: script$1h, + SpinnerIcon: script$1p, + CheckIcon: script$1C } }; function _typeof$e(o) { @@ -15306,10 +14923,10 @@ function render$r(_ctx, _cache, $props, $setup, $data, $options) { 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; + var styleClass = _ref2.styleClass, contentRef = _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); + return $options.listRef(el, contentRef); }, "ref"), id: $data.id + "_list", "class": [_ctx.cx("list"), styleClass], @@ -15455,7 +15072,7 @@ __name(render$r, "render$r"); script$v.render = render$r; var script$u = { name: "AngleDoubleDownIcon", - "extends": script$1m + "extends": script$1j }; function render$q(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -15475,7 +15092,7 @@ __name(render$q, "render$q"); script$u.render = render$q; var script$t = { name: "AngleDoubleUpIcon", - "extends": script$1m + "extends": script$1j }; function render$p(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -15493,7 +15110,7 @@ function render$p(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$p, "render$p"); script$t.render = render$p; -var theme$f = /* @__PURE__ */ __name(function theme25(_ref) { +var theme$f = /* @__PURE__ */ __name(function theme24(_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"); @@ -15508,7 +15125,7 @@ var OrderListStyle = BaseStyle.extend({ }); var script$1$g = { name: "BaseOrderList", - "extends": script$1d, + "extends": script$1f, props: { modelValue: { type: Array, @@ -15556,7 +15173,7 @@ var script$1$g = { }, buttonProps: { type: Object, - "default": /* @__PURE__ */ __name(function _default13() { + "default": /* @__PURE__ */ __name(function _default12() { return { severity: "secondary" }; @@ -15596,7 +15213,7 @@ var script$1$g = { } }, style: OrderListStyle, - provide: /* @__PURE__ */ __name(function provide35() { + provide: /* @__PURE__ */ __name(function provide34() { return { $pcOrderList: this, $parentInstance: this @@ -15642,7 +15259,7 @@ var script$s = { reorderDirection: null, styleElement: null, list: null, - data: /* @__PURE__ */ __name(function data23() { + data: /* @__PURE__ */ __name(function data22() { return { id: this.$attrs.id, d_selection: this.selection @@ -15653,10 +15270,10 @@ var script$s = { this.id = newValue || UniqueComponentId(); }, "$attrsId") }, - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount11() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount10() { this.destroyStyle(); }, "beforeUnmount"), - updated: /* @__PURE__ */ __name(function updated6() { + updated: /* @__PURE__ */ __name(function updated5() { if (this.reorderDirection) { this.updateListScroll(); this.reorderDirection = null; @@ -15825,10 +15442,10 @@ var script$s = { }, "hasSelectedOption") }, components: { - Listbox: script$1O, - Button: script$1e, - AngleUpIcon: script$1P, - AngleDownIcon: script$1H, + Listbox: script$1N, + Button: script$1d, + AngleUpIcon: script$1O, + AngleDownIcon: script$1G, AngleDoubleUpIcon: script$t, AngleDoubleDownIcon: script$u }, @@ -16006,7 +15623,7 @@ function render$o(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$o, "render$o"); script$s.render = render$o; -var theme$e = /* @__PURE__ */ __name(function theme26(_ref) { +var theme$e = /* @__PURE__ */ __name(function theme25(_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"); @@ -16045,7 +15662,7 @@ var OrganizationChartStyle = BaseStyle.extend({ }); var script$2$2 = { name: "BaseOrganizationChart", - "extends": script$1d, + "extends": script$1f, props: { value: { type: null, @@ -16069,7 +15686,7 @@ var script$2$2 = { } }, style: OrganizationChartStyle, - provide: /* @__PURE__ */ __name(function provide36() { + provide: /* @__PURE__ */ __name(function provide35() { return { $pcOrganizationChart: this, $parentInstance: this @@ -16079,7 +15696,7 @@ var script$2$2 = { var script$1$f = { name: "OrganizationChartNode", hostName: "OrganizationChart", - "extends": script$1d, + "extends": script$1f, emits: ["node-click", "node-toggle"], props: { node: { @@ -16143,7 +15760,7 @@ var script$1$f = { onChildNodeToggle: /* @__PURE__ */ __name(function onChildNodeToggle(node2) { this.$emit("node-toggle", node2); }, "onChildNodeToggle"), - onKeydown: /* @__PURE__ */ __name(function onKeydown4(event2) { + onKeydown: /* @__PURE__ */ __name(function onKeydown3(event2) { if (event2.code === "Enter" || event2.code === "NumpadEnter" || event2.code === "Space") { this.toggleNode(); event2.preventDefault(); @@ -16176,8 +15793,8 @@ var script$1$f = { }, "toggleable") }, components: { - ChevronDownIcon: script$1k, - ChevronUpIcon: script$1j + ChevronDownIcon: script$1h, + ChevronUpIcon: script$1g } }; var _hoisted_1$e = ["colspan"]; @@ -16327,7 +15944,7 @@ var script$r = { "extends": script$2$2, inheritAttrs: false, emits: ["node-unselect", "node-select", "update:selectionKeys", "node-expand", "node-collapse", "update:collapsedKeys"], - data: /* @__PURE__ */ __name(function data24() { + data: /* @__PURE__ */ __name(function data23() { return { d_collapsedKeys: this.collapsedKeys || {} }; @@ -16393,7 +16010,7 @@ __name(render$n, "render$n"); script$r.render = render$n; var script$q = { name: "OverlayPanel", - "extends": script$1Q, + "extends": script$1P, mounted: /* @__PURE__ */ __name(function mounted25() { console.warn("Deprecated since v4. Use Popover component instead."); }, "mounted") @@ -16401,7 +16018,7 @@ var script$q = { var OverlayPanelStyle = BaseStyle.extend({ name: "overlaypanel" }); -var theme$d = /* @__PURE__ */ __name(function theme27(_ref) { +var theme$d = /* @__PURE__ */ __name(function theme26(_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"); @@ -16444,7 +16061,7 @@ var PanelMenuStyle = BaseStyle.extend({ }); var script$3$1 = { name: "BasePanelMenu", - "extends": script$1d, + "extends": script$1f, props: { model: { type: Array, @@ -16464,7 +16081,7 @@ var script$3$1 = { } }, style: PanelMenuStyle, - provide: /* @__PURE__ */ __name(function provide37() { + provide: /* @__PURE__ */ __name(function provide36() { return { $pcPanelMenu: this, $parentInstance: this @@ -16474,7 +16091,7 @@ var script$3$1 = { var script$2$1 = { name: "PanelMenuSub", hostName: "PanelMenu", - "extends": script$1d, + "extends": script$1f, emits: ["item-toggle", "item-mousemove"], props: { panelId: { @@ -16597,8 +16214,8 @@ var script$2$1 = { }, "getMenuItemProps") }, components: { - ChevronRightIcon: script$1l, - ChevronDownIcon: script$1k + ChevronRightIcon: script$1i, + ChevronDownIcon: script$1h }, directives: { ripple: Ripple @@ -16768,7 +16385,7 @@ __name(_arrayWithHoles, "_arrayWithHoles"); var script$1$e = { name: "PanelMenuList", hostName: "PanelMenu", - "extends": script$1d, + "extends": script$1f, emits: ["item-toggle", "header-focus"], props: { panelId: { @@ -16790,7 +16407,7 @@ var script$1$e = { }, searchTimeout: null, searchValue: null, - data: /* @__PURE__ */ __name(function data25() { + data: /* @__PURE__ */ __name(function data24() { return { focused: false, focusedItem: null, @@ -17242,7 +16859,7 @@ var script$p = { "extends": script$3$1, inheritAttrs: false, emits: ["update:expandedKeys", "panel-open", "panel-close"], - data: /* @__PURE__ */ __name(function data26() { + data: /* @__PURE__ */ __name(function data25() { return { id: this.$attrs.id, activeItem: null, @@ -17444,8 +17061,8 @@ var script$p = { }, components: { PanelMenuList: script$1$e, - ChevronRightIcon: script$1l, - ChevronDownIcon: script$1k + ChevronRightIcon: script$1i, + ChevronDownIcon: script$1h } }; var _hoisted_1$d = ["id"]; @@ -17479,7 +17096,7 @@ function render$m(_ctx, _cache, $props, $setup, $data, $options) { onClick: /* @__PURE__ */ __name(function onClick11($event) { return $options.onHeaderClick($event, item8); }, "onClick"), - onKeydown: /* @__PURE__ */ __name(function onKeydown6($event) { + onKeydown: /* @__PURE__ */ __name(function onKeydown5($event) { return $options.onHeaderKeyDown($event, item8); }, "onKeydown"), ref_for: true @@ -17556,7 +17173,7 @@ __name(render$m, "render$m"); script$p.render = render$m; var script$o = { name: "EyeSlashIcon", - "extends": script$1m + "extends": script$1j }; function render$l(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -17574,12 +17191,12 @@ function render$l(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$l, "render$l"); script$o.render = render$l; -var theme$c = /* @__PURE__ */ __name(function theme28(_ref) { +var theme$c = /* @__PURE__ */ __name(function theme27(_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) { + root: /* @__PURE__ */ __name(function root21(_ref2) { var props = _ref2.props; return { position: props.appendTo === "self" ? "relative" : void 0 @@ -17587,7 +17204,7 @@ var inlineStyles$4 = { }, "root") }; var classes$d = { - root: /* @__PURE__ */ __name(function root23(_ref3) { + root: /* @__PURE__ */ __name(function root22(_ref3) { var instance = _ref3.instance; return ["p-password p-component p-inputwrapper", { "p-inputwrapper-filled": instance.$filled, @@ -17615,7 +17232,7 @@ var PasswordStyle = BaseStyle.extend({ }); var script$1$d = { name: "BasePassword", - "extends": script$1n, + "extends": script$1k, props: { promptLabel: { type: String, @@ -17745,7 +17362,7 @@ var script$1$d = { } }, style: PasswordStyle, - provide: /* @__PURE__ */ __name(function provide38() { + provide: /* @__PURE__ */ __name(function provide37() { return { $pcPassword: this, $parentInstance: this @@ -17762,7 +17379,7 @@ var script$n = { "default": null } }, - data: /* @__PURE__ */ __name(function data27() { + data: /* @__PURE__ */ __name(function data26() { return { id: this.$attrs.id, overlayVisible: false, @@ -17788,7 +17405,7 @@ var script$n = { this.mediumCheckRegExp = new RegExp(this.mediumRegex); this.strongCheckRegExp = new RegExp(this.strongRegex); }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount12() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount11() { this.unbindResizeListener(); if (this.scrollHandler) { this.scrollHandler.destroy(); @@ -17986,8 +17603,8 @@ var script$n = { }, "overlayUniqueId") }, components: { - InputText: script$1o, - Portal: script$1f, + InputText: script$1l, + Portal: script$1m, EyeSlashIcon: script$o, EyeIcon: script$N } @@ -18144,7 +17761,7 @@ function render$k(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$k, "render$k"); script$n.render = render$k; -var theme$b = /* @__PURE__ */ __name(function theme29(_ref) { +var theme$b = /* @__PURE__ */ __name(function theme28(_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"); @@ -18163,17 +17780,17 @@ var PickListStyle = BaseStyle.extend({ }); var script$1$c = { name: "BasePickList", - "extends": script$1d, + "extends": script$1f, props: { modelValue: { type: Array, - "default": /* @__PURE__ */ __name(function _default14() { + "default": /* @__PURE__ */ __name(function _default13() { return [[], []]; }, "_default") }, selection: { type: Array, - "default": /* @__PURE__ */ __name(function _default15() { + "default": /* @__PURE__ */ __name(function _default14() { return [[], []]; }, "_default") }, @@ -18223,7 +17840,7 @@ var script$1$c = { }, buttonProps: { type: Object, - "default": /* @__PURE__ */ __name(function _default16() { + "default": /* @__PURE__ */ __name(function _default15() { return { severity: "secondary" }; @@ -18271,7 +17888,7 @@ var script$1$c = { } }, style: PickListStyle, - provide: /* @__PURE__ */ __name(function provide39() { + provide: /* @__PURE__ */ __name(function provide38() { return { $pcPickList: this, $parentInstance: this @@ -18318,7 +17935,7 @@ var script$m = { styleElement: null, media: null, mediaChangeListener: null, - data: /* @__PURE__ */ __name(function data28() { + data: /* @__PURE__ */ __name(function data27() { return { id: this.$attrs.id, d_selection: this.selection, @@ -18337,14 +17954,14 @@ var script$m = { this.initMedia(); }, "breakpoint") }, - updated: /* @__PURE__ */ __name(function updated7() { + updated: /* @__PURE__ */ __name(function updated6() { if (this.reorderDirection) { this.updateListScroll(this.$refs.sourceList.$el); this.updateListScroll(this.$refs.targetList.$el); this.reorderDirection = null; } }, "updated"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount13() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount12() { this.destroyStyle(); this.destroyMedia(); }, "beforeUnmount"), @@ -18696,14 +18313,14 @@ var script$m = { }, "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, + Listbox: script$1N, + Button: script$1d, + AngleRightIcon: script$1o, + AngleLeftIcon: script$1Q, + AngleDownIcon: script$1G, + AngleUpIcon: script$1O, + AngleDoubleRightIcon: script$1R, + AngleDoubleLeftIcon: script$1S, AngleDoubleDownIcon: script$u, AngleDoubleUpIcon: script$t }, @@ -19111,7 +18728,7 @@ script$m.render = render$j; var PortalStyle = BaseStyle.extend({ name: "portal" }); -var theme$a = /* @__PURE__ */ __name(function theme30(_ref) { +var theme$a = /* @__PURE__ */ __name(function theme29(_ref) { _ref.dt; return "\n.p-radiobutton-group {\n display: inline-flex;\n}\n"; }, "theme"); @@ -19125,9 +18742,9 @@ var RadioButtonGroupStyle = BaseStyle.extend({ }); var script$1$b = { name: "BaseRadioButtonGroup", - "extends": script$1s, + "extends": script$1r, style: RadioButtonGroupStyle, - provide: /* @__PURE__ */ __name(function provide40() { + provide: /* @__PURE__ */ __name(function provide39() { return { $pcRadioButtonGroup: this, $parentInstance: this @@ -19138,7 +18755,7 @@ var script$l = { name: "RadioButtonGroup", "extends": script$1$b, inheritAttrs: false, - data: /* @__PURE__ */ __name(function data29() { + data: /* @__PURE__ */ __name(function data28() { return { groupName: this.name }; @@ -19161,7 +18778,7 @@ __name(render$i, "render$i"); script$l.render = render$i; var script$k = { name: "BanIcon", - "extends": script$1m + "extends": script$1j }; function render$h(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -19179,7 +18796,7 @@ __name(render$h, "render$h"); script$k.render = render$h; var script$j = { name: "StarIcon", - "extends": script$1m + "extends": script$1j }; function render$g(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -19197,7 +18814,7 @@ __name(render$g, "render$g"); script$j.render = render$g; var script$i = { name: "StarFillIcon", - "extends": script$1m + "extends": script$1j }; function render$f(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps({ @@ -19213,12 +18830,12 @@ function render$f(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$f, "render$f"); script$i.render = render$f; -var theme$9 = /* @__PURE__ */ __name(function theme31(_ref) { +var theme$9 = /* @__PURE__ */ __name(function theme30(_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) { + root: /* @__PURE__ */ __name(function root23(_ref2) { var props = _ref2.props; return ["p-rating", { "p-readonly": props.readonly, @@ -19252,7 +18869,7 @@ var RatingStyle = BaseStyle.extend({ }); var script$1$a = { name: "BaseRating", - "extends": script$1s, + "extends": script$1r, props: { readonly: { type: Boolean, @@ -19272,7 +18889,7 @@ var script$1$a = { } }, style: RatingStyle, - provide: /* @__PURE__ */ __name(function provide41() { + provide: /* @__PURE__ */ __name(function provide40() { return { $pcRating: this, $parentInstance: this @@ -19284,7 +18901,7 @@ var script$h = { "extends": script$1$a, inheritAttrs: false, emits: ["change", "focus", "blur"], - data: /* @__PURE__ */ __name(function data30() { + data: /* @__PURE__ */ __name(function data29() { return { d_name: this.name, focusedOptionIndex: -1, @@ -19422,7 +19039,7 @@ __name(render$e, "render$e"); script$h.render = render$e; var script$g = { name: "Row", - "extends": script$1d, + "extends": script$1f, inject: ["$rows"], mounted: /* @__PURE__ */ __name(function mounted32() { var _this$$rows; @@ -19439,12 +19056,12 @@ var script$g = { var RowStyle = BaseStyle.extend({ name: "row" }); -var theme$8 = /* @__PURE__ */ __name(function theme32(_ref) { +var theme$8 = /* @__PURE__ */ __name(function theme31(_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) { + root: /* @__PURE__ */ __name(function root24(_ref2) { var props = _ref2.props; return ["p-scrolltop", { "p-scrolltop-sticky": props.target !== "window" @@ -19459,7 +19076,7 @@ var ScrollTopStyle = BaseStyle.extend({ }); var script$1$9 = { name: "BaseScrollTop", - "extends": script$1d, + "extends": script$1f, props: { target: { type: String, @@ -19479,7 +19096,7 @@ var script$1$9 = { }, buttonProps: { type: Object, - "default": /* @__PURE__ */ __name(function _default17() { + "default": /* @__PURE__ */ __name(function _default16() { return { rounded: true }; @@ -19487,7 +19104,7 @@ var script$1$9 = { } }, style: ScrollTopStyle, - provide: /* @__PURE__ */ __name(function provide42() { + provide: /* @__PURE__ */ __name(function provide41() { return { $pcScrollTop: this, $parentInstance: this @@ -19500,7 +19117,7 @@ var script$f = { inheritAttrs: false, scrollListener: null, container: null, - data: /* @__PURE__ */ __name(function data31() { + data: /* @__PURE__ */ __name(function data30() { return { visible: false }; @@ -19509,7 +19126,7 @@ var script$f = { if (this.target === "window") this.bindDocumentScrollListener(); else if (this.target === "parent") this.bindParentScrollListener(); }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount14() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount13() { if (this.target === "window") this.unbindDocumentScrollListener(); else if (this.target === "parent") this.unbindParentScrollListener(); if (this.container) { @@ -19555,13 +19172,13 @@ var script$f = { this.scrollListener = null; } }, "unbindDocumentScrollListener"), - onEnter: /* @__PURE__ */ __name(function onEnter4(el) { + onEnter: /* @__PURE__ */ __name(function onEnter3(el) { ZIndex.set("overlay", el, this.$primevue.config.zIndex.overlay); }, "onEnter"), - onAfterLeave: /* @__PURE__ */ __name(function onAfterLeave4(el) { + onAfterLeave: /* @__PURE__ */ __name(function onAfterLeave3(el) { ZIndex.clear(el); }, "onAfterLeave"), - containerRef: /* @__PURE__ */ __name(function containerRef5(el) { + containerRef: /* @__PURE__ */ __name(function containerRef4(el) { this.container = el ? el.$el : void 0; }, "containerRef") }, @@ -19571,8 +19188,8 @@ var script$f = { }, "scrollTopAriaLabel") }, components: { - ChevronUpIcon: script$1j, - Button: script$1e + ChevronUpIcon: script$1g, + Button: script$1d } }; function render$d(_ctx, _cache, $props, $setup, $data, $options) { @@ -19613,7 +19230,7 @@ __name(render$d, "render$d"); script$f.render = render$d; var script$e = { name: "Sidebar", - "extends": script$1c, + "extends": script$1T, mounted: /* @__PURE__ */ __name(function mounted34() { console.warn("Deprecated since v4. Use Drawer component instead."); }, "mounted") @@ -19621,7 +19238,7 @@ var script$e = { var SidebarStyle = BaseStyle.extend({ name: "sidebar" }); -var theme$7 = /* @__PURE__ */ __name(function theme33(_ref) { +var theme$7 = /* @__PURE__ */ __name(function theme32(_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"); @@ -19631,7 +19248,7 @@ var inlineStyles$3 = { } }; var classes$8 = { - root: /* @__PURE__ */ __name(function root26(_ref2) { + root: /* @__PURE__ */ __name(function root25(_ref2) { var props = _ref2.props; return ["p-skeleton p-component", { "p-skeleton-circle": props.shape === "circle", @@ -19647,7 +19264,7 @@ var SkeletonStyle = BaseStyle.extend({ }); var script$1$8 = { name: "BaseSkeleton", - "extends": script$1d, + "extends": script$1f, props: { shape: { type: String, @@ -19675,7 +19292,7 @@ var script$1$8 = { } }, style: SkeletonStyle, - provide: /* @__PURE__ */ __name(function provide43() { + provide: /* @__PURE__ */ __name(function provide42() { return { $pcSkeleton: this, $parentInstance: this @@ -19739,12 +19356,12 @@ function _toPrimitive$8(t2, r) { return ("string" === r ? String : Number)(t2); } __name(_toPrimitive$8, "_toPrimitive$8"); -var theme$6 = /* @__PURE__ */ __name(function theme34(_ref) { +var theme$6 = /* @__PURE__ */ __name(function theme33(_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) { + root: /* @__PURE__ */ __name(function root26(_ref2) { var props = _ref2.props; return { alignItems: (props.direction === "up" || props.direction === "down") && "center", @@ -19760,7 +19377,7 @@ var inlineStyles$2 = { }, "list") }; var classes$7 = { - root: /* @__PURE__ */ __name(function root28(_ref4) { + root: /* @__PURE__ */ __name(function root27(_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"), @@ -19774,7 +19391,7 @@ var classes$7 = { item: "p-speeddial-item", action: "p-speeddial-action", actionIcon: "p-speeddial-action-icon", - mask: /* @__PURE__ */ __name(function mask4(_ref7) { + mask: /* @__PURE__ */ __name(function mask2(_ref7) { var instance = _ref7.instance; return ["p-speeddial-mask", { "p-speeddial-mask-visible": instance.d_visible @@ -19789,7 +19406,7 @@ var SpeedDialStyle = BaseStyle.extend({ }); var script$1$7 = { name: "BaseSpeedDial", - "extends": script$1d, + "extends": script$1f, props: { model: null, visible: { @@ -19844,7 +19461,7 @@ var script$1$7 = { "class": null, buttonProps: { type: Object, - "default": /* @__PURE__ */ __name(function _default18() { + "default": /* @__PURE__ */ __name(function _default17() { return { rounded: true }; @@ -19852,7 +19469,7 @@ var script$1$7 = { }, actionButtonProps: { type: Object, - "default": /* @__PURE__ */ __name(function _default19() { + "default": /* @__PURE__ */ __name(function _default18() { return { severity: "secondary", rounded: true, @@ -19870,7 +19487,7 @@ var script$1$7 = { } }, style: SpeedDialStyle, - provide: /* @__PURE__ */ __name(function provide44() { + provide: /* @__PURE__ */ __name(function provide43() { return { $pcSpeedDial: this, $parentInstance: this @@ -19968,7 +19585,7 @@ var script$c = { documentClickListener: null, container: null, list: null, - data: /* @__PURE__ */ __name(function data32() { + data: /* @__PURE__ */ __name(function data31() { return { id: this.$attrs.id, d_visible: this.visible, @@ -20001,7 +19618,7 @@ var script$c = { this.bindDocumentClickListener(); } }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount15() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount14() { this.unbindDocumentClickListener(); }, "beforeUnmount"), methods: { @@ -20040,7 +19657,7 @@ var script$c = { this.d_visible = true; this.$emit("show"); }, "show"), - hide: /* @__PURE__ */ __name(function hide6() { + hide: /* @__PURE__ */ __name(function hide5() { this.d_visible = false; this.$emit("hide"); }, "hide"), @@ -20303,7 +19920,7 @@ var script$c = { this.documentClickListener = null; } }, "unbindDocumentClickListener"), - isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked4(event2) { + isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked3(event2) { return this.container && !(this.container.isSameNode(event2.target) || this.container.contains(event2.target) || this.isItemClicked); }, "isOutsideClicked"), isItemVisible: /* @__PURE__ */ __name(function isItemVisible6(item8) { @@ -20312,7 +19929,7 @@ var script$c = { isItemActive: /* @__PURE__ */ __name(function isItemActive7(id4) { return id4 === this.focusedOptionId; }, "isItemActive"), - containerRef: /* @__PURE__ */ __name(function containerRef6(el) { + containerRef: /* @__PURE__ */ __name(function containerRef5(el) { this.container = el; }, "containerRef"), listRef: /* @__PURE__ */ __name(function listRef3(el) { @@ -20328,8 +19945,8 @@ var script$c = { }, "focusedOptionId") }, components: { - Button: script$1e, - PlusIcon: script$1x + Button: script$1d, + PlusIcon: script$1w }, directives: { ripple: Ripple, @@ -20467,7 +20084,7 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) { __name(render$b, "render$b"); script$c.render = render$b; var classes$6 = { - root: /* @__PURE__ */ __name(function root29(_ref) { + root: /* @__PURE__ */ __name(function root28(_ref) { var instance = _ref.instance; return ["p-stepitem", { "p-stepitem-active": instance.isActive @@ -20480,7 +20097,7 @@ var StepItemStyle = BaseStyle.extend({ }); var script$1$6 = { name: "BaseStepItem", - "extends": script$1d, + "extends": script$1f, props: { value: { type: [String, Number], @@ -20488,7 +20105,7 @@ var script$1$6 = { } }, style: StepItemStyle, - provide: /* @__PURE__ */ __name(function provide45() { + provide: /* @__PURE__ */ __name(function provide44() { return { $pcStepItem: this, $parentInstance: this @@ -20516,12 +20133,12 @@ function render$a(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$a, "render$a"); script$b.render = render$a; -var theme$5 = /* @__PURE__ */ __name(function theme35(_ref) { +var theme$5 = /* @__PURE__ */ __name(function theme34(_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) { + root: /* @__PURE__ */ __name(function root29(_ref2) { var props = _ref2.props; return ["p-steps p-component", { "p-readonly": props.readonly @@ -20546,7 +20163,7 @@ var StepsStyle = BaseStyle.extend({ }); var script$1$5 = { name: "BaseSteps", - "extends": script$1d, + "extends": script$1f, props: { id: { type: String @@ -20565,7 +20182,7 @@ var script$1$5 = { } }, style: StepsStyle, - provide: /* @__PURE__ */ __name(function provide46() { + provide: /* @__PURE__ */ __name(function provide45() { return { $pcSteps: this, $parentInstance: this @@ -20577,7 +20194,7 @@ var script$a = { "extends": script$1$5, inheritAttrs: false, emits: ["update:activeStep", "step-change"], - data: /* @__PURE__ */ __name(function data33() { + data: /* @__PURE__ */ __name(function data32() { return { d_activeStep: this.activeStep }; @@ -20752,7 +20369,7 @@ function render$9(_ctx, _cache, $props, $setup, $data, $options) { onClick: /* @__PURE__ */ __name(function onClick11($event) { return $options.onItemClick($event, item8, index); }, "onClick"), - onKeydown: /* @__PURE__ */ __name(function onKeydown6($event) { + onKeydown: /* @__PURE__ */ __name(function onKeydown5($event) { return $options.onItemKeydown($event, item8, index); }, "onKeydown"), ref_for: true @@ -20929,7 +20546,7 @@ var StyleClass = BaseStyleClass.extend("styleclass", { }, "isOutsideClick") } }); -var theme$4 = /* @__PURE__ */ __name(function theme36(_ref) { +var theme$4 = /* @__PURE__ */ __name(function theme35(_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"); @@ -20955,7 +20572,7 @@ var TabMenuStyle = BaseStyle.extend({ }); var script$1$4 = { name: "BaseTabMenu", - "extends": script$1d, + "extends": script$1f, props: { model: { type: Array, @@ -20975,7 +20592,7 @@ var script$1$4 = { } }, style: TabMenuStyle, - provide: /* @__PURE__ */ __name(function provide47() { + provide: /* @__PURE__ */ __name(function provide46() { return { $pcTabMenu: this, $parentInstance: this @@ -20987,7 +20604,7 @@ var script$9 = { "extends": script$1$4, inheritAttrs: false, emits: ["update:activeIndex", "tab-change"], - data: /* @__PURE__ */ __name(function data34() { + data: /* @__PURE__ */ __name(function data33() { return { d_activeIndex: this.activeIndex }; @@ -21009,7 +20626,7 @@ var script$9 = { var activeItem2 = this.findActiveItem(); activeItem2 && (activeItem2.tabIndex = "0"); }, "mounted"), - updated: /* @__PURE__ */ __name(function updated8() { + updated: /* @__PURE__ */ __name(function updated7() { this.updateInkBar(); }, "updated"), methods: { @@ -21204,7 +20821,7 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) { onClick: /* @__PURE__ */ __name(function onClick11($event) { return $options.onItemClick($event, item8, i); }, "onClick"), - onKeydown: /* @__PURE__ */ __name(function onKeydown6($event) { + onKeydown: /* @__PURE__ */ __name(function onKeydown5($event) { return $options.onKeydownItem($event, item8, i); }, "onKeydown") }, $options.getPTOptions("item", item8, i), { @@ -21249,7 +20866,7 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) { __name(render$8, "render$8"); script$9.render = render$8; var TerminalService = EventBus(); -var theme$3 = /* @__PURE__ */ __name(function theme37(_ref) { +var theme$3 = /* @__PURE__ */ __name(function theme36(_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"); @@ -21271,7 +20888,7 @@ var TerminalStyle = BaseStyle.extend({ }); var script$1$3 = { name: "BaseTerminal", - "extends": script$1d, + "extends": script$1f, props: { welcomeMessage: { type: String, @@ -21283,7 +20900,7 @@ var script$1$3 = { } }, style: TerminalStyle, - provide: /* @__PURE__ */ __name(function provide48() { + provide: /* @__PURE__ */ __name(function provide47() { return { $pcTerminal: this, $parentInstance: this @@ -21294,7 +20911,7 @@ var script$8 = { name: "Terminal", "extends": script$1$3, inheritAttrs: false, - data: /* @__PURE__ */ __name(function data35() { + data: /* @__PURE__ */ __name(function data34() { return { commandText: null, commands: [] @@ -21304,17 +20921,17 @@ var script$8 = { TerminalService.on("response", this.responseListener); this.$refs.input.focus(); }, "mounted"), - updated: /* @__PURE__ */ __name(function updated9() { + updated: /* @__PURE__ */ __name(function updated8() { this.$el.scrollTop = this.$el.scrollHeight; }, "updated"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount16() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount15() { TerminalService.off("response", this.responseListener); }, "beforeUnmount"), methods: { onClick: /* @__PURE__ */ __name(function onClick7() { this.$refs.input.focus(); }, "onClick"), - onKeydown: /* @__PURE__ */ __name(function onKeydown5(event2) { + onKeydown: /* @__PURE__ */ __name(function onKeydown4(event2) { if (event2.key === "Enter" && this.commandText) { this.commands.push({ text: this.commandText @@ -21374,12 +20991,12 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$7, "render$7"); script$8.render = render$7; -var theme$2 = /* @__PURE__ */ __name(function theme38(_ref) { +var theme$2 = /* @__PURE__ */ __name(function theme37(_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) { + root: /* @__PURE__ */ __name(function root30(_ref2) { var props = _ref2.props; return ["p-timeline p-component", "p-timeline-" + props.align, "p-timeline-" + props.layout]; }, "root"), @@ -21397,7 +21014,7 @@ var TimelineStyle = BaseStyle.extend({ }); var script$1$2 = { name: "BaseTimeline", - "extends": script$1d, + "extends": script$1f, props: { value: null, align: { @@ -21411,7 +21028,7 @@ var script$1$2 = { dataKey: null }, style: TimelineStyle, - provide: /* @__PURE__ */ __name(function provide49() { + provide: /* @__PURE__ */ __name(function provide48() { return { $pcTimeline: this, $parentInstance: this @@ -21483,12 +21100,12 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$6, "render$6"); script$7.render = render$6; -var theme$1 = /* @__PURE__ */ __name(function theme39(_ref) { +var theme$1 = /* @__PURE__ */ __name(function theme38(_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) { + root: /* @__PURE__ */ __name(function root31(_ref2) { var props = _ref2.props; return { position: props.appendTo === "self" ? "relative" : void 0 @@ -21496,7 +21113,7 @@ var inlineStyles$1 = { }, "root") }; var classes$1 = { - root: /* @__PURE__ */ __name(function root33(_ref3) { + root: /* @__PURE__ */ __name(function root32(_ref3) { var instance = _ref3.instance, props = _ref3.props; return ["p-treeselect p-component p-inputwrapper", { "p-treeselect-display-chip": props.display === "chip", @@ -21537,7 +21154,7 @@ var TreeSelectStyle = BaseStyle.extend({ }); var script$1$1 = { name: "BaseTreeSelect", - "extends": script$1n, + "extends": script$1k, props: { options: Array, scrollHeight: { @@ -21658,7 +21275,7 @@ var script$1$1 = { } }, style: TreeSelectStyle, - provide: /* @__PURE__ */ __name(function provide50() { + provide: /* @__PURE__ */ __name(function provide49() { return { $pcTreeSelect: this, $parentInstance: this @@ -21789,7 +21406,7 @@ var script$6 = { "default": null } }, - data: /* @__PURE__ */ __name(function data36() { + data: /* @__PURE__ */ __name(function data35() { return { id: this.$attrs.id, focused: false, @@ -21823,7 +21440,7 @@ var script$6 = { overlay: null, selfChange: false, selfClick: false, - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount17() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount16() { this.unbindOutsideClickListener(); this.unbindResizeListener(); if (this.scrollHandler) { @@ -21844,7 +21461,7 @@ var script$6 = { this.$emit("before-show"); this.overlayVisible = true; }, "show"), - hide: /* @__PURE__ */ __name(function hide7() { + hide: /* @__PURE__ */ __name(function hide6() { this.$emit("before-hide"); this.overlayVisible = false; this.$refs.focusInput.focus(); @@ -22006,7 +21623,7 @@ var script$6 = { absolutePosition(this.overlay, this.$el); } }, "alignOverlay"), - bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener7() { + bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener6() { var _this2 = this; if (!this.outsideClickListener) { this.outsideClickListener = function(event2) { @@ -22018,7 +21635,7 @@ var script$6 = { document.addEventListener("click", this.outsideClickListener); } }, "bindOutsideClickListener"), - unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener7() { + unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener6() { if (this.outsideClickListener) { document.removeEventListener("click", this.outsideClickListener); this.outsideClickListener = null; @@ -22057,7 +21674,7 @@ var script$6 = { this.resizeListener = null; } }, "unbindResizeListener"), - isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked5(event2) { + isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked4(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) { @@ -22227,10 +21844,10 @@ var script$6 = { }, components: { TSTree: script$1U, - Chip: script$1t, - Portal: script$1f, - ChevronDownIcon: script$1k, - TimesIcon: script$1g + Chip: script$1s, + Portal: script$1m, + ChevronDownIcon: script$1h, + TimesIcon: script$1q }, directives: { ripple: Ripple @@ -22526,12 +22143,12 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$5, "render$5"); script$6.render = render$5; -var theme40 = /* @__PURE__ */ __name(function theme41(_ref) { +var theme39 = /* @__PURE__ */ __name(function theme40(_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) { + root: /* @__PURE__ */ __name(function root33(_ref2) { var instance = _ref2.instance, props = _ref2.props; return ["p-treetable p-component", { "p-treetable-hoverable": props.rowHover || instance.rowSelectionMode, @@ -22624,13 +22241,13 @@ var inlineStyles = { }; var TreeTableStyle = BaseStyle.extend({ name: "treetable", - theme: theme40, + theme: theme39, classes, inlineStyles }); var script$5 = { name: "BaseTreeTable", - "extends": script$1d, + "extends": script$1f, props: { value: { type: null, @@ -22806,7 +22423,7 @@ var script$5 = { } }, style: TreeTableStyle, - provide: /* @__PURE__ */ __name(function provide51() { + provide: /* @__PURE__ */ __name(function provide50() { return { $pcTreeTable: this, $parentInstance: this @@ -22816,7 +22433,7 @@ var script$5 = { var script$4 = { name: "FooterCell", hostName: "TreeTable", - "extends": script$1d, + "extends": script$1f, props: { column: { type: Object, @@ -22827,7 +22444,7 @@ var script$4 = { "default": null } }, - data: /* @__PURE__ */ __name(function data37() { + data: /* @__PURE__ */ __name(function data36() { return { styleObject: {} }; @@ -22837,7 +22454,7 @@ var script$4 = { this.updateStickyPosition(); } }, "mounted"), - updated: /* @__PURE__ */ __name(function updated10() { + updated: /* @__PURE__ */ __name(function updated9() { if (this.columnProp("frozen")) { this.updateStickyPosition(); } @@ -22973,7 +22590,7 @@ script$4.render = render$4; var script$3 = { name: "HeaderCell", hostName: "TreeTable", - "extends": script$1d, + "extends": script$1f, emits: ["column-click", "column-resizestart"], props: { column: { @@ -23005,7 +22622,7 @@ var script$3 = { "default": null } }, - data: /* @__PURE__ */ __name(function data38() { + data: /* @__PURE__ */ __name(function data37() { return { styleObject: {} }; @@ -23015,7 +22632,7 @@ var script$3 = { this.updateStickyPosition(); } }, "mounted"), - updated: /* @__PURE__ */ __name(function updated11() { + updated: /* @__PURE__ */ __name(function updated10() { if (this.columnProp("frozen")) { this.updateStickyPosition(); } @@ -23158,7 +22775,7 @@ var script$3 = { }, "ariaSort") }, components: { - Badge: script$1z, + Badge: script$1y, SortAltIcon: script$1V, SortAmountUpAltIcon: script$1W, SortAmountDownIcon: script$1X @@ -23269,7 +22886,7 @@ script$3.render = render$3; var script$2 = { name: "BodyCell", hostName: "TreeTable", - "extends": script$1d, + "extends": script$1f, emits: ["node-toggle", "checkbox-toggle"], props: { node: { @@ -23321,7 +22938,7 @@ var script$2 = { "default": "mask" } }, - data: /* @__PURE__ */ __name(function data39() { + data: /* @__PURE__ */ __name(function data38() { return { styleObject: {} }; @@ -23331,7 +22948,7 @@ var script$2 = { this.updateStickyPosition(); } }, "mounted"), - updated: /* @__PURE__ */ __name(function updated12() { + updated: /* @__PURE__ */ __name(function updated11() { if (this.columnProp("frozen")) { this.updateStickyPosition(); } @@ -23433,12 +23050,12 @@ var script$2 = { }, "checkboxSelectionMode") }, components: { - Checkbox: script$1J, - ChevronRightIcon: script$1l, - ChevronDownIcon: script$1k, - CheckIcon: script$1D, - MinusIcon: script$1y, - SpinnerIcon: script$1r + Checkbox: script$1I, + ChevronRightIcon: script$1i, + ChevronDownIcon: script$1h, + CheckIcon: script$1C, + MinusIcon: script$1x, + SpinnerIcon: script$1p }, directives: { ripple: Ripple @@ -23696,7 +23313,7 @@ __name(_arrayLikeToArray$1, "_arrayLikeToArray$1"); var script$1 = { name: "TreeTableRow", hostName: "TreeTable", - "extends": script$1d, + "extends": script$1f, emits: ["node-click", "node-toggle", "checkbox-change", "nodeClick", "nodeToggle", "checkboxChange", "row-rightclick", "rowRightclick"], props: { node: { @@ -24297,12 +23914,12 @@ var script = { "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() { + provide: /* @__PURE__ */ __name(function provide51() { return { $columns: this.d_columns }; }, "provide"), - data: /* @__PURE__ */ __name(function data40() { + data: /* @__PURE__ */ __name(function data39() { return { d_expandedKeys: this.expandedKeys || {}, d_first: this.first, @@ -24340,7 +23957,7 @@ var script = { this.d_multiSortMeta = newValue; }, "multiSortMeta") }, - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount18() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount17() { this.destroyStyleElement(); this.d_columns.clear(); }, "beforeUnmount"), @@ -24857,32 +24474,32 @@ var script = { return this.value; } else { if (this.value && this.value.length) { - var data41 = this.value; + var data40 = this.value; if (this.sorted) { - if (this.sortMode === "single") data41 = this.sortSingle(data41); - else if (this.sortMode === "multiple") data41 = this.sortMultiple(data41); + if (this.sortMode === "single") data40 = this.sortSingle(data40); + else if (this.sortMode === "multiple") data40 = this.sortMultiple(data40); } if (this.hasFilters()) { - data41 = this.filter(data41); + data40 = this.filter(data40); } - return data41; + return data40; } else { return null; } } }, "processedData"), dataToRender: /* @__PURE__ */ __name(function dataToRender() { - var data41 = this.processedData; + var data40 = this.processedData; if (this.paginator) { var first3 = this.lazy ? 0 : this.d_first; - return data41.slice(first3, first3 + this.d_rows); + return data40.slice(first3, first3 + this.d_rows); } else { - return data41; + return data40; } }, "dataToRender"), empty: /* @__PURE__ */ __name(function empty2() { - var data41 = this.processedData; - return !data41 || data41.length === 0; + var data40 = this.processedData; + return !data40 || data40.length === 0; }, "empty"), sorted: /* @__PURE__ */ __name(function sorted() { return this.d_sortField || this.d_multiSortMeta && this.d_multiSortMeta.length > 0; @@ -24924,17 +24541,17 @@ var script = { if (this.lazy) { return this.totalRecords; } else { - var data41 = this.processedData; - return data41 ? data41.length : 0; + var data40 = this.processedData; + return data40 ? data40.length : 0; } }, "totalRecordsLength") }, components: { TTRow: script$1, - TTPaginator: script$1u, + TTPaginator: script$1t, TTHeaderCell: script$3, TTFooterCell: script$4, - SpinnerIcon: script$1r + SpinnerIcon: script$1p } }; function _typeof(o) { @@ -25514,7 +25131,7 @@ const useMaintenanceTaskStore = defineStore("maintenanceTask", () => { () => tasks.value.filter((task) => task.isInstallationFix).some((task) => getRunner(task)?.executing) ); const tasks = ref(DESKTOP_MAINTENANCE_TASKS); - const taskStates = ref( + const taskRunners = ref( new Map( DESKTOP_MAINTENANCE_TASKS.map((x) => [x.id, new MaintenanceTaskRunner(x)]) ) @@ -25522,7 +25139,7 @@ const useMaintenanceTaskStore = defineStore("maintenanceTask", () => { const anyErrors = computed( () => tasks.value.some((task) => getRunner(task).state === "error") ); - const getRunner = /* @__PURE__ */ __name((task) => taskStates.value.get(task.id), "getRunner"); + const getRunner = /* @__PURE__ */ __name((task) => taskRunners.value.get(task.id), "getRunner"); const processUpdate = /* @__PURE__ */ __name((validationUpdate) => { const update = validationUpdate; isRefreshing.value = true; @@ -25627,7 +25244,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({ ]), footer: withCtx(() => [ createBaseVNode("div", _hoisted_3$3, [ - createVNode(unref(script$1e), { + createVNode(unref(script$1d), { icon: _ctx.task.button?.icon, label: _ctx.task.button?.text, class: "w-full", @@ -25676,7 +25293,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({ const props = __props; return (_ctx, _cache) => { const _directive_tooltip = resolveDirective("tooltip"); - return !_ctx.state || _ctx.loading ? (openBlock(), createBlock(unref(script$1h), { + return !_ctx.state || _ctx.loading ? (openBlock(), createBlock(unref(script$1c), { key: 0, class: "h-8 w-8" })) : withDirectives((openBlock(), createElementBlock("i", { @@ -25733,7 +25350,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({ ]), createBaseVNode("td", null, [ createBaseVNode("p", _hoisted_2$2, toDisplayString(_ctx.task.name), 1), - createVNode(unref(script$1e), { + createVNode(unref(script$1d), { class: "inline-block mx-2", type: "button", icon: unref(PrimeIcons).INFO_CIRCLE, @@ -25741,7 +25358,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({ text: true, onClick: toggle6 }, null, 8, ["icon"]), - createVNode(unref(script$1Q), { + createVNode(unref(script$1P), { ref_key: "infoPopover", ref: infoPopover, class: "block m-1 max-w-64 min-w-32" @@ -25753,7 +25370,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({ }, 512) ]), createBaseVNode("td", _hoisted_4$2, [ - createVNode(unref(script$1e), { + createVNode(unref(script$1d), { icon: _ctx.task.button?.icon, label: _ctx.task.button?.text, severity: severity.value, @@ -25856,13 +25473,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({ }; } }); -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_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 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 _hoisted_3 = { class: "backspan pi-wrench text-4xl font-bold" }; +const _hoisted_4 = { class: "w-full flex flex-wrap gap-4 items-center" }; +const _hoisted_5 = { class: "grow" }; +const _hoisted_6 = { class: "flex gap-4 items-center" }; +const _hoisted_7 = { class: "max-sm:hidden" }; +const _hoisted_8 = { class: "flex justify-between gap-4 flex-row" }; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "MaintenanceView", setup(__props) { @@ -25891,22 +25509,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ if (alertOnFail && !isValid) { toast.add({ severity: "error", - summary: "Error", - detail: "Unable to continue - errors remain", + summary: t("g.error"), + detail: t("maintenance.error.cannotContinue"), 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"); @@ -25929,20 +25537,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ }); onUnmounted(() => electron2.Validation.dispose()); return (_ctx, _cache) => { - return openBlock(), createBlock(_sfc_main$7, { dark: "" }, { + return openBlock(), createBlock(_sfc_main$8, { 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: ")), + createBaseVNode("h1", _hoisted_3, toDisplayString(unref(t)("maintenance.title")), 1), + createBaseVNode("div", _hoisted_4, [ + createBaseVNode("span", _hoisted_5, [ + createTextVNode(toDisplayString(unref(t)("maintenance.status")) + ": ", 1), createVNode(_sfc_main$5, { refreshing: unref(isRefreshing), error: anyErrors.value }, null, 8, ["refreshing", "error"]) ]), - createBaseVNode("div", _hoisted_5, [ + createBaseVNode("div", _hoisted_6, [ createVNode(unref(script$1$), { modelValue: displayAsList.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => displayAsList.value = $event), @@ -25970,7 +25578,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ createBaseVNode("i", { class: normalizeClass(opts.option.icon) }, null, 2), - createBaseVNode("span", _hoisted_6, toDisplayString(opts.option.value), 1) + createBaseVNode("span", _hoisted_7, toDisplayString(opts.option.value), 1) ]), _: 1 }, 8, ["modelValue", "options", "onChange"]), @@ -25988,36 +25596,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ displayAsList: displayAsList.value, isRefreshing: unref(isRefreshing) }, null, 8, ["filter", "displayAsList", "isRefreshing"]), - createBaseVNode("div", _hoisted_7, [ - createVNode(unref(script$1e), { - label: "Console Logs", + createBaseVNode("div", _hoisted_8, [ + createVNode(unref(script$1d), { + label: unref(t)("maintenance.consoleLogs"), icon: "pi pi-desktop", "icon-pos": "left", severity: "secondary", onClick: toggleConsoleDrawer - }), - createVNode(unref(script$1e), { - label: "Continue", + }, null, 8, ["label"]), + createVNode(unref(script$1d), { + label: unref(t)("g.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"]) + }, null, 8, ["label", "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(_sfc_main$7, { + modelValue: terminalVisible.value, + "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => terminalVisible.value = $event), + header: unref(t)("g.terminal"), + "default-message": unref(t)("maintenance.terminalDefaultMessage") + }, null, 8, ["modelValue", "header", "default-message"]), createVNode(unref(script$20)) ]) ]), @@ -26026,8 +25628,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ }; } }); -const MaintenanceView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-74b78f7d"]]); +const MaintenanceView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dd50a7dd"]]); export { MaintenanceView as default }; -//# sourceMappingURL=MaintenanceView-Df7CHNWW.js.map +//# sourceMappingURL=MaintenanceView-BUmTZX1d.js.map diff --git a/web/assets/MaintenanceView-Bj5_Vr6o.css b/web/assets/MaintenanceView-DEJCj8SR.css similarity index 95% rename from web/assets/MaintenanceView-Bj5_Vr6o.css rename to web/assets/MaintenanceView-DEJCj8SR.css index 22e37c41..c12b64c9 100644 --- a/web/assets/MaintenanceView-Bj5_Vr6o.css +++ b/web/assets/MaintenanceView-DEJCj8SR.css @@ -63,10 +63,10 @@ } } -[data-v-74b78f7d] .p-tag { +[data-v-dd50a7dd] .p-tag { --p-tag-gap: 0.375rem; } -.backspan[data-v-74b78f7d]::before { +.backspan[data-v-dd50a7dd]::before { position: absolute; margin: 0px; color: var(--p-text-muted-color); diff --git a/web/assets/ManualConfigurationView-Cz0_f_T-.js b/web/assets/ManualConfigurationView-D3on5kXY.js similarity index 92% rename from web/assets/ManualConfigurationView-Cz0_f_T-.js rename to web/assets/ManualConfigurationView-D3on5kXY.js index bd81747f..bcb4cdaa 100644 --- a/web/assets/ManualConfigurationView-Cz0_f_T-.js +++ b/web/assets/ManualConfigurationView-D3on5kXY.js @@ -1,7 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -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-DqqhYDnY.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cz111_1A.js"; +import { d as defineComponent, I as useI18n, T 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, a5 as script, b3 as script$1, l as script$2, b9 as electronAPI, _ as _export_sfc } from "./index-DqXp9vW4.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-DlGljfEG.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" }; @@ -71,4 +71,4 @@ const ManualConfigurationView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scop export { ManualConfigurationView as default }; -//# sourceMappingURL=ManualConfigurationView-Cz0_f_T-.js.map +//# sourceMappingURL=ManualConfigurationView-D3on5kXY.js.map diff --git a/web/assets/MetricsConsentView-B5NlgqrS.js b/web/assets/MetricsConsentView-DK20ednB.js similarity index 88% rename from web/assets/MetricsConsentView-B5NlgqrS.js rename to web/assets/MetricsConsentView-DK20ednB.js index 73800290..e887d63b 100644 --- a/web/assets/MetricsConsentView-B5NlgqrS.js +++ b/web/assets/MetricsConsentView-DK20ednB.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-Cz111_1A.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-DqqhYDnY.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-DlGljfEG.js"; +import { d as defineComponent, aV as useToast, I as useI18n, T as ref, bi as useRouter, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, E as toDisplayString, a8 as createTextVNode, k as createVNode, j as unref, br as script, l as script$1, b9 as electronAPI } from "./index-DqXp9vW4.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" }; @@ -83,4 +83,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as default }; -//# sourceMappingURL=MetricsConsentView-B5NlgqrS.js.map +//# sourceMappingURL=MetricsConsentView-DK20ednB.js.map diff --git a/web/assets/NotSupportedView-BUpntA4x.js b/web/assets/NotSupportedView-BzM0uuqA.js similarity index 95% rename from web/assets/NotSupportedView-BUpntA4x.js rename to web/assets/NotSupportedView-BzM0uuqA.js index 51a34c8a..532b19ab 100644 --- a/web/assets/NotSupportedView-BUpntA4x.js +++ b/web/assets/NotSupportedView-BzM0uuqA.js @@ -1,7 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -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-DqqhYDnY.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cz111_1A.js"; +import { d as defineComponent, bi 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-DqXp9vW4.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-DlGljfEG.js"; const _imports_0 = "" + new URL("images/sad_girl.png", import.meta.url).href; const _hoisted_1 = { class: "sad-container" }; const _hoisted_2 = { class: "no-drag sad-text flex items-center" }; @@ -83,4 +83,4 @@ const NotSupportedView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", " export { NotSupportedView as default }; -//# sourceMappingURL=NotSupportedView-BUpntA4x.js.map +//# sourceMappingURL=NotSupportedView-BzM0uuqA.js.map diff --git a/web/assets/ServerConfigPanel-B1lI5M9c.js b/web/assets/ServerConfigPanel-D0jTW_iX.js similarity index 94% rename from web/assets/ServerConfigPanel-B1lI5M9c.js rename to web/assets/ServerConfigPanel-D0jTW_iX.js index 6a8c27a8..cd7194db 100644 --- a/web/assets/ServerConfigPanel-B1lI5M9c.js +++ b/web/assets/ServerConfigPanel-D0jTW_iX.js @@ -1,7 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -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-DqqhYDnY.js"; -import { u as useServerConfigStore } from "./serverConfigStore-Kb5DJVFt.js"; +import { o as openBlock, f as createElementBlock, m as createBaseVNode, H as markRaw, d as defineComponent, a as useSettingStore, af as storeToRefs, N as watch, dJ as useCopyToClipboard, I as useI18n, y as createBlock, z as withCtx, j as unref, bn as script, E as toDisplayString, D as renderList, F as Fragment, k as createVNode, l as script$1, B as createCommentVNode, bl as script$2, dK as FormItem, dz as _sfc_main$1, b9 as electronAPI } from "./index-DqXp9vW4.js"; +import { u as useServerConfigStore } from "./serverConfigStore-C8uoM7Sm.js"; const _hoisted_1$1 = { viewBox: "0 0 24 24", width: "1.2em", @@ -153,4 +153,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as default }; -//# sourceMappingURL=ServerConfigPanel-B1lI5M9c.js.map +//# sourceMappingURL=ServerConfigPanel-D0jTW_iX.js.map diff --git a/web/assets/ServerStartView-BpH4TXPO.js b/web/assets/ServerStartView-BENqs5bD.js similarity index 92% rename from web/assets/ServerStartView-BpH4TXPO.js rename to web/assets/ServerStartView-BENqs5bD.js index 6796222b..2e154ee9 100644 --- a/web/assets/ServerStartView-BpH4TXPO.js +++ b/web/assets/ServerStartView-BENqs5bD.js @@ -1,7 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -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-DqqhYDnY.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cz111_1A.js"; +import { d as defineComponent, I as useI18n, T as ref, bo as ProgressStatus, p as onMounted, o as openBlock, y as createBlock, z as withCtx, m as createBaseVNode, a8 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, bp as BaseTerminal, b9 as electronAPI, _ as _export_sfc } from "./index-DqXp9vW4.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-DlGljfEG.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 }; @@ -93,8 +93,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ }; } }); -const ServerStartView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4140d62b"]]); +const ServerStartView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e6ba9633"]]); export { ServerStartView as default }; -//# sourceMappingURL=ServerStartView-BpH4TXPO.js.map +//# sourceMappingURL=ServerStartView-BENqs5bD.js.map diff --git a/web/assets/ServerStartView-CJiwVDQY.css b/web/assets/ServerStartView-BZ7uhZHv.css similarity index 64% rename from web/assets/ServerStartView-CJiwVDQY.css rename to web/assets/ServerStartView-BZ7uhZHv.css index 7d53a927..778134b7 100644 --- a/web/assets/ServerStartView-CJiwVDQY.css +++ b/web/assets/ServerStartView-BZ7uhZHv.css @@ -1,5 +1,5 @@ -[data-v-4140d62b] .xterm-helper-textarea { +[data-v-e6ba9633] .xterm-helper-textarea { /* Hide this as it moves all over when uv is running */ display: none; } diff --git a/web/assets/TerminalOutputDrawer-BgTEspHP.js b/web/assets/TerminalOutputDrawer-BgTEspHP.js new file mode 100644 index 00000000..786fe62f --- /dev/null +++ b/web/assets/TerminalOutputDrawer-BgTEspHP.js @@ -0,0 +1,1061 @@ +var __defProp = Object.defineProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +import { bG as BaseStyle, bH as script$2, bZ as ZIndex, bU as addClass, bL as focus, cy as blockBodyScroll, cA as unblockBodyScroll, cB as FocusTrap, l as script$3, ca as script$4, cl as script$5, bR as resolveComponent, r as resolveDirective, o as openBlock, y as createBlock, z as withCtx, f as createElementBlock, at as mergeProps, k as createVNode, bI as Transition, i as withDirectives, A as renderSlot, F as Fragment, m as createBaseVNode, aj as normalizeClass, E as toDisplayString, B as createCommentVNode, C as resolveDynamicComponent, dd as commonjsGlobal, de as getDefaultExportFromCjs, H as markRaw, df as xtermExports, p as onMounted, d8 as onUnmounted, d as defineComponent, bw as mergeModels, bq as useModel, bp as BaseTerminal, j as unref, b9 as electronAPI } from "./index-DqXp9vW4.js"; +var theme = /* @__PURE__ */ __name(function theme2(_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 = { + 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 = { + mask: /* @__PURE__ */ __name(function mask2(_ref3) { + var instance = _ref3.instance, props = _ref3.props; + var positions = ["left", "right", "top", "bottom"]; + var pos = positions.find(function(item) { + return item === 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, + classes, + inlineStyles +}); +var script$1 = { + name: "BaseDrawer", + "extends": script$2, + 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 _default() { + 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 = { + name: "Drawer", + "extends": script$1, + 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(event) { + if (this.dismissable && this.modal && this.mask === event.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(event) { + if (event.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(event) { + if (_this.isOutsideClicked(event)) { + _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(event) { + return this.container && !this.container.contains(event.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$3, + Portal: script$4, + TimesIcon: script$5 + } +}; +var _hoisted_1 = ["aria-modal"]; +function render(_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)), [[_directive_focustrap]]) : createCommentVNode("", true)]; + }), + _: 3 + }, 16, ["onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])], 16)) : createCommentVNode("", true)]; + }), + _: 3 + }); +} +__name(render, "render"); +script.render = render; +var addonSerialize$2 = { exports: {} }; +var addonSerialize = addonSerialize$2.exports; +(function(module, exports) { + !function(e, t) { + true ? module.exports = t() : false ? (void 0)([], t) : true ? exports.SerializeAddon = t() : e.SerializeAddon = t(); + }(commonjsGlobal, () => (() => { + "use strict"; + var e = { 930: (e2, t2, s2) => { + Object.defineProperty(t2, "__esModule", { value: true }), t2.ColorContrastCache = void 0; + const r2 = s2(485); + t2.ColorContrastCache = class { + constructor() { + this._color = new r2.TwoKeyMap(), this._css = new r2.TwoKeyMap(); + } + setCss(e3, t3, s3) { + this._css.set(e3, t3, s3); + } + getCss(e3, t3) { + return this._css.get(e3, t3); + } + setColor(e3, t3, s3) { + this._color.set(e3, t3, s3); + } + getColor(e3, t3) { + return this._color.get(e3, t3); + } + clear() { + this._color.clear(), this._css.clear(); + } + }; + }, 997: function(e2, t2, s2) { + var r2 = this && this.__decorate || function(e3, t3, s3, r3) { + var o2, i2 = arguments.length, n2 = i2 < 3 ? t3 : null === r3 ? r3 = Object.getOwnPropertyDescriptor(t3, s3) : r3; + if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n2 = Reflect.decorate(e3, t3, s3, r3); + else for (var l2 = e3.length - 1; l2 >= 0; l2--) (o2 = e3[l2]) && (n2 = (i2 < 3 ? o2(n2) : i2 > 3 ? o2(t3, s3, n2) : o2(t3, s3)) || n2); + return i2 > 3 && n2 && Object.defineProperty(t3, s3, n2), n2; + }, o = this && this.__param || function(e3, t3) { + return function(s3, r3) { + t3(s3, r3, e3); + }; + }; + Object.defineProperty(t2, "__esModule", { value: true }), t2.ThemeService = t2.DEFAULT_ANSI_COLORS = void 0; + const i = s2(930), n = s2(160), l = s2(345), a = s2(859), c = s2(97), h = n.css.toColor("#ffffff"), u = n.css.toColor("#000000"), _ = n.css.toColor("#ffffff"), d = n.css.toColor("#000000"), C = { css: "rgba(255, 255, 255, 0.3)", rgba: 4294967117 }; + t2.DEFAULT_ANSI_COLORS = Object.freeze((() => { + const e3 = [n.css.toColor("#2e3436"), n.css.toColor("#cc0000"), n.css.toColor("#4e9a06"), n.css.toColor("#c4a000"), n.css.toColor("#3465a4"), n.css.toColor("#75507b"), n.css.toColor("#06989a"), n.css.toColor("#d3d7cf"), n.css.toColor("#555753"), n.css.toColor("#ef2929"), n.css.toColor("#8ae234"), n.css.toColor("#fce94f"), n.css.toColor("#729fcf"), n.css.toColor("#ad7fa8"), n.css.toColor("#34e2e2"), n.css.toColor("#eeeeec")], t3 = [0, 95, 135, 175, 215, 255]; + for (let s3 = 0; s3 < 216; s3++) { + const r3 = t3[s3 / 36 % 6 | 0], o2 = t3[s3 / 6 % 6 | 0], i2 = t3[s3 % 6]; + e3.push({ css: n.channels.toCss(r3, o2, i2), rgba: n.channels.toRgba(r3, o2, i2) }); + } + for (let t4 = 0; t4 < 24; t4++) { + const s3 = 8 + 10 * t4; + e3.push({ css: n.channels.toCss(s3, s3, s3), rgba: n.channels.toRgba(s3, s3, s3) }); + } + return e3; + })()); + let f = t2.ThemeService = class extends a.Disposable { + get colors() { + return this._colors; + } + constructor(e3) { + super(), this._optionsService = e3, this._contrastCache = new i.ColorContrastCache(), this._halfContrastCache = new i.ColorContrastCache(), this._onChangeColors = this.register(new l.EventEmitter()), this.onChangeColors = this._onChangeColors.event, this._colors = { foreground: h, background: u, cursor: _, cursorAccent: d, selectionForeground: void 0, selectionBackgroundTransparent: C, selectionBackgroundOpaque: n.color.blend(u, C), selectionInactiveBackgroundTransparent: C, selectionInactiveBackgroundOpaque: n.color.blend(u, C), ansi: t2.DEFAULT_ANSI_COLORS.slice(), contrastCache: this._contrastCache, halfContrastCache: this._halfContrastCache }, this._updateRestoreColors(), this._setTheme(this._optionsService.rawOptions.theme), this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio", () => this._contrastCache.clear())), this.register(this._optionsService.onSpecificOptionChange("theme", () => this._setTheme(this._optionsService.rawOptions.theme))); + } + _setTheme(e3 = {}) { + const s3 = this._colors; + if (s3.foreground = g(e3.foreground, h), s3.background = g(e3.background, u), s3.cursor = g(e3.cursor, _), s3.cursorAccent = g(e3.cursorAccent, d), s3.selectionBackgroundTransparent = g(e3.selectionBackground, C), s3.selectionBackgroundOpaque = n.color.blend(s3.background, s3.selectionBackgroundTransparent), s3.selectionInactiveBackgroundTransparent = g(e3.selectionInactiveBackground, s3.selectionBackgroundTransparent), s3.selectionInactiveBackgroundOpaque = n.color.blend(s3.background, s3.selectionInactiveBackgroundTransparent), s3.selectionForeground = e3.selectionForeground ? g(e3.selectionForeground, n.NULL_COLOR) : void 0, s3.selectionForeground === n.NULL_COLOR && (s3.selectionForeground = void 0), n.color.isOpaque(s3.selectionBackgroundTransparent)) { + const e4 = 0.3; + s3.selectionBackgroundTransparent = n.color.opacity(s3.selectionBackgroundTransparent, e4); + } + if (n.color.isOpaque(s3.selectionInactiveBackgroundTransparent)) { + const e4 = 0.3; + s3.selectionInactiveBackgroundTransparent = n.color.opacity(s3.selectionInactiveBackgroundTransparent, e4); + } + if (s3.ansi = t2.DEFAULT_ANSI_COLORS.slice(), s3.ansi[0] = g(e3.black, t2.DEFAULT_ANSI_COLORS[0]), s3.ansi[1] = g(e3.red, t2.DEFAULT_ANSI_COLORS[1]), s3.ansi[2] = g(e3.green, t2.DEFAULT_ANSI_COLORS[2]), s3.ansi[3] = g(e3.yellow, t2.DEFAULT_ANSI_COLORS[3]), s3.ansi[4] = g(e3.blue, t2.DEFAULT_ANSI_COLORS[4]), s3.ansi[5] = g(e3.magenta, t2.DEFAULT_ANSI_COLORS[5]), s3.ansi[6] = g(e3.cyan, t2.DEFAULT_ANSI_COLORS[6]), s3.ansi[7] = g(e3.white, t2.DEFAULT_ANSI_COLORS[7]), s3.ansi[8] = g(e3.brightBlack, t2.DEFAULT_ANSI_COLORS[8]), s3.ansi[9] = g(e3.brightRed, t2.DEFAULT_ANSI_COLORS[9]), s3.ansi[10] = g(e3.brightGreen, t2.DEFAULT_ANSI_COLORS[10]), s3.ansi[11] = g(e3.brightYellow, t2.DEFAULT_ANSI_COLORS[11]), s3.ansi[12] = g(e3.brightBlue, t2.DEFAULT_ANSI_COLORS[12]), s3.ansi[13] = g(e3.brightMagenta, t2.DEFAULT_ANSI_COLORS[13]), s3.ansi[14] = g(e3.brightCyan, t2.DEFAULT_ANSI_COLORS[14]), s3.ansi[15] = g(e3.brightWhite, t2.DEFAULT_ANSI_COLORS[15]), e3.extendedAnsi) { + const r3 = Math.min(s3.ansi.length - 16, e3.extendedAnsi.length); + for (let o2 = 0; o2 < r3; o2++) s3.ansi[o2 + 16] = g(e3.extendedAnsi[o2], t2.DEFAULT_ANSI_COLORS[o2 + 16]); + } + this._contrastCache.clear(), this._halfContrastCache.clear(), this._updateRestoreColors(), this._onChangeColors.fire(this.colors); + } + restoreColor(e3) { + this._restoreColor(e3), this._onChangeColors.fire(this.colors); + } + _restoreColor(e3) { + if (void 0 !== e3) switch (e3) { + case 256: + this._colors.foreground = this._restoreColors.foreground; + break; + case 257: + this._colors.background = this._restoreColors.background; + break; + case 258: + this._colors.cursor = this._restoreColors.cursor; + break; + default: + this._colors.ansi[e3] = this._restoreColors.ansi[e3]; + } + else for (let e4 = 0; e4 < this._restoreColors.ansi.length; ++e4) this._colors.ansi[e4] = this._restoreColors.ansi[e4]; + } + modifyColors(e3) { + e3(this._colors), this._onChangeColors.fire(this.colors); + } + _updateRestoreColors() { + this._restoreColors = { foreground: this._colors.foreground, background: this._colors.background, cursor: this._colors.cursor, ansi: this._colors.ansi.slice() }; + } + }; + function g(e3, t3) { + if (void 0 !== e3) try { + return n.css.toColor(e3); + } catch { + } + return t3; + } + __name(g, "g"); + t2.ThemeService = f = r2([o(0, c.IOptionsService)], f); + }, 160: (e2, t2) => { + Object.defineProperty(t2, "__esModule", { value: true }), t2.contrastRatio = t2.toPaddedHex = t2.rgba = t2.rgb = t2.css = t2.color = t2.channels = t2.NULL_COLOR = void 0; + let s2 = 0, r2 = 0, o = 0, i = 0; + var n, l, a, c, h; + function u(e3) { + const t3 = e3.toString(16); + return t3.length < 2 ? "0" + t3 : t3; + } + __name(u, "u"); + function _(e3, t3) { + return e3 < t3 ? (t3 + 0.05) / (e3 + 0.05) : (e3 + 0.05) / (t3 + 0.05); + } + __name(_, "_"); + t2.NULL_COLOR = { css: "#00000000", rgba: 0 }, function(e3) { + e3.toCss = function(e4, t3, s3, r3) { + return void 0 !== r3 ? `#${u(e4)}${u(t3)}${u(s3)}${u(r3)}` : `#${u(e4)}${u(t3)}${u(s3)}`; + }, e3.toRgba = function(e4, t3, s3, r3 = 255) { + return (e4 << 24 | t3 << 16 | s3 << 8 | r3) >>> 0; + }, e3.toColor = function(t3, s3, r3, o2) { + return { css: e3.toCss(t3, s3, r3, o2), rgba: e3.toRgba(t3, s3, r3, o2) }; + }; + }(n || (t2.channels = n = {})), function(e3) { + function t3(e4, t4) { + return i = Math.round(255 * t4), [s2, r2, o] = h.toChannels(e4.rgba), { css: n.toCss(s2, r2, o, i), rgba: n.toRgba(s2, r2, o, i) }; + } + __name(t3, "t"); + e3.blend = function(e4, t4) { + if (i = (255 & t4.rgba) / 255, 1 === i) return { css: t4.css, rgba: t4.rgba }; + const l2 = t4.rgba >> 24 & 255, a2 = t4.rgba >> 16 & 255, c2 = t4.rgba >> 8 & 255, h2 = e4.rgba >> 24 & 255, u2 = e4.rgba >> 16 & 255, _2 = e4.rgba >> 8 & 255; + return s2 = h2 + Math.round((l2 - h2) * i), r2 = u2 + Math.round((a2 - u2) * i), o = _2 + Math.round((c2 - _2) * i), { css: n.toCss(s2, r2, o), rgba: n.toRgba(s2, r2, o) }; + }, e3.isOpaque = function(e4) { + return 255 == (255 & e4.rgba); + }, e3.ensureContrastRatio = function(e4, t4, s3) { + const r3 = h.ensureContrastRatio(e4.rgba, t4.rgba, s3); + if (r3) return n.toColor(r3 >> 24 & 255, r3 >> 16 & 255, r3 >> 8 & 255); + }, e3.opaque = function(e4) { + const t4 = (255 | e4.rgba) >>> 0; + return [s2, r2, o] = h.toChannels(t4), { css: n.toCss(s2, r2, o), rgba: t4 }; + }, e3.opacity = t3, e3.multiplyOpacity = function(e4, s3) { + return i = 255 & e4.rgba, t3(e4, i * s3 / 255); + }, e3.toColorRGB = function(e4) { + return [e4.rgba >> 24 & 255, e4.rgba >> 16 & 255, e4.rgba >> 8 & 255]; + }; + }(l || (t2.color = l = {})), function(e3) { + let t3, l2; + try { + const e4 = document.createElement("canvas"); + e4.width = 1, e4.height = 1; + const s3 = e4.getContext("2d", { willReadFrequently: true }); + s3 && (t3 = s3, t3.globalCompositeOperation = "copy", l2 = t3.createLinearGradient(0, 0, 1, 1)); + } catch { + } + e3.toColor = function(e4) { + if (e4.match(/#[\da-f]{3,8}/i)) switch (e4.length) { + case 4: + return s2 = parseInt(e4.slice(1, 2).repeat(2), 16), r2 = parseInt(e4.slice(2, 3).repeat(2), 16), o = parseInt(e4.slice(3, 4).repeat(2), 16), n.toColor(s2, r2, o); + case 5: + return s2 = parseInt(e4.slice(1, 2).repeat(2), 16), r2 = parseInt(e4.slice(2, 3).repeat(2), 16), o = parseInt(e4.slice(3, 4).repeat(2), 16), i = parseInt(e4.slice(4, 5).repeat(2), 16), n.toColor(s2, r2, o, i); + case 7: + return { css: e4, rgba: (parseInt(e4.slice(1), 16) << 8 | 255) >>> 0 }; + case 9: + return { css: e4, rgba: parseInt(e4.slice(1), 16) >>> 0 }; + } + const a2 = e4.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/); + if (a2) return s2 = parseInt(a2[1]), r2 = parseInt(a2[2]), o = parseInt(a2[3]), i = Math.round(255 * (void 0 === a2[5] ? 1 : parseFloat(a2[5]))), n.toColor(s2, r2, o, i); + if (!t3 || !l2) throw new Error("css.toColor: Unsupported css format"); + if (t3.fillStyle = l2, t3.fillStyle = e4, "string" != typeof t3.fillStyle) throw new Error("css.toColor: Unsupported css format"); + if (t3.fillRect(0, 0, 1, 1), [s2, r2, o, i] = t3.getImageData(0, 0, 1, 1).data, 255 !== i) throw new Error("css.toColor: Unsupported css format"); + return { rgba: n.toRgba(s2, r2, o, i), css: e4 }; + }; + }(a || (t2.css = a = {})), function(e3) { + function t3(e4, t4, s3) { + const r3 = e4 / 255, o2 = t4 / 255, i2 = s3 / 255; + return 0.2126 * (r3 <= 0.03928 ? r3 / 12.92 : Math.pow((r3 + 0.055) / 1.055, 2.4)) + 0.7152 * (o2 <= 0.03928 ? o2 / 12.92 : Math.pow((o2 + 0.055) / 1.055, 2.4)) + 0.0722 * (i2 <= 0.03928 ? i2 / 12.92 : Math.pow((i2 + 0.055) / 1.055, 2.4)); + } + __name(t3, "t"); + e3.relativeLuminance = function(e4) { + return t3(e4 >> 16 & 255, e4 >> 8 & 255, 255 & e4); + }, e3.relativeLuminance2 = t3; + }(c || (t2.rgb = c = {})), function(e3) { + function t3(e4, t4, s3) { + const r3 = e4 >> 24 & 255, o2 = e4 >> 16 & 255, i2 = e4 >> 8 & 255; + let n2 = t4 >> 24 & 255, l3 = t4 >> 16 & 255, a2 = t4 >> 8 & 255, h2 = _(c.relativeLuminance2(n2, l3, a2), c.relativeLuminance2(r3, o2, i2)); + for (; h2 < s3 && (n2 > 0 || l3 > 0 || a2 > 0); ) n2 -= Math.max(0, Math.ceil(0.1 * n2)), l3 -= Math.max(0, Math.ceil(0.1 * l3)), a2 -= Math.max(0, Math.ceil(0.1 * a2)), h2 = _(c.relativeLuminance2(n2, l3, a2), c.relativeLuminance2(r3, o2, i2)); + return (n2 << 24 | l3 << 16 | a2 << 8 | 255) >>> 0; + } + __name(t3, "t"); + function l2(e4, t4, s3) { + const r3 = e4 >> 24 & 255, o2 = e4 >> 16 & 255, i2 = e4 >> 8 & 255; + let n2 = t4 >> 24 & 255, l3 = t4 >> 16 & 255, a2 = t4 >> 8 & 255, h2 = _(c.relativeLuminance2(n2, l3, a2), c.relativeLuminance2(r3, o2, i2)); + for (; h2 < s3 && (n2 < 255 || l3 < 255 || a2 < 255); ) n2 = Math.min(255, n2 + Math.ceil(0.1 * (255 - n2))), l3 = Math.min(255, l3 + Math.ceil(0.1 * (255 - l3))), a2 = Math.min(255, a2 + Math.ceil(0.1 * (255 - a2))), h2 = _(c.relativeLuminance2(n2, l3, a2), c.relativeLuminance2(r3, o2, i2)); + return (n2 << 24 | l3 << 16 | a2 << 8 | 255) >>> 0; + } + __name(l2, "l"); + e3.blend = function(e4, t4) { + if (i = (255 & t4) / 255, 1 === i) return t4; + const l3 = t4 >> 24 & 255, a2 = t4 >> 16 & 255, c2 = t4 >> 8 & 255, h2 = e4 >> 24 & 255, u2 = e4 >> 16 & 255, _2 = e4 >> 8 & 255; + return s2 = h2 + Math.round((l3 - h2) * i), r2 = u2 + Math.round((a2 - u2) * i), o = _2 + Math.round((c2 - _2) * i), n.toRgba(s2, r2, o); + }, e3.ensureContrastRatio = function(e4, s3, r3) { + const o2 = c.relativeLuminance(e4 >> 8), i2 = c.relativeLuminance(s3 >> 8); + if (_(o2, i2) < r3) { + if (i2 < o2) { + const i3 = t3(e4, s3, r3), n3 = _(o2, c.relativeLuminance(i3 >> 8)); + if (n3 < r3) { + const t4 = l2(e4, s3, r3); + return n3 > _(o2, c.relativeLuminance(t4 >> 8)) ? i3 : t4; + } + return i3; + } + const n2 = l2(e4, s3, r3), a2 = _(o2, c.relativeLuminance(n2 >> 8)); + if (a2 < r3) { + const i3 = t3(e4, s3, r3); + return a2 > _(o2, c.relativeLuminance(i3 >> 8)) ? n2 : i3; + } + return n2; + } + }, e3.reduceLuminance = t3, e3.increaseLuminance = l2, e3.toChannels = function(e4) { + return [e4 >> 24 & 255, e4 >> 16 & 255, e4 >> 8 & 255, 255 & e4]; + }; + }(h || (t2.rgba = h = {})), t2.toPaddedHex = u, t2.contrastRatio = _; + }, 345: (e2, t2) => { + Object.defineProperty(t2, "__esModule", { value: true }), t2.runAndSubscribe = t2.forwardEvent = t2.EventEmitter = void 0, t2.EventEmitter = class { + constructor() { + this._listeners = [], this._disposed = false; + } + get event() { + return this._event || (this._event = (e3) => (this._listeners.push(e3), { dispose: /* @__PURE__ */ __name(() => { + if (!this._disposed) { + for (let t3 = 0; t3 < this._listeners.length; t3++) if (this._listeners[t3] === e3) return void this._listeners.splice(t3, 1); + } + }, "dispose") })), this._event; + } + fire(e3, t3) { + const s2 = []; + for (let e4 = 0; e4 < this._listeners.length; e4++) s2.push(this._listeners[e4]); + for (let r2 = 0; r2 < s2.length; r2++) s2[r2].call(void 0, e3, t3); + } + dispose() { + this.clearListeners(), this._disposed = true; + } + clearListeners() { + this._listeners && (this._listeners.length = 0); + } + }, t2.forwardEvent = function(e3, t3) { + return e3((e4) => t3.fire(e4)); + }, t2.runAndSubscribe = function(e3, t3) { + return t3(void 0), e3((e4) => t3(e4)); + }; + }, 859: (e2, t2) => { + function s2(e3) { + for (const t3 of e3) t3.dispose(); + e3.length = 0; + } + __name(s2, "s"); + Object.defineProperty(t2, "__esModule", { value: true }), t2.getDisposeArrayDisposable = t2.disposeArray = t2.toDisposable = t2.MutableDisposable = t2.Disposable = void 0, t2.Disposable = class { + constructor() { + this._disposables = [], this._isDisposed = false; + } + dispose() { + this._isDisposed = true; + for (const e3 of this._disposables) e3.dispose(); + this._disposables.length = 0; + } + register(e3) { + return this._disposables.push(e3), e3; + } + unregister(e3) { + const t3 = this._disposables.indexOf(e3); + -1 !== t3 && this._disposables.splice(t3, 1); + } + }, t2.MutableDisposable = class { + constructor() { + this._isDisposed = false; + } + get value() { + return this._isDisposed ? void 0 : this._value; + } + set value(e3) { + this._isDisposed || e3 === this._value || (this._value?.dispose(), this._value = e3); + } + clear() { + this.value = void 0; + } + dispose() { + this._isDisposed = true, this._value?.dispose(), this._value = void 0; + } + }, t2.toDisposable = function(e3) { + return { dispose: e3 }; + }, t2.disposeArray = s2, t2.getDisposeArrayDisposable = function(e3) { + return { dispose: /* @__PURE__ */ __name(() => s2(e3), "dispose") }; + }; + }, 485: (e2, t2) => { + Object.defineProperty(t2, "__esModule", { value: true }), t2.FourKeyMap = t2.TwoKeyMap = void 0; + class s2 { + static { + __name(this, "s"); + } + constructor() { + this._data = {}; + } + set(e3, t3, s3) { + this._data[e3] || (this._data[e3] = {}), this._data[e3][t3] = s3; + } + get(e3, t3) { + return this._data[e3] ? this._data[e3][t3] : void 0; + } + clear() { + this._data = {}; + } + } + t2.TwoKeyMap = s2, t2.FourKeyMap = class { + constructor() { + this._data = new s2(); + } + set(e3, t3, r2, o, i) { + this._data.get(e3, t3) || this._data.set(e3, t3, new s2()), this._data.get(e3, t3).set(r2, o, i); + } + get(e3, t3, s3, r2) { + return this._data.get(e3, t3)?.get(s3, r2); + } + clear() { + this._data.clear(); + } + }; + }, 726: (e2, t2) => { + Object.defineProperty(t2, "__esModule", { value: true }), t2.createDecorator = t2.getServiceDependencies = t2.serviceRegistry = void 0; + const s2 = "di$target", r2 = "di$dependencies"; + t2.serviceRegistry = /* @__PURE__ */ new Map(), t2.getServiceDependencies = function(e3) { + return e3[r2] || []; + }, t2.createDecorator = function(e3) { + if (t2.serviceRegistry.has(e3)) return t2.serviceRegistry.get(e3); + const o = /* @__PURE__ */ __name(function(e4, t3, i) { + if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter"); + !function(e5, t4, o2) { + t4[s2] === t4 ? t4[r2].push({ id: e5, index: o2 }) : (t4[r2] = [{ id: e5, index: o2 }], t4[s2] = t4); + }(o, e4, i); + }, "o"); + return o.toString = () => e3, t2.serviceRegistry.set(e3, o), o; + }; + }, 97: (e2, t2, s2) => { + Object.defineProperty(t2, "__esModule", { value: true }), t2.IDecorationService = t2.IUnicodeService = t2.IOscLinkService = t2.IOptionsService = t2.ILogService = t2.LogLevelEnum = t2.IInstantiationService = t2.ICharsetService = t2.ICoreService = t2.ICoreMouseService = t2.IBufferService = void 0; + const r2 = s2(726); + var o; + t2.IBufferService = (0, r2.createDecorator)("BufferService"), t2.ICoreMouseService = (0, r2.createDecorator)("CoreMouseService"), t2.ICoreService = (0, r2.createDecorator)("CoreService"), t2.ICharsetService = (0, r2.createDecorator)("CharsetService"), t2.IInstantiationService = (0, r2.createDecorator)("InstantiationService"), function(e3) { + e3[e3.TRACE = 0] = "TRACE", e3[e3.DEBUG = 1] = "DEBUG", e3[e3.INFO = 2] = "INFO", e3[e3.WARN = 3] = "WARN", e3[e3.ERROR = 4] = "ERROR", e3[e3.OFF = 5] = "OFF"; + }(o || (t2.LogLevelEnum = o = {})), t2.ILogService = (0, r2.createDecorator)("LogService"), t2.IOptionsService = (0, r2.createDecorator)("OptionsService"), t2.IOscLinkService = (0, r2.createDecorator)("OscLinkService"), t2.IUnicodeService = (0, r2.createDecorator)("UnicodeService"), t2.IDecorationService = (0, r2.createDecorator)("DecorationService"); + } }, t = {}; + function s(r2) { + var o = t[r2]; + if (void 0 !== o) return o.exports; + var i = t[r2] = { exports: {} }; + return e[r2].call(i.exports, i, i.exports, s), i.exports; + } + __name(s, "s"); + var r = {}; + return (() => { + var e2 = r; + Object.defineProperty(e2, "__esModule", { value: true }), e2.HTMLSerializeHandler = e2.SerializeAddon = void 0; + const t2 = s(997); + function o(e3, t3, s2) { + return Math.max(t3, Math.min(e3, s2)); + } + __name(o, "o"); + class i { + static { + __name(this, "i"); + } + constructor(e3) { + this._buffer = e3; + } + serialize(e3, t3) { + const s2 = this._buffer.getNullCell(), r2 = this._buffer.getNullCell(); + let o2 = s2; + const i2 = e3.start.y, n2 = e3.end.y, l2 = e3.start.x, a2 = e3.end.x; + this._beforeSerialize(n2 - i2, i2, n2); + for (let t4 = i2; t4 <= n2; t4++) { + const i3 = this._buffer.getLine(t4); + if (i3) { + const n3 = t4 === e3.start.y ? l2 : 0, c2 = t4 === e3.end.y ? a2 : i3.length; + for (let e4 = n3; e4 < c2; e4++) { + const n4 = i3.getCell(e4, o2 === s2 ? r2 : s2); + n4 ? (this._nextCell(n4, o2, t4, e4), o2 = n4) : console.warn(`Can't get cell at row=${t4}, col=${e4}`); + } + } + this._rowEnd(t4, t4 === n2); + } + return this._afterSerialize(), this._serializeString(t3); + } + _nextCell(e3, t3, s2, r2) { + } + _rowEnd(e3, t3) { + } + _beforeSerialize(e3, t3, s2) { + } + _afterSerialize() { + } + _serializeString(e3) { + return ""; + } + } + function n(e3, t3) { + return e3.getFgColorMode() === t3.getFgColorMode() && e3.getFgColor() === t3.getFgColor(); + } + __name(n, "n"); + function l(e3, t3) { + return e3.getBgColorMode() === t3.getBgColorMode() && e3.getBgColor() === t3.getBgColor(); + } + __name(l, "l"); + function a(e3, t3) { + return e3.isInverse() === t3.isInverse() && e3.isBold() === t3.isBold() && e3.isUnderline() === t3.isUnderline() && e3.isOverline() === t3.isOverline() && e3.isBlink() === t3.isBlink() && e3.isInvisible() === t3.isInvisible() && e3.isItalic() === t3.isItalic() && e3.isDim() === t3.isDim() && e3.isStrikethrough() === t3.isStrikethrough(); + } + __name(a, "a"); + class c extends i { + static { + __name(this, "c"); + } + constructor(e3, t3) { + super(e3), this._terminal = t3, this._rowIndex = 0, this._allRows = new Array(), this._allRowSeparators = new Array(), this._currentRow = "", this._nullCellCount = 0, this._cursorStyle = this._buffer.getNullCell(), this._cursorStyleRow = 0, this._cursorStyleCol = 0, this._backgroundCell = this._buffer.getNullCell(), this._firstRow = 0, this._lastCursorRow = 0, this._lastCursorCol = 0, this._lastContentCursorRow = 0, this._lastContentCursorCol = 0, this._thisRowLastChar = this._buffer.getNullCell(), this._thisRowLastSecondChar = this._buffer.getNullCell(), this._nextRowFirstChar = this._buffer.getNullCell(); + } + _beforeSerialize(e3, t3, s2) { + this._allRows = new Array(e3), this._lastContentCursorRow = t3, this._lastCursorRow = t3, this._firstRow = t3; + } + _rowEnd(e3, t3) { + this._nullCellCount > 0 && !l(this._cursorStyle, this._backgroundCell) && (this._currentRow += `\x1B[${this._nullCellCount}X`); + let s2 = ""; + if (!t3) { + e3 - this._firstRow >= this._terminal.rows && this._buffer.getLine(this._cursorStyleRow)?.getCell(this._cursorStyleCol, this._backgroundCell); + const t4 = this._buffer.getLine(e3), r2 = this._buffer.getLine(e3 + 1); + if (r2.isWrapped) { + s2 = ""; + const o2 = t4.getCell(t4.length - 1, this._thisRowLastChar), i2 = t4.getCell(t4.length - 2, this._thisRowLastSecondChar), n2 = r2.getCell(0, this._nextRowFirstChar), a2 = n2.getWidth() > 1; + let c2 = false; + (n2.getChars() && a2 ? this._nullCellCount <= 1 : this._nullCellCount <= 0) && ((o2.getChars() || 0 === o2.getWidth()) && l(o2, n2) && (c2 = true), a2 && (i2.getChars() || 0 === i2.getWidth()) && l(o2, n2) && l(i2, n2) && (c2 = true)), c2 || (s2 = "-".repeat(this._nullCellCount + 1), s2 += "\x1B[1D\x1B[1X", this._nullCellCount > 0 && (s2 += "\x1B[A", s2 += `\x1B[${t4.length - this._nullCellCount}C`, s2 += `\x1B[${this._nullCellCount}X`, s2 += `\x1B[${t4.length - this._nullCellCount}D`, s2 += "\x1B[B"), this._lastContentCursorRow = e3 + 1, this._lastContentCursorCol = 0, this._lastCursorRow = e3 + 1, this._lastCursorCol = 0); + } else s2 = "\r\n", this._lastCursorRow = e3 + 1, this._lastCursorCol = 0; + } + this._allRows[this._rowIndex] = this._currentRow, this._allRowSeparators[this._rowIndex++] = s2, this._currentRow = "", this._nullCellCount = 0; + } + _diffStyle(e3, t3) { + const s2 = [], r2 = !n(e3, t3), o2 = !l(e3, t3), i2 = !a(e3, t3); + if (r2 || o2 || i2) if (e3.isAttributeDefault()) t3.isAttributeDefault() || s2.push(0); + else { + if (r2) { + const t4 = e3.getFgColor(); + e3.isFgRGB() ? s2.push(38, 2, t4 >>> 16 & 255, t4 >>> 8 & 255, 255 & t4) : e3.isFgPalette() ? t4 >= 16 ? s2.push(38, 5, t4) : s2.push(8 & t4 ? 90 + (7 & t4) : 30 + (7 & t4)) : s2.push(39); + } + if (o2) { + const t4 = e3.getBgColor(); + e3.isBgRGB() ? s2.push(48, 2, t4 >>> 16 & 255, t4 >>> 8 & 255, 255 & t4) : e3.isBgPalette() ? t4 >= 16 ? s2.push(48, 5, t4) : s2.push(8 & t4 ? 100 + (7 & t4) : 40 + (7 & t4)) : s2.push(49); + } + i2 && (e3.isInverse() !== t3.isInverse() && s2.push(e3.isInverse() ? 7 : 27), e3.isBold() !== t3.isBold() && s2.push(e3.isBold() ? 1 : 22), e3.isUnderline() !== t3.isUnderline() && s2.push(e3.isUnderline() ? 4 : 24), e3.isOverline() !== t3.isOverline() && s2.push(e3.isOverline() ? 53 : 55), e3.isBlink() !== t3.isBlink() && s2.push(e3.isBlink() ? 5 : 25), e3.isInvisible() !== t3.isInvisible() && s2.push(e3.isInvisible() ? 8 : 28), e3.isItalic() !== t3.isItalic() && s2.push(e3.isItalic() ? 3 : 23), e3.isDim() !== t3.isDim() && s2.push(e3.isDim() ? 2 : 22), e3.isStrikethrough() !== t3.isStrikethrough() && s2.push(e3.isStrikethrough() ? 9 : 29)); + } + return s2; + } + _nextCell(e3, t3, s2, r2) { + if (0 === e3.getWidth()) return; + const o2 = "" === e3.getChars(), i2 = this._diffStyle(e3, this._cursorStyle); + if (o2 ? !l(this._cursorStyle, e3) : i2.length > 0) { + this._nullCellCount > 0 && (l(this._cursorStyle, this._backgroundCell) || (this._currentRow += `\x1B[${this._nullCellCount}X`), this._currentRow += `\x1B[${this._nullCellCount}C`, this._nullCellCount = 0), this._lastContentCursorRow = this._lastCursorRow = s2, this._lastContentCursorCol = this._lastCursorCol = r2, this._currentRow += `\x1B[${i2.join(";")}m`; + const e4 = this._buffer.getLine(s2); + void 0 !== e4 && (e4.getCell(r2, this._cursorStyle), this._cursorStyleRow = s2, this._cursorStyleCol = r2); + } + o2 ? this._nullCellCount += e3.getWidth() : (this._nullCellCount > 0 && (l(this._cursorStyle, this._backgroundCell) || (this._currentRow += `\x1B[${this._nullCellCount}X`), this._currentRow += `\x1B[${this._nullCellCount}C`, this._nullCellCount = 0), this._currentRow += e3.getChars(), this._lastContentCursorRow = this._lastCursorRow = s2, this._lastContentCursorCol = this._lastCursorCol = r2 + e3.getWidth()); + } + _serializeString(e3) { + let t3 = this._allRows.length; + this._buffer.length - this._firstRow <= this._terminal.rows && (t3 = this._lastContentCursorRow + 1 - this._firstRow, this._lastCursorCol = this._lastContentCursorCol, this._lastCursorRow = this._lastContentCursorRow); + let s2 = ""; + for (let e4 = 0; e4 < t3; e4++) s2 += this._allRows[e4], e4 + 1 < t3 && (s2 += this._allRowSeparators[e4]); + if (!e3) { + const e4 = this._buffer.baseY + this._buffer.cursorY, t4 = this._buffer.cursorX, o3 = /* @__PURE__ */ __name((e5) => { + e5 > 0 ? s2 += `\x1B[${e5}C` : e5 < 0 && (s2 += `\x1B[${-e5}D`); + }, "o"); + (e4 !== this._lastCursorRow || t4 !== this._lastCursorCol) && ((r2 = e4 - this._lastCursorRow) > 0 ? s2 += `\x1B[${r2}B` : r2 < 0 && (s2 += `\x1B[${-r2}A`), o3(t4 - this._lastCursorCol)); + } + var r2; + const o2 = this._terminal._core._inputHandler._curAttrData, i2 = this._diffStyle(o2, this._cursorStyle); + return i2.length > 0 && (s2 += `\x1B[${i2.join(";")}m`), s2; + } + } + e2.SerializeAddon = class { + activate(e3) { + this._terminal = e3; + } + _serializeBufferByScrollback(e3, t3, s2) { + const r2 = t3.length, i2 = void 0 === s2 ? r2 : o(s2 + e3.rows, 0, r2); + return this._serializeBufferByRange(e3, t3, { start: r2 - i2, end: r2 - 1 }, false); + } + _serializeBufferByRange(e3, t3, s2, r2) { + return new c(t3, e3).serialize({ start: { x: 0, y: "number" == typeof s2.start ? s2.start : s2.start.line }, end: { x: e3.cols, y: "number" == typeof s2.end ? s2.end : s2.end.line } }, r2); + } + _serializeBufferAsHTML(e3, t3) { + const s2 = e3.buffer.active, r2 = new h(s2, e3, t3); + if (!t3.onlySelection) { + const i3 = s2.length, n2 = t3.scrollback, l2 = void 0 === n2 ? i3 : o(n2 + e3.rows, 0, i3); + return r2.serialize({ start: { x: 0, y: i3 - l2 }, end: { x: e3.cols, y: i3 - 1 } }); + } + const i2 = this._terminal?.getSelectionPosition(); + return void 0 !== i2 ? r2.serialize({ start: { x: i2.start.x, y: i2.start.y }, end: { x: i2.end.x, y: i2.end.y } }) : ""; + } + _serializeModes(e3) { + let t3 = ""; + const s2 = e3.modes; + if (s2.applicationCursorKeysMode && (t3 += "\x1B[?1h"), s2.applicationKeypadMode && (t3 += "\x1B[?66h"), s2.bracketedPasteMode && (t3 += "\x1B[?2004h"), s2.insertMode && (t3 += "\x1B[4h"), s2.originMode && (t3 += "\x1B[?6h"), s2.reverseWraparoundMode && (t3 += "\x1B[?45h"), s2.sendFocusMode && (t3 += "\x1B[?1004h"), false === s2.wraparoundMode && (t3 += "\x1B[?7l"), "none" !== s2.mouseTrackingMode) switch (s2.mouseTrackingMode) { + case "x10": + t3 += "\x1B[?9h"; + break; + case "vt200": + t3 += "\x1B[?1000h"; + break; + case "drag": + t3 += "\x1B[?1002h"; + break; + case "any": + t3 += "\x1B[?1003h"; + } + return t3; + } + serialize(e3) { + if (!this._terminal) throw new Error("Cannot use addon until it has been loaded"); + let t3 = e3?.range ? this._serializeBufferByRange(this._terminal, this._terminal.buffer.normal, e3.range, true) : this._serializeBufferByScrollback(this._terminal, this._terminal.buffer.normal, e3?.scrollback); + return e3?.excludeAltBuffer || "alternate" !== this._terminal.buffer.active.type || (t3 += `\x1B[?1049h\x1B[H${this._serializeBufferByScrollback(this._terminal, this._terminal.buffer.alternate, void 0)}`), e3?.excludeModes || (t3 += this._serializeModes(this._terminal)), t3; + } + serializeAsHTML(e3) { + if (!this._terminal) throw new Error("Cannot use addon until it has been loaded"); + return this._serializeBufferAsHTML(this._terminal, e3 || {}); + } + dispose() { + } + }; + class h extends i { + static { + __name(this, "h"); + } + constructor(e3, s2, r2) { + super(e3), this._terminal = s2, this._options = r2, this._currentRow = "", this._htmlContent = "", s2._core._themeService ? this._ansiColors = s2._core._themeService.colors.ansi : this._ansiColors = t2.DEFAULT_ANSI_COLORS; + } + _padStart(e3, t3, s2) { + return t3 >>= 0, s2 = s2 ?? " ", e3.length > t3 ? e3 : ((t3 -= e3.length) > s2.length && (s2 += s2.repeat(t3 / s2.length)), s2.slice(0, t3) + e3); + } + _beforeSerialize(e3, t3, s2) { + this._htmlContent += "
";
+          let r2 = "#000000", o2 = "#ffffff";
+          this._options.includeGlobalBackground && (r2 = this._terminal.options.theme?.foreground ?? "#ffffff", o2 = this._terminal.options.theme?.background ?? "#000000");
+          const i2 = [];
+          i2.push("color: " + r2 + ";"), i2.push("background-color: " + o2 + ";"), i2.push("font-family: " + this._terminal.options.fontFamily + ";"), i2.push("font-size: " + this._terminal.options.fontSize + "px;"), this._htmlContent += "
"; + } + _afterSerialize() { + this._htmlContent += "
", this._htmlContent += "
"; + } + _rowEnd(e3, t3) { + this._htmlContent += "
" + this._currentRow + "
", this._currentRow = ""; + } + _getHexColor(e3, t3) { + const s2 = t3 ? e3.getFgColor() : e3.getBgColor(); + return (t3 ? e3.isFgRGB() : e3.isBgRGB()) ? "#" + [s2 >> 16 & 255, s2 >> 8 & 255, 255 & s2].map((e4) => this._padStart(e4.toString(16), 2, "0")).join("") : (t3 ? e3.isFgPalette() : e3.isBgPalette()) ? this._ansiColors[s2].css : void 0; + } + _diffStyle(e3, t3) { + const s2 = [], r2 = !n(e3, t3), o2 = !l(e3, t3), i2 = !a(e3, t3); + if (r2 || o2 || i2) { + const t4 = this._getHexColor(e3, true); + t4 && s2.push("color: " + t4 + ";"); + const r3 = this._getHexColor(e3, false); + return r3 && s2.push("background-color: " + r3 + ";"), e3.isInverse() && s2.push("color: #000000; background-color: #BFBFBF;"), e3.isBold() && s2.push("font-weight: bold;"), e3.isUnderline() && e3.isOverline() ? s2.push("text-decoration: overline underline;") : e3.isUnderline() ? s2.push("text-decoration: underline;") : e3.isOverline() && s2.push("text-decoration: overline;"), e3.isBlink() && s2.push("text-decoration: blink;"), e3.isInvisible() && s2.push("visibility: hidden;"), e3.isItalic() && s2.push("font-style: italic;"), e3.isDim() && s2.push("opacity: 0.5;"), e3.isStrikethrough() && s2.push("text-decoration: line-through;"), s2; + } + } + _nextCell(e3, t3, s2, r2) { + if (0 === e3.getWidth()) return; + const o2 = "" === e3.getChars(), i2 = this._diffStyle(e3, t3); + i2 && (this._currentRow += 0 === i2.length ? "" : ""), this._currentRow += o2 ? " " : e3.getChars(); + } + _serializeString() { + return this._htmlContent; + } + } + e2.HTMLSerializeHandler = h; + })(), r; + })()); +})(addonSerialize$2, addonSerialize$2.exports); +var addonSerializeExports = addonSerialize$2.exports; +const addonSerialize$1 = /* @__PURE__ */ getDefaultExportFromCjs(addonSerializeExports); +function useTerminalBuffer() { + const serializeAddon = new addonSerializeExports.SerializeAddon(); + const terminal = markRaw(new xtermExports.Terminal({ convertEol: true })); + const copyTo = /* @__PURE__ */ __name((destinationTerminal) => { + destinationTerminal.write(serializeAddon.serialize()); + }, "copyTo"); + const write = /* @__PURE__ */ __name((message) => terminal.write(message), "write"); + const serialize = /* @__PURE__ */ __name(() => serializeAddon.serialize(), "serialize"); + onMounted(() => { + terminal.loadAddon(serializeAddon); + }); + onUnmounted(() => { + terminal.dispose(); + }); + return { + copyTo, + serialize, + write + }; +} +__name(useTerminalBuffer, "useTerminalBuffer"); +const _sfc_main = /* @__PURE__ */ defineComponent({ + __name: "TerminalOutputDrawer", + props: /* @__PURE__ */ mergeModels({ + header: {}, + defaultMessage: {} + }, { + "modelValue": { type: Boolean, ...{ required: true } }, + "modelModifiers": {} + }), + emits: ["update:modelValue"], + setup(__props) { + const terminalVisible = useModel(__props, "modelValue"); + const props = __props; + const electron = electronAPI(); + const buffer = useTerminalBuffer(); + let xterm = null; + const terminalCreated = /* @__PURE__ */ __name(({ terminal, useAutoSize }, root2) => { + xterm = terminal; + useAutoSize({ root: root2, autoRows: true, autoCols: true }); + terminal.write(props.defaultMessage); + buffer.copyTo(terminal); + terminal.options.cursorBlink = false; + terminal.options.cursorStyle = "bar"; + terminal.options.cursorInactiveStyle = "bar"; + terminal.options.disableStdin = true; + }, "terminalCreated"); + const terminalUnmounted = /* @__PURE__ */ __name(() => { + xterm = null; + }, "terminalUnmounted"); + onMounted(async () => { + electron.onLogMessage((message) => { + buffer.write(message); + xterm?.write(message); + }); + }); + return (_ctx, _cache) => { + return openBlock(), createBlock(unref(script), { + visible: terminalVisible.value, + "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => terminalVisible.value = $event), + header: _ctx.header, + position: "bottom", + style: { "height": "max(50vh, 34rem)" } + }, { + default: withCtx(() => [ + createVNode(BaseTerminal, { + onCreated: terminalCreated, + onUnmounted: terminalUnmounted + }) + ]), + _: 1 + }, 8, ["visible", "header"]); + }; + } +}); +export { + _sfc_main as _, + script as s +}; +//# sourceMappingURL=TerminalOutputDrawer-BgTEspHP.js.map diff --git a/web/assets/UserSelectView-wxa07xPk.js b/web/assets/UserSelectView-CRPNAEVJ.js similarity index 91% rename from web/assets/UserSelectView-wxa07xPk.js rename to web/assets/UserSelectView-CRPNAEVJ.js index 35f6c4a2..d5d12bd6 100644 --- a/web/assets/UserSelectView-wxa07xPk.js +++ b/web/assets/UserSelectView-CRPNAEVJ.js @@ -1,7 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -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-DqqhYDnY.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cz111_1A.js"; +import { d as defineComponent, ak as useUserStore, bi as useRouter, T 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, bj as withKeys, j as unref, bk as script, bl as script$1, bm as script$2, bn as script$3, a8 as createTextVNode, B as createCommentVNode, l as script$4 } from "./index-DqXp9vW4.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-DlGljfEG.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" @@ -98,4 +98,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ export { _sfc_main as default }; -//# sourceMappingURL=UserSelectView-wxa07xPk.js.map +//# sourceMappingURL=UserSelectView-CRPNAEVJ.js.map diff --git a/web/assets/WelcomeView-BrXELNIm.js b/web/assets/WelcomeView-Cvtvw05C.js similarity index 87% rename from web/assets/WelcomeView-BrXELNIm.js rename to web/assets/WelcomeView-Cvtvw05C.js index 81bf8f2a..20b087d9 100644 --- a/web/assets/WelcomeView-BrXELNIm.js +++ b/web/assets/WelcomeView-Cvtvw05C.js @@ -1,7 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -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-DqqhYDnY.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-Cz111_1A.js"; +import { d as defineComponent, bi 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-DqXp9vW4.js"; +import { _ as _sfc_main$1 } from "./BaseViewTemplate-DlGljfEG.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({ @@ -36,4 +36,4 @@ const WelcomeView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data- export { WelcomeView as default }; -//# sourceMappingURL=WelcomeView-BrXELNIm.js.map +//# sourceMappingURL=WelcomeView-Cvtvw05C.js.map diff --git a/web/assets/index-BNlqgrYT.js b/web/assets/index-A-dAhghd.js similarity index 98% rename from web/assets/index-BNlqgrYT.js rename to web/assets/index-A-dAhghd.js index bc17d1c3..69e7290f 100644 --- a/web/assets/index-BNlqgrYT.js +++ b/web/assets/index-A-dAhghd.js @@ -1,6 +1,6 @@ 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-DqqhYDnY.js"; +import { bG as BaseStyle, bH as script$6, o as openBlock, f as createElementBlock, at as mergeProps, cO as findIndexInList, c4 as find, bR as resolveComponent, y as createBlock, C as resolveDynamicComponent, z as withCtx, m as createBaseVNode, E as toDisplayString, A as renderSlot, B as createCommentVNode, aj as normalizeClass, bJ as findSingle, F as Fragment, bI as Transition, i as withDirectives, v as vShow, bP as UniqueComponentId } from "./index-DqXp9vW4.js"; var classes$4 = { root: /* @__PURE__ */ __name(function root(_ref) { var instance = _ref.instance; @@ -536,4 +536,4 @@ export { script as d, script$4 as s }; -//# sourceMappingURL=index-BNlqgrYT.js.map +//# sourceMappingURL=index-A-dAhghd.js.map diff --git a/web/assets/index-B0BQ8jlU.js b/web/assets/index-B0BQ8jlU.js new file mode 100644 index 00000000..350e04ec --- /dev/null +++ b/web/assets/index-B0BQ8jlU.js @@ -0,0 +1,618 @@ +var __defProp = Object.defineProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +import { bG as BaseStyle, bX as script$5, o as openBlock, f as createElementBlock, at as mergeProps, m as createBaseVNode, bH as script$6, cF as script$7, cG as script$8, cl as script$9, bO as Ripple, r as resolveDirective, y as createBlock, C as resolveDynamicComponent, F as Fragment, E as toDisplayString, cx as normalizeProps, i as withDirectives, B as createCommentVNode, dg as ToastEventBus, bZ as ZIndex, ci as isEmpty, c8 as setAttribute, ca as script$a, bR as resolveComponent, z as withCtx, k as createVNode, dh as TransitionGroup, D as renderList } from "./index-DqXp9vW4.js"; +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 _defineProperty$2(e, r, t) { + return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; +} +__name(_defineProperty$2, "_defineProperty$2"); +function _toPropertyKey$2(t) { + var i = _toPrimitive$2(t, "string"); + return "symbol" == _typeof$2(i) ? i : i + ""; +} +__name(_toPropertyKey$2, "_toPropertyKey$2"); +function _toPrimitive$2(t, r) { + if ("object" != _typeof$2(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof$2(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +__name(_toPrimitive$2, "_toPrimitive$2"); +var theme = /* @__PURE__ */ __name(function theme2(_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-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 = { + root: /* @__PURE__ */ __name(function root(_ref2) { + var position = _ref2.position; + return { + position: "fixed", + top: position === "top-right" || position === "top-left" || position === "top-center" ? "20px" : position === "center" ? "50%" : null, + right: (position === "top-right" || position === "bottom-right") && "20px", + bottom: (position === "bottom-left" || position === "bottom-right" || position === "bottom-center") && "20px", + left: position === "top-left" || position === "bottom-left" ? "20px" : position === "center" || position === "top-center" || position === "bottom-center" ? "50%" : null + }; + }, "root") +}; +var classes = { + root: /* @__PURE__ */ __name(function root2(_ref3) { + var props = _ref3.props; + return ["p-toast p-component p-toast-" + props.position]; + }, "root"), + message: /* @__PURE__ */ __name(function message(_ref4) { + var props = _ref4.props; + return ["p-toast-message", { + "p-toast-message-info": props.message.severity === "info" || props.message.severity === void 0, + "p-toast-message-warn": props.message.severity === "warn", + "p-toast-message-error": props.message.severity === "error", + "p-toast-message-success": props.message.severity === "success", + "p-toast-message-secondary": props.message.severity === "secondary", + "p-toast-message-contrast": props.message.severity === "contrast" + }]; + }, "message"), + messageContent: "p-toast-message-content", + messageIcon: /* @__PURE__ */ __name(function messageIcon(_ref5) { + var props = _ref5.props; + return ["p-toast-message-icon", _defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({}, props.infoIcon, props.message.severity === "info"), props.warnIcon, props.message.severity === "warn"), props.errorIcon, props.message.severity === "error"), props.successIcon, props.message.severity === "success")]; + }, "messageIcon"), + messageText: "p-toast-message-text", + summary: "p-toast-summary", + detail: "p-toast-detail", + closeButton: "p-toast-close-button", + closeIcon: "p-toast-close-icon" +}; +var ToastStyle = BaseStyle.extend({ + name: "toast", + theme, + classes, + inlineStyles +}); +var script$4 = { + name: "ExclamationTriangleIcon", + "extends": script$5 +}; +function render$3(_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$3, "render$3"); +script$4.render = render$3; +var script$3 = { + name: "InfoCircleIcon", + "extends": script$5 +}; +function render$2(_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$2, "render$2"); +script$3.render = render$2; +var script$2 = { + name: "BaseToast", + "extends": script$6, + props: { + group: { + type: String, + "default": null + }, + position: { + type: String, + "default": "top-right" + }, + autoZIndex: { + type: Boolean, + "default": true + }, + baseZIndex: { + type: Number, + "default": 0 + }, + breakpoints: { + type: Object, + "default": null + }, + closeIcon: { + type: String, + "default": void 0 + }, + infoIcon: { + type: String, + "default": void 0 + }, + warnIcon: { + type: String, + "default": void 0 + }, + errorIcon: { + type: String, + "default": void 0 + }, + successIcon: { + type: String, + "default": void 0 + }, + closeButtonProps: { + type: null, + "default": null + } + }, + style: ToastStyle, + provide: /* @__PURE__ */ __name(function provide() { + return { + $pcToast: this, + $parentInstance: this + }; + }, "provide") +}; +var script$1 = { + name: "ToastMessage", + hostName: "Toast", + "extends": script$6, + emits: ["close"], + closeTimeout: null, + props: { + message: { + type: null, + "default": null + }, + templates: { + type: Object, + "default": null + }, + closeIcon: { + type: String, + "default": null + }, + infoIcon: { + type: String, + "default": null + }, + warnIcon: { + type: String, + "default": null + }, + errorIcon: { + type: String, + "default": null + }, + successIcon: { + type: String, + "default": null + }, + closeButtonProps: { + type: null, + "default": null + } + }, + mounted: /* @__PURE__ */ __name(function mounted() { + var _this = this; + if (this.message.life) { + this.closeTimeout = setTimeout(function() { + _this.close({ + message: _this.message, + type: "life-end" + }); + }, this.message.life); + } + }, "mounted"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount() { + this.clearCloseTimeout(); + }, "beforeUnmount"), + methods: { + close: /* @__PURE__ */ __name(function close(params) { + this.$emit("close", params); + }, "close"), + onCloseClick: /* @__PURE__ */ __name(function onCloseClick() { + this.clearCloseTimeout(); + this.close({ + message: this.message, + type: "close" + }); + }, "onCloseClick"), + clearCloseTimeout: /* @__PURE__ */ __name(function clearCloseTimeout() { + if (this.closeTimeout) { + clearTimeout(this.closeTimeout); + this.closeTimeout = null; + } + }, "clearCloseTimeout") + }, + computed: { + iconComponent: /* @__PURE__ */ __name(function iconComponent() { + return { + info: !this.infoIcon && script$3, + success: !this.successIcon && script$7, + warn: !this.warnIcon && script$4, + error: !this.errorIcon && script$8 + }[this.message.severity]; + }, "iconComponent"), + closeAriaLabel: /* @__PURE__ */ __name(function closeAriaLabel() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : void 0; + }, "closeAriaLabel") + }, + components: { + TimesIcon: script$9, + InfoCircleIcon: script$3, + CheckIcon: script$7, + ExclamationTriangleIcon: script$4, + TimesCircleIcon: script$8 + }, + directives: { + ripple: Ripple + } +}; +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 ownKeys$1(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t.push.apply(t, o); + } + return t; +} +__name(ownKeys$1, "ownKeys$1"); +function _objectSpread$1(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys$1(Object(t), true).forEach(function(r2) { + _defineProperty$1(e, r2, t[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); + }); + } + return e; +} +__name(_objectSpread$1, "_objectSpread$1"); +function _defineProperty$1(e, r, t) { + return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; +} +__name(_defineProperty$1, "_defineProperty$1"); +function _toPropertyKey$1(t) { + var i = _toPrimitive$1(t, "string"); + return "symbol" == _typeof$1(i) ? i : i + ""; +} +__name(_toPropertyKey$1, "_toPropertyKey$1"); +function _toPrimitive$1(t, r) { + if ("object" != _typeof$1(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof$1(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +__name(_toPrimitive$1, "_toPrimitive$1"); +var _hoisted_1 = ["aria-label"]; +function render$1(_ctx, _cache, $props, $setup, $data, $options) { + var _directive_ripple = resolveDirective("ripple"); + return openBlock(), createElementBlock("div", mergeProps({ + "class": [_ctx.cx("message"), $props.message.styleClass], + role: "alert", + "aria-live": "assertive", + "aria-atomic": "true" + }, _ctx.ptm("message")), [$props.templates.container ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.container), { + key: 0, + message: $props.message, + closeCallback: $options.onCloseClick + }, null, 8, ["message", "closeCallback"])) : (openBlock(), createElementBlock("div", mergeProps({ + key: 1, + "class": [_ctx.cx("messageContent"), $props.message.contentStyleClass] + }, _ctx.ptm("messageContent")), [!$props.templates.message ? (openBlock(), createElementBlock(Fragment, { + key: 0 + }, [(openBlock(), createBlock(resolveDynamicComponent($props.templates.messageicon ? $props.templates.messageicon : $props.templates.icon ? $props.templates.icon : $options.iconComponent && $options.iconComponent.name ? $options.iconComponent : "span"), mergeProps({ + "class": _ctx.cx("messageIcon") + }, _ctx.ptm("messageIcon")), null, 16, ["class"])), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("messageText") + }, _ctx.ptm("messageText")), [createBaseVNode("span", mergeProps({ + "class": _ctx.cx("summary") + }, _ctx.ptm("summary")), toDisplayString($props.message.summary), 17), createBaseVNode("div", mergeProps({ + "class": _ctx.cx("detail") + }, _ctx.ptm("detail")), toDisplayString($props.message.detail), 17)], 16)], 64)) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.message), { + key: 1, + message: $props.message + }, null, 8, ["message"])), $props.message.closable !== false ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ + key: 2 + }, _ctx.ptm("buttonContainer"))), [withDirectives((openBlock(), createElementBlock("button", mergeProps({ + "class": _ctx.cx("closeButton"), + type: "button", + "aria-label": $options.closeAriaLabel, + onClick: _cache[0] || (_cache[0] = function() { + return $options.onCloseClick && $options.onCloseClick.apply($options, arguments); + }), + 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)), [[_directive_ripple]])], 16)) : createCommentVNode("", true)], 16))], 16); +} +__name(render$1, "render$1"); +script$1.render = render$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 t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _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 messageIdx = 0; +var script = { + name: "Toast", + "extends": script$2, + inheritAttrs: false, + emits: ["close", "life-end"], + data: /* @__PURE__ */ __name(function data() { + return { + messages: [] + }; + }, "data"), + styleElement: null, + mounted: /* @__PURE__ */ __name(function mounted2() { + ToastEventBus.on("add", this.onAdd); + ToastEventBus.on("remove", this.onRemove); + ToastEventBus.on("remove-group", this.onRemoveGroup); + ToastEventBus.on("remove-all-groups", this.onRemoveAllGroups); + if (this.breakpoints) { + this.createStyle(); + } + }, "mounted"), + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount2() { + this.destroyStyle(); + if (this.$refs.container && this.autoZIndex) { + ZIndex.clear(this.$refs.container); + } + ToastEventBus.off("add", this.onAdd); + ToastEventBus.off("remove", this.onRemove); + ToastEventBus.off("remove-group", this.onRemoveGroup); + ToastEventBus.off("remove-all-groups", this.onRemoveAllGroups); + }, "beforeUnmount"), + methods: { + add: /* @__PURE__ */ __name(function add(message2) { + if (message2.id == null) { + message2.id = messageIdx++; + } + this.messages = [].concat(_toConsumableArray(this.messages), [message2]); + }, "add"), + remove: /* @__PURE__ */ __name(function remove(params) { + var index = this.messages.findIndex(function(m) { + return m.id === params.message.id; + }); + if (index !== -1) { + this.messages.splice(index, 1); + this.$emit(params.type, { + message: params.message + }); + } + }, "remove"), + onAdd: /* @__PURE__ */ __name(function onAdd(message2) { + if (this.group == message2.group) { + this.add(message2); + } + }, "onAdd"), + onRemove: /* @__PURE__ */ __name(function onRemove(message2) { + this.remove({ + message: message2, + type: "close" + }); + }, "onRemove"), + onRemoveGroup: /* @__PURE__ */ __name(function onRemoveGroup(group) { + if (this.group === group) { + this.messages = []; + } + }, "onRemoveGroup"), + onRemoveAllGroups: /* @__PURE__ */ __name(function onRemoveAllGroups() { + this.messages = []; + }, "onRemoveAllGroups"), + onEnter: /* @__PURE__ */ __name(function onEnter() { + if (this.autoZIndex) { + ZIndex.set("modal", this.$refs.container, this.baseZIndex || this.$primevue.config.zIndex.modal); + } + }, "onEnter"), + onLeave: /* @__PURE__ */ __name(function onLeave() { + var _this = this; + if (this.$refs.container && this.autoZIndex && isEmpty(this.messages)) { + setTimeout(function() { + ZIndex.clear(_this.$refs.container); + }, 200); + } + }, "onLeave"), + 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 = ""; + for (var breakpoint in this.breakpoints) { + var breakpointStyle = ""; + 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.$attrSelector, "] {\n ").concat(breakpointStyle, "\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") + }, + components: { + ToastMessage: script$1, + Portal: script$a + } +}; +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 t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r2) { + return Object.getOwnPropertyDescriptor(e, r2).enumerable; + })), t.push.apply(t, o); + } + return t; +} +__name(ownKeys, "ownKeys"); +function _objectSpread(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), true).forEach(function(r2) { + _defineProperty(e, r2, t[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) { + Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); + }); + } + return e; +} +__name(_objectSpread, "_objectSpread"); +function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; +} +__name(_defineProperty, "_defineProperty"); +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; +} +__name(_toPropertyKey, "_toPropertyKey"); +function _toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +__name(_toPrimitive, "_toPrimitive"); +function render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_ToastMessage = resolveComponent("ToastMessage"); + var _component_Portal = resolveComponent("Portal"); + return openBlock(), createBlock(_component_Portal, null, { + "default": withCtx(function() { + return [createBaseVNode("div", mergeProps({ + ref: "container", + "class": _ctx.cx("root"), + style: _ctx.sx("root", true, { + position: _ctx.position + }) + }, _ctx.ptmi("root")), [createVNode(TransitionGroup, mergeProps({ + name: "p-toast-message", + tag: "div", + onEnter: $options.onEnter, + onLeave: $options.onLeave + }, _objectSpread({}, _ctx.ptm("transition"))), { + "default": withCtx(function() { + return [(openBlock(true), createElementBlock(Fragment, null, renderList($data.messages, function(msg) { + return openBlock(), createBlock(_component_ToastMessage, { + key: msg.id, + message: msg, + templates: _ctx.$slots, + closeIcon: _ctx.closeIcon, + infoIcon: _ctx.infoIcon, + warnIcon: _ctx.warnIcon, + errorIcon: _ctx.errorIcon, + successIcon: _ctx.successIcon, + closeButtonProps: _ctx.closeButtonProps, + unstyled: _ctx.unstyled, + onClose: _cache[0] || (_cache[0] = function($event) { + return $options.remove($event); + }), + pt: _ctx.pt + }, null, 8, ["message", "templates", "closeIcon", "infoIcon", "warnIcon", "errorIcon", "successIcon", "closeButtonProps", "unstyled", "pt"]); + }), 128))]; + }), + _: 1 + }, 16, ["onEnter", "onLeave"])], 16)]; + }), + _: 1 + }); +} +__name(render, "render"); +script.render = render; +export { + script$3 as a, + script$4 as b, + script as s +}; +//# sourceMappingURL=index-B0BQ8jlU.js.map diff --git a/web/assets/index-DXE47DZl.js b/web/assets/index-BTHx8UHZ.js similarity index 91% rename from web/assets/index-DXE47DZl.js rename to web/assets/index-BTHx8UHZ.js index b25616f6..71fd1e5d 100644 --- a/web/assets/index-DXE47DZl.js +++ b/web/assets/index-BTHx8UHZ.js @@ -1,6 +1,6 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { bZ as script$1, o as openBlock, f as createElementBlock, as as mergeProps, m as createBaseVNode } from "./index-DqqhYDnY.js"; +import { bX as script$1, o as openBlock, f as createElementBlock, at as mergeProps, m as createBaseVNode } from "./index-DqXp9vW4.js"; var script = { name: "BarsIcon", "extends": script$1 @@ -24,4 +24,4 @@ script.render = render; export { script as s }; -//# sourceMappingURL=index-DXE47DZl.js.map +//# sourceMappingURL=index-BTHx8UHZ.js.map diff --git a/web/assets/index-C1Hb_Yo9.css b/web/assets/index-CBxvvAzM.css similarity index 92% rename from web/assets/index-C1Hb_Yo9.css rename to web/assets/index-CBxvvAzM.css index 5e62328c..7bcbd2ed 100644 --- a/web/assets/index-C1Hb_Yo9.css +++ b/web/assets/index-CBxvvAzM.css @@ -306,6 +306,7 @@ .litegraph .dialog .dialog-footer { height: 50px; padding: 10px; + margin: 0; border-top: 1px solid #1a1a1a; } @@ -442,63 +443,6 @@ color: black; } -.litegraph .subgraph_property { - padding: 4px; -} - -.litegraph .subgraph_property:hover { - background-color: #333; -} - -.litegraph .subgraph_property.extra { - margin-top: 8px; -} - -.litegraph .subgraph_property span.name { - font-size: 1.3em; - padding-left: 4px; -} - -.litegraph .subgraph_property span.type { - opacity: 0.5; - margin-right: 20px; - padding-left: 4px; -} - -.litegraph .subgraph_property span.label { - display: inline-block; - width: 60px; - padding: 0px 10px; -} - -.litegraph .subgraph_property input { - width: 140px; - color: #999; - background-color: #1a1a1a; - border-radius: 4px; - border: 0; - margin-right: 10px; - padding: 4px; - padding-left: 10px; -} - -.litegraph .subgraph_property button { - background-color: #1c1c1c; - color: #aaa; - border: 0; - border-radius: 2px; - padding: 4px 10px; - cursor: pointer; -} - -.litegraph .subgraph_property.extra { - color: #ccc; -} - -.litegraph .subgraph_property.extra input { - background-color: #111; -} - .litegraph .bullet_icon { margin-left: 10px; border-radius: 10px; @@ -661,21 +605,6 @@ .litegraph .dialog .dialog-content { display: block; } -.litegraph .dialog .dialog-content .subgraph_property { - padding: 5px; -} -.litegraph .dialog .dialog-footer { - margin: 0; -} -.litegraph .dialog .dialog-footer .subgraph_property { - margin-top: 0; - display: flex; - align-items: center; - padding: 5px; -} -.litegraph .dialog .dialog-footer .subgraph_property .name { - flex: 1; -} .litegraph .graphdialog { display: flex; align-items: center; @@ -2110,6 +2039,9 @@ .-right-4{ right: -1rem; } + .bottom-0{ + bottom: 0px; + } .bottom-\[10px\]{ bottom: 10px; } @@ -2119,6 +2051,15 @@ .left-0{ left: 0px; } + .left-1\/2{ + left: 50%; + } + .left-12{ + left: 3rem; + } + .left-2{ + left: 0.5rem; + } .left-\[-350px\]{ left: -350px; } @@ -2128,6 +2069,9 @@ .top-0{ top: 0px; } + .top-2{ + top: 0.5rem; + } .top-\[50px\]{ top: 50px; } @@ -2137,6 +2081,9 @@ .z-10{ z-index: 10; } + .z-20{ + z-index: 20; + } .z-\[1000\]{ z-index: 1000; } @@ -2196,6 +2143,10 @@ margin-top: 1rem; margin-bottom: 1rem; } + .my-8{ + margin-top: 2rem; + margin-bottom: 2rem; + } .mb-2{ margin-bottom: 0.5rem; } @@ -2286,6 +2237,9 @@ .h-16{ height: 4rem; } + .h-48{ + height: 12rem; + } .h-6{ height: 1.5rem; } @@ -2331,6 +2285,9 @@ .min-h-screen{ min-height: 100vh; } + .w-0{ + width: 0px; + } .w-1\/2{ width: 50%; } @@ -2343,12 +2300,21 @@ .w-16{ width: 4rem; } + .w-24{ + width: 6rem; + } .w-28{ width: 7rem; } + .w-3{ + width: 0.75rem; + } .w-3\/12{ width: 25%; } + .w-32{ + width: 8rem; + } .w-44{ width: 11rem; } @@ -2458,6 +2424,9 @@ .cursor-pointer{ cursor: pointer; } + .touch-none{ + touch-action: none; + } .select-none{ -webkit-user-select: none; -moz-user-select: none; @@ -2893,6 +2862,10 @@ --tw-text-opacity: 1; color: rgb(239 68 68 / var(--tw-text-opacity)); } + .text-white{ + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); + } .underline{ text-decoration-line: underline; } @@ -3035,8 +3008,6 @@ body { height: 100vh; margin: 0; overflow: hidden; - grid-template-columns: auto 1fr auto; - grid-template-rows: auto 1fr auto; background: var(--bg-color) var(--bg-img); color: var(--fg-color); min-height: -webkit-fill-available; @@ -3046,87 +3017,6 @@ body { font-family: Arial, sans-serif; } -/** - +------------------+------------------+------------------+ - | | - | .comfyui-body- | - | top | - | (spans all cols) | - | | - +------------------+------------------+------------------+ - | | | | - | .comfyui-body- | #graph-canvas | .comfyui-body- | - | left | | right | - | | | | - | | | | - +------------------+------------------+------------------+ - | | - | .comfyui-body- | - | bottom | - | (spans all cols) | - | | - +------------------+------------------+------------------+ -*/ - -.comfyui-body-top { - order: -5; - /* Span across all columns */ - grid-column: 1/-1; - /* Position at the first row */ - grid-row: 1; - /* Top menu bar dropdown needs to be above of graph canvas splitter overlay which is z-index: 999 */ - /* Top menu bar z-index needs to be higher than bottom menu bar z-index as by default - pysssss's image feed is located at body-bottom, and it can overlap with the queue button, which - is located in body-top. */ - z-index: 1001; - display: flex; - flex-direction: column; -} - -.comfyui-body-left { - order: -4; - /* Position in the first column */ - grid-column: 1; - /* Position below the top element */ - grid-row: 2; - z-index: 10; - display: flex; -} - -.graph-canvas-container { - width: 100%; - height: 100%; - order: -3; - grid-column: 2; - grid-row: 2; - position: relative; - overflow: hidden; -} - -#graph-canvas { - width: 100%; - height: 100%; - touch-action: none; -} - -.comfyui-body-right { - order: -2; - z-index: 10; - grid-column: 3; - grid-row: 2; -} - -.comfyui-body-bottom { - order: 4; - /* Span across all columns */ - grid-column: 1/-1; - grid-row: 3; - /* Bottom menu bar dropdown needs to be above of graph canvas splitter overlay which is z-index: 999 */ - z-index: 1000; - display: flex; - flex-direction: column; -} - .comfy-multiline-input { background-color: var(--comfy-input-bg); color: var(--input-text); @@ -3541,84 +3431,6 @@ dialog::backdrop { justify-content: center; } -#comfy-settings-dialog { - padding: 0; - width: 41rem; -} - -#comfy-settings-dialog tr > td:first-child { - text-align: right; -} - -#comfy-settings-dialog tbody button, -#comfy-settings-dialog table > button { - background-color: var(--bg-color); - border: 1px var(--border-color) solid; - border-radius: 0; - color: var(--input-text); - font-size: 1rem; - padding: 0.5rem; -} - -#comfy-settings-dialog button:hover { - background-color: var(--tr-odd-bg-color); -} - -/* General CSS for tables */ - -.comfy-table { - border-collapse: collapse; - color: var(--input-text); - font-family: Arial, sans-serif; - width: 100%; -} - -.comfy-table caption { - position: sticky; - top: 0; - background-color: var(--bg-color); - color: var(--input-text); - font-size: 1rem; - font-weight: bold; - padding: 8px; - text-align: center; - border-bottom: 1px solid var(--border-color); -} - -.comfy-table caption .comfy-btn { - position: absolute; - top: -2px; - right: 0; - bottom: 0; - cursor: pointer; - border: none; - height: 100%; - border-radius: 0; - aspect-ratio: 1/1; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - font-size: 20px; -} - -.comfy-table caption .comfy-btn:focus { - outline: none; -} - -.comfy-table tr:nth-child(even) { - background-color: var(--tr-even-bg-color); -} - -.comfy-table tr:nth-child(odd) { - background-color: var(--tr-odd-bg-color); -} - -.comfy-table td, -.comfy-table th { - border: 1px solid var(--border-color); - padding: 8px; -} - /* Context menu */ .litegraph .dialog { @@ -3718,24 +3530,6 @@ dialog::backdrop { will-change: transform; } -@media only screen and (max-width: 450px) { - #comfy-settings-dialog .comfy-table tbody { - display: grid; - } - #comfy-settings-dialog .comfy-table tr { - display: grid; - } - #comfy-settings-dialog tr > td:first-child { - text-align: center; - border-bottom: none; - padding-bottom: 0; - } - #comfy-settings-dialog tr > td:not(:first-child) { - text-align: center; - border-top: none; - } -} - audio.comfy-audio.empty-audio-widget { display: none; } @@ -3746,7 +3540,6 @@ audio.comfy-audio.empty-audio-widget { left: 0; width: 100%; height: 100%; - pointer-events: none; } /* Set auto complete panel's width as it is not accessible within vue-root */ @@ -3926,7 +3719,7 @@ audio.comfy-audio.empty-audio-widget { padding-top: 0px } -.prompt-dialog-content[data-v-3df70997] { +.prompt-dialog-content[data-v-4f1e3bbe] { white-space: pre-wrap; } @@ -3944,17 +3737,17 @@ audio.comfy-audio.empty-audio-widget { margin-bottom: 1rem; } -.comfy-error-report[data-v-3faf7785] { +.comfy-error-report[data-v-e5000be2] { display: flex; flex-direction: column; gap: 1rem; } -.action-container[data-v-3faf7785] { +.action-container[data-v-e5000be2] { display: flex; gap: 1rem; justify-content: flex-end; } -.wrapper-pre[data-v-3faf7785] { +.wrapper-pre[data-v-e5000be2] { white-space: pre-wrap; word-wrap: break-word; } @@ -4023,13 +3816,13 @@ audio.comfy-audio.empty-audio-widget { padding: 0px; } -.form-input[data-v-1451da7b] .input-slider .p-inputnumber input, -.form-input[data-v-1451da7b] .input-slider .slider-part { +.form-input[data-v-a29c257f] .input-slider .p-inputnumber input, +.form-input[data-v-a29c257f] .input-slider .slider-part { width: 5rem } -.form-input[data-v-1451da7b] .p-inputtext, -.form-input[data-v-1451da7b] .p-select { +.form-input[data-v-a29c257f] .p-inputtext, +.form-input[data-v-a29c257f] .p-select { width: 11rem } @@ -4319,26 +4112,26 @@ audio.comfy-audio.empty-audio-widget { position: relative; } -[data-v-250ab9af] .p-terminal .xterm { +[data-v-873a313f] .p-terminal .xterm { overflow-x: auto; } -[data-v-250ab9af] .p-terminal .xterm-screen { +[data-v-873a313f] .p-terminal .xterm-screen { background-color: black; overflow-y: hidden; } -[data-v-90a7f075] .p-terminal .xterm { +[data-v-14fef2e4] .p-terminal .xterm { overflow-x: auto; } -[data-v-90a7f075] .p-terminal .xterm-screen { +[data-v-14fef2e4] .p-terminal .xterm-screen { background-color: black; overflow-y: hidden; } -[data-v-03daf1c8] .p-terminal .xterm { +[data-v-cf0c7d52] .p-terminal .xterm { overflow-x: auto; } -[data-v-03daf1c8] .p-terminal .xterm-screen { +[data-v-cf0c7d52] .p-terminal .xterm-screen { background-color: black; overflow-y: hidden; } @@ -4650,28 +4443,28 @@ audio.comfy-audio.empty-audio-widget { box-sizing: border-box; } -.tree-node[data-v-654109c7] { +.tree-node[data-v-a945b5a8] { width: 100%; display: flex; align-items: center; justify-content: space-between; } -.leaf-count-badge[data-v-654109c7] { +.leaf-count-badge[data-v-a945b5a8] { margin-left: 0.5rem; } -.node-content[data-v-654109c7] { +.node-content[data-v-a945b5a8] { display: flex; align-items: center; flex-grow: 1; } -.leaf-label[data-v-654109c7] { +.leaf-label[data-v-a945b5a8] { margin-left: 0.5rem; } -[data-v-654109c7] .editable-text span { +[data-v-a945b5a8] .editable-text span { word-break: break-all; } -[data-v-976a6d58] .tree-explorer-node-label { +[data-v-e3a237e6] .tree-explorer-node-label { width: 100%; display: flex; align-items: center; @@ -4684,10 +4477,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-976a6d58] .p-tree-node-content:has(.tree-folder) { +[data-v-e3a237e6] .p-tree-node-content:has(.tree-folder) { position: relative; } -[data-v-976a6d58] .p-tree-node-content:has(.tree-folder.can-drop)::after { +[data-v-e3a237e6] .p-tree-node-content:has(.tree-folder.can-drop)::after { content: ''; position: absolute; top: 0; @@ -4790,7 +4583,7 @@ audio.comfy-audio.empty-audio-widget { vertical-align: top; } -[data-v-0bb2ac55] .pi-fake-spacer { +[data-v-3be51840] .pi-fake-spacer { height: 1px; width: 16px; } diff --git a/web/assets/index-BYzwFNH3.js b/web/assets/index-D9D9jjLT.js similarity index 98% rename from web/assets/index-BYzwFNH3.js rename to web/assets/index-D9D9jjLT.js index 0673ca94..22a3f291 100644 --- a/web/assets/index-BYzwFNH3.js +++ b/web/assets/index-D9D9jjLT.js @@ -1,6 +1,6 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -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-DqqhYDnY.js"; +import { di as ComfyDialog, dj as $el, dk as ComfyApp, h as app, L as LiteGraph, aD as LGraphCanvas, dl as useExtensionService, dm as processDynamicPrompt, b8 as isElectron, b9 as electronAPI, b as useWorkflowStore, by as checkMirrorReachable, bb as useDialogService, bg as t, dn as DraggableList, aW as useToastStore, $ as LGraphNode, dp as applyTextReplacements, dq as ComfyWidgets, dr as addValueControlWidgets, O as useNodeDefStore, a as useSettingStore, ds as serialise, dt as deserialiseAndCreate, aL as api, Z as LGraphGroup, d as defineComponent, T as ref, p as onMounted, d8 as onUnmounted, r as resolveDirective, o as openBlock, f as createElementBlock, k as createVNode, j as unref, l as script, z as withCtx, i as withDirectives, m as createBaseVNode, y as createBlock, aj as normalizeClass, du as script$1, v as vShow, B as createCommentVNode, dv as createApp, cs as Tooltip, N as watch, bm as script$2, dw as PrimeVue, V as nextTick, b4 as lodashExports, aO as setStorageValue, aM as getStorageValue } from "./index-DqXp9vW4.js"; import { P as PYTHON_MIRROR } from "./uvMirrors-B-HKMf6X.js"; class ClipspaceDialog extends ComfyDialog { static { @@ -289,7 +289,7 @@ useExtensionService().registerExtension({ name: "Comfy.DynamicPrompts", nodeCreated(node) { if (node.widgets) { - const widgets = node.widgets.filter((n) => n.dynamicPrompts); + const widgets = node.widgets.filter((w) => w.dynamicPrompts); for (const widget of widgets) { widget.serializeValue = (workflowNode, widgetIndex) => { if (typeof widget.value !== "string") return widget.value; @@ -1627,17 +1627,16 @@ function mergeIfValid(output, config2, forceUpdate, recreateWidget, config1) { return { customConfig }; } __name(mergeIfValid, "mergeIfValid"); -let useConversionSubmenusSetting; app.registerExtension({ name: "Comfy.WidgetInputs", - init() { - useConversionSubmenusSetting = app.ui.settings.addSetting({ + settings: [ + { id: "Comfy.NodeInputConversionSubmenus", name: "In the node context menu, place the entries that convert between input/widget in sub-menus.", type: "boolean", defaultValue: true - }); - }, + } + ], setup() { app.canvas.getWidgetLinkType = function(widget, node) { const nodeDefStore = useNodeDefStore(); @@ -1679,6 +1678,17 @@ app.registerExtension({ convertToInput(this, widget, config); return true; }; + nodeType.prototype.getExtraSlotMenuOptions = function(slot) { + if (!slot.input || !slot.input.widget) return []; + const widget = this.widgets.find((w) => w.name === slot.input.widget.name); + if (!widget) return []; + return [ + { + content: `Convert to widget`, + callback: /* @__PURE__ */ __name(() => convertToWidget(this, widget), "callback") + } + ]; + }; nodeType.prototype.getExtraMenuOptions = function(_, options) { const r = origGetExtraMenuOptions ? origGetExtraMenuOptions.apply(this, arguments) : void 0; const getPointerCanvasPos = /* @__PURE__ */ __name(() => { @@ -1726,7 +1736,7 @@ app.registerExtension({ } } if (toInput.length) { - if (useConversionSubmenusSetting.value) { + if (useSettingStore().get("Comfy.NodeInputConversionSubmenus")) { options.push({ content: "Convert Widget to Input", submenu: { @@ -1738,7 +1748,7 @@ app.registerExtension({ } } if (toWidget.length) { - if (useConversionSubmenusSetting.value) { + if (useSettingStore().get("Comfy.NodeInputConversionSubmenus")) { options.push({ content: "Convert Input to Widget", submenu: { @@ -1801,10 +1811,7 @@ app.registerExtension({ if (!app2.configuringGraph && this.inputs) { for (const input of this.inputs) { if (input.widget && !input.widget[GET_CONFIG]) { - input.widget[GET_CONFIG] = () => ( - // @ts-expect-error input.widget has unknown type - getConfig.call(this, input.widget.name) - ); + input.widget[GET_CONFIG] = () => getConfig.call(this, input.widget.name); const w = this.widgets.find((w2) => w2.name === input.widget.name); if (w) { hideWidget(this, w); @@ -3415,7 +3422,7 @@ class Load3DConfiguration { constructor(load3d) { this.load3d = load3d; } - configure(loadFolder, modelWidget, material, lightIntensity, upDirection, fov2, cameraState, postModelUpdateFunc) { + configure(loadFolder, modelWidget, material, upDirection, cameraState, width = null, height = null, postModelUpdateFunc) { this.setupModelHandling( modelWidget, loadFolder, @@ -3423,11 +3430,21 @@ class Load3DConfiguration { postModelUpdateFunc ); this.setupMaterial(material); - this.setupLighting(lightIntensity); this.setupDirection(upDirection); - this.setupCamera(fov2); + this.setupTargetSize(width, height); this.setupDefaultProperties(); } + setupTargetSize(width, height) { + if (width && height) { + this.load3d.setTargetSize(width.value, height.value); + width.callback = (value) => { + this.load3d.setTargetSize(value, height.value); + }; + height.callback = (value) => { + this.load3d.setTargetSize(width.value, value); + }; + } + } setupModelHandling(modelWidget, loadFolder, cameraState, postModelUpdateFunc) { const onModelWidgetUpdate = this.createModelUpdateHandler( loadFolder, @@ -3447,12 +3464,6 @@ class Load3DConfiguration { 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); @@ -3461,12 +3472,6 @@ class Load3DConfiguration { upDirection.value ); } - setupCamera(fov2) { - fov2.callback = (value) => { - this.load3d.setFOV(value); - }; - this.load3d.setFOV(fov2.value); - } setupDefaultProperties() { const cameraType = this.load3d.loadNodeProperty( "Camera Type", @@ -3477,6 +3482,10 @@ class Load3DConfiguration { this.load3d.toggleGrid(showGrid); const bgColor = this.load3d.loadNodeProperty("Background Color", "#282828"); this.load3d.setBackgroundColor(bgColor); + const lightIntensity = this.load3d.loadNodeProperty("Light Intensity", "5"); + this.load3d.setLightIntensity(lightIntensity); + const fov2 = this.load3d.loadNodeProperty("FOV", "75"); + this.load3d.setFOV(fov2); } createModelUpdateHandler(loadFolder, cameraState, postModelUpdateFunc) { let isFirstLoad = true; @@ -44141,7 +44150,7 @@ class GLTFParser { /** Returns a reference to a shared resource, cloning it if necessary. */ _getNodeRef(cache, index, object) { if (cache.refs[index] <= 1) return object; - const ref = object.clone(); + const ref2 = object.clone(); const updateMappings = /* @__PURE__ */ __name((original, clone) => { const mappings = this.associations.get(original); if (mappings != null) { @@ -44151,9 +44160,9 @@ class GLTFParser { updateMappings(child, clone.children[i]); } }, "updateMappings"); - updateMappings(object, ref); - ref.name += "_instance_" + cache.uses[index]++; - return ref; + updateMappings(object, ref2); + ref2.name += "_instance_" + cache.uses[index]++; + return ref2; } _invokeOne(func) { const extensions = Object.values(this.plugins); @@ -46206,6 +46215,259 @@ class STLLoader extends Loader { return isBinary(binData) ? parseBinary(binData) : parseASCII(ensureString(data)); } } +const _hoisted_1$1 = { class: "absolute top-2 left-2 flex flex-col gap-2 z-20" }; +const _hoisted_2$1 = { class: "pi pi-camera text-white text-lg" }; +const _hoisted_3 = { class: "pi pi-palette text-white text-lg" }; +const _hoisted_4 = ["value"]; +const _hoisted_5 = { + key: 0, + class: "relative" +}; +const _hoisted_6 = { class: "pi pi-sun text-white text-lg" }; +const _hoisted_7 = { + class: "absolute left-12 top-0 bg-black bg-opacity-50 p-4 rounded-lg shadow-lg", + style: { "width": "150px" } +}; +const _hoisted_8 = { + key: 1, + class: "relative" +}; +const _hoisted_9 = { class: "pi pi-expand text-white text-lg" }; +const _hoisted_10 = { + class: "absolute left-12 top-0 bg-black bg-opacity-50 p-4 rounded-lg shadow-lg", + style: { "width": "150px" } +}; +const _hoisted_11 = { key: 2 }; +const _sfc_main$1 = /* @__PURE__ */ defineComponent({ + __name: "Load3DControls", + props: { + backgroundColor: {}, + showGrid: { type: Boolean }, + showPreview: { type: Boolean }, + lightIntensity: {}, + showLightIntensityButton: { type: Boolean }, + fov: {}, + showFOVButton: { type: Boolean }, + showPreviewButton: { type: Boolean } + }, + emits: ["toggleCamera", "toggleGrid", "updateBackgroundColor", "updateLightIntensity", "updateFOV", "togglePreview"], + setup(__props, { expose: __expose, emit: __emit }) { + const props = __props; + const emit = __emit; + const backgroundColor = ref(props.backgroundColor); + const showGrid = ref(props.showGrid); + const showPreview = ref(props.showPreview); + const colorPickerRef = ref(null); + const lightIntensity = ref(props.lightIntensity); + const showLightIntensity = ref(false); + const showLightIntensityButton = ref(props.showLightIntensityButton); + const fov2 = ref(props.fov); + const showFOV = ref(false); + const showFOVButton = ref(props.showFOVButton); + const showPreviewButton = ref(props.showPreviewButton); + const toggleCamera = /* @__PURE__ */ __name(() => { + emit("toggleCamera"); + }, "toggleCamera"); + const toggleGrid = /* @__PURE__ */ __name(() => { + showGrid.value = !showGrid.value; + emit("toggleGrid", showGrid.value); + }, "toggleGrid"); + const togglePreview = /* @__PURE__ */ __name(() => { + showPreview.value = !showPreview.value; + emit("togglePreview", showPreview.value); + }, "togglePreview"); + const updateBackgroundColor = /* @__PURE__ */ __name((color) => { + emit("updateBackgroundColor", color); + }, "updateBackgroundColor"); + const openColorPicker = /* @__PURE__ */ __name(() => { + colorPickerRef.value?.click(); + }, "openColorPicker"); + const toggleLightIntensity = /* @__PURE__ */ __name(() => { + showLightIntensity.value = !showLightIntensity.value; + }, "toggleLightIntensity"); + const updateLightIntensity = /* @__PURE__ */ __name(() => { + emit("updateLightIntensity", lightIntensity.value); + }, "updateLightIntensity"); + const toggleFOV = /* @__PURE__ */ __name(() => { + showFOV.value = !showFOV.value; + }, "toggleFOV"); + const updateFOV = /* @__PURE__ */ __name(() => { + emit("updateFOV", fov2.value); + }, "updateFOV"); + const closeSlider = /* @__PURE__ */ __name((e) => { + const target = e.target; + if (!target.closest(".relative")) { + showLightIntensity.value = false; + showFOV.value = false; + } + }, "closeSlider"); + onMounted(() => { + document.addEventListener("click", closeSlider); + }); + onUnmounted(() => { + document.removeEventListener("click", closeSlider); + }); + __expose({ + backgroundColor, + showGrid, + lightIntensity, + showLightIntensityButton, + fov: fov2, + showFOVButton, + showPreviewButton + }); + return (_ctx, _cache2) => { + const _directive_tooltip = resolveDirective("tooltip"); + return openBlock(), createElementBlock("div", _hoisted_1$1, [ + createVNode(unref(script), { + class: "p-button-rounded p-button-text", + onClick: toggleCamera + }, { + default: withCtx(() => [ + withDirectives(createBaseVNode("i", _hoisted_2$1, null, 512), [ + [ + _directive_tooltip, + { value: unref(t)("load3d.switchCamera"), showDelay: 300 }, + void 0, + { right: true } + ] + ]) + ]), + _: 1 + }), + withDirectives((openBlock(), createBlock(unref(script), { + class: normalizeClass(["p-button-rounded p-button-text", { "p-button-outlined": showGrid.value }]), + onClick: toggleGrid + }, { + default: withCtx(() => _cache2[3] || (_cache2[3] = [ + createBaseVNode("i", { class: "pi pi-table text-white text-lg" }, null, -1) + ])), + _: 1 + }, 8, ["class"])), [ + [ + _directive_tooltip, + { value: unref(t)("load3d.showGrid"), showDelay: 300 }, + void 0, + { right: true } + ] + ]), + createVNode(unref(script), { + class: "p-button-rounded p-button-text", + onClick: openColorPicker + }, { + default: withCtx(() => [ + withDirectives(createBaseVNode("i", _hoisted_3, null, 512), [ + [ + _directive_tooltip, + { value: unref(t)("load3d.backgroundColor"), showDelay: 300 }, + void 0, + { right: true } + ] + ]), + createBaseVNode("input", { + type: "color", + ref_key: "colorPickerRef", + ref: colorPickerRef, + value: backgroundColor.value, + onInput: _cache2[0] || (_cache2[0] = ($event) => updateBackgroundColor($event.target.value)), + class: "absolute opacity-0 w-0 h-0 p-0 m-0 pointer-events-none" + }, null, 40, _hoisted_4) + ]), + _: 1 + }), + showLightIntensityButton.value ? (openBlock(), createElementBlock("div", _hoisted_5, [ + createVNode(unref(script), { + class: "p-button-rounded p-button-text", + onClick: toggleLightIntensity + }, { + default: withCtx(() => [ + withDirectives(createBaseVNode("i", _hoisted_6, null, 512), [ + [ + _directive_tooltip, + { + value: unref(t)("load3d.lightIntensity"), + showDelay: 300 + }, + void 0, + { right: true } + ] + ]) + ]), + _: 1 + }), + withDirectives(createBaseVNode("div", _hoisted_7, [ + createVNode(unref(script$1), { + modelValue: lightIntensity.value, + "onUpdate:modelValue": _cache2[1] || (_cache2[1] = ($event) => lightIntensity.value = $event), + class: "w-full", + onChange: updateLightIntensity, + min: 1, + max: 20, + step: 1 + }, null, 8, ["modelValue"]) + ], 512), [ + [vShow, showLightIntensity.value] + ]) + ])) : createCommentVNode("", true), + showFOVButton.value ? (openBlock(), createElementBlock("div", _hoisted_8, [ + createVNode(unref(script), { + class: "p-button-rounded p-button-text", + onClick: toggleFOV + }, { + default: withCtx(() => [ + withDirectives(createBaseVNode("i", _hoisted_9, null, 512), [ + [ + _directive_tooltip, + { value: unref(t)("load3d.fov"), showDelay: 300 }, + void 0, + { right: true } + ] + ]) + ]), + _: 1 + }), + withDirectives(createBaseVNode("div", _hoisted_10, [ + createVNode(unref(script$1), { + modelValue: fov2.value, + "onUpdate:modelValue": _cache2[2] || (_cache2[2] = ($event) => fov2.value = $event), + class: "w-full", + onChange: updateFOV, + min: 10, + max: 150, + step: 1 + }, null, 8, ["modelValue"]) + ], 512), [ + [vShow, showFOV.value] + ]) + ])) : createCommentVNode("", true), + showPreviewButton.value ? (openBlock(), createElementBlock("div", _hoisted_11, [ + createVNode(unref(script), { + class: "p-button-rounded p-button-text", + onClick: togglePreview + }, { + default: withCtx(() => [ + withDirectives(createBaseVNode("i", { + class: normalizeClass([ + "pi", + showPreview.value ? "pi-eye" : "pi-eye-slash", + "text-white text-lg" + ]) + }, null, 2), [ + [ + _directive_tooltip, + { value: unref(t)("load3d.previewOutput"), showDelay: 300 }, + void 0, + { right: true } + ] + ]) + ]), + _: 1 + }) + ])) : createCommentVNode("", true) + ]); + }; + } +}); class Load3d { static { __name(this, "Load3d"); @@ -46237,11 +46499,16 @@ class Load3d { originalRotation = null; viewHelper = {}; viewHelperContainer = {}; - cameraSwitcherContainer = {}; - gridSwitcherContainer = {}; + previewRenderer = null; + previewCamera = null; + previewContainer = {}; + targetWidth = 1024; + targetHeight = 1024; + showPreview = true; node = {}; - bgColorInput = {}; - constructor(container) { + controlsApp = null; + controlsContainer; + constructor(container, options = {}) { this.scene = new Scene(); this.perspectiveCamera = new PerspectiveCamera(75, 1, 0.1, 1e3); this.perspectiveCamera.position.set(5, 5, 5); @@ -46301,12 +46568,45 @@ class Load3d { }); this.standardMaterial = this.createSTLMaterial(); this.createViewHelper(container); - this.createGridSwitcher(container); - this.createCameraSwitcher(container); - this.createColorPicker(container); + if (options && options.createPreview) { + this.createCapturePreview(container); + } + this.controlsContainer = document.createElement("div"); + this.controlsContainer.style.position = "absolute"; + this.controlsContainer.style.top = "0"; + this.controlsContainer.style.left = "0"; + this.controlsContainer.style.width = "100%"; + this.controlsContainer.style.height = "100%"; + this.controlsContainer.style.pointerEvents = "none"; + this.controlsContainer.style.zIndex = "1"; + container.appendChild(this.controlsContainer); + this.mountControls(options); this.handleResize(); this.startAnimation(); } + mountControls(options = {}) { + const controlsMount = document.createElement("div"); + controlsMount.style.pointerEvents = "auto"; + this.controlsContainer.appendChild(controlsMount); + this.controlsApp = createApp(_sfc_main$1, { + backgroundColor: "#282828", + showGrid: true, + showPreview: options.createPreview, + lightIntensity: 5, + showLightIntensityButton: true, + fov: 75, + showFOVButton: true, + showPreviewButton: options.createPreview, + onToggleCamera: /* @__PURE__ */ __name(() => this.toggleCamera(), "onToggleCamera"), + onToggleGrid: /* @__PURE__ */ __name((show) => this.toggleGrid(show), "onToggleGrid"), + onTogglePreview: /* @__PURE__ */ __name((show) => this.togglePreview(show), "onTogglePreview"), + onUpdateBackgroundColor: /* @__PURE__ */ __name((color) => this.setBackgroundColor(color), "onUpdateBackgroundColor"), + onUpdateLightIntensity: /* @__PURE__ */ __name((lightIntensity) => this.setLightIntensity(lightIntensity), "onUpdateLightIntensity"), + onUpdateFOV: /* @__PURE__ */ __name((fov2) => this.setFOV(fov2), "onUpdateFOV") + }); + this.controlsApp.directive("tooltip", Tooltip); + this.controlsApp.mount(controlsMount); + } setNode(node) { this.node = node; } @@ -46321,6 +46621,79 @@ class Load3d { } return this.node.properties[name]; } + createCapturePreview(container) { + this.previewRenderer = new WebGLRenderer({ + alpha: true, + antialias: true + }); + this.previewRenderer.setSize(this.targetWidth, this.targetHeight); + this.previewRenderer.setClearColor(2631720); + this.previewContainer = document.createElement("div"); + this.previewContainer.style.cssText = ` + position: absolute; + right: 0px; + bottom: 0px; + background: rgba(0, 0, 0, 0.2); + display: block; + `; + this.previewContainer.appendChild(this.previewRenderer.domElement); + this.previewContainer.style.display = this.showPreview ? "block" : "none"; + container.appendChild(this.previewContainer); + } + updatePreviewRender() { + if (!this.previewRenderer || !this.previewContainer || !this.showPreview) + return; + if (!this.previewCamera || this.activeCamera instanceof PerspectiveCamera && !(this.previewCamera instanceof PerspectiveCamera) || this.activeCamera instanceof OrthographicCamera && !(this.previewCamera instanceof OrthographicCamera)) { + this.previewCamera = this.activeCamera.clone(); + } + this.previewCamera.position.copy(this.activeCamera.position); + this.previewCamera.rotation.copy(this.activeCamera.rotation); + const aspect2 = this.targetWidth / this.targetHeight; + if (this.activeCamera instanceof OrthographicCamera) { + const activeOrtho = this.activeCamera; + const previewOrtho = this.previewCamera; + const frustumHeight = (activeOrtho.top - activeOrtho.bottom) / activeOrtho.zoom; + const frustumWidth = frustumHeight * aspect2; + previewOrtho.top = frustumHeight / 2; + previewOrtho.left = -frustumWidth / 2; + previewOrtho.right = frustumWidth / 2; + previewOrtho.bottom = -frustumHeight / 2; + previewOrtho.zoom = 1; + previewOrtho.updateProjectionMatrix(); + } else { + ; + this.previewCamera.aspect = aspect2; + this.previewCamera.fov = this.activeCamera.fov; + } + this.previewCamera.lookAt(this.controls.target); + const previewWidth = 120; + const previewHeight = previewWidth * this.targetHeight / this.targetWidth; + this.previewRenderer.setSize(previewWidth, previewHeight, false); + this.previewRenderer.render(this.scene, this.previewCamera); + } + updatePreviewSize() { + if (!this.previewContainer) return; + const previewWidth = 120; + const previewHeight = previewWidth * this.targetHeight / this.targetWidth; + this.previewRenderer?.setSize(previewWidth, previewHeight, false); + } + setTargetSize(width, height) { + this.targetWidth = width; + this.targetHeight = height; + this.updatePreviewSize(); + if (this.previewRenderer && this.previewCamera) { + if (this.previewCamera instanceof PerspectiveCamera) { + this.previewCamera.aspect = width / height; + this.previewCamera.updateProjectionMatrix(); + } else if (this.previewCamera instanceof OrthographicCamera) { + const frustumSize = 10; + const aspect2 = width / height; + this.previewCamera.left = -frustumSize * aspect2 / 2; + this.previewCamera.right = frustumSize * aspect2 / 2; + this.previewCamera.updateProjectionMatrix(); + } + } + } createViewHelper(container) { this.viewHelperContainer = document.createElement("div"); this.viewHelperContainer.style.position = "absolute"; @@ -46342,127 +46715,17 @@ class Load3d { ); this.viewHelper.center = this.controls.target; } - createGridSwitcher(container) { - this.gridSwitcherContainer = document.createElement("div"); - this.gridSwitcherContainer.style.position = "absolute"; - this.gridSwitcherContainer.style.top = "28px"; - this.gridSwitcherContainer.style.left = "3px"; - this.gridSwitcherContainer.style.width = "20px"; - this.gridSwitcherContainer.style.height = "20px"; - this.gridSwitcherContainer.style.cursor = "pointer"; - this.gridSwitcherContainer.style.alignItems = "center"; - this.gridSwitcherContainer.style.justifyContent = "center"; - this.gridSwitcherContainer.style.transition = "background-color 0.2s"; - const gridIcon = document.createElement("div"); - gridIcon.innerHTML = ` - - - - - - - - `; - const updateButtonState = /* @__PURE__ */ __name(() => { - if (this.gridHelper.visible) { - this.gridSwitcherContainer.style.backgroundColor = "rgba(255, 255, 255, 0.2)"; - } else { - this.gridSwitcherContainer.style.backgroundColor = "transparent"; - } - }, "updateButtonState"); - updateButtonState(); - this.gridSwitcherContainer.addEventListener("mouseenter", () => { - if (!this.gridHelper.visible) { - this.gridSwitcherContainer.style.backgroundColor = "rgba(0, 0, 0, 0.5)"; - } - }); - this.gridSwitcherContainer.addEventListener("mouseleave", () => { - if (!this.gridHelper.visible) { - this.gridSwitcherContainer.style.backgroundColor = "transparent"; - } - }); - this.gridSwitcherContainer.title = "Toggle Grid"; - this.gridSwitcherContainer.addEventListener("click", (event) => { - event.stopPropagation(); - this.toggleGrid(!this.gridHelper.visible); - updateButtonState(); - }); - this.gridSwitcherContainer.appendChild(gridIcon); - container.appendChild(this.gridSwitcherContainer); - } - createCameraSwitcher(container) { - this.cameraSwitcherContainer = document.createElement("div"); - this.cameraSwitcherContainer.style.position = "absolute"; - this.cameraSwitcherContainer.style.top = "3px"; - this.cameraSwitcherContainer.style.left = "3px"; - this.cameraSwitcherContainer.style.width = "20px"; - this.cameraSwitcherContainer.style.height = "20px"; - this.cameraSwitcherContainer.style.cursor = "pointer"; - this.cameraSwitcherContainer.style.alignItems = "center"; - this.cameraSwitcherContainer.style.justifyContent = "center"; - const cameraIcon = document.createElement("div"); - cameraIcon.innerHTML = ` - - - - - - `; - this.cameraSwitcherContainer.addEventListener("mouseenter", () => { - this.cameraSwitcherContainer.style.backgroundColor = "rgba(0, 0, 0, 0.5)"; - }); - this.cameraSwitcherContainer.addEventListener("mouseleave", () => { - this.cameraSwitcherContainer.style.backgroundColor = "rgba(0, 0, 0, 0.3)"; - }); - this.cameraSwitcherContainer.title = "Switch Camera (Perspective/Orthographic)"; - this.cameraSwitcherContainer.addEventListener("click", (event) => { - event.stopPropagation(); - this.toggleCamera(); - }); - 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; this.perspectiveCamera.updateProjectionMatrix(); this.renderer.render(this.scene, this.activeCamera); + this.storeNodeProperty("FOV", fov2); + } + if (this.previewRenderer && this.previewCamera instanceof PerspectiveCamera) { + this.previewCamera.fov = fov2; + this.previewCamera.updateProjectionMatrix(); + this.previewRenderer.render(this.scene, this.previewCamera); } } getCameraState() { @@ -46475,8 +46738,6 @@ class Load3d { }; } setCameraState(state) { - if (this.activeCamera !== (state.cameraType === "perspective" ? this.perspectiveCamera : this.orthographicCamera)) { - } this.activeCamera.position.copy(state.position); this.controls.target.copy(state.target); if (this.activeCamera instanceof OrthographicCamera) { @@ -46522,6 +46783,9 @@ class Load3d { } setMaterialMode(mode) { this.materialMode = mode; + if (this.controlsApp?._instance?.exposed) { + this.controlsApp._instance.exposed.showLightIntensityButton.value = mode == "original"; + } if (this.currentModel) { if (mode === "depth") { this.renderer.outputColorSpace = LinearSRGBColorSpace; @@ -46641,6 +46905,10 @@ class Load3d { return; } } + if (this.previewCamera) { + this.previewCamera = null; + } + this.previewCamera = this.activeCamera.clone(); this.activeCamera.position.copy(position); this.activeCamera.rotation.copy(rotation); if (this.materialMode === "depth" && oldCamera !== this.activeCamera) { @@ -46655,8 +46923,12 @@ class Load3d { this.viewHelperContainer ); this.viewHelper.center = this.controls.target; + if (this.controlsApp?._instance?.exposed) { + this.controlsApp._instance.exposed.showFOVButton.value = this.getCurrentCameraType() == "perspective"; + } this.storeNodeProperty("Camera Type", this.getCurrentCameraType()); this.handleResize(); + this.updatePreviewRender(); } getCurrentCameraType() { return this.activeCamera === this.perspectiveCamera ? "perspective" : "orthographic"; @@ -46667,6 +46939,13 @@ class Load3d { this.storeNodeProperty("Show Grid", showGrid); } } + togglePreview(showPreview) { + if (this.previewRenderer) { + this.showPreview = showPreview; + this.previewContainer.style.display = this.showPreview ? "block" : "none"; + this.storeNodeProperty("Show Preview", showPreview); + } + } setLightIntensity(intensity) { this.lights.forEach((light) => { if (light instanceof DirectionalLight) { @@ -46683,10 +46962,14 @@ class Load3d { light.intensity = intensity * 0.5; } }); + this.storeNodeProperty("Light Intensity", intensity); } startAnimation() { const animate = /* @__PURE__ */ __name(() => { this.animationFrameId = requestAnimationFrame(animate); + if (this.showPreview) { + this.updatePreviewRender(); + } const delta = this.clock.getDelta(); if (this.viewHelper.animating) { this.viewHelper.update(delta); @@ -46764,6 +47047,10 @@ class Load3d { this.controls.dispose(); this.viewHelper.dispose(); this.renderer.dispose(); + if (this.controlsApp) { + this.controlsApp.unmount(); + this.controlsApp = null; + } this.renderer.domElement.remove(); this.scene.clear(); } @@ -46893,6 +47180,9 @@ class Load3d { this.renderer.toneMappingExposure = 1; this.handleResize(); } + refreshViewport() { + this.handleResize(); + } handleResize() { const parentElement = this.renderer?.domElement?.parentElement; if (!parentElement) { @@ -46914,6 +47204,7 @@ class Load3d { this.orthographicCamera.updateProjectionMatrix(); } this.renderer.setSize(width, height); + this.setTargetSize(this.targetWidth, this.targetHeight); } animate = /* @__PURE__ */ __name(() => { requestAnimationFrame(this.animate); @@ -46923,6 +47214,7 @@ class Load3d { captureScene(width, height) { return new Promise(async (resolve, reject) => { try { + this.updatePreviewSize(); const originalWidth = this.renderer.domElement.width; const originalHeight = this.renderer.domElement.height; const originalClearColor = this.renderer.getClearColor( @@ -46970,11 +47262,161 @@ class Load3d { setBackgroundColor(color) { this.renderer.setClearColor(new Color(color)); this.renderer.render(this.scene, this.activeCamera); - if (this.bgColorInput) { - this.bgColorInput.value = color; + if (this.controlsApp?._instance?.exposed) { + this.controlsApp._instance.exposed.backgroundColor.value = color; } + this.storeNodeProperty("Background Color", color); } } +const _hoisted_1 = { class: "absolute top-0 left-0 w-full h-full pointer-events-none" }; +const _hoisted_2 = { + key: 0, + class: "absolute top-0 left-0 w-full flex justify-center pt-2 gap-2 items-center z-10" +}; +const _sfc_main = /* @__PURE__ */ defineComponent({ + __name: "Load3DAnimationControls", + props: { + animations: {}, + playing: { type: Boolean }, + backgroundColor: {}, + showGrid: { type: Boolean }, + showPreview: { type: Boolean }, + lightIntensity: {}, + showLightIntensityButton: { type: Boolean }, + fov: {}, + showFOVButton: { type: Boolean }, + showPreviewButton: { type: Boolean } + }, + emits: ["toggleCamera", "toggleGrid", "togglePreview", "updateBackgroundColor", "togglePlay", "speedChange", "animationChange", "updateLightIntensity", "updateFOV"], + setup(__props, { expose: __expose, emit: __emit }) { + const props = __props; + const emit = __emit; + const animations = ref(props.animations); + const playing = ref(props.playing); + const selectedSpeed = ref(1); + const selectedAnimation = ref(0); + const backgroundColor = ref(props.backgroundColor); + const showGrid = ref(props.showGrid); + const showPreview = ref(props.showPreview); + const lightIntensity = ref(props.lightIntensity); + const showLightIntensityButton = ref(props.showLightIntensityButton); + const fov2 = ref(props.fov); + const showFOVButton = ref(props.showFOVButton); + const showPreviewButton = ref(props.showPreviewButton); + const load3dControlsRef = ref(null); + const speedOptions = [ + { name: "0.1x", value: 0.1 }, + { name: "0.5x", value: 0.5 }, + { name: "1x", value: 1 }, + { name: "1.5x", value: 1.5 }, + { name: "2x", value: 2 } + ]; + watch(backgroundColor, (newValue) => { + load3dControlsRef.value.backgroundColor = newValue; + }); + watch(showLightIntensityButton, (newValue) => { + load3dControlsRef.value.showLightIntensityButton = newValue; + }); + watch(showFOVButton, (newValue) => { + load3dControlsRef.value.showFOVButton = newValue; + }); + watch(showPreviewButton, (newValue) => { + load3dControlsRef.value.showPreviewButton = newValue; + }); + const onToggleCamera = /* @__PURE__ */ __name(() => { + emit("toggleCamera"); + }, "onToggleCamera"); + const onToggleGrid = /* @__PURE__ */ __name((value) => emit("toggleGrid", value), "onToggleGrid"); + const onTogglePreview = /* @__PURE__ */ __name((value) => { + emit("togglePreview", value); + }, "onTogglePreview"); + const onUpdateBackgroundColor = /* @__PURE__ */ __name((color) => emit("updateBackgroundColor", color), "onUpdateBackgroundColor"); + const onUpdateLightIntensity = /* @__PURE__ */ __name((lightIntensity2) => { + emit("updateLightIntensity", lightIntensity2); + }, "onUpdateLightIntensity"); + const onUpdateFOV = /* @__PURE__ */ __name((fov22) => { + emit("updateFOV", fov22); + }, "onUpdateFOV"); + const togglePlay = /* @__PURE__ */ __name(() => { + playing.value = !playing.value; + emit("togglePlay", playing.value); + }, "togglePlay"); + const speedChange = /* @__PURE__ */ __name(() => { + emit("speedChange", selectedSpeed.value); + }, "speedChange"); + const animationChange = /* @__PURE__ */ __name(() => { + emit("animationChange", selectedAnimation.value); + }, "animationChange"); + __expose({ + animations, + selectedAnimation, + playing, + backgroundColor, + showGrid, + lightIntensity, + showLightIntensityButton, + fov: fov2, + showFOVButton + }); + return (_ctx, _cache2) => { + return openBlock(), createElementBlock("div", _hoisted_1, [ + createVNode(_sfc_main$1, { + backgroundColor: backgroundColor.value, + showGrid: showGrid.value, + showPreview: showPreview.value, + lightIntensity: lightIntensity.value, + showLightIntensityButton: showLightIntensityButton.value, + fov: fov2.value, + showFOVButton: showFOVButton.value, + showPreviewButton: showPreviewButton.value, + onToggleCamera, + onToggleGrid, + onTogglePreview, + onUpdateBackgroundColor, + onUpdateLightIntensity, + onUpdateFOV, + ref_key: "load3dControlsRef", + ref: load3dControlsRef + }, null, 8, ["backgroundColor", "showGrid", "showPreview", "lightIntensity", "showLightIntensityButton", "fov", "showFOVButton", "showPreviewButton"]), + animations.value && animations.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2, [ + createVNode(unref(script), { + class: "p-button-rounded p-button-text", + onClick: togglePlay + }, { + default: withCtx(() => [ + createBaseVNode("i", { + class: normalizeClass([ + "pi", + playing.value ? "pi-pause" : "pi-play", + "text-white text-lg" + ]) + }, null, 2) + ]), + _: 1 + }), + createVNode(unref(script$2), { + modelValue: selectedSpeed.value, + "onUpdate:modelValue": _cache2[0] || (_cache2[0] = ($event) => selectedSpeed.value = $event), + options: speedOptions, + optionLabel: "name", + optionValue: "value", + onChange: speedChange, + class: "w-24" + }, null, 8, ["modelValue"]), + createVNode(unref(script$2), { + modelValue: selectedAnimation.value, + "onUpdate:modelValue": _cache2[1] || (_cache2[1] = ($event) => selectedAnimation.value = $event), + options: animations.value, + optionLabel: "name", + optionValue: "index", + onChange: animationChange, + class: "w-32" + }, null, 8, ["modelValue", "options"]) + ])) : createCommentVNode("", true) + ]); + }; + } +}); class Load3dAnimation extends Load3d { static { __name(this, "Load3dAnimation"); @@ -46985,143 +47427,49 @@ 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); + constructor(container, options = {}) { + super(container, options); } - 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" + mountControls(options = {}) { + const controlsMount = document.createElement("div"); + controlsMount.style.pointerEvents = "auto"; + this.controlsContainer.appendChild(controlsMount); + this.controlsApp = createApp(_sfc_main, { + backgroundColor: "#282828", + showGrid: true, + showPreview: options.createPreview, + animations: [], + playing: false, + lightIntensity: 5, + showLightIntensityButton: true, + fov: 75, + showFOVButton: true, + showPreviewButton: options.createPreview, + onToggleCamera: /* @__PURE__ */ __name(() => this.toggleCamera(), "onToggleCamera"), + onToggleGrid: /* @__PURE__ */ __name((show) => this.toggleGrid(show), "onToggleGrid"), + onTogglePreview: /* @__PURE__ */ __name((show) => this.togglePreview(show), "onTogglePreview"), + onUpdateBackgroundColor: /* @__PURE__ */ __name((color) => this.setBackgroundColor(color), "onUpdateBackgroundColor"), + onTogglePlay: /* @__PURE__ */ __name((play) => this.toggleAnimation(play), "onTogglePlay"), + onSpeedChange: /* @__PURE__ */ __name((speed) => this.setAnimationSpeed(speed), "onSpeedChange"), + onAnimationChange: /* @__PURE__ */ __name((selectedAnimation) => this.updateSelectedAnimation(selectedAnimation), "onAnimationChange"), + onUpdateLightIntensity: /* @__PURE__ */ __name((lightIntensity) => this.setLightIntensity(lightIntensity), "onUpdateLightIntensity"), + onUpdateFOV: /* @__PURE__ */ __name((fov2) => this.setFOV(fov2), "onUpdateFOV") }); - 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); + this.controlsApp.use(PrimeVue); + this.controlsApp.directive("tooltip", Tooltip); + this.controlsApp.mount(controlsMount); } 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"; - } + if (this.controlsApp?._instance?.exposed) { + if (this.animationClips.length > 0) { + this.controlsApp._instance.exposed.animations.value = this.animationClips.map((clip, index) => ({ + name: clip.name || `Animation ${index + 1}`, + index + })); + } else { + this.controlsApp._instance.exposed.animations.value = []; } - }, "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); @@ -47146,21 +47494,7 @@ 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"; - } + this.updateAnimationList(); } setAnimationSpeed(speed) { this.animationSpeed = speed; @@ -47192,7 +47526,9 @@ class Load3dAnimation extends Load3d { action.paused = true; } this.animationActions = [action]; - this.updateAnimationList(); + if (this.controlsApp?._instance?.exposed) { + this.controlsApp._instance.exposed.selectedAnimation.value = index; + } } clearModel() { if (this.currentAnimation) { @@ -47206,20 +47542,11 @@ class Load3dAnimation extends Load3d { this.selectedAnimationIndex = 0; this.isAnimationPlaying = false; this.animationSpeed = 1; + if (this.controlsApp?._instance?.exposed) { + this.controlsApp._instance.exposed.animations.value = []; + this.controlsApp._instance.exposed.selectedAnimation.value = 0; + } 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) => { - return clip.name || `Animation ${index + 1}`; - }); } toggleAnimation(play) { if (!this.currentAnimation || this.animationActions.length === 0) { @@ -47227,15 +47554,8 @@ 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"; - } + if (this.controlsApp?._instance?.exposed) { + this.controlsApp._instance.exposed.playing.value = this.isAnimationPlaying; } this.animationActions.forEach((action) => { if (this.isAnimationPlaying) { @@ -47251,6 +47571,9 @@ class Load3dAnimation extends Load3d { startAnimation() { const animate = /* @__PURE__ */ __name(() => { this.animationFrameId = requestAnimationFrame(animate); + if (this.showPreview) { + this.updatePreviewRender(); + } const delta = this.clock.getDelta(); if (this.currentAnimation && this.isAnimationPlaying) { this.currentAnimation.update(delta); @@ -47269,19 +47592,77 @@ class Load3dAnimation extends Load3d { animate(); } } -const containerToLoad3D = /* @__PURE__ */ new Map(); +class Load3dService { + static { + __name(this, "Load3dService"); + } + static instance; + nodeToLoad3dMap = /* @__PURE__ */ new Map(); + constructor() { + } + static getInstance() { + if (!Load3dService.instance) { + Load3dService.instance = new Load3dService(); + } + return Load3dService.instance; + } + registerLoad3d(node, container, type) { + if (this.nodeToLoad3dMap.has(node)) { + this.removeLoad3d(node); + } + const isAnimation = type.includes("Animation"); + const Load3dClass = isAnimation ? Load3dAnimation : Load3d; + const isPreview = type.includes("Preview"); + const instance = new Load3dClass(container, { createPreview: !isPreview }); + instance.setNode(node); + this.nodeToLoad3dMap.set(node, instance); + return instance; + } + getLoad3d(node) { + return this.nodeToLoad3dMap.get(node) || null; + } + getNodeByLoad3d(load3d) { + for (const [node, instance] of this.nodeToLoad3dMap) { + if (instance === load3d) { + return node; + } + } + return null; + } + removeLoad3d(node) { + const instance = this.nodeToLoad3dMap.get(node); + if (instance) { + instance.remove(); + this.nodeToLoad3dMap.delete(node); + } + } + clear() { + for (const [node] of this.nodeToLoad3dMap) { + this.removeLoad3d(node); + } + } +} +const useLoad3dService = /* @__PURE__ */ __name(() => { + return Load3dService.getInstance(); +}, "useLoad3dService"); app.registerExtension({ name: "Comfy.Load3D", getCustomWidgets(app2) { return { LOAD_3D(node, inputName) { - let load3dNode = app2.graph._nodes.filter((wi) => wi.type == "Load3D"); node.addProperty("Camera Info", ""); const container = document.createElement("div"); - container.id = `comfy-load-3d-${load3dNode.length}`; container.classList.add("comfy-load-3d"); - const load3d = new Load3d(container); - containerToLoad3D.set(container.id, load3d); + const load3d = useLoad3dService().registerLoad3d( + node, + container, + "Load3D" + ); + node.onMouseEnter = function() { + if (load3d) { + load3d.refreshViewport(); + } + }; node.onResize = function() { if (load3d) { load3d.handleResize(); @@ -47292,7 +47673,7 @@ app.registerExtension({ if (load3d) { load3d.remove(); } - containerToLoad3D.delete(container.id); + useLoad3dService().removeLoad3d(node); origOnRemoved?.apply(this, []); }; node.onDrawBackground = function() { @@ -47346,39 +47727,33 @@ app.registerExtension({ const [oldWidth, oldHeight] = node.size; node.setSize([Math.max(oldWidth, 300), Math.max(oldHeight, 600)]); await nextTick(); - const sceneWidget = node.widgets.find((w2) => w2.name === "image"); - const container = sceneWidget.element; - const load3d = containerToLoad3D.get(container.id); - load3d.setNode(node); + const sceneWidget = node.widgets.find((w) => w.name === "image"); + const load3d = useLoad3dService().getLoad3d(node); const modelWidget = node.widgets.find( - (w2) => w2.name === "model_file" - ); - const material = node.widgets.find((w2) => w2.name === "material"); - const lightIntensity = node.widgets.find( - (w2) => w2.name === "light_intensity" + (w) => w.name === "model_file" ); + const material = node.widgets.find((w) => w.name === "material"); const upDirection = node.widgets.find( - (w2) => w2.name === "up_direction" + (w) => w.name === "up_direction" ); - const fov2 = node.widgets.find((w2) => w2.name === "fov"); let cameraState = node.properties["Camera Info"]; const config = new Load3DConfiguration(load3d); + const width = node.widgets.find((w) => w.name === "width"); + const height = node.widgets.find((w) => w.name === "height"); config.configure( "input", modelWidget, material, - lightIntensity, upDirection, - fov2, - cameraState + cameraState, + width, + height ); - 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"] = load3d.getCameraState(); const { scene: imageData, mask: maskData } = await load3d.captureScene( - w.value, - h.value + width.value, + height.value ); const [data, dataMask] = await Promise.all([ Load3dUtils.uploadTempImage(imageData, "scene"), @@ -47396,15 +47771,19 @@ app.registerExtension({ getCustomWidgets(app2) { return { LOAD_3D_ANIMATION(node, inputName) { - let load3dNode = app2.graph._nodes.filter( - (wi) => wi.type == "Load3DAnimation" - ); node.addProperty("Camera Info", ""); const container = document.createElement("div"); - container.id = `comfy-load-3d-animation-${load3dNode.length}`; container.classList.add("comfy-load-3d-animation"); - const load3d = new Load3dAnimation(container); - containerToLoad3D.set(container.id, load3d); + const load3d = useLoad3dService().registerLoad3d( + node, + container, + "Load3DAnimation" + ); + node.onMouseEnter = function() { + if (load3d) { + load3d.refreshViewport(); + } + }; node.onResize = function() { if (load3d) { load3d.handleResize(); @@ -47415,7 +47794,7 @@ app.registerExtension({ if (load3d) { load3d.remove(); } - containerToLoad3D.delete(container.id); + useLoad3dService().removeLoad3d(node); origOnRemoved?.apply(this, []); }; node.onDrawBackground = function() { @@ -47467,42 +47846,36 @@ app.registerExtension({ async nodeCreated(node) { if (node.constructor.comfyClass !== "Load3DAnimation") return; const [oldWidth, oldHeight] = node.size; - node.setSize([Math.max(oldWidth, 300), Math.max(oldHeight, 700)]); + node.setSize([Math.max(oldWidth, 400), Math.max(oldHeight, 700)]); await nextTick(); - const sceneWidget = node.widgets.find((w2) => w2.name === "image"); - const container = sceneWidget.element; - const load3d = containerToLoad3D.get(container.id); - load3d.setNode(node); + const sceneWidget = node.widgets.find((w) => w.name === "image"); + const load3d = useLoad3dService().getLoad3d(node); const modelWidget = node.widgets.find( - (w2) => w2.name === "model_file" - ); - const material = node.widgets.find((w2) => w2.name === "material"); - const lightIntensity = node.widgets.find( - (w2) => w2.name === "light_intensity" + (w) => w.name === "model_file" ); + const material = node.widgets.find((w) => w.name === "material"); const upDirection = node.widgets.find( - (w2) => w2.name === "up_direction" + (w) => w.name === "up_direction" ); - const fov2 = node.widgets.find((w2) => w2.name === "fov"); let cameraState = node.properties["Camera Info"]; const config = new Load3DConfiguration(load3d); + const width = node.widgets.find((w) => w.name === "width"); + const height = node.widgets.find((w) => w.name === "height"); config.configure( "input", modelWidget, material, - lightIntensity, upDirection, - fov2, - cameraState + cameraState, + width, + height ); - 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"] = load3d.getCameraState(); load3d.toggleAnimation(false); const { scene: imageData, mask: maskData } = await load3d.captureScene( - w.value, - h.value + width.value, + height.value ); const [data, dataMask] = await Promise.all([ Load3dUtils.uploadTempImage(imageData, "scene"), @@ -47528,12 +47901,18 @@ app.registerExtension({ getCustomWidgets(app2) { return { PREVIEW_3D(node, inputName) { - let load3dNode = app2.graph._nodes.filter((wi) => wi.type == "Preview3D"); const container = document.createElement("div"); - container.id = `comfy-preview-3d-${load3dNode.length}`; container.classList.add("comfy-preview-3d"); - const load3d = new Load3d(container); - containerToLoad3D.set(container.id, load3d); + const load3d = useLoad3dService().registerLoad3d( + node, + container, + "Preview3D" + ); + node.onMouseEnter = function() { + if (load3d) { + load3d.refreshViewport(); + } + }; node.onResize = function() { if (load3d) { load3d.handleResize(); @@ -47544,7 +47923,7 @@ app.registerExtension({ if (load3d) { load3d.remove(); } - containerToLoad3D.delete(container.id); + useLoad3dService().removeLoad3d(node); origOnRemoved?.apply(this, []); }; node.onDrawBackground = function() { @@ -47559,23 +47938,16 @@ app.registerExtension({ async nodeCreated(node) { if (node.constructor.comfyClass !== "Preview3D") return; const [oldWidth, oldHeight] = node.size; - node.setSize([Math.max(oldWidth, 300), Math.max(oldHeight, 550)]); + node.setSize([Math.max(oldWidth, 400), 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 load3d = useLoad3dService().getLoad3d(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); @@ -47587,14 +47959,7 @@ app.registerExtension({ } modelWidget.value = filePath.replaceAll("\\", "/"); const config = new Load3DConfiguration(load3d); - config.configure( - "output", - modelWidget, - material, - lightIntensity, - upDirection, - fov2 - ); + config.configure("output", modelWidget, material, upDirection); }; } }); @@ -47611,14 +47976,18 @@ app.registerExtension({ 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); + const load3d = useLoad3dService().registerLoad3d( + node, + container, + "Preview3DAnimation" + ); + node.onMouseEnter = function() { + if (load3d) { + load3d.refreshViewport(); + } + }; node.onResize = function() { if (load3d) { load3d.handleResize(); @@ -47629,7 +47998,7 @@ app.registerExtension({ if (load3d) { load3d.remove(); } - containerToLoad3D.delete(container.id); + useLoad3dService().removeLoad3d(node); origOnRemoved?.apply(this, []); }; node.onDrawBackground = function() { @@ -47650,21 +48019,14 @@ app.registerExtension({ 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 load3d = useLoad3dService().getLoad3d(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); @@ -47676,14 +48038,7 @@ app.registerExtension({ } modelWidget.value = filePath.replaceAll("\\", "/"); const config = new Load3DConfiguration(load3d); - config.configure( - "output", - modelWidget, - material, - lightIntensity, - upDirection, - fov2 - ); + config.configure("output", modelWidget, material, upDirection); }; } }); @@ -53025,12 +53380,12 @@ app.registerExtension({ __name(this, "NoteNode"); } static category; + static collapsable; + static title_mode; color = LGraphCanvas.node_colors.yellow.color; bgcolor = LGraphCanvas.node_colors.yellow.bgcolor; groupcolor = LGraphCanvas.node_colors.yellow.groupcolor; isVirtualNode; - collapsable; - title_mode; constructor(title) { super(title); if (!this.properties) { @@ -53108,7 +53463,6 @@ app.registerExtension({ }; this.onConnectionsChange = (type, index, connected, link_info) => { if (app2.configuringGraph) return; - this.applyOrientation(); if (connected && type === LiteGraph.OUTPUT) { const types = new Set( this.outputs[0].links.map((l) => app2.graph.links[l].type).filter((t2) => t2 !== "*") @@ -53191,7 +53545,6 @@ app.registerExtension({ node.__outputType = displayType; node.outputs[0].name = node.properties.showOutputText ? displayType : ""; node.size = node.computeSize(); - node.applyOrientation(); for (const l of node.outputs[0].links || []) { const link = app2.graph.links[l]; if (link) { @@ -53261,7 +53614,6 @@ app.registerExtension({ this.outputs[0].name = ""; } this.size = this.computeSize(); - this.applyOrientation(); app2.graph.setDirtyCanvas(true, true); }, "callback") }, @@ -53272,30 +53624,10 @@ app.registerExtension({ !RerouteNode.defaultVisibility ); }, "callback") - }, - { - // naming is inverted with respect to LiteGraphNode.horizontal - // LiteGraphNode.horizontal == true means that - // each slot in the inputs and outputs are laid out horizontally, - // which is the opposite of the visual orientation of the inputs and outputs as a node - content: "Set " + (this.properties.horizontal ? "Horizontal" : "Vertical"), - callback: /* @__PURE__ */ __name(() => { - this.properties.horizontal = !this.properties.horizontal; - this.applyOrientation(); - }, "callback") } ); return []; } - applyOrientation() { - this.horizontal = this.properties.horizontal; - if (this.horizontal) { - this.inputs[0].pos = [this.size[0] / 2, 0]; - } else { - delete this.inputs[0].pos; - } - app2.graph.setDirtyCanvas(true, true); - } computeSize() { return [ this.properties.showOutputText && this.outputs && this.outputs.length ? Math.max( @@ -53725,8 +54057,11 @@ app.registerExtension({ app.registerExtension({ name: "Comfy.UploadImage", beforeRegisterNodeDef(nodeType, nodeData) { - if (nodeData?.input?.required?.image?.[1]?.image_upload === true) { - nodeData.input.required.upload = ["IMAGEUPLOAD"]; + const imageInputSpec = nodeData?.input?.required?.image; + const config = imageInputSpec?.[1] ?? {}; + const { image_upload = false, image_folder = "input" } = config; + if (image_upload && nodeData?.input?.required) { + nodeData.input.required.upload = ["IMAGEUPLOAD", { image_folder }]; } } }); @@ -53844,4 +54179,4 @@ app.registerExtension({ }); } }); -//# sourceMappingURL=index-BYzwFNH3.js.map +//# sourceMappingURL=index-D9D9jjLT.js.map diff --git a/web/assets/index-DKIv7atk.js b/web/assets/index-DSWvxALN.js similarity index 85% rename from web/assets/index-DKIv7atk.js rename to web/assets/index-DSWvxALN.js index 16d4a527..d7da709c 100644 --- a/web/assets/index-DKIv7atk.js +++ b/web/assets/index-DSWvxALN.js @@ -1,12 +1,12 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -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-DqqhYDnY.js"; -import { s as script$x } from "./index-DXE47DZl.js"; -var theme$7 = /* @__PURE__ */ __name(function theme(_ref) { +import { bG as BaseStyle, bH as script$c, cV as getWidth, d9 as getHeight, c2 as getOuterWidth, da as getOuterHeight, d3 as isRTL, cZ as getVNodeProp, db as isArray, o as openBlock, f as createElementBlock, at as mergeProps, F as Fragment, D as renderList, y as createBlock, C as resolveDynamicComponent, m as createBaseVNode, B as createCommentVNode, A as renderSlot, bK as getAttribute, bJ as findSingle, bL as focus, ce as equals, bO as Ripple, r as resolveDirective, i as withDirectives, z as withCtx, aj as normalizeClass, cW as getOffset, cb as script$d, bQ as script$e, cd as isNotEmpty, bY as script$f, bP as UniqueComponentId, bZ as ZIndex, cc as resolveFieldData, c7 as OverlayEventBus, ci as isEmpty, b_ as addStyle, c1 as relativePosition, c3 as absolutePosition, b$ as ConnectedOverlayScrollHandler, c0 as isTouchDevice, cj as findLastIndex, bk as script$g, cM as script$h, ca as script$i, bN as script$j, ck as script$k, a9 as script$l, bR as resolveComponent, n as normalizeStyle, k as createVNode, E as toDisplayString, bI as Transition, cp as createSlots, a8 as createTextVNode, cv as script$m, cr as resolve, dc as nestedPosition, cf as script$n, ch as isPrintableCharacter, l as script$o, cI as script$p, cx as normalizeProps, cC as guardReactiveProps } from "./index-DqXp9vW4.js"; +import { s as script$q } from "./index-BTHx8UHZ.js"; +var theme$6 = /* @__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"); }, "theme"); -var classes$a = { +var classes$9 = { root: /* @__PURE__ */ __name(function root(_ref2) { var props = _ref2.props; return ["p-splitter p-component", "p-splitter-" + props.layout]; @@ -14,7 +14,7 @@ var classes$a = { gutter: "p-splitter-gutter", gutterHandle: "p-splitter-gutter-handle" }; -var inlineStyles$4 = { +var inlineStyles$3 = { root: /* @__PURE__ */ __name(function root2(_ref3) { var props = _ref3.props; return [{ @@ -27,13 +27,13 @@ var inlineStyles$4 = { }; var SplitterStyle = BaseStyle.extend({ name: "splitter", - theme: theme$7, - classes: classes$a, - inlineStyles: inlineStyles$4 + theme: theme$6, + classes: classes$9, + inlineStyles: inlineStyles$3 }); -var script$1$a = { +var script$1$9 = { name: "BaseSplitter", - "extends": script$f, + "extends": script$c, props: { layout: { type: String, @@ -64,39 +64,39 @@ var script$1$a = { }; }, "provide") }; -function _toConsumableArray$2(r) { - return _arrayWithoutHoles$2(r) || _iterableToArray$2(r) || _unsupportedIterableToArray$2(r) || _nonIterableSpread$2(); +function _toConsumableArray$1(r) { + return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread$1(); } -__name(_toConsumableArray$2, "_toConsumableArray$2"); -function _nonIterableSpread$2() { +__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$2, "_nonIterableSpread$2"); -function _unsupportedIterableToArray$2(r, a) { +__name(_nonIterableSpread$1, "_nonIterableSpread$1"); +function _unsupportedIterableToArray$1(r, a) { if (r) { - if ("string" == typeof r) return _arrayLikeToArray$2(r, a); + if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } } -__name(_unsupportedIterableToArray$2, "_unsupportedIterableToArray$2"); -function _iterableToArray$2(r) { +__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$2, "_iterableToArray$2"); -function _arrayWithoutHoles$2(r) { - if (Array.isArray(r)) return _arrayLikeToArray$2(r); +__name(_iterableToArray$1, "_iterableToArray$1"); +function _arrayWithoutHoles$1(r) { + if (Array.isArray(r)) return _arrayLikeToArray$1(r); } -__name(_arrayWithoutHoles$2, "_arrayWithoutHoles$2"); -function _arrayLikeToArray$2(r, a) { +__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$2, "_arrayLikeToArray$2"); -var script$e = { +__name(_arrayLikeToArray$1, "_arrayLikeToArray$1"); +var script$b = { name: "Splitter", - "extends": script$1$a, + "extends": script$1$9, inheritAttrs: false, emits: ["resizestart", "resizeend", "resize"], dragging: false, @@ -138,7 +138,7 @@ var script$e = { initialized = this.restoreState(); } if (!initialized) { - var children = _toConsumableArray$2(this.$el.children).filter(function(child) { + var children = _toConsumableArray$1(this.$el.children).filter(function(child) { return child.getAttribute("data-pc-name") === "splitterpanel"; }); var _panelSizes = []; @@ -398,7 +398,7 @@ var script$e = { var stateString = storage.getItem(this.stateKey); if (stateString) { this.panelSizes = JSON.parse(stateString); - var children = _toConsumableArray$2(this.$el.children).filter(function(child) { + var children = _toConsumableArray$1(this.$el.children).filter(function(child) { return child.getAttribute("data-pc-name") === "splitterpanel"; }); children.forEach(function(child, i) { @@ -450,9 +450,9 @@ var script$e = { }, "getPTOptions") } }; -var _hoisted_1$7 = ["onMousedown", "onTouchstart", "onTouchmove", "onTouchend"]; +var _hoisted_1$6 = ["onMousedown", "onTouchstart", "onTouchmove", "onTouchend"]; var _hoisted_2$4 = ["aria-orientation", "aria-valuenow", "onKeydown"]; -function render$d(_ctx, _cache, $props, $setup, $data, $options) { +function render$a(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", mergeProps({ "class": _ctx.cx("root"), style: _ctx.sx("root"), @@ -495,12 +495,12 @@ function render$d(_ctx, _cache, $props, $setup, $data, $options) { return $options.onGutterKeyDown($event, i); }, "onKeydown"), ref_for: true - }, _ctx.ptm("gutterHandle")), null, 16, _hoisted_2$4)], 16, _hoisted_1$7)) : createCommentVNode("", true)], 64); + }, _ctx.ptm("gutterHandle")), null, 16, _hoisted_2$4)], 16, _hoisted_1$6)) : createCommentVNode("", true)], 64); }), 128))], 16); } -__name(render$d, "render$d"); -script$e.render = render$d; -var classes$9 = { +__name(render$a, "render$a"); +script$b.render = render$a; +var classes$8 = { root: /* @__PURE__ */ __name(function root3(_ref) { var instance = _ref.instance; return ["p-splitterpanel", { @@ -510,11 +510,11 @@ var classes$9 = { }; var SplitterPanelStyle = BaseStyle.extend({ name: "splitterpanel", - classes: classes$9 + classes: classes$8 }); -var script$1$9 = { +var script$1$8 = { name: "BaseSplitterPanel", - "extends": script$f, + "extends": script$c, props: { size: { type: Number, @@ -533,9 +533,9 @@ var script$1$9 = { }; }, "provide") }; -var script$d = { +var script$a = { name: "SplitterPanel", - "extends": script$1$9, + "extends": script$1$8, inheritAttrs: false, data: /* @__PURE__ */ __name(function data2() { return { @@ -559,15 +559,15 @@ var script$d = { }, "getPTOptions") } }; -function render$c(_ctx, _cache, $props, $setup, $data, $options) { +function render$9(_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$c, "render$c"); -script$d.render = render$c; -var classes$8 = { +__name(render$9, "render$9"); +script$a.render = render$9; +var classes$7 = { root: /* @__PURE__ */ __name(function root4(_ref) { var instance = _ref.instance, props = _ref.props; return ["p-tab", { @@ -578,11 +578,11 @@ var classes$8 = { }; var TabStyle = BaseStyle.extend({ name: "tab", - classes: classes$8 + classes: classes$7 }); -var script$1$8 = { +var script$1$7 = { name: "BaseTab", - "extends": script$f, + "extends": script$c, props: { value: { type: [String, Number], @@ -609,9 +609,9 @@ var script$1$8 = { }; }, "provide") }; -var script$c = { +var script$9 = { name: "Tab", - "extends": script$1$8, + "extends": script$1$7, inheritAttrs: false, inject: ["$pcTabs", "$pcTabList"], methods: { @@ -758,7 +758,7 @@ var script$c = { ripple: Ripple } }; -function render$b(_ctx, _cache, $props, $setup, $data, $options) { +function render$8(_ctx, _cache, $props, $setup, $data, $options) { var _directive_ripple = resolveDirective("ripple"); return !_ctx.asChild ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ key: 0, @@ -777,9 +777,9 @@ function render$b(_ctx, _cache, $props, $setup, $data, $options) { onClick: $options.onClick }); } -__name(render$b, "render$b"); -script$c.render = render$b; -var classes$7 = { +__name(render$8, "render$8"); +script$9.render = render$8; +var classes$6 = { root: "p-tablist", content: /* @__PURE__ */ __name(function content(_ref) { var instance = _ref.instance; @@ -794,11 +794,11 @@ var classes$7 = { }; var TabListStyle = BaseStyle.extend({ name: "tablist", - classes: classes$7 + classes: classes$6 }); -var script$1$7 = { +var script$1$6 = { name: "BaseTabList", - "extends": script$f, + "extends": script$c, props: {}, style: TabListStyle, provide: /* @__PURE__ */ __name(function provide4() { @@ -808,9 +808,9 @@ var script$1$7 = { }; }, "provide") }; -var script$b = { +var script$8 = { name: "TabList", - "extends": script$1$7, + "extends": script$1$6, inheritAttrs: false, inject: ["$pcTabs"], data: /* @__PURE__ */ __name(function data3() { @@ -936,17 +936,17 @@ var script$b = { }, "nextButtonAriaLabel") }, components: { - ChevronLeftIcon: script$g, - ChevronRightIcon: script$h + ChevronLeftIcon: script$d, + ChevronRightIcon: script$e }, directives: { ripple: Ripple } }; -var _hoisted_1$6 = ["aria-label", "tabindex"]; +var _hoisted_1$5 = ["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) { +function render$7(_ctx, _cache, $props, $setup, $data, $options) { var _directive_ripple = resolveDirective("ripple"); return openBlock(), createElementBlock("div", mergeProps({ ref: "list", @@ -964,7 +964,7 @@ function render$a(_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$6)), [[_directive_ripple]]) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ + }, _ctx.ptm("prevIcon")), null, 16))], 16, _hoisted_1$5)), [[_directive_ripple]]) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ ref: "content", "class": _ctx.cx("content"), onScroll: _cache[1] || (_cache[1] = function() { @@ -995,23 +995,23 @@ function render$a(_ctx, _cache, $props, $setup, $data, $options) { "aria-hidden": "true" }, _ctx.ptm("nextIcon")), null, 16))], 16, _hoisted_3$3)), [[_directive_ripple]]) : createCommentVNode("", true)], 16); } -__name(render$a, "render$a"); -script$b.render = render$a; -var theme$6 = /* @__PURE__ */ __name(function theme2(_ref) { +__name(render$7, "render$7"); +script$8.render = render$7; +var theme$5 = /* @__PURE__ */ __name(function theme2(_ref) { _ref.dt; 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 = { +var classes$5 = { root: "p-buttongroup p-component" }; var ButtonGroupStyle = BaseStyle.extend({ name: "buttongroup", - theme: theme$6, - classes: classes$6 + theme: theme$5, + classes: classes$5 }); -var script$1$6 = { +var script$1$5 = { name: "BaseButtonGroup", - "extends": script$f, + "extends": script$c, style: ButtonGroupStyle, provide: /* @__PURE__ */ __name(function provide5() { return { @@ -1020,29 +1020,29 @@ var script$1$6 = { }; }, "provide") }; -var script$a = { +var script$7 = { name: "ButtonGroup", - "extends": script$1$6, + "extends": script$1$5, inheritAttrs: false }; -function render$9(_ctx, _cache, $props, $setup, $data, $options) { +function render$6(_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$9, "render$9"); -script$a.render = render$9; -var theme$5 = /* @__PURE__ */ __name(function theme3(_ref) { +__name(render$6, "render$6"); +script$7.render = render$6; +var theme$4 = /* @__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 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 = { +var inlineStyles$2 = { root: { position: "relative" } }; -var classes$5 = { +var classes$4 = { root: /* @__PURE__ */ __name(function root5(_ref2) { var instance = _ref2.instance, props = _ref2.props; return ["p-autocomplete p-component p-inputwrapper", { @@ -1090,13 +1090,13 @@ var classes$5 = { }; var AutoCompleteStyle = BaseStyle.extend({ name: "autocomplete", - theme: theme$5, - classes: classes$5, - inlineStyles: inlineStyles$3 + theme: theme$4, + classes: classes$4, + inlineStyles: inlineStyles$2 }); -var script$1$5 = { +var script$1$4 = { name: "BaseAutoComplete", - "extends": script$i, + "extends": script$f, props: { suggestions: { type: Array, @@ -1271,48 +1271,48 @@ var script$1$5 = { }; }, "provide") }; -function _typeof$1$1(o) { +function _typeof$1(o) { "@babel/helpers - typeof"; - return _typeof$1$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + 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$1(o); + }, _typeof$1(o); } -__name(_typeof$1$1, "_typeof$1$1"); -function _toConsumableArray$1(r) { - return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread$1(); +__name(_typeof$1, "_typeof$1"); +function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } -__name(_toConsumableArray$1, "_toConsumableArray$1"); -function _nonIterableSpread$1() { +__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$1, "_nonIterableSpread$1"); -function _unsupportedIterableToArray$1(r, a) { +__name(_nonIterableSpread, "_nonIterableSpread"); +function _unsupportedIterableToArray(r, a) { if (r) { - if ("string" == typeof r) return _arrayLikeToArray$1(r, a); + if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } -__name(_unsupportedIterableToArray$1, "_unsupportedIterableToArray$1"); -function _iterableToArray$1(r) { +__name(_unsupportedIterableToArray, "_unsupportedIterableToArray"); +function _iterableToArray(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(_iterableToArray, "_iterableToArray"); +function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); } -__name(_arrayWithoutHoles$1, "_arrayWithoutHoles$1"); -function _arrayLikeToArray$1(r, a) { +__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$1, "_arrayLikeToArray$1"); -var script$9 = { +__name(_arrayLikeToArray, "_arrayLikeToArray"); +var script$6 = { name: "AutoComplete", - "extends": script$1$5, + "extends": script$1$4, inheritAttrs: false, emits: ["change", "focus", "blur", "item-select", "item-unselect", "option-select", "option-unselect", "dropdown-click", "clear", "complete", "before-show", "before-hide", "show", "hide"], inject: { @@ -1609,7 +1609,7 @@ var script$9 = { if (this.multiple) { this.$refs.focusInput.value = ""; if (!this.isSelected(option2)) { - this.updateModel(event, [].concat(_toConsumableArray$1(this.d_value || []), [value])); + this.updateModel(event, [].concat(_toConsumableArray(this.d_value || []), [value])); } } else { this.updateModel(event, value); @@ -1707,7 +1707,7 @@ var script$9 = { onEnterKey: /* @__PURE__ */ __name(function onEnterKey2(event) { if (!this.typeahead) { if (this.multiple) { - this.updateModel(event, [].concat(_toConsumableArray$1(this.d_value || []), [event.target.value])); + this.updateModel(event, [].concat(_toConsumableArray(this.d_value || []), [event.target.value])); this.$refs.focusInput.value = ""; } } else { @@ -2023,7 +2023,7 @@ var script$9 = { }, "visibleOptions"), inputValue: /* @__PURE__ */ __name(function inputValue() { if (this.$filled) { - if (_typeof$1$1(this.d_value) === "object") { + if (_typeof$1(this.d_value) === "object") { var label = this.getOptionLabel(this.d_value); return label != null ? label : this.d_value; } else { @@ -2081,27 +2081,27 @@ var script$9 = { }, "panelId") }, components: { - InputText: script$j, - VirtualScroller: script$k, - Portal: script$l, - ChevronDownIcon: script$m, - SpinnerIcon: script$n, - Chip: script$o + InputText: script$g, + VirtualScroller: script$h, + Portal: script$i, + ChevronDownIcon: script$j, + SpinnerIcon: script$k, + Chip: script$l }, directives: { ripple: Ripple } }; -function _typeof$4(o) { +function _typeof$2(o) { "@babel/helpers - typeof"; - return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { + 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$4(o); + }, _typeof$2(o); } -__name(_typeof$4, "_typeof$4"); -function ownKeys$3(e, r) { +__name(_typeof$2, "_typeof$2"); +function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); @@ -2111,40 +2111,40 @@ function ownKeys$3(e, r) { } return t; } -__name(ownKeys$3, "ownKeys$3"); -function _objectSpread$3(e) { +__name(ownKeys$1, "ownKeys$1"); +function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$3(Object(t), true).forEach(function(r2) { - _defineProperty$4(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function(r2) { + r % 2 ? ownKeys$1(Object(t), true).forEach(function(r2) { + _defineProperty$1(e, r2, t[r2]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r2) { Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); }); } return e; } -__name(_objectSpread$3, "_objectSpread$3"); -function _defineProperty$4(e, r, t) { - return (r = _toPropertyKey$4(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; +__name(_objectSpread$1, "_objectSpread$1"); +function _defineProperty$1(e, r, t) { + return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; } -__name(_defineProperty$4, "_defineProperty$4"); -function _toPropertyKey$4(t) { - var i = _toPrimitive$4(t, "string"); - return "symbol" == _typeof$4(i) ? i : i + ""; +__name(_defineProperty$1, "_defineProperty$1"); +function _toPropertyKey$1(t) { + var i = _toPrimitive$1(t, "string"); + return "symbol" == _typeof$2(i) ? i : i + ""; } -__name(_toPropertyKey$4, "_toPropertyKey$4"); -function _toPrimitive$4(t, r) { - if ("object" != _typeof$4(t) || !t) return t; +__name(_toPropertyKey$1, "_toPropertyKey$1"); +function _toPrimitive$1(t, r) { + if ("object" != _typeof$2(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); - if ("object" != _typeof$4(i)) return i; + if ("object" != _typeof$2(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -__name(_toPrimitive$4, "_toPrimitive$4"); -var _hoisted_1$5 = ["aria-activedescendant"]; +__name(_toPrimitive$1, "_toPrimitive$1"); +var _hoisted_1$4 = ["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"]; @@ -2152,7 +2152,7 @@ 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) { +function render$5(_ctx, _cache, $props, $setup, $data, $options) { var _component_InputText = resolveComponent("InputText"); var _component_Chip = resolveComponent("Chip"); var _component_SpinnerIcon = resolveComponent("SpinnerIcon"); @@ -2243,7 +2243,7 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) { removeIcon: _ctx.chipIcon || _ctx.removeTokenIcon, removable: "", unstyled: _ctx.unstyled, - onRemove: /* @__PURE__ */ __name(function onRemove2($event) { + onRemove: /* @__PURE__ */ __name(function onRemove($event) { return $options.removeOption($event, i); }, "onRemove"), pt: _ctx.ptm("pcChip") @@ -2297,7 +2297,7 @@ function render$8(_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$2)], 16)], 16, _hoisted_1$5)) : 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$4)) : createCommentVNode("", true), $data.searching || _ctx.loading ? renderSlot(_ctx.$slots, _ctx.$slots.loader ? "loader" : "loadingicon", { key: 2, "class": normalizeClass(_ctx.cx("loader")) }, function() { @@ -2358,7 +2358,7 @@ function render$8(_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({}, _ctx.panelStyle), _ctx.overlayStyle), + style: _objectSpread$1(_objectSpread$1({}, _ctx.panelStyle), _ctx.overlayStyle), onClick: _cache[9] || (_cache[9] = function() { return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments); }), @@ -2480,23 +2480,23 @@ function render$8(_ctx, _cache, $props, $setup, $data, $options) { _: 3 }, 8, ["appendTo"])], 16); } -__name(render$8, "render$8"); -script$9.render = render$8; -var theme$4 = /* @__PURE__ */ __name(function theme4(_ref) { +__name(render$5, "render$5"); +script$6.render = render$5; +var theme$3 = /* @__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 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 = { +var classes$3 = { root: "p-overlaybadge" }; var OverlayBadgeStyle = BaseStyle.extend({ name: "overlaybadge", - theme: theme$4, - classes: classes$4 + theme: theme$3, + classes: classes$3 }); -var script$1$4 = { +var script$1$3 = { name: "OverlayBadge", - "extends": script$p, + "extends": script$m, style: OverlayBadgeStyle, provide: /* @__PURE__ */ __name(function provide7() { return { @@ -2505,15 +2505,15 @@ var script$1$4 = { }; }, "provide") }; -var script$8 = { +var script$5 = { name: "OverlayBadge", - "extends": script$1$4, + "extends": script$1$3, inheritAttrs: false, components: { - Badge: script$p + Badge: script$m } }; -function render$7(_ctx, _cache, $props, $setup, $data, $options) { +function render$4(_ctx, _cache, $props, $setup, $data, $options) { var _component_Badge = resolveComponent("Badge"); return openBlock(), createElementBlock("div", mergeProps({ "class": _ctx.cx("root") @@ -2521,618 +2521,9 @@ function render$7(_ctx, _cache, $props, $setup, $data, $options) { pt: _ctx.ptm("pcBadge") }), null, 16, ["pt"])], 16); } -__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) { - 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 _defineProperty$3(e, r, t) { - return (r = _toPropertyKey$3(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$3, "_defineProperty$3"); -function _toPropertyKey$3(t) { - var i = _toPrimitive$3(t, "string"); - return "symbol" == _typeof$3(i) ? i : i + ""; -} -__name(_toPropertyKey$3, "_toPropertyKey$3"); -function _toPrimitive$3(t, r) { - if ("object" != _typeof$3(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$3(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__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-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) { - var position = _ref2.position; - return { - position: "fixed", - top: position === "top-right" || position === "top-left" || position === "top-center" ? "20px" : position === "center" ? "50%" : null, - right: (position === "top-right" || position === "bottom-right") && "20px", - bottom: (position === "bottom-left" || position === "bottom-right" || position === "bottom-center") && "20px", - left: position === "top-left" || position === "bottom-left" ? "20px" : position === "center" || position === "top-center" || position === "bottom-center" ? "50%" : null - }; - }, "root") -}; -var classes$3 = { - root: /* @__PURE__ */ __name(function root7(_ref3) { - var props = _ref3.props; - return ["p-toast p-component p-toast-" + props.position]; - }, "root"), - message: /* @__PURE__ */ __name(function message(_ref4) { - var props = _ref4.props; - return ["p-toast-message", { - "p-toast-message-info": props.message.severity === "info" || props.message.severity === void 0, - "p-toast-message-warn": props.message.severity === "warn", - "p-toast-message-error": props.message.severity === "error", - "p-toast-message-success": props.message.severity === "success", - "p-toast-message-secondary": props.message.severity === "secondary", - "p-toast-message-contrast": props.message.severity === "contrast" - }]; - }, "message"), - messageContent: "p-toast-message-content", - messageIcon: /* @__PURE__ */ __name(function messageIcon(_ref5) { - var props = _ref5.props; - return ["p-toast-message-icon", _defineProperty$3(_defineProperty$3(_defineProperty$3(_defineProperty$3({}, props.infoIcon, props.message.severity === "info"), props.warnIcon, props.message.severity === "warn"), props.errorIcon, props.message.severity === "error"), props.successIcon, props.message.severity === "success")]; - }, "messageIcon"), - messageText: "p-toast-message-text", - summary: "p-toast-summary", - detail: "p-toast-detail", - closeButton: "p-toast-close-button", - closeIcon: "p-toast-close-icon" -}; -var ToastStyle = BaseStyle.extend({ - name: "toast", - theme: theme$3, - 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$f, - props: { - group: { - type: String, - "default": null - }, - position: { - type: String, - "default": "top-right" - }, - autoZIndex: { - type: Boolean, - "default": true - }, - baseZIndex: { - type: Number, - "default": 0 - }, - breakpoints: { - type: Object, - "default": null - }, - closeIcon: { - type: String, - "default": void 0 - }, - infoIcon: { - type: String, - "default": void 0 - }, - warnIcon: { - type: String, - "default": void 0 - }, - errorIcon: { - type: String, - "default": void 0 - }, - successIcon: { - type: String, - "default": void 0 - }, - closeButtonProps: { - type: null, - "default": null - } - }, - style: ToastStyle, - provide: /* @__PURE__ */ __name(function provide8() { - return { - $pcToast: this, - $parentInstance: this - }; - }, "provide") -}; -var script$1$3 = { - name: "ToastMessage", - hostName: "Toast", - "extends": script$f, - emits: ["close"], - closeTimeout: null, - props: { - message: { - type: null, - "default": null - }, - templates: { - type: Object, - "default": null - }, - closeIcon: { - type: String, - "default": null - }, - infoIcon: { - type: String, - "default": null - }, - warnIcon: { - type: String, - "default": null - }, - errorIcon: { - type: String, - "default": null - }, - successIcon: { - type: String, - "default": null - }, - closeButtonProps: { - type: null, - "default": null - } - }, - mounted: /* @__PURE__ */ __name(function mounted4() { - var _this = this; - if (this.message.life) { - this.closeTimeout = setTimeout(function() { - _this.close({ - message: _this.message, - type: "life-end" - }); - }, this.message.life); - } - }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount4() { - this.clearCloseTimeout(); - }, "beforeUnmount"), - methods: { - close: /* @__PURE__ */ __name(function close(params) { - this.$emit("close", params); - }, "close"), - onCloseClick: /* @__PURE__ */ __name(function onCloseClick() { - this.clearCloseTimeout(); - this.close({ - message: this.message, - type: "close" - }); - }, "onCloseClick"), - clearCloseTimeout: /* @__PURE__ */ __name(function clearCloseTimeout() { - if (this.closeTimeout) { - clearTimeout(this.closeTimeout); - this.closeTimeout = null; - } - }, "clearCloseTimeout") - }, - computed: { - iconComponent: /* @__PURE__ */ __name(function iconComponent() { - return { - 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() { - return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : void 0; - }, "closeAriaLabel") - }, - components: { - TimesIcon: script$t, - InfoCircleIcon: script$6, - CheckIcon: script$r, - ExclamationTriangleIcon: script$7, - TimesCircleIcon: script$s - }, - directives: { - ripple: Ripple - } -}; -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 ownKeys$1(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$1, "ownKeys$1"); -function _objectSpread$1(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$1(Object(t), true).forEach(function(r2) { - _defineProperty$1(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$1, "_objectSpread$1"); -function _defineProperty$1(e, r, t) { - return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$1, "_defineProperty$1"); -function _toPropertyKey$1(t) { - var i = _toPrimitive$1(t, "string"); - return "symbol" == _typeof$1(i) ? i : i + ""; -} -__name(_toPropertyKey$1, "_toPropertyKey$1"); -function _toPrimitive$1(t, r) { - if ("object" != _typeof$1(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$1(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$1, "_toPrimitive$1"); -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({ - "class": [_ctx.cx("message"), $props.message.styleClass], - role: "alert", - "aria-live": "assertive", - "aria-atomic": "true" - }, _ctx.ptm("message")), [$props.templates.container ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.container), { - key: 0, - message: $props.message, - closeCallback: $options.onCloseClick - }, null, 8, ["message", "closeCallback"])) : (openBlock(), createElementBlock("div", mergeProps({ - key: 1, - "class": [_ctx.cx("messageContent"), $props.message.contentStyleClass] - }, _ctx.ptm("messageContent")), [!$props.templates.message ? (openBlock(), createElementBlock(Fragment, { - key: 0 - }, [(openBlock(), createBlock(resolveDynamicComponent($props.templates.messageicon ? $props.templates.messageicon : $props.templates.icon ? $props.templates.icon : $options.iconComponent && $options.iconComponent.name ? $options.iconComponent : "span"), mergeProps({ - "class": _ctx.cx("messageIcon") - }, _ctx.ptm("messageIcon")), null, 16, ["class"])), createBaseVNode("div", mergeProps({ - "class": _ctx.cx("messageText") - }, _ctx.ptm("messageText")), [createBaseVNode("span", mergeProps({ - "class": _ctx.cx("summary") - }, _ctx.ptm("summary")), toDisplayString($props.message.summary), 17), createBaseVNode("div", mergeProps({ - "class": _ctx.cx("detail") - }, _ctx.ptm("detail")), toDisplayString($props.message.detail), 17)], 16)], 64)) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.message), { - key: 1, - message: $props.message - }, null, 8, ["message"])), $props.message.closable !== false ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ - key: 2 - }, _ctx.ptm("buttonContainer"))), [withDirectives((openBlock(), createElementBlock("button", mergeProps({ - "class": _ctx.cx("closeButton"), - type: "button", - "aria-label": $options.closeAriaLabel, - onClick: _cache[0] || (_cache[0] = function() { - return $options.onCloseClick && $options.onCloseClick.apply($options, arguments); - }), - 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$4)), [[_directive_ripple]])], 16)) : createCommentVNode("", true)], 16))], 16); -} -__name(render$1$2, "render$1$2"); -script$1$3.render = render$1$2; -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 t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _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 messageIdx = 0; -var script$5 = { - name: "Toast", - "extends": script$2$2, - inheritAttrs: false, - emits: ["close", "life-end"], - data: /* @__PURE__ */ __name(function data5() { - return { - messages: [] - }; - }, "data"), - styleElement: null, - mounted: /* @__PURE__ */ __name(function mounted5() { - ToastEventBus.on("add", this.onAdd); - ToastEventBus.on("remove", this.onRemove); - ToastEventBus.on("remove-group", this.onRemoveGroup); - ToastEventBus.on("remove-all-groups", this.onRemoveAllGroups); - if (this.breakpoints) { - this.createStyle(); - } - }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount5() { - this.destroyStyle(); - if (this.$refs.container && this.autoZIndex) { - ZIndex.clear(this.$refs.container); - } - ToastEventBus.off("add", this.onAdd); - ToastEventBus.off("remove", this.onRemove); - ToastEventBus.off("remove-group", this.onRemoveGroup); - ToastEventBus.off("remove-all-groups", this.onRemoveAllGroups); - }, "beforeUnmount"), - methods: { - add: /* @__PURE__ */ __name(function add(message2) { - if (message2.id == null) { - message2.id = messageIdx++; - } - this.messages = [].concat(_toConsumableArray(this.messages), [message2]); - }, "add"), - remove: /* @__PURE__ */ __name(function remove(params) { - var index = this.messages.findIndex(function(m) { - return m.id === params.message.id; - }); - if (index !== -1) { - this.messages.splice(index, 1); - this.$emit(params.type, { - message: params.message - }); - } - }, "remove"), - onAdd: /* @__PURE__ */ __name(function onAdd(message2) { - if (this.group == message2.group) { - this.add(message2); - } - }, "onAdd"), - onRemove: /* @__PURE__ */ __name(function onRemove(message2) { - this.remove({ - message: message2, - type: "close" - }); - }, "onRemove"), - onRemoveGroup: /* @__PURE__ */ __name(function onRemoveGroup(group) { - if (this.group === group) { - this.messages = []; - } - }, "onRemoveGroup"), - onRemoveAllGroups: /* @__PURE__ */ __name(function onRemoveAllGroups() { - this.messages = []; - }, "onRemoveAllGroups"), - onEnter: /* @__PURE__ */ __name(function onEnter() { - if (this.autoZIndex) { - ZIndex.set("modal", this.$refs.container, this.baseZIndex || this.$primevue.config.zIndex.modal); - } - }, "onEnter"), - onLeave: /* @__PURE__ */ __name(function onLeave() { - var _this = this; - if (this.$refs.container && this.autoZIndex && isEmpty(this.messages)) { - setTimeout(function() { - ZIndex.clear(_this.$refs.container); - }, 200); - } - }, "onLeave"), - 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 = ""; - for (var breakpoint in this.breakpoints) { - var breakpointStyle = ""; - 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.$attrSelector, "] {\n ").concat(breakpointStyle, "\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") - }, - components: { - ToastMessage: script$1$3, - Portal: script$l - } -}; -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 ownKeys$2(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$2, "ownKeys$2"); -function _objectSpread$2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$2(Object(t), true).forEach(function(r2) { - _defineProperty$2(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$2, "_objectSpread$2"); -function _defineProperty$2(e, r, t) { - return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$2, "_defineProperty$2"); -function _toPropertyKey$2(t) { - var i = _toPrimitive$2(t, "string"); - return "symbol" == _typeof$2(i) ? i : i + ""; -} -__name(_toPropertyKey$2, "_toPropertyKey$2"); -function _toPrimitive$2(t, r) { - if ("object" != _typeof$2(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$2(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$2, "_toPrimitive$2"); -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, { - "default": withCtx(function() { - return [createBaseVNode("div", mergeProps({ - ref: "container", - "class": _ctx.cx("root"), - style: _ctx.sx("root", true, { - position: _ctx.position - }) - }, _ctx.ptmi("root")), [createVNode(TransitionGroup, mergeProps({ - name: "p-toast-message", - tag: "div", - onEnter: $options.onEnter, - onLeave: $options.onLeave - }, _objectSpread$2({}, _ctx.ptm("transition"))), { - "default": withCtx(function() { - return [(openBlock(true), createElementBlock(Fragment, null, renderList($data.messages, function(msg) { - return openBlock(), createBlock(_component_ToastMessage, { - key: msg.id, - message: msg, - templates: _ctx.$slots, - closeIcon: _ctx.closeIcon, - infoIcon: _ctx.infoIcon, - warnIcon: _ctx.warnIcon, - errorIcon: _ctx.errorIcon, - successIcon: _ctx.successIcon, - closeButtonProps: _ctx.closeButtonProps, - unstyled: _ctx.unstyled, - onClose: _cache[0] || (_cache[0] = function($event) { - return $options.remove($event); - }), - pt: _ctx.pt - }, null, 8, ["message", "templates", "closeIcon", "infoIcon", "warnIcon", "errorIcon", "successIcon", "closeButtonProps", "unstyled", "pt"]); - }), 128))]; - }), - _: 1 - }, 16, ["onEnter", "onLeave"])], 16)]; - }), - _: 1 - }); -} __name(render$4, "render$4"); script$5.render = render$4; -var theme$2 = /* @__PURE__ */ __name(function theme6(_ref) { +var theme$2 = /* @__PURE__ */ __name(function theme5(_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-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"); @@ -3145,7 +2536,7 @@ var inlineStyles$1 = { }, "submenu") }; var classes$2 = { - root: /* @__PURE__ */ __name(function root8(_ref3) { + root: /* @__PURE__ */ __name(function root6(_ref3) { var props = _ref3.props, instance = _ref3.instance; return ["p-tieredmenu p-component", { "p-tieredmenu-overlay": props.popup, @@ -3179,7 +2570,7 @@ var TieredMenuStyle = BaseStyle.extend({ }); var script$2$1 = { name: "BaseTieredMenu", - "extends": script$f, + "extends": script$c, props: { popup: { type: Boolean, @@ -3223,7 +2614,7 @@ var script$2$1 = { } }, style: TieredMenuStyle, - provide: /* @__PURE__ */ __name(function provide9() { + provide: /* @__PURE__ */ __name(function provide8() { return { $pcTieredMenu: this, $parentInstance: this @@ -3233,7 +2624,7 @@ var script$2$1 = { var script$1$2 = { name: "TieredMenuSub", hostName: "TieredMenu", - "extends": script$f, + "extends": script$c, emits: ["item-click", "item-mouseenter", "item-mousemove"], container: null, props: { @@ -3314,7 +2705,7 @@ var script$1$2 = { isItemGroup: /* @__PURE__ */ __name(function isItemGroup(processedItem) { return isNotEmpty(processedItem.items); }, "isItemGroup"), - onEnter: /* @__PURE__ */ __name(function onEnter2() { + onEnter: /* @__PURE__ */ __name(function onEnter() { nestedPosition(this.container, this.level); }, "onEnter"), onItemClick: /* @__PURE__ */ __name(function onItemClick(event, processedItem) { @@ -3374,7 +2765,7 @@ var script$1$2 = { }, "containerRef") }, components: { - AngleRightIcon: script$u + AngleRightIcon: script$n }, directives: { ripple: Ripple @@ -3527,7 +2918,7 @@ var script$4 = { menubar: null, searchTimeout: null, searchValue: null, - data: /* @__PURE__ */ __name(function data6() { + data: /* @__PURE__ */ __name(function data5() { return { id: this.$attrs.id, focused: false, @@ -3560,11 +2951,11 @@ var script$4 = { } }, "activeItemPath") }, - mounted: /* @__PURE__ */ __name(function mounted6() { + mounted: /* @__PURE__ */ __name(function mounted4() { this.id = this.id || UniqueComponentId(); this.bindMatchMediaListener(); }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount6() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount4() { this.unbindOutsideClickListener(); this.unbindResizeListener(); this.unbindMatchMediaListener(); @@ -3735,7 +3126,7 @@ var script$4 = { onItemClick: /* @__PURE__ */ __name(function onItemClick2(event) { var originalEvent = event.originalEvent, processedItem = event.processedItem; var grouped = this.isProccessedItemGroup(processedItem); - var root11 = isEmpty(processedItem.parent); + var root9 = isEmpty(processedItem.parent); var selected = this.isSelected(processedItem); if (selected) { var index = processedItem.index, key = processedItem.key, level = processedItem.level, parentKey = processedItem.parentKey; @@ -3747,13 +3138,13 @@ var script$4 = { level, parentKey }; - this.dirty = !root11; + this.dirty = !root9; focus(this.menubar); } else { if (grouped) { this.onItemChange(event); } else { - var rootProcessedItem = root11 ? processedItem : this.activeItemPath.find(function(p) { + var rootProcessedItem = root9 ? processedItem : this.activeItemPath.find(function(p) { return p.parentKey === ""; }); this.hide(originalEvent); @@ -3801,8 +3192,8 @@ var script$4 = { var parentItem = this.activeItemPath.find(function(p) { return p.key === processedItem.parentKey; }); - var root11 = isEmpty(processedItem.parent); - if (!root11) { + var root9 = isEmpty(processedItem.parent); + if (!root9) { this.focusedItemInfo = { index: -1, parentKey: parentItem ? parentItem.parentKey : "" @@ -3880,7 +3271,7 @@ var script$4 = { } this.hide(); }, "onTabKey"), - onEnter: /* @__PURE__ */ __name(function onEnter3(el) { + onEnter: /* @__PURE__ */ __name(function onEnter2(el) { if (this.autoZIndex) { ZIndex.set("menu", el, this.baseZIndex + this.$primevue.config.zIndex.menu); } @@ -3899,7 +3290,7 @@ var script$4 = { this.bindResizeListener(); this.$emit("show"); }, "onAfterEnter"), - onLeave: /* @__PURE__ */ __name(function onLeave2() { + onLeave: /* @__PURE__ */ __name(function onLeave() { this.unbindOutsideClickListener(); this.unbindScrollListener(); this.unbindResizeListener(); @@ -4139,7 +3530,7 @@ var script$4 = { }, components: { TieredMenuSub: script$1$2, - Portal: script$l + Portal: script$i } }; var _hoisted_1$3 = ["id"]; @@ -4209,12 +3600,12 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$3, "render$3"); script$4.render = render$3; -var theme$1 = /* @__PURE__ */ __name(function theme7(_ref) { +var theme$1 = /* @__PURE__ */ __name(function theme6(_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-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) { + root: /* @__PURE__ */ __name(function root7(_ref2) { var instance = _ref2.instance, props = _ref2.props; return ["p-splitbutton p-component", { "p-splitbutton-raised": props.raised, @@ -4232,7 +3623,7 @@ var SplitButtonStyle = BaseStyle.extend({ }); var script$1$1 = { name: "BaseSplitButton", - "extends": script$f, + "extends": script$c, props: { label: { type: String, @@ -4320,7 +3711,7 @@ var script$1$1 = { } }, style: SplitButtonStyle, - provide: /* @__PURE__ */ __name(function provide10() { + provide: /* @__PURE__ */ __name(function provide9() { return { $pcSplitButton: this, $parentInstance: this @@ -4337,7 +3728,7 @@ var script$3 = { "default": null } }, - data: /* @__PURE__ */ __name(function data7() { + data: /* @__PURE__ */ __name(function data6() { return { id: this.$attrs.id, isExpanded: false @@ -4348,7 +3739,7 @@ var script$3 = { this.id = newValue || UniqueComponentId(); }, "$attrsId") }, - mounted: /* @__PURE__ */ __name(function mounted7() { + mounted: /* @__PURE__ */ __name(function mounted5() { var _this = this; this.id = this.id || UniqueComponentId(); this.$watch("$refs.menu.visible", function(newValue) { @@ -4388,9 +3779,9 @@ var script$3 = { }, "hasFluid") }, components: { - PVSButton: script$v, + PVSButton: script$o, PVSMenu: script$4, - ChevronDownIcon: script$m + ChevronDownIcon: script$j } }; var _hoisted_1$2 = ["data-p-severity"]; @@ -4503,7 +3894,7 @@ function render$2(_ctx, _cache, $props, $setup, $data, $options) { } __name(render$2, "render$2"); script$3.render = render$2; -var theme8 = /* @__PURE__ */ __name(function theme9(_ref) { +var theme7 = /* @__PURE__ */ __name(function theme8(_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-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"); @@ -4516,7 +3907,7 @@ var inlineStyles = { }, "submenu") }; var classes = { - root: /* @__PURE__ */ __name(function root10(_ref3) { + root: /* @__PURE__ */ __name(function root8(_ref3) { var instance = _ref3.instance; return ["p-menubar p-component", { "p-menubar-mobile": instance.queryMatches, @@ -4545,13 +3936,13 @@ var classes = { }; var MenubarStyle = BaseStyle.extend({ name: "menubar", - theme: theme8, + theme: theme7, classes, inlineStyles }); var script$2 = { name: "BaseMenubar", - "extends": script$f, + "extends": script$c, props: { model: { type: Array, @@ -4575,7 +3966,7 @@ var script$2 = { } }, style: MenubarStyle, - provide: /* @__PURE__ */ __name(function provide11() { + provide: /* @__PURE__ */ __name(function provide10() { return { $pcMenubar: this, $parentInstance: this @@ -4585,7 +3976,7 @@ var script$2 = { var script$1 = { name: "MenubarSub", hostName: "Menubar", - "extends": script$f, + "extends": script$c, emits: ["item-mouseenter", "item-click", "item-mousemove"], props: { items: { @@ -4730,8 +4121,8 @@ var script$1 = { }, "getAriaSetSize") }, components: { - AngleRightIcon: script$u, - AngleDownIcon: script$w + AngleRightIcon: script$n, + AngleDownIcon: script$p }, directives: { ripple: Ripple @@ -4863,7 +4254,7 @@ var script = { inheritAttrs: false, emits: ["focus", "blur"], matchMediaListener: null, - data: /* @__PURE__ */ __name(function data8() { + data: /* @__PURE__ */ __name(function data7() { return { id: this.$attrs.id, mobileActive: false, @@ -4896,11 +4287,11 @@ var script = { outsideClickListener: null, container: null, menubar: null, - mounted: /* @__PURE__ */ __name(function mounted8() { + mounted: /* @__PURE__ */ __name(function mounted6() { this.id = this.id || UniqueComponentId(); this.bindMatchMediaListener(); }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount7() { + beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount5() { this.mobileActive = false; this.unbindOutsideClickListener(); this.unbindResizeListener(); @@ -5062,7 +4453,7 @@ var script = { onItemClick: /* @__PURE__ */ __name(function onItemClick4(event) { var originalEvent = event.originalEvent, processedItem = event.processedItem; var grouped = this.isProccessedItemGroup(processedItem); - var root11 = isEmpty(processedItem.parent); + var root9 = isEmpty(processedItem.parent); var selected = this.isSelected(processedItem); if (selected) { var index = processedItem.index, key = processedItem.key, level = processedItem.level, parentKey = processedItem.parentKey; @@ -5074,13 +4465,13 @@ var script = { level, parentKey }; - this.dirty = !root11; + this.dirty = !root9; focus(this.menubar); } else { if (grouped) { this.onItemChange(event); } else { - var rootProcessedItem = root11 ? processedItem : this.activeItemPath.find(function(p) { + var rootProcessedItem = root9 ? processedItem : this.activeItemPath.find(function(p) { return p.parentKey === ""; }); this.hide(originalEvent); @@ -5108,8 +4499,8 @@ var script = { }, "menuButtonKeydown"), onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey3(event) { var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var root11 = processedItem ? isEmpty(processedItem.parent) : null; - if (root11) { + var root9 = processedItem ? isEmpty(processedItem.parent) : null; + if (root9) { var grouped = this.isProccessedItemGroup(processedItem); if (grouped) { this.onItemChange({ @@ -5131,8 +4522,8 @@ var script = { onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey3(event) { var _this3 = this; var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var root11 = isEmpty(processedItem.parent); - if (root11) { + var root9 = isEmpty(processedItem.parent); + if (root9) { var grouped = this.isProccessedItemGroup(processedItem); if (grouped) { this.onItemChange({ @@ -5465,7 +4856,7 @@ var script = { }, components: { MenubarSub: script$1, - BarsIcon: script$x + BarsIcon: script$q } }; function _typeof(o) { @@ -5589,17 +4980,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { __name(render, "render"); script.render = render; export { - 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 + script$b as a, + script$8 as b, + script$9 as c, + script$7 as d, + script$6 as e, + script$5 as f, + script$3 as g, + script as h, + script$a as s }; -//# sourceMappingURL=index-DKIv7atk.js.map +//# sourceMappingURL=index-DSWvxALN.js.map diff --git a/web/assets/index-DqqhYDnY.js b/web/assets/index-DqXp9vW4.js similarity index 97% rename from web/assets/index-DqqhYDnY.js rename to web/assets/index-DqXp9vW4.js index 07ca6f82..46d800e2 100644 --- a/web/assets/index-DqqhYDnY.js +++ b/web/assets/index-DqXp9vW4.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./GraphView-D9ZzDQZV.js","./index-DKIv7atk.js","./index-DXE47DZl.js","./keybindingService-DEgCutrm.js","./serverConfigStore-Kb5DJVFt.js","./GraphView-CVCdiww1.css","./UserSelectView-wxa07xPk.js","./BaseViewTemplate-Cz111_1A.js","./ServerStartView-BpH4TXPO.js","./ServerStartView-CJiwVDQY.css","./InstallView-CVZcZZXJ.js","./index-BNlqgrYT.js","./uvMirrors-B-HKMf6X.js","./InstallView-DbJ2cGfL.css","./WelcomeView-BrXELNIm.js","./WelcomeView-Brz3-luE.css","./NotSupportedView-BUpntA4x.js","./NotSupportedView-RFx6eCkN.css","./DownloadGitView-DVXUne-M.js","./ManualConfigurationView-Cz0_f_T-.js","./ManualConfigurationView-CsirlNfV.css","./MetricsConsentView-B5NlgqrS.js","./DesktopStartView-FKlxS2Lt.js","./MaintenanceView-Df7CHNWW.js","./index-BapOFhAR.js","./MaintenanceView-Bj5_Vr6o.css","./KeybindingPanel-CeHhC2F4.js","./KeybindingPanel-DvrUYZ4S.css","./ExtensionPanel-iPOrhDVM.js","./ServerConfigPanel-B1lI5M9c.js","./index-BYzwFNH3.js","./index-BRhY6FpL.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./GraphView-CLFBgoGf.js","./index-DSWvxALN.js","./index-BTHx8UHZ.js","./index-B0BQ8jlU.js","./keybindingService-DgS0S2M6.js","./serverConfigStore-C8uoM7Sm.js","./GraphView-Bo28XDd0.css","./UserSelectView-CRPNAEVJ.js","./BaseViewTemplate-DlGljfEG.js","./ServerStartView-BENqs5bD.js","./ServerStartView-BZ7uhZHv.css","./InstallView-x9XCq0hC.js","./index-A-dAhghd.js","./uvMirrors-B-HKMf6X.js","./InstallView-DbJ2cGfL.css","./WelcomeView-Cvtvw05C.js","./WelcomeView-Brz3-luE.css","./NotSupportedView-BzM0uuqA.js","./NotSupportedView-RFx6eCkN.css","./DownloadGitView-SPK8AXQU.js","./ManualConfigurationView-D3on5kXY.js","./ManualConfigurationView-CsirlNfV.css","./MetricsConsentView-DK20ednB.js","./DesktopStartView-B2BMUZxW.js","./MaintenanceView-BUmTZX1d.js","./index-KUUE4Ew8.js","./TerminalOutputDrawer-BgTEspHP.js","./MaintenanceView-DEJCj8SR.css","./DesktopUpdateView-DWsew03S.js","./DesktopUpdateView-CxchaIvw.css","./KeybindingPanel-BIrxefrS.js","./KeybindingPanel-CDYVPYDp.css","./ExtensionPanel-1HZtMFvH.js","./ServerConfigPanel-D0jTW_iX.js","./index-D9D9jjLT.js","./index-BRhY6FpL.css"])))=>i.map(i=>d[i]); var __defProp2 = Object.defineProperty; var __name = (target2, value4) => __defProp2(target2, "name", { value: value4, configurable: true }); (/* @__PURE__ */ __name(function polyfill2() { @@ -10941,10 +10941,10 @@ async function close$1(timeout) { return Promise.resolve(false); } __name(close$1, "close$1"); -function isInitialized() { +function isInitialized$1() { return !!getClient(); } -__name(isInitialized, "isInitialized"); +__name(isInitialized$1, "isInitialized$1"); function isEnabled() { const client = getClient(); return !!client && client.getOptions().enabled !== false && !!client.getTransport(); @@ -19319,16 +19319,16 @@ function toUpperCase(str) { } __name(toUpperCase, "toUpperCase"); const ORIGINAL_ATTRIBUTE_NAME = "__rrweb_original__"; -function is2DCanvasBlank(canvas) { - const ctx = canvas.getContext("2d"); +function is2DCanvasBlank(canvas2) { + const ctx = canvas2.getContext("2d"); if (!ctx) return true; const chunkSize = 50; - for (let x2 = 0; x2 < canvas.width; x2 += chunkSize) { - for (let y2 = 0; y2 < canvas.height; y2 += chunkSize) { + for (let x2 = 0; x2 < canvas2.width; x2 += chunkSize) { + for (let y2 = 0; y2 < canvas2.height; y2 += chunkSize) { const getImageData = ctx.getImageData; const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData; - const pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x2, y2, Math.min(chunkSize, canvas.width - x2), Math.min(chunkSize, canvas.height - y2)).data.buffer); + const pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x2, y2, Math.min(chunkSize, canvas2.width - x2), Math.min(chunkSize, canvas2.height - y2)).data.buffer); if (pixelBuffer.some((pixel) => pixel !== 0)) return false; } @@ -19472,13 +19472,13 @@ function getAbsoluteSrcsetString(doc2, attributeValue) { if (attributeValue.trim() === "") { return attributeValue; } - let pos2 = 0; + let pos = 0; function collectCharacters(regEx) { let chars2; - const match2 = regEx.exec(attributeValue.substring(pos2)); + const match2 = regEx.exec(attributeValue.substring(pos)); if (match2) { chars2 = match2[0]; - pos2 += chars2.length; + pos += chars2.length; return chars2; } return ""; @@ -19487,7 +19487,7 @@ function getAbsoluteSrcsetString(doc2, attributeValue) { const output = []; while (true) { collectCharacters(SRCSET_COMMAS_OR_SPACES); - if (pos2 >= attributeValue.length) { + if (pos >= attributeValue.length) { break; } let url = collectCharacters(SRCSET_NOT_SPACES); @@ -19499,13 +19499,13 @@ function getAbsoluteSrcsetString(doc2, attributeValue) { url = absoluteToDoc(doc2, url); let inParens = false; while (true) { - const c2 = attributeValue.charAt(pos2); + const c2 = attributeValue.charAt(pos); if (c2 === "") { output.push((url + descriptorsStr).trim()); break; } else if (!inParens) { if (c2 === ",") { - pos2 += 1; + pos += 1; output.push((url + descriptorsStr).trim()); break; } else if (c2 === "(") { @@ -19517,7 +19517,7 @@ function getAbsoluteSrcsetString(doc2, attributeValue) { } } descriptorsStr += c2; - pos2 += 1; + pos += 1; } } } @@ -21686,17 +21686,17 @@ function initInputObserver({ inputCb, doc: doc2, mirror: mirror2, blockClass, bl __name(initInputObserver, "initInputObserver"); function getNestedCSSRulePositions(rule) { const positions = []; - function recurse(childRule, pos2) { + function recurse(childRule, pos) { if (hasNestedCSSRule("CSSGroupingRule") && childRule.parentRule instanceof CSSGroupingRule || hasNestedCSSRule("CSSMediaRule") && childRule.parentRule instanceof CSSMediaRule || hasNestedCSSRule("CSSSupportsRule") && childRule.parentRule instanceof CSSSupportsRule || hasNestedCSSRule("CSSConditionRule") && childRule.parentRule instanceof CSSConditionRule) { const rules = Array.from(childRule.parentRule.cssRules); const index2 = rules.indexOf(childRule); - pos2.unshift(index2); + pos.unshift(index2); } else if (childRule.parentStyleSheet) { const rules = Array.from(childRule.parentStyleSheet.cssRules); const index2 = rules.indexOf(childRule); - pos2.unshift(index2); + pos.unshift(index2); } - return pos2; + return pos; } __name(recurse, "recurse"); return recurse(rule, positions); @@ -23199,9 +23199,9 @@ function onWindowOpen(cb) { } handlers$2.push(cb); return () => { - const pos2 = handlers$2 ? handlers$2.indexOf(cb) : -1; - if (pos2 > -1) { - handlers$2.splice(pos2, 1); + const pos = handlers$2 ? handlers$2.indexOf(cb) : -1; + if (pos > -1) { + handlers$2.splice(pos, 1); } }; } @@ -23329,10 +23329,10 @@ class ClickDetector { } }); for (const click2 of timedOutClicks) { - const pos2 = this._clicks.indexOf(click2); - if (pos2 > -1) { + const pos = this._clicks.indexOf(click2); + if (pos > -1) { this._generateBreadcrumbs(click2); - this._clicks.splice(pos2, 1); + this._clicks.splice(pos, 1); } } if (this._clicks.length) { @@ -27708,9 +27708,9 @@ class CanvasManager { } const matchedCanvas = []; const searchCanvas = /* @__PURE__ */ __name((root29) => { - root29.querySelectorAll("canvas").forEach((canvas) => { - if (!isBlocked(canvas, blockClass, blockSelector, unblockSelector)) { - matchedCanvas.push(canvas); + root29.querySelectorAll("canvas").forEach((canvas2) => { + if (!isBlocked(canvas2, blockClass, blockSelector, unblockSelector)) { + matchedCanvas.push(canvas2); } }); }, "searchCanvas"); @@ -27737,28 +27737,28 @@ class CanvasManager { return; } lastSnapshotTime = timestamp2; - getCanvas(canvasElement).forEach((canvas) => { - if (!this.mirror.hasNode(canvas)) { + getCanvas(canvasElement).forEach((canvas2) => { + if (!this.mirror.hasNode(canvas2)) { return; } - const id3 = this.mirror.getId(canvas); + const id3 = this.mirror.getId(canvas2); if (this.snapshotInProgressMap.get(id3)) return; - if (!canvas.width || !canvas.height) + if (!canvas2.width || !canvas2.height) return; this.snapshotInProgressMap.set(id3, true); - if (!isManualSnapshot && ["webgl", "webgl2"].includes(canvas.__context)) { - const context = canvas.getContext(canvas.__context); + if (!isManualSnapshot && ["webgl", "webgl2"].includes(canvas2.__context)) { + const context = canvas2.getContext(canvas2.__context); if (_optionalChain([context, "optionalAccess", (_4) => _4.getContextAttributes, "call", (_5) => _5(), "optionalAccess", (_6) => _6.preserveDrawingBuffer]) === false) { context.clear(context.COLOR_BUFFER_BIT); } } - createImageBitmap(canvas).then((bitmap) => { + createImageBitmap(canvas2).then((bitmap) => { _optionalChain([this, "access", (_7) => _7.worker, "optionalAccess", (_8) => _8.postMessage, "call", (_9) => _9({ id: id3, bitmap, - width: canvas.width, - height: canvas.height, + width: canvas2.width, + height: canvas2.height, dataURLOptions, maxCanvasSize }, [bitmap])]); @@ -27786,17 +27786,17 @@ class CanvasManager { onRequestAnimationFrame(setLatestRAFTimestamp); } flushPendingCanvasMutations() { - this.pendingCanvasMutations.forEach((values, canvas) => { - const id3 = this.mirror.getId(canvas); - this.flushPendingCanvasMutationFor(canvas, id3); + this.pendingCanvasMutations.forEach((values, canvas2) => { + const id3 = this.mirror.getId(canvas2); + this.flushPendingCanvasMutationFor(canvas2, id3); }); onRequestAnimationFrame(() => this.flushPendingCanvasMutations()); } - flushPendingCanvasMutationFor(canvas, id3) { + flushPendingCanvasMutationFor(canvas2, id3) { if (this.frozen || this.locked) { return; } - const valuesWithType = this.pendingCanvasMutations.get(canvas); + const valuesWithType = this.pendingCanvasMutations.get(canvas2); if (!valuesWithType || id3 === -1) return; const values = valuesWithType.map((value4) => { @@ -27805,7 +27805,7 @@ class CanvasManager { }); const { type } = valuesWithType[0]; this.mutationCb({ id: id3, type, commands: values }); - this.pendingCanvasMutations.delete(canvas); + this.pendingCanvasMutations.delete(canvas2); } } const CANVAS_QUALITY = { @@ -32008,7 +32008,7 @@ const toHandlerKey = cacheStringFunction$1( return s2; } ); -const hasChanged = /* @__PURE__ */ __name((value4, oldValue2) => !Object.is(value4, oldValue2), "hasChanged"); +const hasChanged = /* @__PURE__ */ __name((value4, oldValue) => !Object.is(value4, oldValue), "hasChanged"); const invokeArrayFns = /* @__PURE__ */ __name((fns, ...arg) => { for (let i2 = 0; i2 < fns.length; i2++) { fns[i2](...arg); @@ -33096,7 +33096,7 @@ function track(target2, type, key) { } } __name(track, "track"); -function trigger(target2, type, key, newValue2, oldValue2, oldTarget) { +function trigger(target2, type, key, newValue2, oldValue, oldTarget) { const depsMap = targetMap.get(target2); if (!depsMap) { globalVersion++; @@ -33110,7 +33110,7 @@ function trigger(target2, type, key, newValue2, oldValue2, oldTarget) { type, key, newValue: newValue2, - oldValue: oldValue2, + oldValue, oldTarget }); } else { @@ -33435,18 +33435,18 @@ class MutableReactiveHandler extends BaseReactiveHandler { super(false, isShallow2); } set(target2, key, value4, receiver) { - let oldValue2 = target2[key]; + let oldValue = target2[key]; if (!this._isShallow) { - const isOldValueReadonly = isReadonly(oldValue2); + const isOldValueReadonly = isReadonly(oldValue); if (!isShallow(value4) && !isReadonly(value4)) { - oldValue2 = toRaw(oldValue2); + oldValue = toRaw(oldValue); value4 = toRaw(value4); } - if (!isArray$b(target2) && isRef(oldValue2) && !isRef(value4)) { + if (!isArray$b(target2) && isRef(oldValue) && !isRef(value4)) { if (isOldValueReadonly) { return false; } else { - oldValue2.value = value4; + oldValue.value = value4; return true; } } @@ -33461,18 +33461,18 @@ class MutableReactiveHandler extends BaseReactiveHandler { if (target2 === toRaw(receiver)) { if (!hadKey) { trigger(target2, "add", key, value4); - } else if (hasChanged(value4, oldValue2)) { - trigger(target2, "set", key, value4, oldValue2); + } else if (hasChanged(value4, oldValue)) { + trigger(target2, "set", key, value4, oldValue); } } return result; } deleteProperty(target2, key) { const hadKey = hasOwn$3(target2, key); - const oldValue2 = target2[key]; + const oldValue = target2[key]; const result = Reflect.deleteProperty(target2, key); if (result && hadKey) { - trigger(target2, "delete", key, void 0, oldValue2); + trigger(target2, "delete", key, void 0, oldValue); } return result; } @@ -33652,12 +33652,12 @@ function createInstrumentations(readonly2, shallow) { } else if (false) { checkIdentityKeys(target2, has2, key); } - const oldValue2 = get3.call(target2, key); + const oldValue = 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); + } else if (hasChanged(value4, oldValue)) { + trigger(target2, "set", key, value4, oldValue); } return this; }, @@ -33671,10 +33671,10 @@ function createInstrumentations(readonly2, shallow) { } else if (false) { checkIdentityKeys(target2, has2, key); } - const oldValue2 = get3 ? get3.call(target2, key) : void 0; + const oldValue = get3 ? get3.call(target2, key) : void 0; const result = target2.delete(key); if (hadKey) { - trigger(target2, "delete", key, void 0, oldValue2); + trigger(target2, "delete", key, void 0, oldValue); } return result; }, @@ -33921,10 +33921,10 @@ class RefImpl { return this._value; } set value(newValue2) { - const oldValue2 = this._rawValue; + const oldValue = this._rawValue; const useDirectValue = this["__v_isShallow"] || isShallow(newValue2) || isReadonly(newValue2); newValue2 = useDirectValue ? newValue2 : toRaw(newValue2); - if (hasChanged(newValue2, oldValue2)) { + if (hasChanged(newValue2, oldValue)) { this._rawValue = newValue2; this._value = useDirectValue ? newValue2 : toReactive$1(newValue2); if (false) { @@ -33933,7 +33933,7 @@ class RefImpl { type: "set", key: "value", newValue: newValue2, - oldValue: oldValue2 + oldValue }); } else { this.dep.trigger(); @@ -33967,9 +33967,9 @@ __name(toValue$4, "toValue$4"); const shallowUnwrapHandlers = { 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; + const oldValue = target2[key]; + if (isRef(oldValue) && !isRef(value4)) { + oldValue.value = value4; return true; } else { return Reflect.set(target2, key, value4, receiver); @@ -34264,14 +34264,14 @@ function watch$1(source, cb, options4 = EMPTY_OBJ) { watchHandle(); }, "cb"); } - let oldValue2 = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + let oldValue = 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 (deep || forceTrigger || (isMultiSource ? newValue2.some((v2, i2) => hasChanged(v2, oldValue[i2])) : hasChanged(newValue2, oldValue))) { if (cleanup) { cleanup(); } @@ -34281,14 +34281,14 @@ function watch$1(source, cb, options4 = EMPTY_OBJ) { 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, + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, boundCleanup ]; call ? call(cb, 3, args) : ( // @ts-expect-error cb(...args) ); - oldValue2 = newValue2; + oldValue = newValue2; } finally { activeWatcher = currentWatcher; } @@ -34322,7 +34322,7 @@ function watch$1(source, cb, options4 = EMPTY_OBJ) { if (immediate) { job(true); } else { - oldValue2 = effect2.run(); + oldValue = effect2.run(); } } else if (scheduler) { scheduler(job.bind(null, true), true); @@ -43375,8 +43375,8 @@ const vShow = { transition.enter(el); } }, - updated(el, { value: value4, oldValue: oldValue2 }, { transition }) { - if (!value4 === !oldValue2) return; + updated(el, { value: value4, oldValue }, { transition }) { + if (!value4 === !oldValue) return; if (transition) { if (value4) { transition.beforeEnter(el); @@ -43616,13 +43616,13 @@ function patchDOMProp(el, key, value4, parentComponent, attrName) { const tag = el.tagName; if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally !tag.includes("-")) { - const oldValue2 = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; + const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value; const newValue2 = value4 == null ? ( // #11647: value should be set as empty string for null and undefined, // but should be set as 'on'. el.type === "checkbox" ? "on" : "" ) : String(value4); - if (oldValue2 !== newValue2 || !("_value" in el)) { + if (oldValue !== newValue2 || !("_value" in el)) { el.value = newValue2; } if (value4 == null) { @@ -44433,7 +44433,7 @@ const vModelText = { mounted(el, { value: value4 }) { el.value = value4 == null ? "" : value4; }, - beforeUpdate(el, { value: value4, oldValue: oldValue2, modifiers: { lazy, trim: trim2, number: number2 } }, vnode) { + beforeUpdate(el, { value: value4, oldValue, modifiers: { lazy, trim: trim2, number: number2 } }, vnode) { el[assignKey] = getModelAssigner(vnode); if (el.composing) return; const elValue = (number2 || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value; @@ -44442,7 +44442,7 @@ const vModelText = { return; } if (document.activeElement === el && el.type !== "range") { - if (lazy && value4 === oldValue2) { + if (lazy && value4 === oldValue) { return; } if (trim2 && el.value.trim() === newValue2) { @@ -44492,7 +44492,7 @@ const vModelCheckbox = { setChecked(el, binding, vnode); } }; -function setChecked(el, { value: value4, oldValue: oldValue2 }, vnode) { +function setChecked(el, { value: value4, oldValue }, vnode) { el._modelValue = value4; let checked4; if (isArray$b(value4)) { @@ -44500,7 +44500,7 @@ function setChecked(el, { value: value4, oldValue: oldValue2 }, vnode) { } else if (isSet$3(value4)) { checked4 = value4.has(vnode.props.value); } else { - if (value4 === oldValue2) return; + if (value4 === oldValue) return; checked4 = looseEqual(value4, getCheckboxValue(el, true)); } if (el.checked !== checked4) { @@ -44516,9 +44516,9 @@ const vModelRadio = { el[assignKey](getValue$3(el)); }); }, - beforeUpdate(el, { value: value4, oldValue: oldValue2 }, vnode) { + beforeUpdate(el, { value: value4, oldValue }, vnode) { el[assignKey] = getModelAssigner(vnode); - if (value4 !== oldValue2) { + if (value4 !== oldValue) { el.checked = looseEqual(value4, vnode.props.value); } } @@ -45887,7 +45887,7 @@ function addStoreToDevtools(app2, store) { }); }, true); store._customProperties.forEach((name2) => { - watch(() => unref(store[name2]), (newValue2, oldValue2) => { + watch(() => unref(store[name2]), (newValue2, oldValue) => { api2.notifyComponentUpdate(); api2.sendInspectorState(INSPECTOR_ID); if (isTimelineActive) { @@ -45899,7 +45899,7 @@ function addStoreToDevtools(app2, store) { subtitle: name2, data: { newValue: newValue2, - oldValue: oldValue2 + oldValue }, groupId: activeAction } @@ -48906,10 +48906,10 @@ function setupConfig(app2, PrimeVue2) { isThemeChanged.value = true; } }); - var stopConfigWatcher = watch(PrimeVue2.config, function(newValue2, oldValue2) { + var stopConfigWatcher = watch(PrimeVue2.config, function(newValue2, oldValue) { PrimeVueService.emit("config:change", { newValue: newValue2, - oldValue: oldValue2 + oldValue }); }, { immediate: true, @@ -48917,10 +48917,10 @@ function setupConfig(app2, PrimeVue2) { }); var stopRippleWatcher = watch(function() { return PrimeVue2.config.ripple; - }, function(newValue2, oldValue2) { + }, function(newValue2, oldValue) { PrimeVueService.emit("config:ripple:change", { newValue: newValue2, - oldValue: oldValue2 + oldValue }); }, { immediate: true, @@ -48928,7 +48928,7 @@ function setupConfig(app2, PrimeVue2) { }); var stopThemeWatcher = watch(function() { return PrimeVue2.config.theme; - }, function(newValue2, oldValue2) { + }, function(newValue2, oldValue) { if (!isThemeChanged.value) { config_default$1.setTheme(newValue2); } @@ -48938,7 +48938,7 @@ function setupConfig(app2, PrimeVue2) { isThemeChanged.value = false; PrimeVueService.emit("config:theme:change", { newValue: newValue2, - oldValue: oldValue2 + oldValue }); }, { immediate: true, @@ -48946,13 +48946,13 @@ function setupConfig(app2, PrimeVue2) { }); var stopUnstyledWatcher = watch(function() { return PrimeVue2.config.unstyled; - }, function(newValue2, oldValue2) { + }, function(newValue2, oldValue) { if (!newValue2 && PrimeVue2.config.theme) { loadCommonTheme(); } PrimeVueService.emit("config:unstyled:change", { newValue: newValue2, - oldValue: oldValue2 + oldValue }); }, { immediate: true, @@ -49659,14 +49659,14 @@ var BaseDirective = { watchers === null || watchers === void 0 || (_watchers$config = watchers["config"]) === null || _watchers$config === void 0 || _watchers$config.call(el.$instance, (_el$$instance11 = el.$instance) === null || _el$$instance11 === void 0 ? void 0 : _el$$instance11.$primevueConfig); PrimeVueService.on("config:change", function(_ref8) { var _watchers$config2; - var newValue2 = _ref8.newValue, oldValue2 = _ref8.oldValue; - return watchers === null || watchers === void 0 || (_watchers$config2 = watchers["config"]) === null || _watchers$config2 === void 0 ? void 0 : _watchers$config2.call(el.$instance, newValue2, oldValue2); + var newValue2 = _ref8.newValue, oldValue = _ref8.oldValue; + return watchers === null || watchers === void 0 || (_watchers$config2 = watchers["config"]) === null || _watchers$config2 === void 0 ? void 0 : _watchers$config2.call(el.$instance, newValue2, oldValue); }); watchers === null || watchers === void 0 || (_watchers$configRipp = watchers["config.ripple"]) === null || _watchers$configRipp === void 0 || _watchers$configRipp.call(el.$instance, (_el$$instance12 = el.$instance) === null || _el$$instance12 === void 0 || (_el$$instance12 = _el$$instance12.$primevueConfig) === null || _el$$instance12 === void 0 ? void 0 : _el$$instance12.ripple); PrimeVueService.on("config:ripple:change", function(_ref9) { var _watchers$configRipp2; - var newValue2 = _ref9.newValue, oldValue2 = _ref9.oldValue; - return watchers === null || watchers === void 0 || (_watchers$configRipp2 = watchers["config.ripple"]) === null || _watchers$configRipp2 === void 0 ? void 0 : _watchers$configRipp2.call(el.$instance, newValue2, oldValue2); + var newValue2 = _ref9.newValue, oldValue = _ref9.oldValue; + return watchers === null || watchers === void 0 || (_watchers$configRipp2 = watchers["config.ripple"]) === null || _watchers$configRipp2 === void 0 ? void 0 : _watchers$configRipp2.call(el.$instance, newValue2, oldValue); }); }, "handleWatch"); return { @@ -54831,12 +54831,12 @@ const streamChunk = /* @__PURE__ */ __name(function* (chunk, chunkSize) { yield chunk; return; } - let pos2 = 0; + let pos = 0; let end; - while (pos2 < len) { - end = pos2 + chunkSize; - yield chunk.slice(pos2, end); - pos2 = end; + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; } }, "streamChunk"); const readBytes = /* @__PURE__ */ __name(async function* (iterable, chunkSize, encode2) { @@ -55879,10 +55879,10 @@ function createBounds(objects, padding = 10) { ]; } __name(createBounds, "createBounds"); -function snapPoint(pos2, snapTo) { +function snapPoint(pos, snapTo) { if (!snapTo) return false; - pos2[0] = snapTo * Math.round(pos2[0] / snapTo); - pos2[1] = snapTo * Math.round(pos2[1] / snapTo); + pos[0] = snapTo * Math.round(pos[0] / snapTo); + pos[1] = snapTo * Math.round(pos[1] / snapTo); return true; } __name(snapPoint, "snapPoint"); @@ -55897,10 +55897,10 @@ class Reroute { * @param pos Position in graph coordinates * @param linkIds Link IDs ({@link LLink.id}) of all links that use this reroute */ - constructor(id3, network, pos2, parentId, linkIds) { + constructor(id3, network, pos, parentId, linkIds) { this.id = id3; this.#network = new WeakRef(network); - this.update(parentId, pos2, linkIds); + this.update(parentId, pos, linkIds); this.linkIds ??= /* @__PURE__ */ new Set(); } static radius = 10; @@ -55976,9 +55976,9 @@ class Reroute { * @param pos The position of this reroute * @param linkIds All link IDs that pass through this reroute */ - update(parentId, pos2, linkIds) { + update(parentId, pos, linkIds) { this.parentId = parentId; - if (pos2) this.pos = pos2; + if (pos) this.pos = pos; if (linkIds) this.linkIds = new Set(linkIds); } /** @@ -56034,9 +56034,9 @@ class Reroute { /** @inheritdoc */ snapToGrid(snapTo) { if (!snapTo) return false; - const { pos: pos2 } = this; - pos2[0] = snapTo * Math.round(pos2[0] / snapTo); - pos2[1] = snapTo * Math.round(pos2[1] / snapTo); + const { pos } = this; + pos[0] = snapTo * Math.round(pos[0] / snapTo); + pos[1] = snapTo * Math.round(pos[1] / snapTo); return true; } calculateAngle(lastRenderTime, network, linkStart) { @@ -56049,9 +56049,9 @@ class Reroute { for (const linkId of linkIds) { const link2 = links.get(linkId); if (!link2) continue; - const pos2 = LLink.findNextReroute(network, link2, id3)?.pos ?? network.getNodeById(link2.target_id)?.getConnectionPos(true, link2.target_slot, this.#buffer); - if (!pos2) continue; - const angle = Math.atan2(pos2[1] - this.#pos[1], pos2[0] - this.#pos[0]); + const pos = LLink.findNextReroute(network, link2, id3)?.pos ?? network.getNodeById(link2.target_id)?.getConnectionPos(true, link2.target_slot, this.#buffer); + if (!pos) continue; + const angle = Math.atan2(pos[1] - this.#pos[1], pos[0] - this.#pos[0]); angles.push(angle); sum += angle; } @@ -56080,10 +56080,10 @@ class Reroute { * @remarks Leaves {@link ctx}.fillStyle, strokeStyle, and lineWidth dirty (perf.). */ draw(ctx) { - const { pos: pos2 } = this; + const { pos } = this; ctx.fillStyle = this._colour; ctx.beginPath(); - ctx.arc(pos2[0], pos2[1], Reroute.radius, 0, 2 * Math.PI); + ctx.arc(pos[0], pos[1], Reroute.radius, 0, 2 * Math.PI); ctx.fill(); ctx.lineWidth = Reroute.radius * 0.1; ctx.strokeStyle = "rgb(0,0,0,0.5)"; @@ -56091,13 +56091,13 @@ class Reroute { ctx.fillStyle = "#ffffff55"; ctx.strokeStyle = "rgb(0,0,0,0.3)"; ctx.beginPath(); - ctx.arc(pos2[0], pos2[1], Reroute.radius * 0.8, 0, 2 * Math.PI); + ctx.arc(pos[0], pos[1], Reroute.radius * 0.8, 0, 2 * Math.PI); ctx.fill(); ctx.stroke(); if (this.selected) { ctx.strokeStyle = "#fff"; ctx.beginPath(); - ctx.arc(pos2[0], pos2[1], Reroute.radius * 1.2, 0, 2 * Math.PI); + ctx.arc(pos[0], pos[1], Reroute.radius * 1.2, 0, 2 * Math.PI); ctx.stroke(); } } @@ -56178,6 +56178,900 @@ class LGraphBadge { ctx.fillStyle = fillStyle; } } +var SlotType = /* @__PURE__ */ ((SlotType2) => { + SlotType2["Array"] = "array"; + SlotType2[SlotType2["Event"] = -1] = "Event"; + return SlotType2; +})(SlotType || {}); +var SlotShape = ((SlotShape2) => { + SlotShape2[SlotShape2["Box"] = RenderShape.BOX] = "Box"; + SlotShape2[SlotShape2["Arrow"] = RenderShape.ARROW] = "Arrow"; + SlotShape2[SlotShape2["Grid"] = RenderShape.GRID] = "Grid"; + SlotShape2[SlotShape2["Circle"] = RenderShape.CIRCLE] = "Circle"; + SlotShape2[SlotShape2["HollowCircle"] = RenderShape.HollowCircle] = "HollowCircle"; + return SlotShape2; +})(SlotShape || {}); +var SlotDirection = ((SlotDirection2) => { + SlotDirection2[SlotDirection2["Up"] = LinkDirection.UP] = "Up"; + SlotDirection2[SlotDirection2["Right"] = LinkDirection.RIGHT] = "Right"; + SlotDirection2[SlotDirection2["Down"] = LinkDirection.DOWN] = "Down"; + SlotDirection2[SlotDirection2["Left"] = LinkDirection.LEFT] = "Left"; + return SlotDirection2; +})(SlotDirection || {}); +var LabelPosition = /* @__PURE__ */ ((LabelPosition2) => { + LabelPosition2["Left"] = "left"; + LabelPosition2["Right"] = "right"; + return LabelPosition2; +})(LabelPosition || {}); +function strokeShape(ctx, area, options22 = {}) { + const { + shape = RenderShape.BOX, + round_radius = LiteGraph.ROUND_RADIUS, + title_height = LiteGraph.NODE_TITLE_HEIGHT, + title_mode = TitleMode.NORMAL_TITLE, + colour = LiteGraph.NODE_BOX_OUTLINE_COLOR, + padding = 6, + collapsed: collapsed2 = false, + thickness = 1 + } = options22; + if (title_mode === TitleMode.TRANSPARENT_TITLE) { + area[1] -= title_height; + area[3] += title_height; + } + const { lineWidth, strokeStyle } = ctx; + ctx.lineWidth = thickness; + ctx.globalAlpha = 0.8; + ctx.strokeStyle = colour; + ctx.beginPath(); + const [x2, y2, width2, height] = area; + switch (shape) { + case RenderShape.BOX: { + ctx.rect( + x2 - padding, + y2 - padding, + width2 + 2 * padding, + height + 2 * padding + ); + break; + } + case RenderShape.ROUND: + case RenderShape.CARD: { + const radius = round_radius + padding; + const isCollapsed = shape === RenderShape.CARD && collapsed2; + const cornerRadii = isCollapsed || shape === RenderShape.ROUND ? [radius] : [radius, 2, radius, 2]; + ctx.roundRect( + x2 - padding, + y2 - padding, + width2 + 2 * padding, + height + 2 * padding, + cornerRadii + ); + break; + } + case RenderShape.CIRCLE: { + const centerX = x2 + width2 / 2; + const centerY = y2 + height / 2; + const radius = Math.max(width2, height) / 2 + padding; + ctx.arc(centerX, centerY, radius, 0, Math.PI * 2); + break; + } + } + ctx.stroke(); + ctx.lineWidth = lineWidth; + ctx.strokeStyle = strokeStyle; + ctx.globalAlpha = 1; +} +__name(strokeShape, "strokeShape"); +class NodeSlot { + static { + __name(this, "NodeSlot"); + } + name; + localized_name; + label; + type; + dir; + removable; + shape; + color_off; + color_on; + locked; + nameLocked; + pos; + widget; + constructor(slot) { + Object.assign(this, slot); + this.name = slot.name; + this.type = slot.type; + } + /** + * The label to display in the UI. + */ + get renderingLabel() { + return this.label || this.localized_name || this.name || ""; + } + connectedColor(context) { + return this.color_on || context.default_connection_color_byType[this.type] || context.default_connection_color.output_on; + } + disconnectedColor(context) { + return this.color_off || context.default_connection_color_byTypeOff[this.type] || context.default_connection_color_byType[this.type] || context.default_connection_color.output_off; + } + renderingColor(context) { + return this.isConnected() ? this.connectedColor(context) : this.disconnectedColor(context); + } + draw(ctx, options22) { + const { + pos, + colorContext, + labelColor = "#AAA", + labelPosition = LabelPosition.Right, + lowQuality = false, + renderText = true, + highlight = false, + doStroke: _doStroke = false + } = options22; + const originalFillStyle = ctx.fillStyle; + const originalStrokeStyle = ctx.strokeStyle; + const originalLineWidth = ctx.lineWidth; + const slot_type = this.type; + const slot_shape = slot_type === SlotType.Array ? SlotShape.Grid : this.shape; + ctx.beginPath(); + let doStroke = _doStroke; + let doFill = true; + ctx.fillStyle = this.renderingColor(colorContext); + ctx.lineWidth = 1; + if (slot_type === SlotType.Event || slot_shape === SlotShape.Box) { + ctx.rect(pos[0] - 6 + 0.5, pos[1] - 5 + 0.5, 14, 10); + } else if (slot_shape === SlotShape.Arrow) { + ctx.moveTo(pos[0] + 8, pos[1] + 0.5); + ctx.lineTo(pos[0] - 4, pos[1] + 6 + 0.5); + ctx.lineTo(pos[0] - 4, pos[1] - 6 + 0.5); + ctx.closePath(); + } else if (slot_shape === SlotShape.Grid) { + const gridSize = 3; + const cellSize = 2; + const spacing = 3; + for (let x2 = 0; x2 < gridSize; x2++) { + for (let y2 = 0; y2 < gridSize; y2++) { + ctx.rect( + pos[0] - 4 + x2 * spacing, + pos[1] - 4 + y2 * spacing, + cellSize, + cellSize + ); + } + } + doStroke = false; + } else { + if (lowQuality) { + ctx.rect(pos[0] - 4, pos[1] - 4, 8, 8); + } else { + let radius; + if (slot_shape === SlotShape.HollowCircle) { + doFill = false; + doStroke = true; + ctx.lineWidth = 3; + ctx.strokeStyle = ctx.fillStyle; + radius = highlight ? 4 : 3; + } else { + radius = highlight ? 5 : 4; + } + ctx.arc(pos[0], pos[1], radius, 0, Math.PI * 2); + } + } + if (doFill) ctx.fill(); + if (!lowQuality && doStroke) ctx.stroke(); + if (renderText) { + const text2 = this.renderingLabel; + if (text2) { + ctx.fillStyle = labelColor; + if (labelPosition === LabelPosition.Right) { + if (this.dir == LinkDirection.UP) { + ctx.fillText(text2, pos[0], pos[1] - 10); + } else { + ctx.fillText(text2, pos[0] + 10, pos[1] + 5); + } + } else { + if (this.dir == LinkDirection.DOWN) { + ctx.fillText(text2, pos[0], pos[1] - 8); + } else { + ctx.fillText(text2, pos[0] - 10, pos[1] + 5); + } + } + } + } + ctx.fillStyle = originalFillStyle; + ctx.strokeStyle = originalStrokeStyle; + ctx.lineWidth = originalLineWidth; + } + drawCollapsed(ctx, options22) { + const [x2, y2] = options22.pos; + const originalFillStyle = ctx.fillStyle; + ctx.fillStyle = "#686"; + ctx.beginPath(); + if (this.type === SlotType.Event || this.shape === RenderShape.BOX) { + ctx.rect(x2 - 7 + 0.5, y2 - 4, 14, 8); + } else if (this.shape === RenderShape.ARROW) { + const isInput = this instanceof NodeInputSlot; + if (isInput) { + ctx.moveTo(x2 + 8, y2); + ctx.lineTo(x2 - 4, y2 - 4); + ctx.lineTo(x2 - 4, y2 + 4); + } else { + ctx.moveTo(x2 + 6, y2); + ctx.lineTo(x2 - 6, y2 - 4); + ctx.lineTo(x2 - 6, y2 + 4); + } + ctx.closePath(); + } else { + ctx.arc(x2, y2, 4, 0, Math.PI * 2); + } + ctx.fill(); + ctx.fillStyle = originalFillStyle; + } +} +class NodeInputSlot extends NodeSlot { + static { + __name(this, "NodeInputSlot"); + } + link; + constructor(slot) { + super(slot); + this.link = slot.link; + } + isConnected() { + return this.link != null; + } + isValidTarget(link2) { + if (!link2) return true; + return !!link2.output && LiteGraph.isValidConnection(this.type, link2.output.type); + } + draw(ctx, options22) { + const originalTextAlign = ctx.textAlign; + ctx.textAlign = "left"; + super.draw(ctx, { + ...options22, + labelPosition: LabelPosition.Right, + doStroke: false + }); + ctx.textAlign = originalTextAlign; + } +} +class NodeOutputSlot extends NodeSlot { + static { + __name(this, "NodeOutputSlot"); + } + links; + _data; + slot_index; + constructor(slot) { + super(slot); + this.links = slot.links; + this._data = slot._data; + this.slot_index = slot.slot_index; + } + isValidTarget(link2) { + if (!link2) return true; + return !!link2.input && LiteGraph.isValidConnection(this.type, link2.input.type); + } + isConnected() { + return this.links != null && this.links.length > 0; + } + draw(ctx, options22) { + const originalTextAlign = ctx.textAlign; + const originalStrokeStyle = ctx.strokeStyle; + ctx.textAlign = "right"; + ctx.strokeStyle = "black"; + super.draw(ctx, { + ...options22, + labelPosition: LabelPosition.Left, + doStroke: true + }); + ctx.textAlign = originalTextAlign; + ctx.strokeStyle = originalStrokeStyle; + } +} +class BaseWidget { + static { + __name(this, "BaseWidget"); + } + linkedWidgets; + options; + marker; + label; + clicked; + name; + type; + value; + y; + last_y; + width; + disabled; + hidden; + advanced; + tooltip; + element; + constructor(widget) { + Object.assign(this, widget); + this.options = widget.options; + } + get outline_color() { + return this.advanced ? LiteGraph.WIDGET_ADVANCED_OUTLINE_COLOR : LiteGraph.WIDGET_OUTLINE_COLOR; + } + get background_color() { + return LiteGraph.WIDGET_BGCOLOR; + } + get height() { + return LiteGraph.NODE_WIDGET_HEIGHT; + } + get text_color() { + return LiteGraph.WIDGET_TEXT_COLOR; + } + get secondary_text_color() { + return LiteGraph.WIDGET_SECONDARY_TEXT_COLOR; + } + /** + * Handles the click event for the widget + * @param options - The options for handling the click event + */ + onClick(options22) { + } + /** + * Handles the drag event for the widget + * @param options - The options for handling the drag event + */ + onDrag(options22) { + } + /** + * Sets the value of the widget + * @param value - The value to set + * @param options - The options for setting the value + */ + setValue(value4, options22) { + const { node: node22, canvas: canvas2, e: e2 } = options22; + const oldValue = this.value; + const v2 = this.type === "number" ? Number(value4) : value4; + this.value = v2; + if (this.options?.property && node22.properties[this.options.property] !== void 0) { + node22.setProperty(this.options.property, v2); + } + const pos = canvas2.graph_mouse; + this.callback?.(this.value, canvas2, node22, pos, e2); + node22.onWidgetChanged?.(this.name ?? "", v2, oldValue, this); + if (node22.graph) node22.graph._version++; + } +} +class BooleanWidget extends BaseWidget { + static { + __name(this, "BooleanWidget"); + } + constructor(widget) { + super(widget); + this.type = "toggle"; + this.value = widget.value; + } + drawWidget(ctx, options22) { + const { y: y2, width: width2, show_text = true, margin = 15 } = options22; + const widget_width = width2; + const H = this.height; + ctx.textAlign = "left"; + ctx.strokeStyle = this.outline_color; + ctx.fillStyle = this.background_color; + ctx.beginPath(); + if (show_text) + ctx.roundRect(margin, y2, widget_width - margin * 2, H, [H * 0.5]); + else ctx.rect(margin, y2, widget_width - margin * 2, H); + ctx.fill(); + if (show_text && !this.disabled) ctx.stroke(); + ctx.fillStyle = this.value ? "#89A" : "#333"; + ctx.beginPath(); + ctx.arc( + widget_width - margin * 2, + y2 + H * 0.5, + H * 0.36, + 0, + Math.PI * 2 + ); + ctx.fill(); + if (show_text) { + ctx.fillStyle = this.secondary_text_color; + const label5 = this.label || this.name; + if (label5 != null) { + ctx.fillText(label5, margin * 2, y2 + H * 0.7); + } + ctx.fillStyle = this.value ? this.text_color : this.secondary_text_color; + ctx.textAlign = "right"; + ctx.fillText( + this.value ? this.options.on || "true" : this.options.off || "false", + widget_width - 40, + y2 + H * 0.7 + ); + } + } + onClick(options22) { + this.setValue(!this.value, options22); + } +} +class ButtonWidget extends BaseWidget { + static { + __name(this, "ButtonWidget"); + } + constructor(widget) { + super(widget); + this.type = "button"; + this.value = widget.value ?? ""; + } + /** + * Draws the widget + * @param ctx - The canvas context + * @param options - The options for drawing the widget + */ + drawWidget(ctx, options22) { + const originalTextAlign = ctx.textAlign; + const originalStrokeStyle = ctx.strokeStyle; + const originalFillStyle = ctx.fillStyle; + const { y: y2, width: width2, show_text = true, margin = 15 } = options22; + const widget_width = width2; + const H = this.height; + ctx.fillStyle = this.background_color; + if (this.clicked) { + ctx.fillStyle = "#AAA"; + this.clicked = false; + } + ctx.fillRect(margin, y2, widget_width - margin * 2, H); + if (show_text && !this.disabled) { + ctx.strokeStyle = this.outline_color; + ctx.strokeRect(margin, y2, widget_width - margin * 2, H); + } + if (show_text) { + ctx.textAlign = "center"; + ctx.fillStyle = this.text_color; + ctx.fillText( + this.label || this.name || "", + widget_width * 0.5, + y2 + H * 0.7 + ); + } + ctx.textAlign = originalTextAlign; + ctx.strokeStyle = originalStrokeStyle; + ctx.fillStyle = originalFillStyle; + } + onClick(options22) { + const { e: e2, node: node22, canvas: canvas2 } = options22; + const pos = canvas2.graph_mouse; + this.clicked = true; + canvas2.setDirty(true); + this.callback?.(this, canvas2, node22, pos, e2); + } +} +class ComboWidget extends BaseWidget { + static { + __name(this, "ComboWidget"); + } + constructor(widget) { + super(widget); + this.type = "combo"; + this.value = widget.value; + } + /** + * Draws the widget + * @param ctx - The canvas context + * @param options - The options for drawing the widget + */ + drawWidget(ctx, options22) { + const originalTextAlign = ctx.textAlign; + const originalStrokeStyle = ctx.strokeStyle; + const originalFillStyle = ctx.fillStyle; + const { y: y2, width: width2, show_text = true, margin = 15 } = options22; + const widget_width = width2; + const H = this.height; + ctx.textAlign = "left"; + ctx.strokeStyle = this.outline_color; + ctx.fillStyle = this.background_color; + ctx.beginPath(); + if (show_text) + ctx.roundRect(margin, y2, widget_width - margin * 2, H, [H * 0.5]); + else + ctx.rect(margin, y2, widget_width - margin * 2, H); + ctx.fill(); + if (show_text) { + if (!this.disabled) { + ctx.stroke(); + ctx.fillStyle = this.text_color; + ctx.beginPath(); + ctx.moveTo(margin + 16, y2 + 5); + ctx.lineTo(margin + 6, y2 + H * 0.5); + ctx.lineTo(margin + 16, y2 + H - 5); + ctx.fill(); + ctx.beginPath(); + ctx.moveTo(widget_width - margin - 16, y2 + 5); + ctx.lineTo(widget_width - margin - 6, y2 + H * 0.5); + ctx.lineTo(widget_width - margin - 16, y2 + H - 5); + ctx.fill(); + } + ctx.fillStyle = this.secondary_text_color; + const label5 = this.label || this.name; + if (label5 != null) { + ctx.fillText(label5, margin * 2 + 5, y2 + H * 0.7); + } + ctx.fillStyle = this.text_color; + ctx.textAlign = "right"; + let displayValue = typeof this.value === "number" ? String(this.value) : this.value; + if (this.options.values) { + let values = this.options.values; + if (typeof values === "function") { + values = values(); + } + if (values && !Array.isArray(values)) { + displayValue = values[this.value]; + } + } + const labelWidth = ctx.measureText(label5 || "").width + margin * 2; + const inputWidth = widget_width - margin * 4; + const availableWidth = inputWidth - labelWidth; + const textWidth = ctx.measureText(displayValue).width; + if (textWidth > availableWidth) { + const ELLIPSIS = "…"; + const ellipsisWidth = ctx.measureText(ELLIPSIS).width; + const charWidthAvg = ctx.measureText("a").width; + if (availableWidth <= ellipsisWidth) { + displayValue = "․"; + } else { + displayValue = `${displayValue}`; + const overflowWidth = textWidth + ellipsisWidth - availableWidth; + if (overflowWidth + charWidthAvg * 3 > availableWidth) { + const preciseRange = availableWidth + charWidthAvg * 3; + const preTruncateCt = Math.floor((preciseRange - ellipsisWidth) / charWidthAvg); + displayValue = displayValue.substr(0, preTruncateCt); + } + while (ctx.measureText(displayValue).width + ellipsisWidth > availableWidth) { + displayValue = displayValue.substr(0, displayValue.length - 1); + } + displayValue += ELLIPSIS; + } + } + ctx.fillText( + displayValue, + widget_width - margin * 2 - 20, + y2 + H * 0.7 + ); + } + ctx.textAlign = originalTextAlign; + ctx.strokeStyle = originalStrokeStyle; + ctx.fillStyle = originalFillStyle; + } + onClick(options22) { + const { e: e2, node: node22, canvas: canvas2 } = options22; + const x2 = e2.canvasX - node22.pos[0]; + const width2 = this.width || node22.size[0]; + const delta2 = x2 < 40 ? -1 : x2 > width2 - 40 ? 1 : 0; + let values = this.options.values; + if (typeof values === "function") { + values = values(this, node22); + } + const values_list = Array.isArray(values) ? values : Object.keys(values); + if (delta2) { + let index2 = -1; + canvas2.last_mouseclick = 0; + index2 = typeof values === "object" ? values_list.indexOf(String(this.value)) + delta2 : values_list.indexOf(this.value) + delta2; + if (index2 >= values_list.length) index2 = values_list.length - 1; + if (index2 < 0) index2 = 0; + this.setValue( + Array.isArray(values) ? values[index2] : index2, + { + e: e2, + node: node22, + canvas: canvas2 + } + ); + return; + } + const text_values = values != values_list ? Object.values(values) : values; + new LiteGraph.ContextMenu(text_values, { + scale: Math.max(1, canvas2.ds.scale), + event: e2, + className: "dark", + callback: /* @__PURE__ */ __name((value4) => { + this.setValue( + values != values_list ? text_values.indexOf(value4) : value4, + { + e: e2, + node: node22, + canvas: canvas2 + } + ); + }, "callback") + }); + } +} +class NumberWidget extends BaseWidget { + static { + __name(this, "NumberWidget"); + } + constructor(widget) { + super(widget); + this.type = "number"; + this.value = widget.value; + } + /** + * Draws the widget + * @param ctx - The canvas context + * @param options - The options for drawing the widget + */ + drawWidget(ctx, options22) { + const originalTextAlign = ctx.textAlign; + const originalStrokeStyle = ctx.strokeStyle; + const originalFillStyle = ctx.fillStyle; + const { y: y2, width: width2, show_text = true, margin = 15 } = options22; + const widget_width = width2; + const H = this.height; + ctx.textAlign = "left"; + ctx.strokeStyle = this.outline_color; + ctx.fillStyle = this.background_color; + ctx.beginPath(); + if (show_text) + ctx.roundRect(margin, y2, widget_width - margin * 2, H, [H * 0.5]); + else + ctx.rect(margin, y2, widget_width - margin * 2, H); + ctx.fill(); + if (show_text) { + if (!this.disabled) { + ctx.stroke(); + ctx.fillStyle = this.text_color; + ctx.beginPath(); + ctx.moveTo(margin + 16, y2 + 5); + ctx.lineTo(margin + 6, y2 + H * 0.5); + ctx.lineTo(margin + 16, y2 + H - 5); + ctx.fill(); + ctx.beginPath(); + ctx.moveTo(widget_width - margin - 16, y2 + 5); + ctx.lineTo(widget_width - margin - 6, y2 + H * 0.5); + ctx.lineTo(widget_width - margin - 16, y2 + H - 5); + ctx.fill(); + } + ctx.fillStyle = this.secondary_text_color; + const label5 = this.label || this.name; + if (label5 != null) { + ctx.fillText(label5, margin * 2 + 5, y2 + H * 0.7); + } + ctx.fillStyle = this.text_color; + ctx.textAlign = "right"; + ctx.fillText( + Number(this.value).toFixed( + this.options.precision !== void 0 ? this.options.precision : 3 + ), + widget_width - margin * 2 - 20, + y2 + H * 0.7 + ); + } + ctx.textAlign = originalTextAlign; + ctx.strokeStyle = originalStrokeStyle; + ctx.fillStyle = originalFillStyle; + } + onClick(options) { + const { e, node, canvas } = options; + const x = e.canvasX - node.pos[0]; + const width = this.width || node.size[0]; + const delta = x < 40 ? -1 : x > width - 40 ? 1 : 0; + if (delta) { + let newValue2 = this.value + delta * 0.1 * (this.options.step || 1); + if (this.options.min != null && newValue2 < this.options.min) { + newValue2 = this.options.min; + } + if (this.options.max != null && newValue2 > this.options.max) { + newValue2 = this.options.max; + } + if (newValue2 !== this.value) { + this.setValue(newValue2, { e, node, canvas }); + } + return; + } + canvas.prompt("Value", this.value, (v) => { + if (/^[0-9+\-*/()\s]+|\d+\.\d+$/.test(v)) { + try { + v = eval(v); + } catch { + } + } + const newValue = Number(v); + if (!isNaN(newValue)) { + this.setValue(newValue, { e, node, canvas }); + } + }, e); + } + /** + * Handles drag events for the number widget + * @param options - The options for handling the drag event + */ + onDrag(options22) { + const { e: e2, node: node22, canvas: canvas2 } = options22; + const width2 = this.width || node22.width; + const x2 = e2.canvasX - node22.pos[0]; + const delta2 = x2 < 40 ? -1 : x2 > width2 - 40 ? 1 : 0; + if (delta2 && (x2 > -3 && x2 < width2 + 3)) return; + let newValue2 = this.value; + if (e2.deltaX) newValue2 += e2.deltaX * 0.1 * (this.options.step || 1); + if (this.options.min != null && newValue2 < this.options.min) { + newValue2 = this.options.min; + } + if (this.options.max != null && newValue2 > this.options.max) { + newValue2 = this.options.max; + } + if (newValue2 !== this.value) { + this.setValue(newValue2, { e: e2, node: node22, canvas: canvas2 }); + } + } +} +class SliderWidget extends BaseWidget { + static { + __name(this, "SliderWidget"); + } + constructor(widget) { + super(widget); + this.type = "slider"; + this.value = widget.value; + this.options = widget.options; + } + /** + * Draws the widget + * @param ctx - The canvas context + * @param options - The options for drawing the widget + */ + drawWidget(ctx, options22) { + const originalTextAlign = ctx.textAlign; + const originalStrokeStyle = ctx.strokeStyle; + const originalFillStyle = ctx.fillStyle; + const { y: y2, width: widget_width, show_text = true, margin = 15 } = options22; + const H = this.height; + ctx.fillStyle = this.background_color; + ctx.fillRect(margin, y2, widget_width - margin * 2, H); + const range2 = this.options.max - this.options.min; + let nvalue = (this.value - this.options.min) / range2; + nvalue = clamp$1(nvalue, 0, 1); + ctx.fillStyle = this.options.slider_color ?? "#678"; + ctx.fillRect(margin, y2, nvalue * (widget_width - margin * 2), H); + if (show_text && !this.disabled) { + ctx.strokeStyle = this.outline_color; + ctx.strokeRect(margin, y2, widget_width - margin * 2, H); + } + if (this.marker != null) { + let marker_nvalue = (this.marker - this.options.min) / range2; + marker_nvalue = clamp$1(marker_nvalue, 0, 1); + ctx.fillStyle = this.options.marker_color ?? "#AA9"; + ctx.fillRect( + margin + marker_nvalue * (widget_width - margin * 2), + y2, + 2, + H + ); + } + if (show_text) { + ctx.textAlign = "center"; + ctx.fillStyle = this.text_color; + ctx.fillText( + (this.label || this.name) + " " + Number(this.value).toFixed( + this.options.precision != null ? this.options.precision : 3 + ), + widget_width * 0.5, + y2 + H * 0.7 + ); + } + ctx.textAlign = originalTextAlign; + ctx.strokeStyle = originalStrokeStyle; + ctx.fillStyle = originalFillStyle; + } + /** + * Handles click events for the slider widget + */ + onClick(options22) { + if (this.options.read_only) return; + const { e: e2, node: node22 } = options22; + const width2 = this.width || node22.size[0]; + const x2 = e2.canvasX - node22.pos[0]; + const slideFactor = clamp$1((x2 - 15) / (width2 - 30), 0, 1); + const newValue2 = this.options.min + (this.options.max - this.options.min) * slideFactor; + if (newValue2 !== this.value) { + this.setValue(newValue2, options22); + } + } + /** + * Handles drag events for the slider widget + */ + onDrag(options22) { + if (this.options.read_only) return false; + const { e: e2, node: node22 } = options22; + const width2 = this.width || node22.size[0]; + const x2 = e2.canvasX - node22.pos[0]; + const slideFactor = clamp$1((x2 - 15) / (width2 - 30), 0, 1); + const newValue2 = this.options.min + (this.options.max - this.options.min) * slideFactor; + if (newValue2 !== this.value) { + this.setValue(newValue2, options22); + } + } +} +class TextWidget extends BaseWidget { + static { + __name(this, "TextWidget"); + } + constructor(widget) { + super(widget); + this.type = widget.type; + this.value = widget.value?.toString() ?? ""; + } + /** + * Draws the widget + * @param ctx - The canvas context + * @param options - The options for drawing the widget + */ + drawWidget(ctx, options22) { + const originalTextAlign = ctx.textAlign; + const originalStrokeStyle = ctx.strokeStyle; + const originalFillStyle = ctx.fillStyle; + const { y: y2, width: width2, show_text = true, margin = 15 } = options22; + const widget_width = width2; + const H = this.height; + ctx.textAlign = "left"; + ctx.strokeStyle = this.outline_color; + ctx.fillStyle = this.background_color; + ctx.beginPath(); + if (show_text) + ctx.roundRect(margin, y2, widget_width - margin * 2, H, [H * 0.5]); + else + ctx.rect(margin, y2, widget_width - margin * 2, H); + ctx.fill(); + if (show_text) { + if (!this.disabled) ctx.stroke(); + ctx.save(); + ctx.beginPath(); + ctx.rect(margin, y2, widget_width - margin * 2, H); + ctx.clip(); + ctx.fillStyle = this.secondary_text_color; + const label5 = this.label || this.name; + if (label5 != null) { + ctx.fillText(label5, margin * 2, y2 + H * 0.7); + } + ctx.fillStyle = this.text_color; + ctx.textAlign = "right"; + ctx.fillText( + String(this.value).substr(0, 30), + // 30 chars max + widget_width - margin * 2, + y2 + H * 0.7 + ); + ctx.restore(); + } + ctx.textAlign = originalTextAlign; + ctx.strokeStyle = originalStrokeStyle; + ctx.fillStyle = originalFillStyle; + } + onClick(options22) { + const { e: e2, node: node22, canvas: canvas2 } = options22; + canvas2.prompt( + "Value", + this.value, + (v2) => { + if (v2 !== null) { + this.setValue(v2, { e: e2, node: node22, canvas: canvas2 }); + } + }, + e2, + this.options?.multiline ?? false + ); + } +} +const WIDGET_TYPE_MAP = { + button: ButtonWidget, + toggle: BooleanWidget, + slider: SliderWidget, + combo: ComboWidget, + number: NumberWidget, + string: TextWidget, + text: TextWidget +}; +function toClass(cls, obj) { + return obj instanceof cls ? obj : new cls(obj); +} +__name(toClass, "toClass"); class LGraphNode { static { __name(this, "LGraphNode"); @@ -56187,12 +57081,18 @@ class LGraphNode { static MAX_CONSOLE; static type; static category; - static supported_extensions; static filter; static skip_list; /** Default setting for {@link LGraphNode.connectInputToOutput}. @see {@link INodeFlags.keepAllLinksOnBypass} */ static keepAllLinksOnBypass = false; + /** The title text of the node. */ title; + /** + * The font style used to render the node's title text. + */ + get titleFontStyle() { + return `${LiteGraph.NODE_TEXT_SIZE}px Arial`; + } graph = null; id; type = null; @@ -56210,9 +57110,37 @@ class LGraphNode { mode; last_serialization; serialize_widgets; + /** + * The overridden fg color used to render the node. + * @see {@link renderingColor} + */ color; + /** + * The overridden bg color used to render the node. + * @see {@link renderingBgColor} + */ bgcolor; + /** + * The overridden box color used to render the node. + * @see {@link renderingBoxColor} + */ boxcolor; + /** The fg color used to render the node. */ + get renderingColor() { + return this.color || this.constructor.color || LiteGraph.NODE_DEFAULT_COLOR; + } + /** The bg color used to render the node. */ + get renderingBgColor() { + return this.bgcolor || this.constructor.bgcolor || LiteGraph.NODE_DEFAULT_BGCOLOR; + } + /** The box color used to render the node. */ + get renderingBoxColor() { + let colState = LiteGraph.node_box_coloured_by_mode && LiteGraph.NODE_MODES_COLORS[this.mode] ? LiteGraph.NODE_MODES_COLORS[this.mode] : void 0; + if (LiteGraph.node_box_coloured_when_on) { + colState = this.action_triggered ? "#FFF" : this.execute_triggered ? "#AAA" : colState; + } + return this.boxcolor || colState || LiteGraph.NODE_DEFAULT_BOXCOLOR; + } exec_version; action_call; execute_triggered; @@ -56223,13 +57151,14 @@ class LGraphNode { gotFocusAt; badges = []; badgePosition = BadgePosition.TopLeft; + /** + * The width of the node when collapsed. + * Updated by {@link LGraphCanvas.drawNode} + */ _collapsed_width; - horizontal; console; _level; _shape; - subgraph; - skip_subgraph_button; mouseOver; redraw_on_mouse; // Appears unused @@ -56285,6 +57214,12 @@ class LGraphNode { this._size[0] = value4[0]; this._size[1] = value4[1]; } + /** + * The size of the node used for rendering. + */ + get renderingSize() { + return this.flags.collapsed ? [this._collapsed_width, 0] : this._size; + } get shape() { return this._shape; } @@ -56309,12 +57244,21 @@ class LGraphNode { this._shape = v2; } } + /** + * The shape of the node used for rendering. @see {@link RenderShape} + */ + get renderingShape() { + return this._shape || this.constructor.shape || LiteGraph.NODE_DEFAULT_SHAPE; + } get is_selected() { return this.selected; } set is_selected(value4) { this.selected = value4; } + get title_mode() { + return this.constructor.title_mode ?? TitleMode.NORMAL_TITLE; + } constructor(title) { this.id = LiteGraph.use_uuids ? LiteGraph.uuidv4() : -1; this.title = title || "Unnamed"; @@ -56351,30 +57295,27 @@ class LGraphNode { if (!info.title) { this.title = this.constructor.title; } - if (this.inputs) { - for (let i2 = 0; i2 < this.inputs.length; ++i2) { - const input = this.inputs[i2]; - const link2 = this.graph ? this.graph._links.get(input.link) : null; - this.onConnectionsChange?.(NodeSlotType.INPUT, i2, true, link2, input); - this.onInputAdded?.(input); - } + this.inputs ??= []; + this.inputs = this.inputs.map((input) => toClass(NodeInputSlot, input)); + for (const [i2, input] of this.inputs.entries()) { + const link2 = this.graph ? this.graph._links.get(input.link) : null; + this.onConnectionsChange?.(NodeSlotType.INPUT, i2, true, link2, input); + this.onInputAdded?.(input); } - if (this.outputs) { - for (let i2 = 0; i2 < this.outputs.length; ++i2) { - const output = this.outputs[i2]; - if (!output.links) { - continue; - } - for (let j2 = 0; j2 < output.links.length; ++j2) { - const link2 = this.graph ? this.graph._links.get(output.links[j2]) : null; - this.onConnectionsChange?.(NodeSlotType.OUTPUT, i2, true, link2, output); - } - this.onOutputAdded?.(output); + this.outputs ??= []; + this.outputs = this.outputs.map((output) => toClass(NodeOutputSlot, output)); + for (const [i2, output] of this.outputs.entries()) { + if (!output.links) { + continue; } + for (const linkId of output.links) { + const link2 = this.graph ? this.graph._links.get(linkId) : null; + this.onConnectionsChange?.(NodeSlotType.OUTPUT, i2, true, link2, output); + } + this.onOutputAdded?.(output); } if (this.widgets) { - for (let i2 = 0; i2 < this.widgets.length; ++i2) { - const w2 = this.widgets[i2]; + for (const w2 of this.widgets) { if (!w2) continue; if (w2.options?.property && this.properties[w2.options.property] != void 0) w2.value = JSON.parse(JSON.stringify(this.properties[w2.options.property])); @@ -56709,10 +57650,10 @@ class LGraphNode { } return trigS; } - onAfterExecuteNode(param, options4) { + onAfterExecuteNode(param, options22) { const trigS = this.findOutputSlot("onExecuted"); if (trigS != -1) { - this.triggerSlot(trigS, param, null, options4); + this.triggerSlot(trigS, param, null, options22); } } changeMode(modeTo) { @@ -56738,46 +57679,46 @@ class LGraphNode { /** * Triggers the node code execution, place a boolean/counter to mark the node as being executed */ - doExecute(param, options4) { - options4 = options4 || {}; + doExecute(param, options22) { + options22 = options22 || {}; if (this.onExecute) { - options4.action_call ||= this.id + "_exec_" + Math.floor(Math.random() * 9999); + options22.action_call ||= this.id + "_exec_" + Math.floor(Math.random() * 9999); this.graph.nodes_executing[this.id] = true; - this.onExecute(param, options4); + this.onExecute(param, options22); this.graph.nodes_executing[this.id] = false; this.exec_version = this.graph.iteration; - if (options4?.action_call) { - this.action_call = options4.action_call; - this.graph.nodes_executedAction[this.id] = options4.action_call; + if (options22?.action_call) { + this.action_call = options22.action_call; + this.graph.nodes_executedAction[this.id] = options22.action_call; } } this.execute_triggered = 2; - this.onAfterExecuteNode?.(param, options4); + this.onAfterExecuteNode?.(param, options22); } /** * Triggers an action, wrapped by logics to control execution flow * @param action name */ - actionDo(action, param, options4) { - options4 = options4 || {}; + actionDo(action, param, options22) { + options22 = options22 || {}; if (this.onAction) { - options4.action_call ||= this.id + "_" + (action ? action : "action") + "_" + Math.floor(Math.random() * 9999); + options22.action_call ||= this.id + "_" + (action ? action : "action") + "_" + Math.floor(Math.random() * 9999); this.graph.nodes_actioning[this.id] = action ? action : "actioning"; - this.onAction(action, param, options4); + this.onAction(action, param, options22); this.graph.nodes_actioning[this.id] = false; - if (options4?.action_call) { - this.action_call = options4.action_call; - this.graph.nodes_executedAction[this.id] = options4.action_call; + if (options22?.action_call) { + this.action_call = options22.action_call; + this.graph.nodes_executedAction[this.id] = options22.action_call; } } this.action_triggered = 2; - this.onAfterExecuteNode?.(param, options4); + this.onAfterExecuteNode?.(param, options22); } /** * Triggers an event in this node, this will trigger any output with the same name * @param action name ( "on_play", ... ) if action is equivalent to false then the event is send to all */ - trigger(action, param, options4) { + trigger(action, param, options22) { if (!this.outputs || !this.outputs.length) { return; } @@ -56786,7 +57727,7 @@ class LGraphNode { const output = this.outputs[i2]; if (!output || output.type !== LiteGraph.EVENT || action && output.name != action) continue; - this.triggerSlot(i2, param, null, options4); + this.triggerSlot(i2, param, null, options22); } } /** @@ -56794,8 +57735,8 @@ class LGraphNode { * @param slot the index of the output slot * @param link_id [optional] in case you want to trigger and specific output link in a slot */ - triggerSlot(slot, param, link_id, options4) { - options4 = options4 || {}; + triggerSlot(slot, param, link_id, options22) { + options22 = options22 || {}; if (!this.outputs) return; if (slot == null) { console.error("slot must be a number"); @@ -56817,14 +57758,14 @@ class LGraphNode { const node22 = this.graph.getNodeById(link_info.target_id); if (!node22) continue; if (node22.mode === LGraphEventMode.ON_TRIGGER) { - if (!options4.action_call) - options4.action_call = this.id + "_trigg_" + Math.floor(Math.random() * 9999); - node22.doExecute?.(param, options4); + if (!options22.action_call) + options22.action_call = this.id + "_trigg_" + Math.floor(Math.random() * 9999); + node22.doExecute?.(param, options22); } else if (node22.onAction) { - if (!options4.action_call) - options4.action_call = this.id + "_act_" + Math.floor(Math.random() * 9999); + if (!options22.action_call) + options22.action_call = this.id + "_act_" + Math.floor(Math.random() * 9999); const target_connection = node22.inputs[link_info.target_slot]; - node22.actionDo(target_connection.name, param, options4); + node22.actionDo(target_connection.name, param, options22); } } } @@ -56882,7 +57823,7 @@ class LGraphNode { * @param extra_info this can be used to have special properties of an output (label, special color, position, etc) */ addOutput(name2, type, extra_info) { - const output = { name: name2, type, links: null }; + const output = new NodeOutputSlot({ name: name2, type, links: null }); if (extra_info) { for (const i2 in extra_info) { output[i2] = extra_info[i2]; @@ -56904,7 +57845,7 @@ class LGraphNode { addOutputs(array) { for (let i2 = 0; i2 < array.length; ++i2) { const info = array[i2]; - const o2 = { name: info[0], type: info[1], links: null }; + const o2 = new NodeOutputSlot({ name: info[0], type: info[1], links: null }); if (array[2]) { for (const j2 in info[2]) { o2[j2] = info[2][j2]; @@ -56945,7 +57886,7 @@ class LGraphNode { */ addInput(name2, type, extra_info) { type = type || 0; - const input = { name: name2, type, link: null }; + const input = new NodeInputSlot({ name: name2, type, link: null }); if (extra_info) { for (const i2 in extra_info) { input[i2] = extra_info[i2]; @@ -56966,7 +57907,7 @@ class LGraphNode { addInputs(array) { for (let i2 = 0; i2 < array.length; ++i2) { const info = array[i2]; - const o2 = { name: info[0], type: info[1], link: null }; + const o2 = new NodeInputSlot({ name: info[0], type: info[1], link: null }); if (array[2]) { for (const j2 in info[2]) { o2[j2] = info[2][j2]; @@ -57002,11 +57943,11 @@ class LGraphNode { * @param pos position of the connection inside the node * @param direction if is input or output */ - addConnection(name2, type, pos2, direction) { + addConnection(name2, type, pos, direction) { const o2 = { name: name2, type, - pos: pos2, + pos, direction, links: null }; @@ -57056,9 +57997,9 @@ class LGraphNode { let widgets_height = 0; if (this.widgets?.length) { for (let i2 = 0, l2 = this.widgets.length; i2 < l2; ++i2) { - const widget2 = this.widgets[i2]; - if (widget2.hidden || widget2.advanced && !this.showAdvanced) continue; - widgets_height += widget2.computeSize ? widget2.computeSize(size[0])[1] + 4 : LiteGraph.NODE_WIDGET_HEIGHT + 4; + const widget = this.widgets[i2]; + if (widget.hidden || widget.advanced && !this.showAdvanced) continue; + widgets_height += widget.computeSize ? widget.computeSize(size[0])[1] + 4 : LiteGraph.NODE_WIDGET_HEIGHT + 4; } widgets_height += 8; } @@ -57126,17 +58067,17 @@ class LGraphNode { * @param options the object that contains special properties of this widget * @returns the created widget object */ - addWidget(type, name2, value4, callback, options4) { + addWidget(type, name2, value4, callback, options22) { this.widgets ||= []; - if (!options4 && callback && typeof callback === "object") { - options4 = callback; + if (!options22 && callback && typeof callback === "object") { + options22 = callback; callback = null; } - if (options4 && typeof options4 === "string") - options4 = { property: options4 }; + if (options22 && typeof options22 === "string") + options22 = { property: options22 }; if (callback && typeof callback === "string") { - options4 ||= {}; - options4.property = callback; + options22 ||= {}; + options22.property = callback; callback = null; } if (callback && typeof callback !== "function") { @@ -57149,7 +58090,7 @@ class LGraphNode { name: name2, value: value4, callback, - options: options4 || {} + options: options22 || {} }; if (w2.options.y !== void 0) { w2.y = w2.options.y; @@ -57160,14 +58101,16 @@ class LGraphNode { if (type == "combo" && !w2.options.values) { throw "LiteGraph addWidget('combo',...) requires to pass values in options: { values:['red','blue'] }"; } - this.widgets.push(w2); + const widget = this.addCustomWidget(w2); this.setSize(this.computeSize()); - return w2; + return widget; } addCustomWidget(custom_widget) { this.widgets ||= []; - this.widgets.push(custom_widget); - return custom_widget; + const WidgetClass = WIDGET_TYPE_MAP[custom_widget.type]; + const widget = WidgetClass ? new WidgetClass(custom_widget) : custom_widget; + this.widgets.push(widget); + return widget; } move(deltaX, deltaY) { if (this.pinned) return; @@ -57183,7 +58126,7 @@ class LGraphNode { * @param pad Expands the area by this amount on each side. Default: 0 */ measure(out, pad = 0) { - const titleMode = this.constructor.title_mode; + const titleMode = this.title_mode; const renderTitle = titleMode != TitleMode.TRANSPARENT_TITLE && titleMode != TitleMode.NO_TITLE; const titleHeight = renderTitle ? LiteGraph.NODE_TITLE_HEIGHT : 0; out[0] = this.pos[0] - pad; @@ -57285,18 +58228,18 @@ class LGraphNode { * @returns The widget found, otherwise `null` */ getWidgetOnPos(canvasX, canvasY, includeDisabled = false) { - const { widgets, pos: pos2, size } = this; + const { widgets, pos, size } = this; if (!widgets?.length) return null; - const x2 = canvasX - pos2[0]; - const y2 = canvasY - pos2[1]; + const x2 = canvasX - pos[0]; + const y2 = canvasY - pos[1]; const nodeWidth = size[0]; - for (const widget2 of widgets) { - if (!widget2 || widget2.disabled && !includeDisabled || widget2.hidden || widget2.advanced && !this.showAdvanced) + for (const widget of widgets) { + if (!widget || widget.disabled && !includeDisabled || widget.hidden || widget.advanced && !this.showAdvanced) continue; - const h2 = widget2.computeSize ? widget2.computeSize(nodeWidth)[1] : LiteGraph.NODE_WIDGET_HEIGHT; - const w2 = widget2.width || nodeWidth; - if (widget2.last_y !== void 0 && isInRectangle(x2, y2, 6, widget2.last_y, w2 - 12, h2)) - return widget2; + const h2 = widget.computeSize ? widget.computeSize(nodeWidth)[1] : LiteGraph.NODE_WIDGET_HEIGHT; + const w2 = widget.width || nodeWidth; + if (widget.last_y !== void 0 && isInRectangle(x2, y2, 6, widget.last_y, w2 - 12, h2)) + return widget; } return null; } @@ -57328,12 +58271,12 @@ class LGraphNode { * Finds the next free slot * @param slots The slots to search, i.e. this.inputs or this.outputs */ - #findFreeSlot(slots, options4) { + #findFreeSlot(slots, options22) { const defaults2 = { returnObj: false, typesNotAccepted: [] }; - const opts = Object.assign(defaults2, options4 || {}); + const opts = Object.assign(defaults2, options22 || {}); const length = slots?.length; if (!(length > 0)) return -1; for (let i2 = 0; i2 < length; ++i2) { @@ -57423,18 +58366,18 @@ class LGraphNode { * @see {connectByType} * @see {connectByTypeOutput} */ - findConnectByTypeSlot(findInputs, node22, slotType, options4) { - if (options4 && typeof options4 === "object") { - if ("firstFreeIfInputGeneralInCase" in options4) options4.wildcardToTyped = !!options4.firstFreeIfInputGeneralInCase; - if ("firstFreeIfOutputGeneralInCase" in options4) options4.wildcardToTyped = !!options4.firstFreeIfOutputGeneralInCase; - if ("generalTypeInCase" in options4) options4.typedToWildcard = !!options4.generalTypeInCase; + findConnectByTypeSlot(findInputs, node22, slotType, options22) { + if (options22 && typeof options22 === "object") { + if ("firstFreeIfInputGeneralInCase" in options22) options22.wildcardToTyped = !!options22.firstFreeIfInputGeneralInCase; + if ("firstFreeIfOutputGeneralInCase" in options22) options22.wildcardToTyped = !!options22.firstFreeIfOutputGeneralInCase; + if ("generalTypeInCase" in options22) options22.typedToWildcard = !!options22.generalTypeInCase; } const optsDef = { createEventInCase: true, wildcardToTyped: true, typedToWildcard: true }; - const opts = Object.assign(optsDef, options4); + const opts = Object.assign(optsDef, options22); if (node22 && typeof node22 === "number") { node22 = this.graph.getNodeById(node22); } @@ -57789,13 +58732,8 @@ class LGraphNode { const offset = LiteGraph.NODE_SLOT_HEIGHT * 0.5; if (this.flags.collapsed) { const w2 = this._collapsed_width || LiteGraph.NODE_COLLAPSED_WIDTH; - if (this.horizontal) { - out[0] = this.pos[0] + w2 * 0.5; - out[1] = is_input ? this.pos[1] - LiteGraph.NODE_TITLE_HEIGHT : this.pos[1]; - } else { - out[0] = is_input ? this.pos[0] : this.pos[0] + w2; - out[1] = this.pos[1] - LiteGraph.NODE_TITLE_HEIGHT * 0.5; - } + out[0] = is_input ? this.pos[0] : this.pos[0] + w2; + out[1] = this.pos[1] - LiteGraph.NODE_TITLE_HEIGHT * 0.5; return out; } if (is_input && slot_number == -1) { @@ -57812,11 +58750,6 @@ class LGraphNode { out[1] = this.pos[1] + this.outputs[slot_number].pos[1]; return out; } - if (this.horizontal) { - out[0] = this.pos[0] + (slot_number + 0.5) * (this.size[0] / num_slots); - out[1] = is_input ? this.pos[1] - LiteGraph.NODE_TITLE_HEIGHT : this.pos[1] + this.size[1]; - return out; - } out[0] = is_input ? this.pos[0] + offset : this.pos[0] + this.size[0] + 1 - offset; out[1] = this.pos[1] + (slot_number + 0.7) * LiteGraph.NODE_SLOT_HEIGHT + (this.constructor.slot_start_y || 0); return out; @@ -57920,8 +58853,12 @@ class LGraphNode { get width() { return this.collapsed ? this._collapsed_width || LiteGraph.NODE_COLLAPSED_WIDTH : this.size[0]; } + /** + * Returns the height of the node, including the title bar. + */ get height() { - return this.collapsed ? LiteGraph.NODE_COLLAPSED_HEIGHT : this.size[1]; + const bodyHeight = this.collapsed ? 0 : this.size[1]; + return LiteGraph.NODE_TITLE_HEIGHT + bodyHeight; } drawBadges(ctx, { gap = 2 } = {}) { const badgeInstances = this.badges.map((badge) => badge instanceof LGraphBadge ? badge : badge()); @@ -57933,6 +58870,168 @@ class LGraphNode { currentX += badge.getWidth(ctx) + gap; } } + /** + * Renders the node's title bar background + */ + drawTitleBarBackground(ctx, options22) { + const { + scale, + title_height = LiteGraph.NODE_TITLE_HEIGHT, + low_quality = false + } = options22; + const fgcolor = this.renderingColor; + const shape = this.renderingShape; + const size = this.renderingSize; + if (this.onDrawTitleBar) { + this.onDrawTitleBar(ctx, title_height, size, scale, fgcolor); + return; + } + if (this.title_mode === TitleMode.TRANSPARENT_TITLE) { + return; + } + if (this.collapsed) { + ctx.shadowColor = LiteGraph.DEFAULT_SHADOW_COLOR; + } + ctx.fillStyle = this.constructor.title_color || fgcolor; + ctx.beginPath(); + if (shape == RenderShape.BOX || low_quality) { + ctx.rect(0, -title_height, size[0], title_height); + } else if (shape == RenderShape.ROUND || shape == RenderShape.CARD) { + ctx.roundRect( + 0, + -title_height, + size[0], + title_height, + this.collapsed ? [LiteGraph.ROUND_RADIUS] : [LiteGraph.ROUND_RADIUS, LiteGraph.ROUND_RADIUS, 0, 0] + ); + } + ctx.fill(); + ctx.shadowColor = "transparent"; + } + /** + * Renders the node's title box, i.e. the dot in front of the title text that + * when clicked toggles the node's collapsed state. The term `title box` comes + * from the original LiteGraph implementation. + */ + drawTitleBox(ctx, options22) { + const { + scale, + low_quality = false, + title_height = LiteGraph.NODE_TITLE_HEIGHT, + box_size = 10 + } = options22; + const size = this.renderingSize; + const shape = this.renderingShape; + if (this.onDrawTitleBox) { + this.onDrawTitleBox(ctx, title_height, size, scale); + return; + } + if ([RenderShape.ROUND, RenderShape.CIRCLE, RenderShape.CARD].includes(shape)) { + if (low_quality) { + ctx.fillStyle = "black"; + ctx.beginPath(); + ctx.arc( + title_height * 0.5, + title_height * -0.5, + box_size * 0.5 + 1, + 0, + Math.PI * 2 + ); + ctx.fill(); + } + ctx.fillStyle = this.renderingBoxColor; + if (low_quality) + ctx.fillRect( + title_height * 0.5 - box_size * 0.5, + title_height * -0.5 - box_size * 0.5, + box_size, + box_size + ); + else { + ctx.beginPath(); + ctx.arc( + title_height * 0.5, + title_height * -0.5, + box_size * 0.5, + 0, + Math.PI * 2 + ); + ctx.fill(); + } + } else { + if (low_quality) { + ctx.fillStyle = "black"; + ctx.fillRect( + (title_height - box_size) * 0.5 - 1, + (title_height + box_size) * -0.5 - 1, + box_size + 2, + box_size + 2 + ); + } + ctx.fillStyle = this.renderingBoxColor; + ctx.fillRect( + (title_height - box_size) * 0.5, + (title_height + box_size) * -0.5, + box_size, + box_size + ); + } + } + /** + * Renders the node's title text. + */ + drawTitleText(ctx, options22) { + const { + scale, + default_title_color, + low_quality = false, + title_height = LiteGraph.NODE_TITLE_HEIGHT + } = options22; + const size = this.renderingSize; + const selected2 = this.selected; + if (this.onDrawTitleText) { + this.onDrawTitleText( + ctx, + title_height, + size, + scale, + this.titleFontStyle, + selected2 + ); + return; + } + if (low_quality) { + return; + } + ctx.font = this.titleFontStyle; + const rawTitle = this.getTitle() ?? `❌ ${this.type}`; + const title = String(rawTitle) + (this.pinned ? "📌" : ""); + if (title) { + if (selected2) { + ctx.fillStyle = LiteGraph.NODE_SELECTED_TITLE_COLOR; + } else { + ctx.fillStyle = this.constructor.title_text_color || default_title_color; + } + if (this.collapsed) { + ctx.textAlign = "left"; + ctx.fillText( + title.substr(0, 20), + // avoid urls too long + title_height, + // + measure.width * 0.5, + LiteGraph.NODE_TITLE_TEXT_Y - title_height + ); + ctx.textAlign = "left"; + } else { + ctx.textAlign = "left"; + ctx.fillText( + title, + title_height, + LiteGraph.NODE_TITLE_TEXT_Y - title_height + ); + } + } + } /** * Attempts to gracefully bypass this node in all of its connections by reconnecting all links. * @@ -57991,6 +59090,147 @@ class LGraphNode { } __name(bypassAllLinks, "bypassAllLinks"); } + drawWidgets(ctx, options22) { + if (!this.widgets) return; + const { y: y2, colorContext, linkOverWidget, linkOverWidgetType, lowQuality = false, editorAlpha = 1 } = options22; + let posY = y2; + if (this.widgets_up) { + posY = 2; + } + if (this.widgets_start_y != null) posY = this.widgets_start_y; + const width2 = this.size[0]; + const widgets = this.widgets; + posY += 2; + const H = LiteGraph.NODE_WIDGET_HEIGHT; + const show_text = !lowQuality; + ctx.save(); + ctx.globalAlpha = editorAlpha; + const margin = 15; + for (const w2 of widgets) { + if (w2.hidden || w2.advanced && !this.showAdvanced) continue; + const y22 = w2.y || posY; + const outline_color = w2.advanced ? LiteGraph.WIDGET_ADVANCED_OUTLINE_COLOR : LiteGraph.WIDGET_OUTLINE_COLOR; + if (w2 === linkOverWidget) { + new NodeInputSlot({ + name: "", + type: linkOverWidgetType, + link: 0 + }).draw(ctx, { pos: [10, y22 + 10], colorContext }); + } + w2.last_y = y22; + ctx.strokeStyle = outline_color; + ctx.fillStyle = "#222"; + ctx.textAlign = "left"; + if (w2.disabled) ctx.globalAlpha *= 0.5; + const widget_width = w2.width || width2; + const WidgetClass = WIDGET_TYPE_MAP[w2.type]; + if (WidgetClass) { + toClass(WidgetClass, w2).drawWidget(ctx, { y: y22, width: widget_width, show_text, margin }); + } else { + w2.draw?.(ctx, this, widget_width, y22, H); + } + posY += (w2.computeSize ? w2.computeSize(widget_width)[1] : H) + 4; + ctx.globalAlpha = editorAlpha; + } + ctx.restore(); + } + /** + * When {@link LGraphNode.collapsed} is `true`, this method draws the node's collapsed slots. + */ + drawCollapsedSlots(ctx) { + let input_slot = null; + let output_slot = null; + for (const slot of this.inputs ?? []) { + if (slot.link == null) { + continue; + } + input_slot = slot; + break; + } + for (const slot of this.outputs ?? []) { + if (!slot.links || !slot.links.length) { + continue; + } + output_slot = slot; + break; + } + if (input_slot) { + const x2 = 0; + const y2 = LiteGraph.NODE_TITLE_HEIGHT * -0.5; + toClass(NodeInputSlot, input_slot).drawCollapsed(ctx, { + pos: [x2, y2] + }); + } + if (output_slot) { + const x2 = this._collapsed_width; + const y2 = LiteGraph.NODE_TITLE_HEIGHT * -0.5; + toClass(NodeOutputSlot, output_slot).drawCollapsed(ctx, { + pos: [x2, y2] + }); + } + } + get highlightColor() { + return LiteGraph.NODE_TEXT_HIGHLIGHT_COLOR ?? LiteGraph.NODE_SELECTED_TITLE_COLOR ?? LiteGraph.NODE_TEXT_COLOR; + } + /** + * Draws the node's input and output slots. + * @returns The maximum y-coordinate of the slots. + * TODO: Calculate the bounding box of the slots and return it instead of the maximum y-coordinate. + */ + drawSlots(ctx, options22) { + const { colorContext, connectingLink, editorAlpha, lowQuality } = options22; + let max_y = 0; + const slot_pos = new Float32Array(2); + for (const [i2, input] of (this.inputs ?? []).entries()) { + const slot = toClass(NodeInputSlot, input); + const isValid2 = slot.isValidTarget(connectingLink); + const highlight = isValid2 && this.mouseOver?.inputId === i2; + const label_color = highlight ? this.highlightColor : LiteGraph.NODE_TEXT_COLOR; + ctx.globalAlpha = isValid2 ? editorAlpha : 0.4 * editorAlpha; + const pos = this.getConnectionPos( + true, + i2, + /* out= */ + slot_pos + ); + pos[0] -= this.pos[0]; + pos[1] -= this.pos[1]; + max_y = Math.max(max_y, pos[1] + LiteGraph.NODE_SLOT_HEIGHT * 0.5); + slot.draw(ctx, { + pos, + colorContext, + labelColor: label_color, + lowQuality, + renderText: !lowQuality, + highlight + }); + } + for (const [i2, output] of (this.outputs ?? []).entries()) { + const slot = toClass(NodeOutputSlot, output); + const isValid2 = slot.isValidTarget(connectingLink); + const highlight = isValid2 && this.mouseOver?.outputId === i2; + const label_color = highlight ? this.highlightColor : LiteGraph.NODE_TEXT_COLOR; + ctx.globalAlpha = isValid2 ? editorAlpha : 0.4 * editorAlpha; + const pos = this.getConnectionPos( + false, + i2, + /* out= */ + slot_pos + ); + pos[0] -= this.pos[0]; + pos[1] -= this.pos[1]; + max_y = Math.max(max_y, pos[1] + LiteGraph.NODE_SLOT_HEIGHT * 0.5); + slot.draw(ctx, { + pos, + colorContext, + labelColor: label_color, + lowQuality, + renderText: !lowQuality, + highlight + }); + } + return max_y; + } } class LGraphGroup { static { @@ -58121,7 +59361,7 @@ class LGraphGroup { ctx.textAlign = "left"; ctx.fillText(this.title + (this.pinned ? "📌" : ""), x2 + padding, y2 + font_size); if (LiteGraph.highlight_selected_group && this.selected) { - graphCanvas.strokeShape(ctx, this._bounding, { + strokeShape(ctx, this._bounding, { title_height: this.titleHeight, padding }); @@ -58235,117 +59475,6 @@ class LGraphGroup { isPointInside = LGraphNode.prototype.isPointInside; setDirtyCanvas = LGraphNode.prototype.setDirtyCanvas; } -var SlotType = /* @__PURE__ */ ((SlotType2) => { - SlotType2["Array"] = "array"; - SlotType2[SlotType2["Event"] = -1] = "Event"; - return SlotType2; -})(SlotType || {}); -var SlotShape = ((SlotShape2) => { - SlotShape2[SlotShape2["Box"] = RenderShape.BOX] = "Box"; - SlotShape2[SlotShape2["Arrow"] = RenderShape.ARROW] = "Arrow"; - SlotShape2[SlotShape2["Grid"] = RenderShape.GRID] = "Grid"; - SlotShape2[SlotShape2["Circle"] = RenderShape.CIRCLE] = "Circle"; - SlotShape2[SlotShape2["HollowCircle"] = RenderShape.HollowCircle] = "HollowCircle"; - return SlotShape2; -})(SlotShape || {}); -var SlotDirection = ((SlotDirection2) => { - SlotDirection2[SlotDirection2["Up"] = LinkDirection.UP] = "Up"; - SlotDirection2[SlotDirection2["Right"] = LinkDirection.RIGHT] = "Right"; - SlotDirection2[SlotDirection2["Down"] = LinkDirection.DOWN] = "Down"; - SlotDirection2[SlotDirection2["Left"] = LinkDirection.LEFT] = "Left"; - return SlotDirection2; -})(SlotDirection || {}); -var LabelPosition = /* @__PURE__ */ ((LabelPosition2) => { - LabelPosition2["Left"] = "left"; - LabelPosition2["Right"] = "right"; - return LabelPosition2; -})(LabelPosition || {}); -function drawSlot(ctx, slot, pos2, { - label_color = "#AAA", - label_position = "right", - horizontal: horizontal2 = false, - low_quality = false, - render_text = true, - do_stroke = false, - highlight = false -} = {}) { - const originalFillStyle = ctx.fillStyle; - const originalStrokeStyle = ctx.strokeStyle; - const originalLineWidth = ctx.lineWidth; - const slot_type = slot.type; - const slot_shape = slot_type === "array" ? SlotShape.Grid : slot.shape; - ctx.beginPath(); - let doStroke = do_stroke; - let doFill = true; - if (slot_type === -1 || slot_shape === SlotShape.Box) { - if (horizontal2) { - ctx.rect(pos2[0] - 5 + 0.5, pos2[1] - 8 + 0.5, 10, 14); - } else { - ctx.rect(pos2[0] - 6 + 0.5, pos2[1] - 5 + 0.5, 14, 10); - } - } else if (slot_shape === SlotShape.Arrow) { - ctx.moveTo(pos2[0] + 8, pos2[1] + 0.5); - ctx.lineTo(pos2[0] - 4, pos2[1] + 6 + 0.5); - ctx.lineTo(pos2[0] - 4, pos2[1] - 6 + 0.5); - ctx.closePath(); - } else if (slot_shape === SlotShape.Grid) { - const gridSize = 3; - const cellSize = 2; - const spacing = 3; - for (let x2 = 0; x2 < gridSize; x2++) { - for (let y2 = 0; y2 < gridSize; y2++) { - ctx.rect( - pos2[0] - 4 + x2 * spacing, - pos2[1] - 4 + y2 * spacing, - cellSize, - cellSize - ); - } - } - doStroke = false; - } else { - if (low_quality) { - ctx.rect(pos2[0] - 4, pos2[1] - 4, 8, 8); - } else { - let radius; - if (slot_shape === SlotShape.HollowCircle) { - doFill = false; - doStroke = true; - ctx.lineWidth = 3; - ctx.strokeStyle = ctx.fillStyle; - radius = highlight ? 4 : 3; - } else { - radius = highlight ? 5 : 4; - } - ctx.arc(pos2[0], pos2[1], radius, 0, Math.PI * 2); - } - } - if (doFill) ctx.fill(); - if (!low_quality && doStroke) ctx.stroke(); - if (render_text) { - const text2 = slot.label || slot.localized_name || slot.name; - if (text2) { - ctx.fillStyle = label_color; - if (label_position === "right") { - if (horizontal2 || slot.dir == LinkDirection.UP) { - ctx.fillText(text2, pos2[0], pos2[1] - 10); - } else { - ctx.fillText(text2, pos2[0] + 10, pos2[1] + 5); - } - } else { - if (horizontal2 || slot.dir == LinkDirection.DOWN) { - ctx.fillText(text2, pos2[0], pos2[1] - 8); - } else { - ctx.fillText(text2, pos2[0] - 10, pos2[1] + 5); - } - } - } - } - ctx.fillStyle = originalFillStyle; - ctx.strokeStyle = originalStrokeStyle; - ctx.lineWidth = originalLineWidth; -} -__name(drawSlot, "drawSlot"); class DragAndScale { static { __name(this, "DragAndScale"); @@ -58435,8 +59564,8 @@ class DragAndScale { if (!this.enabled) { return; } - const canvas = this.element; - const rect = canvas.getBoundingClientRect(); + const canvas2 = this.element; + const rect = canvas2.getBoundingClientRect(); const x2 = e2.clientX - rect.left; const y2 = e2.clientY - rect.top; e2.canvasx = x2; @@ -58449,7 +59578,7 @@ class DragAndScale { } if (e2.type == LiteGraph.pointerevents_method + "down" && is_inside) { this.dragging = true; - LiteGraph.pointerListenerRemove(canvas, "move", this._binded_mouse_callback); + LiteGraph.pointerListenerRemove(canvas2, "move", this._binded_mouse_callback); LiteGraph.pointerListenerAdd(document, "move", this._binded_mouse_callback); LiteGraph.pointerListenerAdd(document, "up", this._binded_mouse_callback); } else if (e2.type == LiteGraph.pointerevents_method + "move") { @@ -58464,7 +59593,7 @@ class DragAndScale { this.dragging = false; LiteGraph.pointerListenerRemove(document, "move", this._binded_mouse_callback); LiteGraph.pointerListenerRemove(document, "up", this._binded_mouse_callback); - LiteGraph.pointerListenerAdd(canvas, "move", this._binded_mouse_callback); + LiteGraph.pointerListenerAdd(canvas2, "move", this._binded_mouse_callback); } else if (is_inside && (e2.type == "mousewheel" || e2.type == "wheel" || e2.type == "DOMMouseScroll")) { e2.eventType = "mousewheel"; if (e2.type == "wheel") e2.wheel = -e2.deltaY; @@ -58484,16 +59613,16 @@ class DragAndScale { ctx.scale(this.scale, this.scale); ctx.translate(this.offset[0], this.offset[1]); } - convertOffsetToCanvas(pos2) { + convertOffsetToCanvas(pos) { return [ - (pos2[0] + this.offset[0]) * this.scale, - (pos2[1] + this.offset[1]) * this.scale + (pos[0] + this.offset[0]) * this.scale, + (pos[1] + this.offset[1]) * this.scale ]; } - convertCanvasToOffset(pos2, out) { + convertCanvasToOffset(pos, out) { out = out || [0, 0]; - out[0] = pos2[0] / this.scale - this.offset[0]; - out[1] = pos2[1] / this.scale - this.offset[1]; + out[0] = pos[0] / this.scale - this.offset[0]; + out[1] = pos[1] / this.scale - this.offset[1]; return out; } /** @deprecated Has not been kept up to date */ @@ -58512,13 +59641,15 @@ class DragAndScale { if (!this.element) return; const rect = this.element.getBoundingClientRect(); if (!rect) return; - zooming_center = zooming_center || [rect.width * 0.5, rect.height * 0.5]; - zooming_center[0] -= rect.x; - zooming_center[1] -= rect.y; - const center = this.convertCanvasToOffset(zooming_center); + zooming_center = zooming_center ?? [rect.width * 0.5, rect.height * 0.5]; + const normalizedCenter = [ + zooming_center[0] - rect.x, + zooming_center[1] - rect.y + ]; + const center = this.convertCanvasToOffset(normalizedCenter); this.scale = value4; if (Math.abs(this.scale - 1) < 0.01) this.scale = 1; - const new_center = this.convertCanvasToOffset(zooming_center); + const new_center = this.convertCanvasToOffset(normalizedCenter); const delta_offset = [ new_center[0] - center[0], new_center[1] - center[1] @@ -58914,6 +60045,9 @@ class LGraphCanvas { this.#updateCursorStyle(); } // #endregion Legacy accessors + /** + * @deprecated Use {@link LGraphNode.titleFontStyle} instead. + */ get title_text_font() { return `${LiteGraph.NODE_TEXT_SIZE}px Arial`; } @@ -58928,6 +60062,24 @@ class LGraphCanvas { set maximumFps(value4) { this.#maximumFrameGap = value4 > Number.EPSILON ? 1e3 / value4 : 0; } + /** + * @deprecated Use {@link LiteGraphGlobal.ROUND_RADIUS} instead. + */ + get round_radius() { + return LiteGraph.ROUND_RADIUS; + } + /** + * @deprecated Use {@link LiteGraphGlobal.ROUND_RADIUS} instead. + */ + set round_radius(value4) { + LiteGraph.ROUND_RADIUS = value4; + } + /** + * Render low quality when zoomed out. + */ + get low_quality() { + return this.ds.scale < this.low_quality_zoom_threshold; + } options; background_image; ds; @@ -58967,13 +60119,14 @@ class LGraphCanvas { render_connection_arrows; render_collapsed_slots; render_execution_order; - render_title_colored; render_link_tooltip; /** Controls whether reroutes are rendered at all. */ reroutesEnabled = false; /** Shape of the markers shown at the midpoint of links. Default: Circle */ linkMarkerShape = LinkMarkerShape.Circle; links_render_mode; + /** Zoom threshold for low quality rendering. Zoom below this threshold will render low quality. */ + low_quality_zoom_threshold = 0.6; /** mouse in canvas coordinates, where 0,0 is the top-left corner of the blue rectangle */ mouse; /** mouse in graph coordinates, where 0,0 is the top-left corner of the blue rectangle */ @@ -58989,7 +60142,6 @@ class LGraphCanvas { /** to render foreground objects (above nodes and connections) in the canvas affected by transform */ onDrawForeground; connections_width; - round_radius; /** The current node being drawn by {@link drawNode}. This should NOT be used to determine the currently selected node. See {@link selectedItems} */ current_node; /** used for widgets */ @@ -59035,7 +60187,6 @@ class LGraphCanvas { last_mouse = [0, 0]; last_mouseclick = 0; graph; - _graph_stack = null; canvas; bgcanvas; ctx; @@ -59076,6 +60227,10 @@ class LGraphCanvas { #snapToGrid; /** Set on keydown, keyup. @todo */ #shiftDown = false; + /** If true, enable drag zoom. Ctrl+Shift+Drag Up/Down: zoom canvas. */ + dragZoomEnabled = false; + /** The start position of the drag zoom. */ + #dragZoomStart = null; static active_node; onClear; /** called after moving a node @deprecated Does not handle multi-node move, and can return the wrong node. */ @@ -59100,9 +60255,9 @@ class LGraphCanvas { * @param graph The graph that owns this canvas. * @param options */ - constructor(canvas, graph, options4) { - options4 ||= {}; - this.options = options4; + constructor(canvas2, graph, options22) { + options22 ||= {}; + this.options = options22; this.background_image = LGraphCanvas.DEFAULT_BACKGROUND_IMAGE; this.ds = new DragAndScale(); this.pointer = new CanvasPointer(this.canvas); @@ -59156,7 +60311,6 @@ class LGraphCanvas { this.render_connection_arrows = false; this.render_collapsed_slots = true; this.render_execution_order = false; - this.render_title_colored = true; this.render_link_tooltip = true; this.links_render_mode = LinkRenderType.SPLINE_LINK; this.mouse = [0, 0]; @@ -59171,11 +60325,9 @@ class LGraphCanvas { this.onDrawLinkTooltip = null; this.onNodeMoved = null; this.onSelectionChange = null; - this.onConnectingChange = null; this.onBeforeChange = null; this.onAfterChange = null; this.connections_width = 3; - this.round_radius = 8; this.current_node = null; this.node_widget = null; this.over_link_center = null; @@ -59183,14 +60335,14 @@ class LGraphCanvas { this.visible_area = this.ds.visible_area; this.visible_links = []; this.connecting_links = null; - this.viewport = options4.viewport || null; + this.viewport = options22.viewport || null; graph?.attachCanvas(this); - this.setCanvas(canvas, options4.skip_events); + this.setCanvas(canvas2, options22.skip_events); this.clear(); - if (!options4.skip_render) { + if (!options22.skip_render) { this.startRendering(); } - this.autoresize = options4.autoresize; + this.autoresize = options22.autoresize; } static getFileExtension(url) { const question = url.indexOf("?"); @@ -59199,10 +60351,10 @@ class LGraphCanvas { return point === -1 ? "" : url.substring(point + 1).toLowerCase(); } static onGroupAdd(info, entry, mouse_event) { - const canvas = LGraphCanvas.active_canvas; + const canvas2 = LGraphCanvas.active_canvas; const group = new LiteGraph.LGraphGroup(); - group.pos = canvas.convertEventToCanvasOffset(mouse_event); - canvas.graph.add(group); + group.pos = canvas2.convertEventToCanvasOffset(mouse_event); + canvas2.graph.add(group); } /** * @deprecated Functionality moved to {@link getBoundaryNodes}. The new function returns null on failure, instead of an object with all null properties. @@ -59229,7 +60381,7 @@ class LGraphCanvas { alignNodes(Object.values(nodes), direction, align_to); LGraphCanvas.active_canvas.setDirty(true, true); } - static onNodeAlign(value4, options4, event, prev_menu, node22) { + static onNodeAlign(value4, options22, event, prev_menu, node22) { new LiteGraph.ContextMenu(["Top", "Bottom", "Left", "Right"], { event, callback: inner_clicked, @@ -59245,7 +60397,7 @@ class LGraphCanvas { } __name(inner_clicked, "inner_clicked"); } - static onGroupAlign(value4, options4, event, prev_menu) { + static onGroupAlign(value4, options22, event, prev_menu) { new LiteGraph.ContextMenu(["Top", "Bottom", "Left", "Right"], { event, callback: inner_clicked, @@ -59260,26 +60412,26 @@ class LGraphCanvas { } __name(inner_clicked, "inner_clicked"); } - static createDistributeMenu(value4, options4, event, prev_menu, node22) { + static createDistributeMenu(value4, options22, event, prev_menu, node22) { new LiteGraph.ContextMenu(["Vertically", "Horizontally"], { event, callback: inner_clicked, parentMenu: prev_menu }); function inner_clicked(value22) { - const canvas = LGraphCanvas.active_canvas; - distributeNodes(Object.values(canvas.selected_nodes), value22 === "Horizontally"); - canvas.setDirty(true, true); + const canvas2 = LGraphCanvas.active_canvas; + distributeNodes(Object.values(canvas2.selected_nodes), value22 === "Horizontally"); + canvas2.setDirty(true, true); } __name(inner_clicked, "inner_clicked"); } - static onMenuAdd(node22, options4, e2, prev_menu, callback) { - const canvas = LGraphCanvas.active_canvas; - const ref_window = canvas.getCanvasWindow(); - const graph = canvas.graph; + static onMenuAdd(node22, options22, e2, prev_menu, callback) { + const canvas2 = LGraphCanvas.active_canvas; + const ref_window = canvas2.getCanvasWindow(); + const graph = canvas2.graph; if (!graph) return; function inner_onMenuAdded(base_category, prev_menu2) { - const categories = LiteGraph.getNodeTypesCategories(canvas.filter || graph.filter).filter(function(category) { + const categories = LiteGraph.getNodeTypesCategories(canvas2.filter || graph.filter).filter(function(category) { return category.startsWith(base_category); }); const entries = []; @@ -59299,32 +60451,32 @@ class LGraphCanvas { value: category_path, content: name2, has_submenu: true, - callback: /* @__PURE__ */ __name(function(value4, event, mouseEvent, contextMenu) { - inner_onMenuAdded(value4.value, contextMenu); + callback: /* @__PURE__ */ __name(function(value4, event, mouseEvent, contextMenu2) { + inner_onMenuAdded(value4.value, contextMenu2); }, "callback") }); } }); const nodes = LiteGraph.getNodeTypesInCategory( base_category.slice(0, -1), - canvas.filter || graph.filter + canvas2.filter || graph.filter ); - nodes.map(function(node3) { - if (node3.skip_list) return; + nodes.map(function(node222) { + if (node222.skip_list) return; const entry = { - value: node3.type, - content: node3.title, + value: node222.type, + content: node222.title, has_submenu: false, - callback: /* @__PURE__ */ __name(function(value4, event, mouseEvent, contextMenu) { - const first_event = contextMenu.getFirstEvent(); - canvas.graph.beforeChange(); - const node4 = LiteGraph.createNode(value4.value); - if (node4) { - node4.pos = canvas.convertEventToCanvasOffset(first_event); - canvas.graph.add(node4); + callback: /* @__PURE__ */ __name(function(value4, event, mouseEvent, contextMenu2) { + const first_event = contextMenu2.getFirstEvent(); + canvas2.graph.beforeChange(); + const node3 = LiteGraph.createNode(value4.value); + if (node3) { + node3.pos = canvas2.convertEventToCanvasOffset(first_event); + canvas2.graph.add(node3); } - callback?.(node4); - canvas.graph.afterChange(); + callback?.(node3); + canvas2.graph.afterChange(); }, "callback") }; entries.push(entry); @@ -59340,16 +60492,16 @@ class LGraphCanvas { static onMenuNodeEdit() { } /** @param options Parameter is never used */ - static showMenuNodeOptionalInputs(v2, options4, e2, prev_menu, node22) { + static showMenuNodeOptionalInputs(v2, options22, e2, prev_menu, node22) { if (!node22) return; const that = this; - const canvas = LGraphCanvas.active_canvas; - const ref_window = canvas.getCanvasWindow(); - options4 = node22.onGetInputs ? node22.onGetInputs() : node22.optional_inputs; + const canvas2 = LGraphCanvas.active_canvas; + const ref_window = canvas2.getCanvasWindow(); + options22 = node22.onGetInputs ? node22.onGetInputs() : node22.optional_inputs; let entries = []; - if (options4) { - for (let i2 = 0; i2 < options4.length; i2++) { - const entry = options4[i2]; + if (options22) { + for (let i2 = 0; i2 < options22.length; i2++) { + const entry = options22[i2]; if (!entry) { entries.push(null); continue; @@ -59384,30 +60536,30 @@ class LGraphCanvas { // @ts-expect-error Unused param ref_window ); - function inner_clicked(v3, e3, prev2) { + function inner_clicked(v22, e22, prev2) { if (!node22) return; - v3.callback?.call(that, node22, v3, e3, prev2); - if (!v3.value) return; + v22.callback?.call(that, node22, v22, e22, prev2); + if (!v22.value) return; node22.graph.beforeChange(); - node22.addInput(v3.value[0], v3.value[1], v3.value[2]); - node22.onNodeInputAdd?.(v3.value); - canvas.setDirty(true, true); + node22.addInput(v22.value[0], v22.value[1], v22.value[2]); + node22.onNodeInputAdd?.(v22.value); + canvas2.setDirty(true, true); node22.graph.afterChange(); } __name(inner_clicked, "inner_clicked"); return false; } /** @param options Parameter is never used */ - static showMenuNodeOptionalOutputs(v2, options4, e2, prev_menu, node22) { + static showMenuNodeOptionalOutputs(v2, options22, e2, prev_menu, node22) { if (!node22) return; const that = this; - const canvas = LGraphCanvas.active_canvas; - const ref_window = canvas.getCanvasWindow(); - options4 = node22.onGetOutputs ? node22.onGetOutputs() : node22.optional_outputs; + const canvas2 = LGraphCanvas.active_canvas; + const ref_window = canvas2.getCanvasWindow(); + options22 = node22.onGetOutputs ? node22.onGetOutputs() : node22.optional_outputs; let entries = []; - if (options4) { - for (let i2 = 0; i2 < options4.length; i2++) { - const entry = options4[i2]; + if (options22) { + for (let i2 = 0; i2 < options22.length; i2++) { + const entry = options22[i2]; if (!entry) { entries.push(null); continue; @@ -59448,18 +60600,18 @@ class LGraphCanvas { // @ts-expect-error Unused ref_window ); - function inner_clicked(v3, e3, prev2) { + function inner_clicked(v22, e22, prev2) { if (!node22) return; - if (v3.callback) v3.callback.call(that, node22, v3, e3, prev2); - if (!v3.value) return; - const value4 = v3.value[1]; + if (v22.callback) v22.callback.call(that, node22, v22, e22, prev2); + if (!v22.value) return; + const value4 = v22.value[1]; if (value4 && (typeof value4 === "object" || Array.isArray(value4))) { const entries2 = []; for (const i2 in value4) { entries2.push({ content: i2, value: value4[i2] }); } new LiteGraph.ContextMenu(entries2, { - event: e3, + event: e22, callback: inner_clicked, parentMenu: prev_menu, node: node22 @@ -59468,19 +60620,19 @@ class LGraphCanvas { } const graph = node22.graph; graph.beforeChange(); - node22.addOutput(v3.value[0], v3.value[1], v3.value[2]); - node22.onNodeOutputAdd?.(v3.value); - canvas.setDirty(true, true); + node22.addOutput(v22.value[0], v22.value[1], v22.value[2]); + node22.onNodeOutputAdd?.(v22.value); + canvas2.setDirty(true, true); graph.afterChange(); } __name(inner_clicked, "inner_clicked"); return false; } /** @param value Parameter is never used */ - static onShowMenuNodeProperties(value4, options4, e2, prev_menu, node22) { + static onShowMenuNodeProperties(value4, options22, e2, prev_menu, node22) { if (!node22 || !node22.properties) return; - const canvas = LGraphCanvas.active_canvas; - const ref_window = canvas.getCanvasWindow(); + const canvas2 = LGraphCanvas.active_canvas; + const ref_window = canvas2.getCanvasWindow(); const entries = []; for (const i2 in node22.properties) { value4 = node22.properties[i2] !== void 0 ? node22.properties[i2] : " "; @@ -59513,7 +60665,7 @@ class LGraphCanvas { function inner_clicked(v2) { if (!node22) return; const rect = this.getBoundingClientRect(); - canvas.showEditPropertyValue(node22, v2.value, { + canvas2.showEditPropertyValue(node22, v2.value, { position: [rect.left, rect.top] }); } @@ -59525,24 +60677,24 @@ class LGraphCanvas { e2.innerText = str; return e2.innerHTML; } - static onMenuResizeNode(value4, options4, e2, menu2, node22) { + static onMenuResizeNode(value4, options22, e2, menu2, node22) { if (!node22) return; - const fApplyMultiNode = /* @__PURE__ */ __name(function(node3) { - node3.size = node3.computeSize(); - node3.onResize?.(node3.size); + const fApplyMultiNode = /* @__PURE__ */ __name(function(node222) { + node222.size = node222.computeSize(); + node222.onResize?.(node222.size); }, "fApplyMultiNode"); - const canvas = LGraphCanvas.active_canvas; - if (!canvas.selected_nodes || Object.keys(canvas.selected_nodes).length <= 1) { + const canvas2 = LGraphCanvas.active_canvas; + if (!canvas2.selected_nodes || Object.keys(canvas2.selected_nodes).length <= 1) { fApplyMultiNode(node22); } else { - for (const i2 in canvas.selected_nodes) { - fApplyMultiNode(canvas.selected_nodes[i2]); + for (const i2 in canvas2.selected_nodes) { + fApplyMultiNode(canvas2.selected_nodes[i2]); } } - canvas.setDirty(true, true); + canvas2.setDirty(true, true); } // TODO refactor :: this is used fot title but not for properties! - static onShowPropertyEditor(item3, options4, e2, menu2, node22) { + static onShowPropertyEditor(item3, options22, e2, menu2, node22) { const property = item3.property || "title"; const value4 = node22[property]; const dialog = document.createElement("div"); @@ -59560,21 +60712,21 @@ class LGraphCanvas { input.addEventListener("blur", function() { this.focus(); }); - input.addEventListener("keydown", function(e3) { + input.addEventListener("keydown", function(e22) { dialog.is_modified = true; - if (e3.keyCode == 27) { + if (e22.keyCode == 27) { dialog.close(); - } else if (e3.keyCode == 13) { + } else if (e22.keyCode == 13) { inner(); - } else if (e3.keyCode != 13 && e3.target.localName != "textarea") { + } else if (e22.keyCode != 13 && e22.target.localName != "textarea") { return; } - e3.preventDefault(); - e3.stopPropagation(); + e22.preventDefault(); + e22.stopPropagation(); }); } - const canvas = LGraphCanvas.active_canvas; - const canvasEl = canvas.canvas; + const canvas2 = LGraphCanvas.active_canvas; + const canvasEl = canvas2.canvas; const rect = canvasEl.getBoundingClientRect(); let offsetx = -20; let offsety = -20; @@ -59620,7 +60772,7 @@ class LGraphCanvas { } node22[property] = value22; dialog.parentNode?.removeChild(dialog); - canvas.setDirty(true, true); + canvas2.setDirty(true, true); } __name(setValue2, "setValue"); } @@ -59639,12 +60791,12 @@ class LGraphCanvas { return String(value4) + " (" + desc_value + ")"; } } - static onMenuNodeCollapse(value4, options4, e2, menu2, node22) { + static onMenuNodeCollapse(value4, options22, e2, menu2, node22) { node22.graph.beforeChange( /* ? */ ); - const fApplyMultiNode = /* @__PURE__ */ __name(function(node3) { - node3.collapse(); + const fApplyMultiNode = /* @__PURE__ */ __name(function(node222) { + node222.collapse(); }, "fApplyMultiNode"); const graphcanvas = LGraphCanvas.active_canvas; if (!graphcanvas.selected_nodes || Object.keys(graphcanvas.selected_nodes).length <= 1) { @@ -59658,12 +60810,12 @@ class LGraphCanvas { /* ? */ ); } - static onMenuToggleAdvanced(value4, options4, e2, menu2, node22) { + static onMenuToggleAdvanced(value4, options22, e2, menu2, node22) { node22.graph.beforeChange( /* ? */ ); - const fApplyMultiNode = /* @__PURE__ */ __name(function(node3) { - node3.toggleAdvanced(); + const fApplyMultiNode = /* @__PURE__ */ __name(function(node222) { + node222.toggleAdvanced(); }, "fApplyMultiNode"); const graphcanvas = LGraphCanvas.active_canvas; if (!graphcanvas.selected_nodes || Object.keys(graphcanvas.selected_nodes).length <= 1) { @@ -59677,9 +60829,9 @@ class LGraphCanvas { /* ? */ ); } - static onMenuNodePin(value4, options4, e2, menu2, node22) { + static onMenuNodePin(value4, options22, e2, menu2, node22) { } - static onMenuNodeMode(value4, options4, e2, menu2, node22) { + static onMenuNodeMode(value4, options22, e2, menu2, node22) { new LiteGraph.ContextMenu( LiteGraph.NODE_MODES, { event: e2, callback: inner_clicked, parentMenu: menu2, node: node22 } @@ -59687,12 +60839,12 @@ class LGraphCanvas { function inner_clicked(v2) { if (!node22) return; const kV = Object.values(LiteGraph.NODE_MODES).indexOf(v2); - const fApplyMultiNode = /* @__PURE__ */ __name(function(node3) { + const fApplyMultiNode = /* @__PURE__ */ __name(function(node222) { if (kV >= 0 && LiteGraph.NODE_MODES[kV]) - node3.changeMode(kV); + node222.changeMode(kV); else { console.warn("unexpected mode: " + v2); - node3.changeMode(LGraphEventMode.ALWAYS); + node222.changeMode(LGraphEventMode.ALWAYS); } }, "fApplyMultiNode"); const graphcanvas = LGraphCanvas.active_canvas; @@ -59708,7 +60860,7 @@ class LGraphCanvas { return false; } /** @param value Parameter is never used */ - static onMenuNodeColors(value4, options4, e2, menu2, node22) { + static onMenuNodeColors(value4, options22, e2, menu2, node22) { if (!node22) throw "no node for color"; const values = []; values.push({ @@ -59732,33 +60884,33 @@ class LGraphCanvas { function inner_clicked(v2) { if (!node22) return; const color2 = v2.value ? LGraphCanvas.node_colors[v2.value] : null; - const fApplyColor = /* @__PURE__ */ __name(function(node3) { + const fApplyColor = /* @__PURE__ */ __name(function(node222) { if (color2) { - if (node3 instanceof LGraphGroup) { - node3.color = color2.groupcolor; + if (node222 instanceof LGraphGroup) { + node222.color = color2.groupcolor; } else { - node3.color = color2.color; - node3.bgcolor = color2.bgcolor; + node222.color = color2.color; + node222.bgcolor = color2.bgcolor; } } else { - delete node3.color; - delete node3.bgcolor; + delete node222.color; + delete node222.bgcolor; } }, "fApplyColor"); - const canvas = LGraphCanvas.active_canvas; - if (!canvas.selected_nodes || Object.keys(canvas.selected_nodes).length <= 1) { + const canvas2 = LGraphCanvas.active_canvas; + if (!canvas2.selected_nodes || Object.keys(canvas2.selected_nodes).length <= 1) { fApplyColor(node22); } else { - for (const i2 in canvas.selected_nodes) { - fApplyColor(canvas.selected_nodes[i2]); + for (const i2 in canvas2.selected_nodes) { + fApplyColor(canvas2.selected_nodes[i2]); } } - canvas.setDirty(true, true); + canvas2.setDirty(true, true); } __name(inner_clicked, "inner_clicked"); return false; } - static onMenuNodeShapes(value4, options4, e2, menu2, node22) { + static onMenuNodeShapes(value4, options22, e2, menu2, node22) { if (!node22) throw "no node passed"; new LiteGraph.ContextMenu(LiteGraph.VALID_SHAPES, { event: e2, @@ -59771,82 +60923,69 @@ class LGraphCanvas { node22.graph.beforeChange( /* ? */ ); - const fApplyMultiNode = /* @__PURE__ */ __name(function(node3) { - node3.shape = v2; + const fApplyMultiNode = /* @__PURE__ */ __name(function(node222) { + node222.shape = v2; }, "fApplyMultiNode"); - const canvas = LGraphCanvas.active_canvas; - if (!canvas.selected_nodes || Object.keys(canvas.selected_nodes).length <= 1) { + const canvas2 = LGraphCanvas.active_canvas; + if (!canvas2.selected_nodes || Object.keys(canvas2.selected_nodes).length <= 1) { fApplyMultiNode(node22); } else { - for (const i2 in canvas.selected_nodes) { - fApplyMultiNode(canvas.selected_nodes[i2]); + for (const i2 in canvas2.selected_nodes) { + fApplyMultiNode(canvas2.selected_nodes[i2]); } } node22.graph.afterChange( /* ? */ ); - canvas.setDirty(true); + canvas2.setDirty(true); } __name(inner_clicked, "inner_clicked"); return false; } - static onMenuNodeRemove(value4, options4, e2, menu2, node22) { + static onMenuNodeRemove(value4, options22, e2, menu2, node22) { if (!node22) throw "no node passed"; const graph = node22.graph; graph.beforeChange(); - const fApplyMultiNode = /* @__PURE__ */ __name(function(node3) { - if (node3.removable === false) return; - graph.remove(node3); + const fApplyMultiNode = /* @__PURE__ */ __name(function(node222) { + if (node222.removable === false) return; + graph.remove(node222); }, "fApplyMultiNode"); - const canvas = LGraphCanvas.active_canvas; - if (!canvas.selected_nodes || Object.keys(canvas.selected_nodes).length <= 1) { + const canvas2 = LGraphCanvas.active_canvas; + if (!canvas2.selected_nodes || Object.keys(canvas2.selected_nodes).length <= 1) { fApplyMultiNode(node22); } else { - for (const i2 in canvas.selected_nodes) { - fApplyMultiNode(canvas.selected_nodes[i2]); + for (const i2 in canvas2.selected_nodes) { + fApplyMultiNode(canvas2.selected_nodes[i2]); } } graph.afterChange(); - canvas.setDirty(true, true); + canvas2.setDirty(true, true); } - static onMenuNodeToSubgraph(value4, options4, e2, menu2, node22) { - const graph = node22.graph; - const canvas = LGraphCanvas.active_canvas; - if (!canvas) return; - let nodes_list = Object.values(canvas.selected_nodes || {}); - if (!nodes_list.length) nodes_list = [node22]; - const subgraph_node = LiteGraph.createNode("graph/subgraph"); - subgraph_node.pos = node22.pos.concat(); - graph.add(subgraph_node); - subgraph_node.buildFromNodes(nodes_list); - canvas.deselectAll(); - canvas.setDirty(true, true); - } - static onMenuNodeClone(value4, options4, e2, menu2, node22) { + static onMenuNodeClone(value4, options22, e2, menu2, node22) { const graph = node22.graph; graph.beforeChange(); const newSelected = /* @__PURE__ */ new Set(); - const fApplyMultiNode = /* @__PURE__ */ __name(function(node3, newNodes) { - if (node3.clonable === false) return; - const newnode = node3.clone(); + const fApplyMultiNode = /* @__PURE__ */ __name(function(node222, newNodes) { + if (node222.clonable === false) return; + const newnode = node222.clone(); if (!newnode) return; - newnode.pos = [node3.pos[0] + 5, node3.pos[1] + 5]; - node3.graph.add(newnode); + newnode.pos = [node222.pos[0] + 5, node222.pos[1] + 5]; + node222.graph.add(newnode); newNodes.add(newnode); }, "fApplyMultiNode"); - const canvas = LGraphCanvas.active_canvas; - if (!canvas.selected_nodes || Object.keys(canvas.selected_nodes).length <= 1) { + const canvas2 = LGraphCanvas.active_canvas; + if (!canvas2.selected_nodes || Object.keys(canvas2.selected_nodes).length <= 1) { fApplyMultiNode(node22, newSelected); } else { - for (const i2 in canvas.selected_nodes) { - fApplyMultiNode(canvas.selected_nodes[i2], newSelected); + for (const i2 in canvas2.selected_nodes) { + fApplyMultiNode(canvas2.selected_nodes[i2], newSelected); } } if (newSelected.size) { - canvas.selectNodes([...newSelected]); + canvas2.selectNodes([...newSelected]); } graph.afterChange(); - canvas.setDirty(true, true); + canvas2.setDirty(true, true); } /** * clears all the data inside @@ -59888,15 +61027,8 @@ class LGraphCanvas { return; } graph.attachCanvas(this); - this._graph_stack &&= null; this.setDirty(true, true); } - /** - * @returns the top level graph (in case there are subgraphs open on the canvas) - */ - getTopGraph() { - return this._graph_stack.length ? this._graph_stack[0] : this.graph; - } /** * @returns the visually active graph (in case there are more in the stack) */ @@ -59909,13 +61041,13 @@ class LGraphCanvas { * @returns The canvas element * @throws If {@link canvas} is an element ID that does not belong to a valid HTML canvas element */ - #validateCanvas(canvas) { - if (typeof canvas === "string") { - const el = document.getElementById(canvas); + #validateCanvas(canvas2) { + if (typeof canvas2 === "string") { + const el = document.getElementById(canvas2); if (!(el instanceof HTMLCanvasElement)) throw "Error validating LiteGraph canvas: Canvas element not found"; return el; } - return canvas; + return canvas2; } /** * Sets the current HTML canvas element. @@ -59923,8 +61055,8 @@ class LGraphCanvas { * @param canvas The canvas element to assign, or its HTML element ID. If null or undefined, the current reference is cleared. * @param skip_events If true, events on the previous canvas will not be removed. Has no effect on the first invocation. */ - setCanvas(canvas, skip_events) { - const element = this.#validateCanvas(canvas); + setCanvas(canvas2, skip_events) { + const element = this.#validateCanvas(canvas2); if (element === this.canvas) return; if (!element && this.canvas && !skip_events) this.unbindEvents(); this.canvas = element; @@ -59973,7 +61105,7 @@ class LGraphCanvas { console.warn("LGraphCanvas: events already binded"); return; } - const canvas = this.canvas; + const canvas2 = this.canvas; const ref_window = this.getCanvasWindow(); const document2 = ref_window.document; this._mousedown_callback = this.processMouseDown.bind(this); @@ -59982,26 +61114,26 @@ class LGraphCanvas { this._mouseup_callback = this.processMouseUp.bind(this); this._mouseout_callback = this.processMouseOut.bind(this); this._mousecancel_callback = this.processMouseCancel.bind(this); - LiteGraph.pointerListenerAdd(canvas, "down", this._mousedown_callback, true); - canvas.addEventListener("mousewheel", this._mousewheel_callback, false); - LiteGraph.pointerListenerAdd(canvas, "up", this._mouseup_callback, true); - LiteGraph.pointerListenerAdd(canvas, "move", this._mousemove_callback); - canvas.addEventListener("pointerout", this._mouseout_callback); - canvas.addEventListener("pointercancel", this._mousecancel_callback, true); - canvas.addEventListener("contextmenu", this._doNothing); - canvas.addEventListener( + LiteGraph.pointerListenerAdd(canvas2, "down", this._mousedown_callback, true); + canvas2.addEventListener("mousewheel", this._mousewheel_callback, false); + LiteGraph.pointerListenerAdd(canvas2, "up", this._mouseup_callback, true); + LiteGraph.pointerListenerAdd(canvas2, "move", this._mousemove_callback); + canvas2.addEventListener("pointerout", this._mouseout_callback); + canvas2.addEventListener("pointercancel", this._mousecancel_callback, true); + canvas2.addEventListener("contextmenu", this._doNothing); + canvas2.addEventListener( "DOMMouseScroll", this._mousewheel_callback, false ); this._key_callback = this.processKey.bind(this); - canvas.addEventListener("keydown", this._key_callback, true); + canvas2.addEventListener("keydown", this._key_callback, true); document2.addEventListener("keyup", this._key_callback, true); this._ondrop_callback = this.processDrop.bind(this); - canvas.addEventListener("dragover", this._doNothing, false); - canvas.addEventListener("dragend", this._doNothing, false); - canvas.addEventListener("drop", this._ondrop_callback, false); - canvas.addEventListener("dragenter", this._doReturnTrue, false); + canvas2.addEventListener("dragover", this._doNothing, false); + canvas2.addEventListener("dragend", this._doNothing, false); + canvas2.addEventListener("drop", this._ondrop_callback, false); + canvas2.addEventListener("dragenter", this._doReturnTrue, false); this._events_binded = true; } /** @@ -60128,17 +61260,17 @@ class LGraphCanvas { const graphPos = this.graph_mouse; const x2 = graphPos[0] - node22.pos[0]; const y2 = graphPos[1] - node22.pos[1]; - for (const widget2 of node22.widgets) { - if (widget2.hidden || widget2.advanced && !node22.showAdvanced) continue; + for (const widget of node22.widgets) { + if (widget.hidden || widget.advanced && !node22.showAdvanced) continue; let widgetWidth, widgetHeight; - if (widget2.computeSize) { - [widgetWidth, widgetHeight] = widget2.computeSize(node22.size[0]); + if (widget.computeSize) { + [widgetWidth, widgetHeight] = widget.computeSize(node22.size[0]); } else { - widgetWidth = widget2.width || node22.size[0]; + widgetWidth = widget.width || node22.size[0]; widgetHeight = LiteGraph.NODE_WIDGET_HEIGHT; } - if (widget2.last_y !== void 0 && x2 >= 6 && x2 <= widgetWidth - 12 && y2 >= widget2.last_y && y2 <= widget2.last_y + widgetHeight) { - return widget2; + if (widget.last_y !== void 0 && x2 >= 6 && x2 <= widgetWidth - 12 && y2 >= widget.last_y && y2 <= widget.last_y + widgetHeight) { + return widget; } } return null; @@ -60167,9 +61299,13 @@ class LGraphCanvas { } } processMouseDown(e2) { - const { graph, pointer: pointer2 } = this; + if (this.dragZoomEnabled && e2.ctrlKey && e2.shiftKey && !e2.altKey && e2.buttons) { + this.#dragZoomStart = { pos: [e2.x, e2.y], scale: this.ds.scale }; + return; + } + const { graph, pointer } = this; this.adjustMouseEvent(e2); - if (e2.isPrimary) pointer2.down(e2); + if (e2.isPrimary) pointer.down(e2); if (this.set_canvas_dirty_on_mouse_event) this.dirty_canvas = true; if (!graph) return; const ref_window = this.getCanvasWindow(); @@ -60185,16 +61321,16 @@ class LGraphCanvas { this.graph_mouse[0] = e2.canvasX; this.graph_mouse[1] = e2.canvasY; this.last_click_position = [this.mouse[0], this.mouse[1]]; - pointer2.isDouble = pointer2.isDown && e2.isPrimary; - pointer2.isDown = true; + pointer.isDouble = pointer.isDown && e2.isPrimary; + pointer.isDown = true; this.canvas.focus(); LiteGraph.closeAllContextMenus(ref_window); if (this.onMouse?.(e2) == true) return; - if (e2.button === 0 && !pointer2.isDouble) { + if (e2.button === 0 && !pointer.isDouble) { this.#processPrimaryButton(e2, node22); } else if (e2.button === 1) { this.#processMiddleButton(e2, node22); - } else if ((e2.button === 2 || pointer2.isDouble) && this.allow_interaction && !this.read_only) { + } else if ((e2.button === 2 || pointer.isDouble) && this.allow_interaction && !this.read_only) { if (node22) this.processSelect(node22, e2, true); this.processContextMenu(node22, e2); } @@ -60209,7 +61345,7 @@ class LGraphCanvas { this.onMouseDown?.(e2); } #processPrimaryButton(e2, node22) { - const { pointer: pointer2, graph } = this; + const { pointer, graph } = this; const x2 = e2.canvasX; const y2 = e2.canvasY; const ctrlOrMeta = e2.ctrlKey || e2.metaKey; @@ -60219,17 +61355,17 @@ class LGraphCanvas { dragRect[1] = y2; dragRect[2] = 1; dragRect[3] = 1; - pointer2.onClick = (eUp) => { + pointer.onClick = (eUp) => { const clickedItem = node22 ?? (this.reroutesEnabled ? graph.getRerouteOnPos(eUp.canvasX, eUp.canvasY) : null) ?? graph.getGroupTitlebarOnPos(eUp.canvasX, eUp.canvasY); this.processSelect(clickedItem, eUp); }; - pointer2.onDragStart = () => this.dragging_rectangle = dragRect; - pointer2.onDragEnd = (upEvent2) => this.#handleMultiSelect(upEvent2, dragRect); - pointer2.finally = () => this.dragging_rectangle = null; + pointer.onDragStart = () => this.dragging_rectangle = dragRect; + pointer.onDragEnd = (upEvent) => this.#handleMultiSelect(upEvent, dragRect); + pointer.finally = () => this.dragging_rectangle = null; return; } if (this.read_only) { - pointer2.finally = () => this.dragging_canvas = false; + pointer.finally = () => this.dragging_canvas = false; this.dragging_canvas = true; return; } @@ -60241,11 +61377,11 @@ class LGraphCanvas { cloned.pos[0] += 5; cloned.pos[1] += 5; if (this.allow_dragnodes) { - pointer2.onDragStart = (pointer3) => { + pointer.onDragStart = (pointer2) => { graph.add(cloned, false); - this.#startDraggingItems(cloned, pointer3); + this.#startDraggingItems(cloned, pointer2); }; - pointer2.onDragEnd = (e3) => this.#processDraggedItems(e3); + pointer.onDragEnd = (e22) => this.#processDraggedItems(e22); } else { graph.beforeChange(); graph.add(cloned, false); @@ -60272,13 +61408,13 @@ class LGraphCanvas { afterRerouteId: reroute.id }; this.connecting_links = [connecting]; - pointer2.onDragStart = () => connecting.output = outputNode.outputs[slot]; + pointer.onDragStart = () => connecting.output = outputNode.outputs[slot]; this.dirty_bgcanvas = true; } - pointer2.onClick = () => this.processSelect(reroute, e2); - if (!pointer2.onDragStart) { - pointer2.onDragStart = (pointer3) => this.#startDraggingItems(reroute, pointer3, true); - pointer2.onDragEnd = (e3) => this.#processDraggedItems(e3); + pointer.onClick = () => this.processSelect(reroute, e2); + if (!pointer.onDragStart) { + pointer.onDragStart = (pointer2) => this.#startDraggingItems(reroute, pointer2, true); + pointer.onDragEnd = (e22) => this.#processDraggedItems(e22); } return; } @@ -60301,19 +61437,19 @@ class LGraphCanvas { }; this.connecting_links = [connecting]; if (linkSegment.parentId) connecting.afterRerouteId = linkSegment.parentId; - pointer2.onDragStart = () => connecting.output = originNode.outputs[slot]; + pointer.onDragStart = () => connecting.output = originNode.outputs[slot]; return; } else if (this.reroutesEnabled && e2.altKey && !e2.shiftKey) { const newReroute = graph.createReroute([x2, y2], linkSegment); - pointer2.onDragStart = (pointer3) => this.#startDraggingItems(newReroute, pointer3); - pointer2.onDragEnd = (e3) => this.#processDraggedItems(e3); + pointer.onDragStart = (pointer2) => this.#startDraggingItems(newReroute, pointer2); + pointer.onDragEnd = (e22) => this.#processDraggedItems(e22); return; } } else if (isInRectangle(x2, y2, centre[0] - 4, centre[1] - 4, 8, 8)) { this.ctx.lineWidth = lineWidth; - pointer2.onClick = () => this.showLinkMenu(linkSegment, e2); - pointer2.onDragStart = () => this.dragging_canvas = true; - pointer2.finally = () => this.dragging_canvas = false; + pointer.onClick = () => this.showLinkMenu(linkSegment, e2); + pointer.onDragStart = () => this.dragging_canvas = true; + pointer.finally = () => this.dragging_canvas = false; this.over_link_center = null; return; } @@ -60326,18 +61462,18 @@ class LGraphCanvas { const b2 = group.boundingRect; const offsetX = x2 - (b2[0] + b2[2]); const offsetY = y2 - (b2[1] + b2[3]); - pointer2.onDragStart = () => this.resizingGroup = group; - pointer2.onDrag = (eMove) => { + pointer.onDragStart = () => this.resizingGroup = group; + pointer.onDrag = (eMove) => { if (this.read_only) return; - const pos2 = [ + const pos = [ eMove.canvasX - group.pos[0] - offsetX, eMove.canvasY - group.pos[1] - offsetY ]; - snapPoint(pos2, this.#snapToGrid); - const resized = group.resize(pos2[0], pos2[1]); + snapPoint(pos, this.#snapToGrid); + const resized = group.resize(pos[0], pos[1]); if (resized) this.dirty_bgcanvas = true; }; - pointer2.finally = () => this.resizingGroup = null; + pointer.finally = () => this.resizingGroup = null; } else { const f2 = group.font_size || LiteGraph.DEFAULT_GROUP_FONT_SIZE; const headerHeight = f2 * 1.4; @@ -60349,15 +61485,15 @@ class LGraphCanvas { group.size[0], headerHeight )) { - pointer2.onClick = () => this.processSelect(group, e2); - pointer2.onDragStart = (pointer3) => { + pointer.onClick = () => this.processSelect(group, e2); + pointer.onDragStart = (pointer2) => { group.recomputeInsideNodes(); - this.#startDraggingItems(group, pointer3, true); + this.#startDraggingItems(group, pointer2, true); }; - pointer2.onDragEnd = (e3) => this.#processDraggedItems(e3); + pointer.onDragEnd = (e22) => this.#processDraggedItems(e22); } } - pointer2.onDoubleClick = () => { + pointer.onDoubleClick = () => { this.emitEvent({ subType: "group-double-click", originalEvent: e2, @@ -60365,7 +61501,7 @@ class LGraphCanvas { }); }; } else { - pointer2.onDoubleClick = () => { + pointer.onDoubleClick = () => { if (this.allow_searchbox) { this.showSearchBox(e2); e2.preventDefault(); @@ -60377,9 +61513,9 @@ class LGraphCanvas { }; } } - if (!pointer2.onDragStart && !pointer2.onClick && !pointer2.onDrag && this.allow_dragcanvas) { - pointer2.onClick = () => this.processSelect(null, e2); - pointer2.finally = () => this.dragging_canvas = false; + if (!pointer.onDragStart && !pointer.onClick && !pointer.onDrag && this.allow_dragcanvas) { + pointer.onClick = () => this.processSelect(null, e2); + pointer.finally = () => this.dragging_canvas = false; this.dragging_canvas = true; } } @@ -60390,16 +61526,16 @@ class LGraphCanvas { * @param node The node to process a click event for */ #processNodeClick(e2, ctrlOrMeta, node22) { - const { pointer: pointer2, graph } = this; + const { pointer, graph } = this; const x2 = e2.canvasX; const y2 = e2.canvasY; - pointer2.onClick = () => this.processSelect(node22, e2); + pointer.onClick = () => this.processSelect(node22, e2); if (!node22.flags.pinned) { this.bringToFront(node22); } const inCollapse = node22.isPointInCollapse(x2, y2); if (inCollapse) { - pointer2.onClick = () => { + pointer.onClick = () => { node22.collapse(); this.setDirty(true, true); }; @@ -60408,28 +61544,28 @@ class LGraphCanvas { const b2 = node22.boundingRect; const offsetX = x2 - (b2[0] + b2[2]); const offsetY = y2 - (b2[1] + b2[3]); - pointer2.onDragStart = () => { + pointer.onDragStart = () => { graph.beforeChange(); this.resizing_node = node22; }; - pointer2.onDrag = (eMove) => { + pointer.onDrag = (eMove) => { if (this.read_only) return; - const pos3 = [ + const pos2 = [ eMove.canvasX - node22.pos[0] - offsetX, eMove.canvasY - node22.pos[1] - offsetY ]; - snapPoint(pos3, this.#snapToGrid); + snapPoint(pos2, this.#snapToGrid); const min = node22.computeSize(); - pos3[0] = Math.max(min[0], pos3[0]); - pos3[1] = Math.max(min[1], pos3[1]); - node22.setSize(pos3); + pos2[0] = Math.max(min[0], pos2[0]); + pos2[1] = Math.max(min[1], pos2[1]); + node22.setSize(pos2); this.#dirty(); }; - pointer2.onDragEnd = (upEvent2) => { + pointer.onDragEnd = (upEvent) => { this.#dirty(); graph.afterChange(this.resizing_node); }; - pointer2.finally = () => this.resizing_node = null; + pointer.finally = () => this.resizing_node = null; this.canvas.style.cursor = "se-resize"; return; } @@ -60445,14 +61581,14 @@ class LGraphCanvas { const slot = link2.target_slot; const linked_node = graph._nodes_by_id[link2.target_id]; const input = linked_node.inputs[slot]; - const pos3 = linked_node.getConnectionPos(true, slot); + const pos2 = linked_node.getConnectionPos(true, slot); this.connecting_links.push({ node: linked_node, slot, input, output: null, - pos: pos3, - direction: node22.horizontal !== true ? LinkDirection.RIGHT : LinkDirection.CENTER + pos: pos2, + direction: LinkDirection.RIGHT }); } return; @@ -60476,8 +61612,8 @@ class LGraphCanvas { node22.disconnectOutput(i2); } } - pointer2.onDoubleClick = () => node22.onOutputDblClick?.(i2, e2); - pointer2.onClick = () => node22.onOutputClick?.(i2, e2); + pointer.onDoubleClick = () => node22.onOutputDblClick?.(i2, e2); + pointer.onClick = () => node22.onOutputClick?.(i2, e2); return; } } @@ -60487,8 +61623,8 @@ class LGraphCanvas { const input = node22.inputs[i2]; const link_pos = node22.getConnectionPos(true, i2); if (isInRectangle(x2, y2, link_pos[0] - 15, link_pos[1] - 10, 30, 20)) { - pointer2.onDoubleClick = () => node22.onInputDblClick?.(i2, e2); - pointer2.onClick = () => node22.onInputClick?.(i2, e2); + pointer.onDoubleClick = () => node22.onInputDblClick?.(i2, e2); + pointer.onClick = () => node22.onInputClick?.(i2, e2); if (input.link !== null) { const link_info = graph._links.get(input.link); const slot = link_info.origin_slot; @@ -60503,7 +61639,7 @@ class LGraphCanvas { pos: linked_node.getConnectionPos(false, slot) }; this.connecting_links = [connecting]; - pointer2.onDragStart = () => { + pointer.onDragStart = () => { if (this.allow_reconnect_links && !LiteGraph.click_do_break_link_to) node22.disconnectInput(i2); connecting.output = linked_node.outputs[slot]; @@ -60511,7 +61647,7 @@ class LGraphCanvas { this.dirty_bgcanvas = true; } } - if (!pointer2.onDragStart) { + if (!pointer.onDragStart) { const connecting = { node: node22, slot: i2, @@ -60519,7 +61655,7 @@ class LGraphCanvas { pos: link_pos }; this.connecting_links = [connecting]; - pointer2.onDragStart = () => connecting.input = input; + pointer.onDragStart = () => connecting.input = input; this.dirty_bgcanvas = true; } return; @@ -60527,17 +61663,17 @@ class LGraphCanvas { } } } - const pos2 = [x2 - node22.pos[0], y2 - node22.pos[1]]; - const widget2 = node22.getWidgetOnPos(x2, y2); - if (widget2) { - this.#processWidgetClick(e2, node22, widget2); - this.node_widget = [node22, widget2]; + const pos = [x2 - node22.pos[0], y2 - node22.pos[1]]; + const widget = node22.getWidgetOnPos(x2, y2); + if (widget) { + this.#processWidgetClick(e2, node22, widget); + this.node_widget = [node22, widget]; } else { - pointer2.onDoubleClick = () => { - if (pos2[1] < 0 && !inCollapse) { - node22.onNodeTitleDblClick?.(e2, pos2, this); + pointer.onDoubleClick = () => { + if (pos[1] < 0 && !inCollapse) { + node22.onNodeTitleDblClick?.(e2, pos, this); } - node22.onDblClick?.(e2, pos2, this); + node22.onDblClick?.(e2, pos, this); this.emitEvent({ subType: "node-double-click", originalEvent: e2, @@ -60545,167 +61681,54 @@ class LGraphCanvas { }); this.processNodeDblClicked(node22); }; - if (node22.onMouseDown?.(e2, pos2, this) || !this.allow_dragnodes) + if (node22.onMouseDown?.(e2, pos, this) || !this.allow_dragnodes) return; - pointer2.onDragStart = (pointer3) => this.#startDraggingItems(node22, pointer3, true); - pointer2.onDragEnd = (e3) => this.#processDraggedItems(e3); + pointer.onDragStart = (pointer2) => this.#startDraggingItems(node22, pointer2, true); + pointer.onDragEnd = (e22) => this.#processDraggedItems(e22); } this.dirty_canvas = true; } - #processWidgetClick(e, node, widget) { + #processWidgetClick(e2, node22, widget) { const { pointer } = this; if (typeof widget.onPointerDown === "function") { - const handled = widget.onPointerDown(pointer, node, this); + const handled = widget.onPointerDown(pointer, node22, this); if (handled) return; } - const width = widget.width || node.width; const oldValue = widget.value; const pos = this.graph_mouse; - const x = pos[0] - node.pos[0]; - const y = pos[1] - node.pos[1]; - switch (widget.type) { - case "button": - pointer.onClick = () => { - widget.callback?.(widget, this, node, pos, e); - widget.clicked = true; - this.dirty_canvas = true; - }; - break; - case "slider": { - if (widget.options.read_only) break; - pointer.onDrag = (eMove) => { - const x2 = eMove.canvasX - node.pos[0]; - const slideFactor = clamp$1((x2 - 15) / (width - 30), 0, 1); - widget.value = widget.options.min + (widget.options.max - widget.options.min) * slideFactor; - if (oldValue != widget.value) { - setWidgetValue(this, node, widget, widget.value); - } - this.dirty_canvas = true; - }; - break; + const x2 = pos[0] - node22.pos[0]; + const y2 = pos[1] - node22.pos[1]; + const WidgetClass = WIDGET_TYPE_MAP[widget.type]; + if (WidgetClass) { + const widgetInstance = toClass(WidgetClass, widget); + pointer.onClick = () => widgetInstance.onClick({ + e: e2, + node: node22, + canvas: this + }); + pointer.onDrag = (eMove) => widgetInstance.onDrag({ + e: eMove, + node: node22, + canvas: this + }); + } else { + if (widget.mouse) { + const result = widget.mouse(e2, [x2, y2], node22); + if (result != null) this.dirty_canvas = result; } - case "number": { - const delta = x < 40 ? -1 : x > width - 40 ? 1 : 0; - pointer.onClick = (upEvent) => { - let newValue = widget.value + delta * 0.1 * (widget.options.step || 1); - if (widget.options.min != null && newValue < widget.options.min) { - newValue = widget.options.min; - } - if (widget.options.max != null && newValue > widget.options.max) { - newValue = widget.options.max; - } - if (newValue !== widget.value) setWidgetValue(this, node, widget, newValue); - if (delta !== 0) return; - this.prompt("Value", widget.value, (v) => { - if (/^[0-9+\-*/()\s]+|\d+\.\d+$/.test(v)) { - try { - v = eval(v); - } catch { - } - } - widget.value = Number(v); - setWidgetValue(this, node, widget, widget.value); - }, e); - this.dirty_canvas = true; - }; - pointer.onDrag = (eMove) => { - const x2 = eMove.canvasX - node.pos[0]; - if (delta && (x2 > -3 && x2 < width + 3)) return; - let newValue2 = widget.value; - if (eMove.deltaX) newValue2 += eMove.deltaX * 0.1 * (widget.options.step || 1); - if (widget.options.min != null && newValue2 < widget.options.min) { - newValue2 = widget.options.min; - } - if (widget.options.max != null && newValue2 > widget.options.max) { - newValue2 = widget.options.max; - } - if (newValue2 !== widget.value) setWidgetValue(this, node, widget, newValue2); - }; - break; - } - case "combo": { - let values; - let values_list; - pointer.onClick = (upEvent2) => { - const delta2 = x < 40 ? -1 : x > width - 40 ? 1 : 0; - values = widget.options.values; - if (typeof values === "function") { - values = values(widget, node); - } - values_list = null; - values_list = Array.isArray(values) ? values : Object.keys(values); - if (delta2) { - let index2 = -1; - this.last_mouseclick = 0; - index2 = typeof values === "object" ? values_list.indexOf(String(widget.value)) + delta2 : values_list.indexOf(widget.value) + delta2; - if (index2 >= values_list.length) index2 = values_list.length - 1; - if (index2 < 0) index2 = 0; - widget.value = Array.isArray(values) ? values[index2] : index2; - if (oldValue != widget.value) setWidgetValue(this, node, widget, widget.value); - this.dirty_canvas = true; - return; - } - const text_values = values != values_list ? Object.values(values) : values; - new LiteGraph.ContextMenu(text_values, { - scale: Math.max(1, this.ds.scale), - event: e, - className: "dark", - callback: /* @__PURE__ */ __name((value4) => { - widget.value = values != values_list ? text_values.indexOf(value4) : value4; - setWidgetValue(this, node, widget, widget.value); - this.dirty_canvas = true; - return false; - }, "callback") - }); - }; - break; - } - case "toggle": - pointer.onClick = () => { - widget.value = !widget.value; - setWidgetValue(this, node, widget, widget.value); - }; - break; - case "string": - case "text": - pointer.onClick = () => this.prompt( - "Value", - widget.value, - (v2) => setWidgetValue(this, node, widget, v2), - e, - widget.options ? widget.options.multiline : false - ); - break; - default: - if (widget.mouse) { - const result = widget.mouse(e, [x, y], node); - if (result != null) this.dirty_canvas = result; - } - break; } if (oldValue != widget.value) { - node.onWidgetChanged?.(widget.name, widget.value, oldValue, widget); - node.graph._version++; + node22.onWidgetChanged?.(widget.name, widget.value, oldValue, widget); + node22.graph._version++; } pointer.finally = () => { if (widget.mouse) { const { eUp } = pointer; const { canvasX, canvasY } = eUp; - widget.mouse(eUp, [canvasX - node.pos[0], canvasY - node.pos[1]], node); + widget.mouse(eUp, [canvasX - node22.pos[0], canvasY - node22.pos[1]], node22); } this.node_widget = null; }; - function setWidgetValue(canvas, node22, widget2, value4) { - const v2 = widget2.type === "number" ? Number(value4) : value4; - widget2.value = v2; - if (widget2.options?.property && node22.properties[widget2.options.property] !== void 0) { - node22.setProperty(widget2.options.property, v2); - } - widget2.callback?.(widget2.value, canvas, node22, pos, e); - node22.onWidgetChanged?.(widget2.name, v2, oldValue, widget2); - node22.graph._version++; - } - __name(setWidgetValue, "setWidgetValue"); } /** * Pointer middle button click processing. Part of {@link processMouseDown}. @@ -60713,7 +61736,7 @@ class LGraphCanvas { * @param node The node to process a click event for */ #processMiddleButton(e2, node22) { - const { pointer: pointer2 } = this; + const { pointer } = this; if (LiteGraph.middle_click_slot_add_default_node && node22 && this.allow_interaction && !this.read_only && !this.connecting_links && !node22.flags.collapsed) { let mClikSlot = false; let mClikSlot_index = false; @@ -60749,7 +61772,7 @@ class LGraphCanvas { !mClikSlot_isOut ? node_bounding[0] : node_bounding[0] + node_bounding[2], e2.canvasY - 80 ]; - pointer2.onClick = () => this.createDefaultNodeForSlot({ + pointer.onClick = () => this.createDefaultNodeForSlot({ nodeFrom: !mClikSlot_isOut ? null : node22, slotFrom: !mClikSlot_isOut ? null : mClikSlot_index, nodeTo: !mClikSlot_isOut ? node22 : null, @@ -60762,14 +61785,29 @@ class LGraphCanvas { } } if (this.allow_dragcanvas) { - pointer2.onDragStart = () => this.dragging_canvas = true; - pointer2.finally = () => this.dragging_canvas = false; + pointer.onDragStart = () => this.dragging_canvas = true; + pointer.finally = () => this.dragging_canvas = false; } } + #processDragZoom(e2) { + if (!e2.buttons) { + this.#dragZoomStart = null; + return; + } + const deltaY = e2.y - this.#dragZoomStart.pos[1]; + const startScale = this.#dragZoomStart.scale; + const scale = startScale - deltaY / 100; + this.ds.changeScale(scale, this.#dragZoomStart.pos); + this.graph.change(); + } /** * Called when a mouse move event has to be processed */ processMouseMove(e2) { + if (this.dragZoomEnabled && e2.ctrlKey && e2.shiftKey && this.#dragZoomStart) { + this.#processDragZoom(e2); + return; + } if (this.autoresize) this.resize(); if (this.set_canvas_dirty_on_mouse_event) this.dirty_canvas = true; if (!this.graph) return; @@ -60792,11 +61830,11 @@ class LGraphCanvas { } e2.dragging = this.last_mouse_dragging; if (this.node_widget) { - const [node3, widget2] = this.node_widget; - if (widget2?.mouse) { - const x2 = e2.canvasX - node3.pos[0]; - const y2 = e2.canvasY - node3.pos[1]; - const result = widget2.mouse(e2, [x2, y2], node3); + const [node222, widget] = this.node_widget; + if (widget?.mouse) { + const x2 = e2.canvasX - node222.pos[0]; + const y2 = e2.canvasY - node222.pos[1]; + const result = widget.mouse(e2, [x2, y2], node222); if (result != null) this.dirty_canvas = result; } } @@ -60824,9 +61862,9 @@ class LGraphCanvas { if (node22) { underPointer |= CanvasItem.Node; if (node22.redraw_on_mouse) this.dirty_canvas = true; - const pos2 = [0, 0]; - const inputId = this.isOverNodeInput(node22, e2.canvasX, e2.canvasY, pos2); - const outputId = this.isOverNodeOutput(node22, e2.canvasX, e2.canvasY, pos2); + const pos = [0, 0]; + const inputId = this.isOverNodeInput(node22, e2.canvasX, e2.canvasY, pos); + const outputId = this.isOverNodeOutput(node22, e2.canvasX, e2.canvasY, pos); const overWidget = this.getWidgetAtCursor(node22); if (!node22.mouseOver) { node22.mouseOver = { @@ -60863,14 +61901,14 @@ class LGraphCanvas { if (!linkOverWidget) { const targetSlotId = firstLink.node.findConnectByTypeSlot(true, node22, firstLink.output.type); if (targetSlotId !== null && targetSlotId >= 0) { - node22.getConnectionPos(true, targetSlotId, pos2); - highlightPos = pos2; + node22.getConnectionPos(true, targetSlotId, pos); + highlightPos = pos; highlightInput = node22.inputs[targetSlotId]; } } } else if (inputId != -1 && node22.inputs[inputId] && LiteGraph.isValidConnection(firstLink.output.type, node22.inputs[inputId].type)) { if (inputId != -1 && node22.inputs[inputId] && LiteGraph.isValidConnection(firstLink.output.type, node22.inputs[inputId].type)) { - highlightPos = pos2; + highlightPos = pos; highlightInput = node22.inputs[inputId]; } } @@ -60878,12 +61916,12 @@ class LGraphCanvas { if (inputId === -1 && outputId === -1) { const targetSlotId = firstLink.node.findConnectByTypeSlot(false, node22, firstLink.input.type); if (targetSlotId !== null && targetSlotId >= 0) { - node22.getConnectionPos(false, targetSlotId, pos2); - highlightPos = pos2; + node22.getConnectionPos(false, targetSlotId, pos); + highlightPos = pos; } } else { if (outputId != -1 && node22.outputs[outputId] && LiteGraph.isValidConnection(firstLink.input.type, node22.outputs[outputId].type)) { - highlightPos = pos2; + highlightPos = pos; } } } @@ -60944,15 +61982,15 @@ class LGraphCanvas { * @param pointer The pointer event that initiated the drag, e.g. pointerdown * @param sticky If `true`, the item is added to the selection - see {@link processSelect} */ - #startDraggingItems(item3, pointer2, sticky = false) { + #startDraggingItems(item3, pointer, sticky = false) { this.emitBeforeChange(); this.graph.beforeChange(); - pointer2.finally = () => { + pointer.finally = () => { this.isDragging = false; this.graph.afterChange(); this.emitAfterChange(); }; - this.processSelect(item3, pointer2.eDown, sticky); + this.processSelect(item3, pointer.eDown, sticky); this.isDragging = true; } /** @@ -60972,16 +62010,16 @@ class LGraphCanvas { */ processMouseUp(e2) { if (e2.isPrimary === false) return; - const { graph, pointer: pointer2 } = this; + const { graph, pointer } = this; if (!graph) return; LGraphCanvas.active_canvas = this; this.adjustMouseEvent(e2); const now2 = LiteGraph.getTime(); e2.click_time = now2 - this.last_mouseclick; - const isClick = pointer2.up(e2); + const isClick = pointer.up(e2); if (isClick === true) { - pointer2.isDown = false; - pointer2.isDouble = false; + pointer.isDown = false; + pointer.isDouble = false; this.connecting_links = null; this.dragging_canvas = false; graph.change(); @@ -61081,8 +62119,8 @@ class LGraphCanvas { } else if (e2.button === 2) { this.dirty_canvas = true; } - pointer2.isDown = false; - pointer2.isDouble = false; + pointer.isDown = false; + pointer.isDouble = false; graph.change(); e2.stopPropagation(); e2.preventDefault(); @@ -61107,8 +62145,8 @@ class LGraphCanvas { if (!this.graph || !this.allow_dragcanvas) return; const delta2 = e2.wheelDeltaY ?? e2.detail * -60; this.adjustMouseEvent(e2); - const pos2 = [e2.clientX, e2.clientY]; - if (this.viewport && !isPointInRect(pos2, this.viewport)) return; + const pos = [e2.clientX, e2.clientY]; + if (this.viewport && !isPointInRect(pos, this.viewport)) return; let scale = this.ds.scale; if (delta2 > 0) scale *= this.zoom_speed; else if (delta2 < 0) scale *= 1 / this.zoom_speed; @@ -61126,26 +62164,15 @@ class LGraphCanvas { const input = node22.inputs[i2]; const link_pos = node22.getConnectionPos(true, i2); let is_inside = false; - if (node22.horizontal) { - is_inside = isInRectangle( - canvasx, - canvasy, - link_pos[0] - 5, - link_pos[1] - 10, - 10, - 20 - ); - } else { - const width2 = 20 + ((input.label?.length ?? input.localized_name?.length ?? input.name?.length) || 3) * 7; - is_inside = isInRectangle( - canvasx, - canvasy, - link_pos[0] - 10, - link_pos[1] - 10, - width2, - 20 - ); - } + const width2 = 20 + ((input.label?.length ?? input.localized_name?.length ?? input.name?.length) || 3) * 7; + is_inside = isInRectangle( + canvasx, + canvasy, + link_pos[0] - 10, + link_pos[1] - 10, + width2, + 20 + ); if (is_inside) { if (slot_pos) { slot_pos[0] = link_pos[0]; @@ -61164,26 +62191,14 @@ class LGraphCanvas { if (node22.outputs) { for (let i2 = 0, l2 = node22.outputs.length; i2 < l2; ++i2) { const link_pos = node22.getConnectionPos(false, i2); - let is_inside = false; - if (node22.horizontal) { - is_inside = isInRectangle( - canvasx, - canvasy, - link_pos[0] - 5, - link_pos[1] - 10, - 10, - 20 - ); - } else { - is_inside = isInRectangle( - canvasx, - canvasy, - link_pos[0] - 10, - link_pos[1] - 10, - 40, - 20 - ); - } + const is_inside = isInRectangle( + canvasx, + canvasy, + link_pos[0] - 10, + link_pos[1] - 10, + 40, + 20 + ); if (is_inside) { if (slot_pos) { slot_pos[0] = link_pos[0]; @@ -61224,7 +62239,7 @@ class LGraphCanvas { block_default = true; } } else if (e2.keyCode === 86 && (e2.metaKey || e2.ctrlKey)) { - this.pasteFromClipboard(e2.shiftKey); + this.pasteFromClipboard({ connectInputs: e2.shiftKey }); } else if (e2.keyCode == 46 || e2.keyCode == 8) { if (e2.target.localName != "input" && e2.target.localName != "textarea") { this.deleteSelected(); @@ -61312,7 +62327,11 @@ class LGraphCanvas { * Pastes the items from the canvas "clipbaord" - a local storage variable. * @param connectInputs If `true`, always attempt to connect inputs of pasted nodes - including to nodes that were not pasted. */ - _pasteFromClipboard(connectInputs = false) { + _pasteFromClipboard(options22 = {}) { + const { + connectInputs = false, + position: position3 = this.graph_mouse + } = options22; if (!LiteGraph.ctrl_shift_v_paste_connect_unselected_outputs && connectInputs) return; const data26 = localStorage.getItem("litegrapheditor_clipboard"); if (!data26) return; @@ -61395,17 +62414,17 @@ class LGraphCanvas { if (!reroute.validateLinks(graph.links)) graph.removeReroute(reroute.id); } for (const item3 of created4) { - item3.pos[0] += this.graph_mouse[0] - offsetX; - item3.pos[1] += this.graph_mouse[1] - offsetY; + item3.pos[0] += position3[0] - offsetX; + item3.pos[1] += position3[1] - offsetY; } this.selectItems(created4); graph.afterChange(); return results; } - pasteFromClipboard(isConnectUnselected = false) { + pasteFromClipboard(options22 = {}) { this.emitBeforeChange(); try { - this._pasteFromClipboard(isConnectUnselected); + this._pasteFromClipboard(options22); } finally { this.emitAfterChange(); } @@ -61420,8 +62439,8 @@ class LGraphCanvas { const y2 = e2.clientY; const is_inside = !this.viewport || isInRect(x2, y2, this.viewport); if (!is_inside) return; - const pos2 = [e2.canvasX, e2.canvasY]; - const node22 = this.graph ? this.graph.getNodeOnPos(pos2[0], pos2[1]) : null; + const pos = [e2.canvasX, e2.canvasY]; + const node22 = this.graph ? this.graph.getNodeOnPos(pos[0], pos[1]) : null; if (!node22) { const r2 = this.onDropItem?.(e2); if (!r2) this.checkDropItem(e2); @@ -61731,14 +62750,14 @@ class LGraphCanvas { /** * converts a coordinate from graph coordinates to canvas2D coordinates */ - convertOffsetToCanvas(pos2, out) { - return this.ds.convertOffsetToCanvas(pos2, out); + convertOffsetToCanvas(pos, out) { + return this.ds.convertOffsetToCanvas(pos, out); } /** * converts a coordinate from Canvas2D coordinates to graph space */ - convertCanvasToOffset(pos2, out) { - return this.ds.convertCanvasToOffset(pos2, out); + convertCanvasToOffset(pos, out) { + return this.ds.convertCanvasToOffset(pos, out); } // converts event coordinates from canvas2D to graph coordinates convertEventToCanvasOffset(e2) { @@ -61811,7 +62830,7 @@ class LGraphCanvas { } const ctx = this.ctx; if (!ctx) return; - const canvas = this.canvas; + const canvas2 = this.canvas; if (ctx.start2D && !this.viewport) { ctx.start2D(); ctx.restore(); @@ -61827,7 +62846,7 @@ class LGraphCanvas { this.#snapToGrid = this.#shiftDown || LiteGraph.alwaysSnapToGrid ? this.graph.getSnapToGridSize() : void 0; if (this.clear_background) { if (area) ctx.clearRect(area[0], area[1], area[2], area[3]); - else ctx.clearRect(0, 0, canvas.width, canvas.height); + else ctx.clearRect(0, 0, canvas2.width, canvas2.height); } if (this.bgcanvas == this.canvas) { this.drawBackCanvas(); @@ -61841,7 +62860,7 @@ class LGraphCanvas { this.bgcanvas.height / scale ); } - this.onRender?.(canvas, ctx); + this.onRender?.(canvas2, ctx); if (this.show_info) { this.renderInfo(ctx, area ? area[0] : 0, area ? area[1] : 0); } @@ -61874,9 +62893,9 @@ class LGraphCanvas { let connDir = connInOrOut?.dir; if (connDir == null) { if (link2.output) - connDir = link2.node.horizontal ? LinkDirection.DOWN : LinkDirection.RIGHT; + connDir = LinkDirection.RIGHT; else - connDir = link2.node.horizontal ? LinkDirection.UP : LinkDirection.LEFT; + connDir = LinkDirection.LEFT; } const connShape = connInOrOut?.shape; switch (connType) { @@ -61886,11 +62905,11 @@ class LGraphCanvas { default: link_color = LiteGraph.CONNECTING_LINK_COLOR; } - const pos2 = this.graph.reroutes.get(link2.afterRerouteId)?.pos ?? link2.pos; + const pos = this.graph.reroutes.get(link2.afterRerouteId)?.pos ?? link2.pos; const highlightPos = this.#getHighlightPosition(); this.renderLink( ctx, - pos2, + pos, highlightPos, null, false, @@ -61901,7 +62920,7 @@ class LGraphCanvas { ); ctx.beginPath(); if (connType === LiteGraph.EVENT || connShape === RenderShape.BOX) { - ctx.rect(pos2[0] - 6 + 0.5, pos2[1] - 5 + 0.5, 14, 10); + ctx.rect(pos[0] - 6 + 0.5, pos[1] - 5 + 0.5, 14, 10); ctx.fill(); ctx.beginPath(); ctx.rect( @@ -61911,12 +62930,12 @@ class LGraphCanvas { 10 ); } else if (connShape === RenderShape.ARROW) { - ctx.moveTo(pos2[0] + 8, pos2[1] + 0.5); - ctx.lineTo(pos2[0] - 4, pos2[1] + 6 + 0.5); - ctx.lineTo(pos2[0] - 4, pos2[1] - 6 + 0.5); + ctx.moveTo(pos[0] + 8, pos[1] + 0.5); + ctx.lineTo(pos[0] - 4, pos[1] + 6 + 0.5); + ctx.lineTo(pos[0] - 4, pos[1] - 6 + 0.5); ctx.closePath(); } else { - ctx.arc(pos2[0], pos2[1], 4, 0, Math.PI * 2); + ctx.arc(pos[0], pos[1], 4, 0, Math.PI * 2); ctx.fill(); ctx.beginPath(); ctx.arc(this.graph_mouse[0], this.graph_mouse[1], 4, 0, Math.PI * 2); @@ -61991,7 +63010,7 @@ class LGraphCanvas { const { strokeStyle, lineWidth } = ctx; const area = node22.boundingRect; const gap = 3; - const radius = this.round_radius + gap; + const radius = LiteGraph.ROUND_RADIUS + gap; const x2 = area[0] - gap; const y2 = area[1] - gap; const width2 = area[2] + gap * 2; @@ -62046,10 +63065,10 @@ class LGraphCanvas { * draws the back canvas (the one containing the background and the connections) */ drawBackCanvas() { - const canvas = this.bgcanvas; - if (canvas.width != this.canvas.width || canvas.height != this.canvas.height) { - canvas.width = this.canvas.width; - canvas.height = this.canvas.height; + const canvas2 = this.bgcanvas; + if (canvas2.width != this.canvas.width || canvas2.height != this.canvas.height) { + canvas2.width = this.canvas.width; + canvas2.height = this.canvas.height; } if (!this.bgctx) { this.bgctx = this.bgcanvas.getContext("2d"); @@ -62060,24 +63079,7 @@ class LGraphCanvas { if (this.clear_background) { ctx.clearRect(viewport[0], viewport[1], viewport[2], viewport[3]); } - if (this._graph_stack?.length) { - ctx.save(); - const subgraph_node = this.graph._subgraph_node; - ctx.strokeStyle = subgraph_node.bgcolor; - ctx.lineWidth = 10; - ctx.strokeRect(1, 1, canvas.width - 2, canvas.height - 2); - ctx.lineWidth = 1; - ctx.font = "40px Arial"; - ctx.textAlign = "center"; - ctx.fillStyle = subgraph_node.bgcolor || "#AAA"; - let title = ""; - for (let i2 = 1; i2 < this._graph_stack.length; ++i2) { - title += this._graph_stack[i2]._subgraph_node.getTitle() + " >> "; - } - ctx.fillText(title + subgraph_node.getTitle(), canvas.width * 0.5, 40); - ctx.restore(); - } - const bg_already_painted = this.onRenderBackground ? this.onRenderBackground(canvas, ctx) : false; + const bg_already_painted = this.onRenderBackground ? this.onRenderBackground(canvas2, ctx) : false; if (!this.viewport) { const scale = window.devicePixelRatio; ctx.restore(); @@ -62132,12 +63134,12 @@ class LGraphCanvas { ctx.imageSmoothingEnabled = true; } if (this.graph._groups.length) { - this.drawGroups(canvas, ctx); + this.drawGroups(canvas2, ctx); } this.onDrawBackground?.(ctx, this.visible_area); if (this.render_canvas_border) { ctx.strokeStyle = "#235"; - ctx.strokeRect(0, 0, canvas.width, canvas.height); + ctx.strokeRect(0, 0, canvas2.width, canvas2.height); } if (this.render_connections_shadows) { ctx.shadowColor = "#000"; @@ -62160,9 +63162,9 @@ class LGraphCanvas { */ drawNode(node22, ctx) { this.current_node = node22; - const color2 = node22.color || node22.constructor.color || LiteGraph.NODE_DEFAULT_COLOR; - const bgcolor = node22.bgcolor || node22.constructor.bgcolor || LiteGraph.NODE_DEFAULT_BGCOLOR; - const low_quality = this.ds.scale < 0.6; + const color2 = node22.renderingColor; + const bgcolor = node22.renderingBgColor; + const low_quality = this.low_quality; const editor_alpha = this.editor_alpha; ctx.globalAlpha = editor_alpha; if (this.render_shadows && !low_quality) { @@ -62178,7 +63180,6 @@ class LGraphCanvas { const shape = node22._shape || RenderShape.BOX; const size = LGraphCanvas.#temp_vec2; LGraphCanvas.#temp_vec2.set(node22.size); - const horizontal2 = node22.horizontal; if (node22.flags.collapsed) { ctx.font = this.inner_text_font; const title = node22.getTitle ? node22.getTitle() : node22.title; @@ -62217,152 +63218,19 @@ class LGraphCanvas { ctx.shadowColor = "transparent"; ctx.strokeStyle = LiteGraph.NODE_BOX_OUTLINE_COLOR; node22.onDrawForeground?.(ctx, this, this.canvas); - ctx.textAlign = horizontal2 ? "center" : "left"; ctx.font = this.inner_text_font; - const render_text = !low_quality; - const highlightColour = LiteGraph.NODE_TEXT_HIGHLIGHT_COLOR ?? LiteGraph.NODE_SELECTED_TITLE_COLOR ?? LiteGraph.NODE_TEXT_COLOR; - const out_slot = this.connecting_links?.[0]?.output; - const in_slot = this.connecting_links?.[0]?.input; - ctx.lineWidth = 1; - let max_y = 0; - const slot_pos = new Float32Array(2); - if (!node22.flags.collapsed) { - if (node22.inputs) { - for (let i2 = 0; i2 < node22.inputs.length; i2++) { - const slot = node22.inputs[i2]; - const slot_type = slot.type; - const isValid2 = !this.connecting_links || out_slot && LiteGraph.isValidConnection(slot.type, out_slot.type); - const highlight = isValid2 && node22.mouseOver?.inputId === i2; - const label_color = highlight ? highlightColour : LiteGraph.NODE_TEXT_COLOR; - ctx.globalAlpha = isValid2 ? editor_alpha : 0.4 * editor_alpha; - ctx.fillStyle = slot.link != null ? slot.color_on || this.default_connection_color_byType[slot_type] || this.default_connection_color.input_on : slot.color_off || this.default_connection_color_byTypeOff[slot_type] || this.default_connection_color_byType[slot_type] || this.default_connection_color.input_off; - const pos2 = node22.getConnectionPos(true, i2, slot_pos); - pos2[0] -= node22.pos[0]; - pos2[1] -= node22.pos[1]; - if (max_y < pos2[1] + LiteGraph.NODE_SLOT_HEIGHT * 0.5) { - max_y = pos2[1] + LiteGraph.NODE_SLOT_HEIGHT * 0.5; - } - drawSlot(ctx, slot, pos2, { - horizontal: horizontal2, - low_quality, - render_text, - label_color, - label_position: LabelPosition.Right, - // Input slot is not stroked. - do_stroke: false, - highlight - }); - } - } - ctx.textAlign = horizontal2 ? "center" : "right"; - ctx.strokeStyle = "black"; - if (node22.outputs) { - for (let i2 = 0; i2 < node22.outputs.length; i2++) { - const slot = node22.outputs[i2]; - const slot_type = slot.type; - const isValid2 = !this.connecting_links || in_slot && LiteGraph.isValidConnection(slot_type, in_slot.type); - const highlight = isValid2 && node22.mouseOver?.outputId === i2; - const label_color = highlight ? highlightColour : LiteGraph.NODE_TEXT_COLOR; - ctx.globalAlpha = isValid2 ? editor_alpha : 0.4 * editor_alpha; - const pos2 = node22.getConnectionPos(false, i2, slot_pos); - pos2[0] -= node22.pos[0]; - pos2[1] -= node22.pos[1]; - if (max_y < pos2[1] + LiteGraph.NODE_SLOT_HEIGHT * 0.5) { - max_y = pos2[1] + LiteGraph.NODE_SLOT_HEIGHT * 0.5; - } - ctx.fillStyle = slot.links && slot.links.length ? slot.color_on || this.default_connection_color_byType[slot_type] || this.default_connection_color.output_on : slot.color_off || this.default_connection_color_byTypeOff[slot_type] || this.default_connection_color_byType[slot_type] || this.default_connection_color.output_off; - drawSlot(ctx, slot, pos2, { - horizontal: horizontal2, - low_quality, - render_text, - label_color, - label_position: LabelPosition.Left, - do_stroke: true, - highlight - }); - } - } + if (!node22.collapsed) { + const max_y = node22.drawSlots(ctx, { + colorContext: this, + connectingLink: this.connecting_links?.[0], + editorAlpha: this.editor_alpha, + lowQuality: this.low_quality + }); ctx.textAlign = "left"; ctx.globalAlpha = 1; - if (node22.widgets) { - let widgets_y = max_y; - if (horizontal2 || node22.widgets_up) { - widgets_y = 2; - } - if (node22.widgets_start_y != null) widgets_y = node22.widgets_start_y; - this.drawNodeWidgets( - node22, - widgets_y, - ctx, - this.node_widget && this.node_widget[0] == node22 ? this.node_widget[1] : null - ); - } + this.drawNodeWidgets(node22, max_y, ctx); } else if (this.render_collapsed_slots) { - let input_slot = null; - let output_slot = null; - let slot; - if (node22.inputs) { - for (let i2 = 0; i2 < node22.inputs.length; i2++) { - slot = node22.inputs[i2]; - if (slot.link == null) { - continue; - } - input_slot = slot; - break; - } - } - if (node22.outputs) { - for (let i2 = 0; i2 < node22.outputs.length; i2++) { - slot = node22.outputs[i2]; - if (!slot.links || !slot.links.length) { - continue; - } - output_slot = slot; - } - } - if (input_slot) { - let x2 = 0; - let y2 = LiteGraph.NODE_TITLE_HEIGHT * -0.5; - if (horizontal2) { - x2 = node22._collapsed_width * 0.5; - y2 = -LiteGraph.NODE_TITLE_HEIGHT; - } - ctx.fillStyle = "#686"; - ctx.beginPath(); - if (slot.type === LiteGraph.EVENT || slot.shape === RenderShape.BOX) { - ctx.rect(x2 - 7 + 0.5, y2 - 4, 14, 8); - } else if (slot.shape === RenderShape.ARROW) { - ctx.moveTo(x2 + 8, y2); - ctx.lineTo(x2 + -4, y2 - 4); - ctx.lineTo(x2 + -4, y2 + 4); - ctx.closePath(); - } else { - ctx.arc(x2, y2, 4, 0, Math.PI * 2); - } - ctx.fill(); - } - if (output_slot) { - let x2 = node22._collapsed_width; - let y2 = LiteGraph.NODE_TITLE_HEIGHT * -0.5; - if (horizontal2) { - x2 = node22._collapsed_width * 0.5; - y2 = 0; - } - ctx.fillStyle = "#686"; - ctx.strokeStyle = "black"; - ctx.beginPath(); - if (slot.type === LiteGraph.EVENT || slot.shape === RenderShape.BOX) { - ctx.rect(x2 - 7 + 0.5, y2 - 4, 14, 8); - } else if (slot.shape === RenderShape.ARROW) { - ctx.moveTo(x2 + 6, y2); - ctx.lineTo(x2 - 6, y2 - 4); - ctx.lineTo(x2 - 6, y2 + 4); - ctx.closePath(); - } else { - ctx.arc(x2, y2, 4, 0, Math.PI * 2); - } - ctx.fill(); - } + node22.drawCollapsedSlots(ctx); } if (node22.clip_area) { ctx.restore(); @@ -62378,19 +63246,19 @@ class LGraphCanvas { * @todo Split tooltip from hover, so it can be drawn / eased separately */ drawLinkTooltip(ctx, link2) { - const pos2 = link2._pos; + const pos = link2._pos; ctx.fillStyle = "black"; ctx.beginPath(); if (this.linkMarkerShape === LinkMarkerShape.Arrow) { const transform2 = ctx.getTransform(); - ctx.translate(pos2[0], pos2[1]); + ctx.translate(pos[0], pos[1]); if (Number.isFinite(link2._centreAngle)) ctx.rotate(link2._centreAngle); ctx.moveTo(-2, -3); ctx.lineTo(4, 0); ctx.lineTo(-2, 3); ctx.setTransform(transform2); } else if (this.linkMarkerShape == null || this.linkMarkerShape === LinkMarkerShape.Circle) { - ctx.arc(pos2[0], pos2[1], 3, 0, Math.PI * 2); + ctx.arc(pos[0], pos[1], 3, 0, Math.PI * 2); } ctx.fill(); const data26 = link2.data; @@ -62419,15 +63287,15 @@ class LGraphCanvas { ctx.shadowBlur = 3; ctx.fillStyle = "#454"; ctx.beginPath(); - ctx.roundRect(pos2[0] - w2 * 0.5, pos2[1] - 15 - h2, w2, h2, [3]); - ctx.moveTo(pos2[0] - 10, pos2[1] - 15); - ctx.lineTo(pos2[0] + 10, pos2[1] - 15); - ctx.lineTo(pos2[0], pos2[1] - 5); + ctx.roundRect(pos[0] - w2 * 0.5, pos[1] - 15 - h2, w2, h2, [3]); + ctx.moveTo(pos[0] - 10, pos[1] - 15); + ctx.lineTo(pos[0] + 10, pos[1] - 15); + ctx.lineTo(pos[0], pos[1] - 5); ctx.fill(); ctx.shadowColor = "transparent"; ctx.textAlign = "center"; ctx.fillStyle = "#CEC"; - ctx.fillText(text2, pos2[0], pos2[1] - 15 - h2 * 0.3); + ctx.fillText(text2, pos[0], pos[1] - 15 - h2 * 0.3); } /** * Draws the shape of the given node on the canvas @@ -62442,10 +63310,10 @@ class LGraphCanvas { ctx.strokeStyle = fgcolor; ctx.fillStyle = LiteGraph.use_legacy_node_error_indicator ? "#F00" : bgcolor; const title_height = LiteGraph.NODE_TITLE_HEIGHT; - const low_quality = this.ds.scale < 0.5; + const low_quality = this.low_quality; const { collapsed: collapsed2 } = node22.flags; - const shape = node22._shape || node22.constructor.shape || LiteGraph.NODE_DEFAULT_SHAPE; - const { title_mode } = node22.constructor; + const shape = node22.renderingShape; + const title_mode = node22.title_mode; const render_title = title_mode == TitleMode.TRANSPARENT_TITLE || title_mode == TitleMode.NO_TITLE ? false : true; const area = LGraphCanvas.#tmp_area; node22.measure(area); @@ -62461,14 +63329,14 @@ class LGraphCanvas { area[1], area[2], area[3], - shape == RenderShape.CARD ? [this.round_radius, this.round_radius, 0, 0] : [this.round_radius] + shape == RenderShape.CARD ? [LiteGraph.ROUND_RADIUS, LiteGraph.ROUND_RADIUS, 0, 0] : [LiteGraph.ROUND_RADIUS] ); } else if (shape == RenderShape.CIRCLE) { ctx.arc(size[0] * 0.5, size[1] * 0.5, size[0] * 0.5, 0, Math.PI * 2); } ctx.fill(); if (node22.has_errors && !LiteGraph.use_legacy_node_error_indicator) { - this.strokeShape(ctx, area, { + strokeShape(ctx, area, { shape, title_mode, title_height, @@ -62484,161 +63352,29 @@ class LGraphCanvas { ctx.fillRect(0, -1, area[2], 2); } ctx.shadowColor = "transparent"; - node22.onDrawBackground?.(ctx, this, this.canvas, this.graph_mouse); + node22.onDrawBackground?.(ctx); if (render_title || title_mode == TitleMode.TRANSPARENT_TITLE) { - if (node22.onDrawTitleBar) { - node22.onDrawTitleBar(ctx, title_height, size, this.ds.scale, fgcolor); - } else if (title_mode != TitleMode.TRANSPARENT_TITLE && (node22.constructor.title_color || this.render_title_colored)) { - const title_color = node22.constructor.title_color || fgcolor; - if (collapsed2) { - ctx.shadowColor = LiteGraph.DEFAULT_SHADOW_COLOR; - } - ctx.fillStyle = title_color; - ctx.beginPath(); - if (shape == RenderShape.BOX || low_quality) { - ctx.rect(0, -title_height, size[0], title_height); - } else if (shape == RenderShape.ROUND || shape == RenderShape.CARD) { - ctx.roundRect( - 0, - -title_height, - size[0], - title_height, - collapsed2 ? [this.round_radius] : [this.round_radius, this.round_radius, 0, 0] - ); - } - ctx.fill(); - ctx.shadowColor = "transparent"; - } - let colState = LiteGraph.node_box_coloured_by_mode && LiteGraph.NODE_MODES_COLORS[node22.mode] ? LiteGraph.NODE_MODES_COLORS[node22.mode] : false; - if (LiteGraph.node_box_coloured_when_on) { - colState = node22.action_triggered ? "#FFF" : node22.execute_triggered ? "#AAA" : colState; - } - const box_size = 10; - if (node22.onDrawTitleBox) { - node22.onDrawTitleBox(ctx, title_height, size, this.ds.scale); - } else if (shape == RenderShape.ROUND || shape == RenderShape.CIRCLE || shape == RenderShape.CARD) { - if (low_quality) { - ctx.fillStyle = "black"; - ctx.beginPath(); - ctx.arc( - title_height * 0.5, - title_height * -0.5, - box_size * 0.5 + 1, - 0, - Math.PI * 2 - ); - ctx.fill(); - } - ctx.fillStyle = node22.boxcolor || colState || LiteGraph.NODE_DEFAULT_BOXCOLOR; - if (low_quality) - ctx.fillRect( - title_height * 0.5 - box_size * 0.5, - title_height * -0.5 - box_size * 0.5, - box_size, - box_size - ); - else { - ctx.beginPath(); - ctx.arc( - title_height * 0.5, - title_height * -0.5, - box_size * 0.5, - 0, - Math.PI * 2 - ); - ctx.fill(); - } - } else { - if (low_quality) { - ctx.fillStyle = "black"; - ctx.fillRect( - (title_height - box_size) * 0.5 - 1, - (title_height + box_size) * -0.5 - 1, - box_size + 2, - box_size + 2 - ); - } - ctx.fillStyle = node22.boxcolor || colState || LiteGraph.NODE_DEFAULT_BOXCOLOR; - ctx.fillRect( - (title_height - box_size) * 0.5, - (title_height + box_size) * -0.5, - box_size, - box_size - ); - } + node22.drawTitleBarBackground(ctx, { + scale: this.ds.scale, + low_quality + }); + node22.drawTitleBox(ctx, { + scale: this.ds.scale, + low_quality, + box_size: 10 + }); ctx.globalAlpha = old_alpha; - if (node22.onDrawTitleText) { - node22.onDrawTitleText( - ctx, - title_height, - size, - this.ds.scale, - this.title_text_font, - selected2 - ); - } - if (!low_quality) { - ctx.font = this.title_text_font; - const rawTitle = node22.getTitle() ?? `❌ ${node22.type}`; - const title = String(rawTitle) + (node22.pinned ? "📌" : ""); - if (title) { - if (selected2) { - ctx.fillStyle = LiteGraph.NODE_SELECTED_TITLE_COLOR; - } else { - ctx.fillStyle = node22.constructor.title_text_color || this.node_title_color; - } - if (collapsed2) { - ctx.textAlign = "left"; - ctx.fillText( - title.substr(0, 20), - // avoid urls too long - title_height, - // + measure.width * 0.5, - LiteGraph.NODE_TITLE_TEXT_Y - title_height - ); - ctx.textAlign = "left"; - } else { - ctx.textAlign = "left"; - ctx.fillText( - title, - title_height, - LiteGraph.NODE_TITLE_TEXT_Y - title_height - ); - } - } - } - if (!collapsed2 && node22.subgraph && !node22.skip_subgraph_button) { - const w2 = LiteGraph.NODE_TITLE_HEIGHT; - const x2 = node22.size[0] - w2; - const over = LiteGraph.isInsideRectangle( - this.graph_mouse[0] - node22.pos[0], - this.graph_mouse[1] - node22.pos[1], - x2 + 2, - -w2 + 2, - w2 - 4, - w2 - 4 - ); - ctx.fillStyle = over ? "#888" : "#555"; - if (shape == RenderShape.BOX || low_quality) { - ctx.fillRect(x2 + 2, -w2 + 2, w2 - 4, w2 - 4); - } else { - ctx.beginPath(); - ctx.roundRect(x2 + 2, -w2 + 2, w2 - 4, w2 - 4, [4]); - ctx.fill(); - } - ctx.fillStyle = "#333"; - ctx.beginPath(); - ctx.moveTo(x2 + w2 * 0.2, -w2 * 0.6); - ctx.lineTo(x2 + w2 * 0.8, -w2 * 0.6); - ctx.lineTo(x2 + w2 * 0.5, -w2 * 0.3); - ctx.fill(); - } + node22.drawTitleText(ctx, { + scale: this.ds.scale, + default_title_color: this.node_title_color, + low_quality + }); node22.onDrawTitle?.(ctx); } if (selected2) { node22.onBounding?.(area); const padding = node22.has_errors && !LiteGraph.use_legacy_node_error_indicator ? 20 : void 0; - this.strokeShape(ctx, area, { + strokeShape(ctx, area, { shape, title_height, title_mode, @@ -62649,75 +63385,6 @@ class LGraphCanvas { if (node22.execute_triggered > 0) node22.execute_triggered--; if (node22.action_triggered > 0) node22.action_triggered--; } - /** - * Draws only the path of a shape on the canvas, without filling. - * Used to draw indicators for node status, e.g. "selected". - * @param ctx The 2D context to draw on - * @param area The position and size of the shape to render - */ - strokeShape(ctx, area, { - /** The shape to render */ - shape = RenderShape.BOX, - /** Shape will extend above the Y-axis 0 by this amount */ - title_height = LiteGraph.NODE_TITLE_HEIGHT, - /** @deprecated This is node-specific: it should be removed entirely, and behaviour defined by the caller more explicitly */ - title_mode = TitleMode.NORMAL_TITLE, - /** The colour that should be drawn */ - colour = LiteGraph.NODE_BOX_OUTLINE_COLOR, - /** The distance between the edge of the {@link area} and the middle of the line */ - padding = 6, - /** @deprecated This is node-specific: it should be removed entirely, and behaviour defined by the caller more explicitly */ - collapsed: collapsed2 = false, - /** Thickness of the line drawn (`lineWidth`) */ - thickness = 1 - } = {}) { - if (title_mode === TitleMode.TRANSPARENT_TITLE) { - area[1] -= title_height; - area[3] += title_height; - } - const { lineWidth, strokeStyle } = ctx; - ctx.lineWidth = thickness; - ctx.globalAlpha = 0.8; - ctx.strokeStyle = colour; - ctx.beginPath(); - const [x2, y2, width2, height] = area; - switch (shape) { - case RenderShape.BOX: { - ctx.rect( - x2 - padding, - y2 - padding, - width2 + 2 * padding, - height + 2 * padding - ); - break; - } - case RenderShape.ROUND: - case RenderShape.CARD: { - const radius = this.round_radius + padding; - const isCollapsed = shape === RenderShape.CARD && collapsed2; - const cornerRadii = isCollapsed || shape === RenderShape.ROUND ? [radius] : [radius, 2, radius, 2]; - ctx.roundRect( - x2 - padding, - y2 - padding, - width2 + 2 * padding, - height + 2 * padding, - cornerRadii - ); - break; - } - case RenderShape.CIRCLE: { - const centerX = x2 + width2 / 2; - const centerY = y2 + height / 2; - const radius = Math.max(width2, height) / 2 + padding; - ctx.arc(centerX, centerY, radius, 0, Math.PI * 2); - break; - } - } - ctx.stroke(); - ctx.lineWidth = lineWidth; - ctx.strokeStyle = strokeStyle; - ctx.globalAlpha = 1; - } /** * Draws a snap guide for a {@link Positionable} item. * @@ -62732,9 +63399,9 @@ class LGraphCanvas { drawSnapGuide(ctx, item3, shape = RenderShape.ROUND) { const snapGuide = LGraphCanvas.#temp; snapGuide.set(item3.boundingRect); - const { pos: pos2 } = item3; - const offsetX = pos2[0] - snapGuide[0]; - const offsetY = pos2[1] - snapGuide[1]; + const { pos } = item3; + const offsetX = pos[0] - snapGuide[0]; + const offsetY = pos[1] - snapGuide[1]; snapGuide[0] += offsetX; snapGuide[1] += offsetY; snapPoint(snapGuide, this.#snapToGrid); @@ -62806,8 +63473,8 @@ class LGraphCanvas { const start_slot = start_node.outputs[outputId]; const end_slot = node22.inputs[i2]; if (!start_slot || !end_slot) continue; - const start_dir = start_slot.dir || (start_node.horizontal ? LinkDirection.DOWN : LinkDirection.RIGHT); - const end_dir = end_slot.dir || (node22.horizontal ? LinkDirection.UP : LinkDirection.LEFT); + const start_dir = start_slot.dir || LinkDirection.RIGHT; + const end_dir = end_slot.dir || LinkDirection.LEFT; if (reroutes.length) { let startControl; const l22 = reroutes.length; @@ -62916,7 +63583,7 @@ class LGraphCanvas { const startDir = start_dir || LinkDirection.RIGHT; const endDir = end_dir || LinkDirection.LEFT; const dist3 = this.links_render_mode == LinkRenderType.SPLINE_LINK && (!endControl || !startControl) ? distance(a2, b2) : null; - if (this.render_connections_border && this.ds.scale > 0.6) { + if (this.render_connections_border && !this.low_quality) { ctx.lineWidth = this.connections_width + 4; } ctx.lineJoin = "round"; @@ -62927,7 +63594,7 @@ class LGraphCanvas { if (linkSegment) linkSegment.path = path; const innerA = LGraphCanvas.#lTempA; const innerB = LGraphCanvas.#lTempB; - const pos2 = linkSegment?._pos ?? [0, 0]; + const pos = linkSegment?._pos ?? [0, 0]; for (let i2 = 0; i2 < num_sublines; i2 += 1) { const offsety = (i2 - (num_sublines - 1) * 0.5) * 5; innerA[0] = a2[0]; @@ -62956,13 +63623,13 @@ class LGraphCanvas { b2[0], b2[1] + offsety ); - findPointOnCurve(pos2, a2, b2, innerA, innerB, 0.5); + findPointOnCurve(pos, a2, b2, innerA, innerB, 0.5); if (linkSegment && this.linkMarkerShape === LinkMarkerShape.Arrow) { const justPastCentre = LGraphCanvas.#lTempC; findPointOnCurve(justPastCentre, a2, b2, innerA, innerB, 0.51); linkSegment._centreAngle = Math.atan2( - justPastCentre[1] - pos2[1], - justPastCentre[0] - pos2[0] + justPastCentre[1] - pos[1], + justPastCentre[0] - pos[0] ); } } else if (this.links_render_mode == LinkRenderType.LINEAR_LINK) { @@ -62999,8 +63666,8 @@ class LGraphCanvas { path.lineTo(innerA[0], innerA[1] + offsety); path.lineTo(innerB[0], innerB[1] + offsety); path.lineTo(b2[0], b2[1] + offsety); - pos2[0] = (innerA[0] + innerB[0]) * 0.5; - pos2[1] = (innerA[1] + innerB[1]) * 0.5; + pos[0] = (innerA[0] + innerB[0]) * 0.5; + pos[1] = (innerA[1] + innerB[1]) * 0.5; if (linkSegment && this.linkMarkerShape === LinkMarkerShape.Arrow) { linkSegment._centreAngle = Math.atan2( innerB[1] - innerA[1], @@ -63025,8 +63692,8 @@ class LGraphCanvas { path.lineTo(midX, innerB[1]); path.lineTo(innerB[0], innerB[1]); path.lineTo(b2[0], b2[1]); - pos2[0] = midX; - pos2[1] = (innerA[1] + innerB[1]) * 0.5; + pos[0] = midX; + pos[1] = (innerA[1] + innerB[1]) * 0.5; if (linkSegment && this.linkMarkerShape === LinkMarkerShape.Arrow) { const diff2 = innerB[1] - innerA[1]; if (Math.abs(diff2) < 4) linkSegment._centreAngle = 0; @@ -63037,7 +63704,7 @@ class LGraphCanvas { return; } } - if (this.render_connections_border && this.ds.scale > 0.6 && !skip_border) { + if (this.render_connections_border && !this.low_quality && !skip_border) { ctx.strokeStyle = "rgba(0,0,0,0.5)"; ctx.stroke(path); } @@ -63080,7 +63747,7 @@ class LGraphCanvas { ctx.beginPath(); if (this.linkMarkerShape === LinkMarkerShape.Arrow) { const transform2 = ctx.getTransform(); - ctx.translate(pos2[0], pos2[1]); + ctx.translate(pos[0], pos[1]); ctx.rotate(linkSegment._centreAngle); ctx.moveTo(-3.2, -5); ctx.lineTo(7, 0); @@ -63088,7 +63755,7 @@ class LGraphCanvas { ctx.fill(); ctx.setTransform(transform2); } else if (this.linkMarkerShape == null || this.linkMarkerShape === LinkMarkerShape.Circle) { - ctx.arc(pos2[0], pos2[1], 5, 0, Math.PI * 2); + ctx.arc(pos[0], pos[1], 5, 0, Math.PI * 2); } ctx.fill(); } @@ -63186,245 +63853,23 @@ class LGraphCanvas { } /** * draws the widgets stored inside a node + * @deprecated Use {@link LGraphNode.drawWidgets} instead. + * @note Currently there are extensions hijacking this function, so we cannot remove it. */ - drawNodeWidgets(node22, posY, ctx, active_widget) { - if (!node22.widgets || !node22.widgets.length) return 0; - const width2 = node22.size[0]; - const widgets = node22.widgets; - posY += 2; - const H = LiteGraph.NODE_WIDGET_HEIGHT; - const show_text = this.ds.scale > 0.5; - ctx.save(); - ctx.globalAlpha = this.editor_alpha; - const background_color = LiteGraph.WIDGET_BGCOLOR; - const text_color = LiteGraph.WIDGET_TEXT_COLOR; - const secondary_text_color = LiteGraph.WIDGET_SECONDARY_TEXT_COLOR; - const margin = 15; - for (let i2 = 0; i2 < widgets.length; ++i2) { - const w2 = widgets[i2]; - if (w2.hidden || w2.advanced && !node22.showAdvanced) continue; - const y2 = w2.y || posY; - const outline_color = w2.advanced ? LiteGraph.WIDGET_ADVANCED_OUTLINE_COLOR : LiteGraph.WIDGET_OUTLINE_COLOR; - if (w2 === this.link_over_widget) { - ctx.fillStyle = this.default_connection_color_byType[this.link_over_widget_type] || this.default_connection_color.input_on; - drawSlot(ctx, {}, [10, y2 + 10], {}); - } - w2.last_y = y2; - ctx.strokeStyle = outline_color; - ctx.fillStyle = "#222"; - ctx.textAlign = "left"; - if (w2.disabled) ctx.globalAlpha *= 0.5; - const widget_width = w2.width || width2; - switch (w2.type) { - case "button": - ctx.fillStyle = background_color; - if (w2.clicked) { - ctx.fillStyle = "#AAA"; - w2.clicked = false; - this.dirty_canvas = true; - } - ctx.fillRect(margin, y2, widget_width - margin * 2, H); - if (show_text && !w2.disabled) - ctx.strokeRect(margin, y2, widget_width - margin * 2, H); - if (show_text) { - ctx.textAlign = "center"; - ctx.fillStyle = text_color; - ctx.fillText(w2.label || w2.name, widget_width * 0.5, y2 + H * 0.7); - } - break; - case "toggle": - ctx.textAlign = "left"; - ctx.strokeStyle = outline_color; - ctx.fillStyle = background_color; - ctx.beginPath(); - if (show_text) - ctx.roundRect(margin, y2, widget_width - margin * 2, H, [H * 0.5]); - else ctx.rect(margin, y2, widget_width - margin * 2, H); - ctx.fill(); - if (show_text && !w2.disabled) ctx.stroke(); - ctx.fillStyle = w2.value ? "#89A" : "#333"; - ctx.beginPath(); - ctx.arc( - widget_width - margin * 2, - y2 + H * 0.5, - H * 0.36, - 0, - Math.PI * 2 - ); - ctx.fill(); - if (show_text) { - ctx.fillStyle = secondary_text_color; - const label5 = w2.label || w2.name; - if (label5 != null) { - ctx.fillText(label5, margin * 2, y2 + H * 0.7); - } - ctx.fillStyle = w2.value ? text_color : secondary_text_color; - ctx.textAlign = "right"; - ctx.fillText( - w2.value ? w2.options.on || "true" : w2.options.off || "false", - widget_width - 40, - y2 + H * 0.7 - ); - } - break; - case "slider": { - ctx.fillStyle = background_color; - ctx.fillRect(margin, y2, widget_width - margin * 2, H); - const range2 = w2.options.max - w2.options.min; - let nvalue = (w2.value - w2.options.min) / range2; - if (nvalue < 0) nvalue = 0; - if (nvalue > 1) nvalue = 1; - ctx.fillStyle = w2.options.hasOwnProperty("slider_color") ? w2.options.slider_color : active_widget == w2 ? "#89A" : "#678"; - ctx.fillRect(margin, y2, nvalue * (widget_width - margin * 2), H); - if (show_text && !w2.disabled) - ctx.strokeRect(margin, y2, widget_width - margin * 2, H); - if (w2.marker) { - let marker_nvalue = (w2.marker - w2.options.min) / range2; - if (marker_nvalue < 0) marker_nvalue = 0; - if (marker_nvalue > 1) marker_nvalue = 1; - ctx.fillStyle = w2.options.hasOwnProperty("marker_color") ? w2.options.marker_color : "#AA9"; - ctx.fillRect( - margin + marker_nvalue * (widget_width - margin * 2), - y2, - 2, - H - ); - } - if (show_text) { - ctx.textAlign = "center"; - ctx.fillStyle = text_color; - ctx.fillText( - (w2.label || w2.name) + " " + Number(w2.value).toFixed( - w2.options.precision != null ? w2.options.precision : 3 - ), - widget_width * 0.5, - y2 + H * 0.7 - ); - } - break; - } - case "number": - case "combo": - ctx.textAlign = "left"; - ctx.strokeStyle = outline_color; - ctx.fillStyle = background_color; - ctx.beginPath(); - if (show_text) - ctx.roundRect(margin, y2, widget_width - margin * 2, H, [H * 0.5]); - else ctx.rect(margin, y2, widget_width - margin * 2, H); - ctx.fill(); - if (show_text) { - if (!w2.disabled) ctx.stroke(); - ctx.fillStyle = text_color; - if (!w2.disabled) { - ctx.beginPath(); - ctx.moveTo(margin + 16, y2 + 5); - ctx.lineTo(margin + 6, y2 + H * 0.5); - ctx.lineTo(margin + 16, y2 + H - 5); - ctx.fill(); - ctx.beginPath(); - ctx.moveTo(widget_width - margin - 16, y2 + 5); - ctx.lineTo(widget_width - margin - 6, y2 + H * 0.5); - ctx.lineTo(widget_width - margin - 16, y2 + H - 5); - ctx.fill(); - } - ctx.fillStyle = secondary_text_color; - ctx.fillText(w2.label || w2.name, margin * 2 + 5, y2 + H * 0.7); - ctx.fillStyle = text_color; - ctx.textAlign = "right"; - if (w2.type == "number") { - ctx.fillText( - Number(w2.value).toFixed( - w2.options.precision !== void 0 ? w2.options.precision : 3 - ), - widget_width - margin * 2 - 20, - y2 + H * 0.7 - ); - } else { - let v2 = typeof w2.value === "number" ? String(w2.value) : w2.value; - if (w2.options.values) { - let values = w2.options.values; - if (typeof values === "function") - values = values(); - if (values && !Array.isArray(values)) - v2 = values[w2.value]; - } - const labelWidth = ctx.measureText(w2.label || w2.name).width + margin * 2; - const inputWidth = widget_width - margin * 4; - const availableWidth = inputWidth - labelWidth; - const textWidth = ctx.measureText(v2).width; - if (textWidth > availableWidth) { - const ELLIPSIS = "…"; - const ellipsisWidth = ctx.measureText(ELLIPSIS).width; - const charWidthAvg = ctx.measureText("a").width; - if (availableWidth <= ellipsisWidth) { - v2 = "․"; - } else { - v2 = `${v2}`; - const overflowWidth = textWidth + ellipsisWidth - availableWidth; - if (overflowWidth + charWidthAvg * 3 > availableWidth) { - const preciseRange = availableWidth + charWidthAvg * 3; - const preTruncateCt = Math.floor((preciseRange - ellipsisWidth) / charWidthAvg); - v2 = v2.substr(0, preTruncateCt); - } - while (ctx.measureText(v2).width + ellipsisWidth > availableWidth) { - v2 = v2.substr(0, v2.length - 1); - } - v2 += ELLIPSIS; - } - } - ctx.fillText( - v2, - widget_width - margin * 2 - 20, - y2 + H * 0.7 - ); - } - } - break; - case "string": - case "text": - ctx.textAlign = "left"; - ctx.strokeStyle = outline_color; - ctx.fillStyle = background_color; - ctx.beginPath(); - if (show_text) - ctx.roundRect(margin, y2, widget_width - margin * 2, H, [H * 0.5]); - else - ctx.rect(margin, y2, widget_width - margin * 2, H); - ctx.fill(); - if (show_text) { - if (!w2.disabled) ctx.stroke(); - ctx.save(); - ctx.beginPath(); - ctx.rect(margin, y2, widget_width - margin * 2, H); - ctx.clip(); - ctx.fillStyle = secondary_text_color; - const label5 = w2.label || w2.name; - if (label5 != null) ctx.fillText(label5, margin * 2, y2 + H * 0.7); - ctx.fillStyle = text_color; - ctx.textAlign = "right"; - ctx.fillText( - String(w2.value).substr(0, 30), - widget_width - margin * 2, - y2 + H * 0.7 - ); - ctx.restore(); - } - break; - default: - w2.draw?.(ctx, node22, widget_width, y2, H); - break; - } - posY += (w2.computeSize ? w2.computeSize(widget_width)[1] : H) + 4; - ctx.globalAlpha = this.editor_alpha; - } - ctx.restore(); - ctx.textAlign = "left"; + drawNodeWidgets(node22, posY, ctx) { + node22.drawWidgets(ctx, { + y: posY, + colorContext: this, + linkOverWidget: this.link_over_widget, + linkOverWidgetType: this.link_over_widget_type, + lowQuality: this.low_quality, + editorAlpha: this.editor_alpha + }); } /** * draws every group area in the background */ - drawGroups(canvas, ctx) { + drawGroups(canvas2, ctx) { if (!this.graph) return; const groups = this.graph._groups; ctx.save(); @@ -63477,18 +63922,18 @@ class LGraphCanvas { const { graph } = this; const node_left = graph.getNodeById(segment.origin_id); const fromType = node_left?.outputs?.[segment.origin_slot]?.type ?? "*"; - const options4 = ["Add Node", null, "Delete", null]; - if (this.reroutesEnabled) options4.splice(1, 0, "Add Reroute"); + const options22 = ["Add Node", null, "Delete", null]; + if (this.reroutesEnabled) options22.splice(1, 0, "Add Reroute"); const title = "data" in segment && segment.data != null ? segment.data.constructor.name : null; - const menu2 = new LiteGraph.ContextMenu(options4, { + const menu2 = new LiteGraph.ContextMenu(options22, { event: e2, title, callback: inner_clicked.bind(this) }); - function inner_clicked(v2, options22, e3) { + function inner_clicked(v2, options222, e22) { switch (v2) { case "Add Node": - LGraphCanvas.onMenuAdd(null, null, e3, menu2, function(node22) { + LGraphCanvas.onMenuAdd(null, null, e22, menu2, function(node22) { if (!node22.inputs?.length || !node22.outputs?.length) return; const options32 = this.reroutesEnabled ? { afterRerouteId: segment.parentId } : void 0; if (node_left.connectByType(segment.origin_slot, node22, fromType, options32)) { @@ -63497,8 +63942,8 @@ class LGraphCanvas { }); break; case "Add Reroute": { - this.adjustMouseEvent(e3); - graph.createReroute([e3.canvasX, e3.canvasY], segment); + this.adjustMouseEvent(e22); + graph.createReroute([e22.canvasX, e22.canvasY], segment); this.setDirty(false, true); break; } @@ -63659,28 +64104,28 @@ class LGraphCanvas { console.warn("Cant get slot information " + slotX); return; } - const options4 = ["Add Node", null]; + const options22 = ["Add Node", null]; if (opts.allow_searchbox) { - options4.push("Search"); - options4.push(null); + options22.push("Search"); + options22.push(null); } const fromSlotType = slotX.type == LiteGraph.EVENT ? "_event_" : slotX.type; const slotTypesDefault = isFrom ? LiteGraph.slot_types_default_out : LiteGraph.slot_types_default_in; if (slotTypesDefault?.[fromSlotType]) { if (typeof slotTypesDefault[fromSlotType] == "object") { for (const typeX in slotTypesDefault[fromSlotType]) { - options4.push(slotTypesDefault[fromSlotType][typeX]); + options22.push(slotTypesDefault[fromSlotType][typeX]); } } else { - options4.push(slotTypesDefault[fromSlotType]); + options22.push(slotTypesDefault[fromSlotType]); } } - const menu2 = new LiteGraph.ContextMenu(options4, { + const menu2 = new LiteGraph.ContextMenu(options22, { event: opts.e, title: (slotX && slotX.name != "" ? slotX.name + (fromSlotType ? " | " : "") : "") + (slotX && fromSlotType ? fromSlotType : ""), callback: inner_clicked }); - function inner_clicked(v2, options22, e2) { + function inner_clicked(v2, options222, e2) { switch (v2) { case "Add Node": LGraphCanvas.onMenuAdd(null, null, e2, menu2, function(node22) { @@ -63725,8 +64170,8 @@ class LGraphCanvas { } }; const graphcanvas = LGraphCanvas.active_canvas; - const canvas = graphcanvas.canvas; - canvas.parentNode.appendChild(dialog); + const canvas2 = graphcanvas.canvas; + canvas2.parentNode.appendChild(dialog); if (this.ds.scale > 1) dialog.style.transform = "scale(" + this.ds.scale + ")"; let dialogCloseTimer = null; let prevent_timeout = 0; @@ -63787,7 +64232,7 @@ class LGraphCanvas { that.setDirty(true); dialog.close(); }); - const rect = canvas.getBoundingClientRect(); + const rect = canvas2.getBoundingClientRect(); let offsetx = -20; let offsety = -20; if (rect) { @@ -63798,26 +64243,26 @@ class LGraphCanvas { dialog.style.left = event.clientX + offsetx + "px"; dialog.style.top = event.clientY + offsety + "px"; } else { - dialog.style.left = canvas.width * 0.5 + offsetx + "px"; - dialog.style.top = canvas.height * 0.5 + offsety + "px"; + dialog.style.left = canvas2.width * 0.5 + offsetx + "px"; + dialog.style.top = canvas2.height * 0.5 + offsety + "px"; } setTimeout(function() { input.focus(); const clickTime = Date.now(); function handleOutsideClick(e2) { - if (e2.target === canvas && Date.now() - clickTime > 256) { + if (e2.target === canvas2 && Date.now() - clickTime > 256) { dialog.close(); - canvas.parentNode.removeEventListener("click", handleOutsideClick); - canvas.parentNode.removeEventListener("touchend", handleOutsideClick); + canvas2.parentNode.removeEventListener("click", handleOutsideClick); + canvas2.parentNode.removeEventListener("touchend", handleOutsideClick); } } __name(handleOutsideClick, "handleOutsideClick"); - canvas.parentNode.addEventListener("click", handleOutsideClick); - canvas.parentNode.addEventListener("touchend", handleOutsideClick); + canvas2.parentNode.addEventListener("click", handleOutsideClick); + canvas2.parentNode.addEventListener("touchend", handleOutsideClick); }, 10); return dialog; } - showSearchBox(event, options4) { + showSearchBox(event, options22) { const def_options = { slot_from: null, node_from: null, @@ -63834,15 +64279,15 @@ class LGraphCanvas { show_all_if_empty: true, show_all_on_open: LiteGraph.search_show_all_on_open }; - options4 = Object.assign(def_options, options4 || {}); + options22 = Object.assign(def_options, options22 || {}); const that = this; const graphcanvas = LGraphCanvas.active_canvas; - const canvas = graphcanvas.canvas; - const root_document = canvas.ownerDocument || document; + const canvas2 = graphcanvas.canvas; + const root_document = canvas2.ownerDocument || document; const dialog = document.createElement("div"); dialog.className = "litegraph litesearchbox graphdialog rounded"; dialog.innerHTML = "Search "; - if (options4.do_type_filter) { + if (options22.do_type_filter) { dialog.innerHTML += ""; dialog.innerHTML += ""; } @@ -63855,14 +64300,14 @@ class LGraphCanvas { } let selIn; let selOut; - if (options4.do_type_filter) { + if (options22.do_type_filter) { selIn = dialog.querySelector(".slot_in_type_filter"); selOut = dialog.querySelector(".slot_out_type_filter"); } dialog.close = function() { that.search_box = null; this.blur(); - canvas.focus(); + canvas2.focus(); root_document.body.style.overflow = ""; setTimeout(function() { that.canvas.focus(); @@ -63872,7 +64317,7 @@ class LGraphCanvas { if (this.ds.scale > 1) { dialog.style.transform = "scale(" + this.ds.scale + ")"; } - if (options4.hide_on_mouse_leave) { + if (options22.hide_on_mouse_leave) { let prevent_timeout = false; let timeout_close = null; LiteGraph.pointerListenerAdd(dialog, "enter", function() { @@ -63886,9 +64331,9 @@ class LGraphCanvas { return; timeout_close = setTimeout(function() { dialog.close(); - }, typeof options4.hide_on_mouse_leave === "number" ? options4.hide_on_mouse_leave : 500); + }, typeof options22.hide_on_mouse_leave === "number" ? options22.hide_on_mouse_leave : 500); }); - if (options4.do_type_filter) { + if (options22.do_type_filter) { selIn.addEventListener("click", function() { prevent_timeout++; }); @@ -63948,12 +64393,12 @@ class LGraphCanvas { return true; }); } - if (options4.do_type_filter) { + if (options22.do_type_filter) { if (selIn) { const aSlots = LiteGraph.slot_types_in; const nSlots = aSlots.length; - if (options4.type_filter_in == LiteGraph.EVENT || options4.type_filter_in == LiteGraph.ACTION) - options4.type_filter_in = "_event_"; + if (options22.type_filter_in == LiteGraph.EVENT || options22.type_filter_in == LiteGraph.ACTION) + options22.type_filter_in = "_event_"; for (let iK = 0; iK < nSlots; iK++) { const opt = document.createElement("option"); opt.value = aSlots[iK]; @@ -63961,7 +64406,7 @@ class LGraphCanvas { selIn.appendChild(opt); if ( // @ts-expect-error - options4.type_filter_in !== false && (options4.type_filter_in + "").toLowerCase() == (aSlots[iK] + "").toLowerCase() + options22.type_filter_in !== false && (options22.type_filter_in + "").toLowerCase() == (aSlots[iK] + "").toLowerCase() ) { opt.selected = true; } @@ -63973,14 +64418,14 @@ class LGraphCanvas { if (selOut) { const aSlots = LiteGraph.slot_types_out; const nSlots = aSlots.length; - if (options4.type_filter_out == LiteGraph.EVENT || options4.type_filter_out == LiteGraph.ACTION) - options4.type_filter_out = "_event_"; + if (options22.type_filter_out == LiteGraph.EVENT || options22.type_filter_out == LiteGraph.ACTION) + options22.type_filter_out = "_event_"; for (let iK = 0; iK < nSlots; iK++) { const opt = document.createElement("option"); opt.value = aSlots[iK]; opt.innerHTML = aSlots[iK]; selOut.appendChild(opt); - if (options4.type_filter_out !== false && (options4.type_filter_out + "").toLowerCase() == (aSlots[iK] + "").toLowerCase()) + if (options22.type_filter_out !== false && (options22.type_filter_out + "").toLowerCase() == (aSlots[iK] + "").toLowerCase()) opt.selected = true; } selOut.addEventListener("change", function() { @@ -63988,7 +64433,7 @@ class LGraphCanvas { }); } } - const rect = canvas.getBoundingClientRect(); + const rect = canvas2.getBoundingClientRect(); const left = (event ? event.clientX : rect.left + rect.width * 0.5) - 80; const top = (event ? event.clientY : rect.top + rect.height * 0.5) - 20; dialog.style.left = left + "px"; @@ -63998,7 +64443,7 @@ class LGraphCanvas { requestAnimationFrame(function() { input.focus(); }); - if (options4.show_all_on_open) refreshHelper(); + if (options22.show_all_on_open) refreshHelper(); function select(name2) { if (name2) { if (that.onSearchBoxSelection) { @@ -64043,47 +64488,47 @@ class LGraphCanvas { node22.configure(extra.data.json); } } - if (options4.node_from) { + if (options22.node_from) { let iS = false; - switch (typeof options4.slot_from) { + switch (typeof options22.slot_from) { case "string": - iS = options4.node_from.findOutputSlot(options4.slot_from); + iS = options22.node_from.findOutputSlot(options22.slot_from); break; case "object": - iS = options4.slot_from.name ? options4.node_from.findOutputSlot(options4.slot_from.name) : -1; - if (iS == -1 && typeof options4.slot_from.slot_index !== "undefined") iS = options4.slot_from.slot_index; + iS = options22.slot_from.name ? options22.node_from.findOutputSlot(options22.slot_from.name) : -1; + if (iS == -1 && typeof options22.slot_from.slot_index !== "undefined") iS = options22.slot_from.slot_index; break; case "number": - iS = options4.slot_from; + iS = options22.slot_from; break; default: iS = 0; } - if (typeof options4.node_from.outputs[iS] !== "undefined") { + if (typeof options22.node_from.outputs[iS] !== "undefined") { if (iS !== false && iS > -1) { - options4.node_from.connectByType(iS, node22, options4.node_from.outputs[iS].type); + options22.node_from.connectByType(iS, node22, options22.node_from.outputs[iS].type); } } } - if (options4.node_to) { + if (options22.node_to) { let iS = false; - switch (typeof options4.slot_from) { + switch (typeof options22.slot_from) { case "string": - iS = options4.node_to.findInputSlot(options4.slot_from); + iS = options22.node_to.findInputSlot(options22.slot_from); break; case "object": - iS = options4.slot_from.name ? options4.node_to.findInputSlot(options4.slot_from.name) : -1; - if (iS == -1 && typeof options4.slot_from.slot_index !== "undefined") iS = options4.slot_from.slot_index; + iS = options22.slot_from.name ? options22.node_to.findInputSlot(options22.slot_from.name) : -1; + if (iS == -1 && typeof options22.slot_from.slot_index !== "undefined") iS = options22.slot_from.slot_index; break; case "number": - iS = options4.slot_from; + iS = options22.slot_from; break; default: iS = 0; } - if (typeof options4.node_to.inputs[iS] !== "undefined") { + if (typeof options22.node_to.inputs[iS] !== "undefined") { if (iS !== false && iS > -1) { - options4.node_to.connectByTypeOutput(iS, node22, options4.node_to.inputs[iS].type); + options22.node_to.connectByTypeOutput(iS, node22, options22.node_to.inputs[iS].type); } } } @@ -64112,7 +64557,7 @@ class LGraphCanvas { let str = input.value; first2 = null; helper.innerHTML = ""; - if (!str && !options4.show_all_if_empty) return; + if (!str && !options22.show_all_if_empty) return; if (that.onSearchBox) { const list2 = that.onSearchBox(helper, str, graphcanvas); if (list2) { @@ -64131,9 +64576,9 @@ class LGraphCanvas { const opts = Object.assign(optsDef, optsIn); const ctor = LiteGraph.registered_node_types[type]; if (filter4 && ctor.filter != filter4) return false; - if ((!options4.show_all_if_empty || str) && type.toLowerCase().indexOf(str) === -1 && (!ctor.title || ctor.title.toLowerCase().indexOf(str) === -1)) + if ((!options22.show_all_if_empty || str) && type.toLowerCase().indexOf(str) === -1 && (!ctor.title || ctor.title.toLowerCase().indexOf(str) === -1)) return false; - if (options4.do_type_filter && !opts.skipFilter) { + if (options22.do_type_filter && !opts.skipFilter) { const sType = type; let sV = opts.inTypeOverride !== false ? opts.inTypeOverride : sIn.value; if (sIn && sV && LiteGraph.registered_slot_in_types[sV]?.nodes) { @@ -64154,13 +64599,13 @@ class LGraphCanvas { const filter4 = graphcanvas.filter || graphcanvas.graph.filter; let sIn = false; let sOut = false; - if (options4.do_type_filter && that.search_box) { + if (options22.do_type_filter && that.search_box) { sIn = that.search_box.querySelector(".slot_in_type_filter"); sOut = that.search_box.querySelector(".slot_out_type_filter"); } for (const i2 in LiteGraph.searchbox_extras) { const extra = LiteGraph.searchbox_extras[i2]; - if ((!options4.show_all_if_empty || str) && extra.desc.toLowerCase().indexOf(str) === -1) + if ((!options22.show_all_if_empty || str) && extra.desc.toLowerCase().indexOf(str) === -1) continue; const ctor = LiteGraph.registered_node_types[extra.type]; if (ctor && ctor.filter != filter4) continue; @@ -64185,7 +64630,7 @@ class LGraphCanvas { if (LGraphCanvas.search_limit !== -1 && c2++ > LGraphCanvas.search_limit) break; } - if (options4.show_general_after_typefiltered && (sIn.value || sOut.value)) { + if (options22.show_general_after_typefiltered && (sIn.value || sOut.value)) { filtered_extra = []; for (const i2 in LiteGraph.registered_node_types) { if (inner_test_filter(i2, { @@ -64200,7 +64645,7 @@ class LGraphCanvas { break; } } - if ((sIn.value || sOut.value) && helper.childNodes.length == 0 && options4.show_general_if_none_on_typefilter) { + if ((sIn.value || sOut.value) && helper.childNodes.length == 0 && options22.show_general_if_none_on_typefilter) { filtered_extra = []; for (const i2 in LiteGraph.registered_node_types) { if (inner_test_filter(i2, { skipFilter: true })) @@ -64241,9 +64686,9 @@ class LGraphCanvas { __name(refreshHelper, "refreshHelper"); return dialog; } - showEditPropertyValue(node22, property, options4) { + showEditPropertyValue(node22, property, options22) { if (!node22 || node22.properties[property] === void 0) return; - options4 = options4 || {}; + options22 = options22 || {}; const info = node22.getPropertyInfo(property); const type = info.type; let input_html = ""; @@ -64264,7 +64709,7 @@ class LGraphCanvas { } const dialog = this.createDialog( "" + (info.label || property) + "" + input_html + "", - options4 + options22 ); let input; if ((type == "enum" || type == "combo") && info.values) { @@ -64325,7 +64770,7 @@ class LGraphCanvas { node22.graph._version++; } node22.onPropertyChanged?.(property, value4); - options4.onclose?.(); + options22.onclose?.(); dialog.close(); this.setDirty(true, true); } @@ -64333,13 +64778,13 @@ class LGraphCanvas { return dialog; } // TODO refactor, theer are different dialog, some uses createDialog, some dont - createDialog(html, options4) { + createDialog(html, options22) { const def_options = { checkForInput: false, closeOnLeave: true, closeOnLeave_checkModified: true }; - options4 = Object.assign(def_options, options4 || {}); + options22 = Object.assign(def_options, options22 || {}); const dialog = document.createElement("div"); dialog.className = "graphdialog"; dialog.innerHTML = html; @@ -64351,12 +64796,12 @@ class LGraphCanvas { offsetx -= rect.left; offsety -= rect.top; } - if (options4.position) { - offsetx += options4.position[0]; - offsety += options4.position[1]; - } else if (options4.event) { - offsetx += options4.event.clientX; - offsety += options4.event.clientY; + if (options22.position) { + offsetx += options22.position[0]; + offsety += options22.position[1]; + } else if (options22.event) { + offsetx += options22.event.clientX; + offsety += options22.event.clientY; } else { offsetx += this.canvas.width * 0.5; offsety += this.canvas.height * 0.5; @@ -64364,7 +64809,7 @@ class LGraphCanvas { dialog.style.left = offsetx + "px"; dialog.style.top = offsety + "px"; this.canvas.parentNode.appendChild(dialog); - if (options4.checkForInput) { + if (options22.checkForInput) { const aI = dialog.querySelectorAll("input"); aI?.forEach(function(iX) { iX.addEventListener("keydown", function(e2) { @@ -64397,7 +64842,7 @@ class LGraphCanvas { ); }); dialog.addEventListener("mouseenter", function() { - if (options4.closeOnLeave || LiteGraph.dialog_close_on_mouse_leave) { + if (options22.closeOnLeave || LiteGraph.dialog_close_on_mouse_leave) { if (dialogCloseTimer) clearTimeout(dialogCloseTimer); } }); @@ -64415,18 +64860,18 @@ class LGraphCanvas { }); return dialog; } - createPanel(title, options4) { - options4 = options4 || {}; - const ref_window = options4.window || window; + createPanel(title, options22) { + options22 = options22 || {}; + const ref_window = options22.window || window; const root29 = document.createElement("div"); root29.className = "litegraph dialog"; root29.innerHTML = "
"; root29.header = root29.querySelector(".dialog-header"); - if (options4.width) - root29.style.width = options4.width + (typeof options4.width === "number" ? "px" : ""); - if (options4.height) - root29.style.height = options4.height + (typeof options4.height === "number" ? "px" : ""); - if (options4.closable) { + if (options22.width) + root29.style.width = options22.width + (typeof options22.width === "number" ? "px" : ""); + if (options22.height) + root29.style.height = options22.height + (typeof options22.height === "number" ? "px" : ""); + if (options22.closable) { const close5 = document.createElement("span"); close5.innerHTML = "✕"; close5.classList.add("close"); @@ -64478,10 +64923,10 @@ class LGraphCanvas { else root29.content.appendChild(elem); return elem; }; - root29.addButton = function(name2, callback, options22) { + root29.addButton = function(name2, callback, options222) { const elem = document.createElement("button"); elem.innerText = name2; - elem.options = options22; + elem.options = options222; elem.classList.add("btn"); elem.addEventListener("click", callback); root29.footer.appendChild(elem); @@ -64492,20 +64937,20 @@ class LGraphCanvas { elem.className = "separator"; root29.content.appendChild(elem); }; - root29.addWidget = function(type, name2, value4, options22, callback) { - options22 = options22 || {}; + root29.addWidget = function(type, name2, value4, options222, callback) { + options222 = options222 || {}; let str_value = String(value4); type = type.toLowerCase(); if (type == "number") str_value = value4.toFixed(3); const elem = document.createElement("div"); elem.className = "property"; elem.innerHTML = ""; - elem.querySelector(".property_name").innerText = options22.label || name2; + elem.querySelector(".property_name").innerText = options222.label || name2; const value_element = elem.querySelector(".property_value"); value_element.innerText = str_value; elem.dataset["property"] = name2; - elem.dataset["type"] = options22.type || type; - elem.options = options22; + elem.dataset["type"] = options222.type || type; + elem.options = options222; elem.value = value4; if (type == "code") elem.addEventListener("click", function() { @@ -64537,10 +64982,10 @@ class LGraphCanvas { innerChange(propname, v2); }); } else if (type == "enum" || type == "combo") { - const str_value2 = LGraphCanvas.getPropertyPrintableValue(value4, options22.values); + const str_value2 = LGraphCanvas.getPropertyPrintableValue(value4, options222.values); value_element.innerText = str_value2; value_element.addEventListener("click", function(event) { - const values = options22.values || []; + const values = options222.values || []; const propname = this.parentNode.dataset["property"]; const elem_that = this; new LiteGraph.ContextMenu( @@ -64563,8 +65008,8 @@ class LGraphCanvas { } root29.content.appendChild(elem); function innerChange(name22, value22) { - options22.callback?.(name22, value22, options22); - callback?.(name22, value22, options22); + options222.callback?.(name22, value22, options222); + callback?.(name22, value22, options222); } __name(innerChange, "innerChange"); return elem; @@ -64698,11 +65143,11 @@ class LGraphCanvas { } } getCanvasMenuOptions() { - let options4 = null; + let options22 = null; if (this.getMenuOptions) { - options4 = this.getMenuOptions(); + options22 = this.getMenuOptions(); } else { - options4 = [ + options22 = [ { content: "Add Node", has_submenu: true, @@ -64714,23 +65159,23 @@ class LGraphCanvas { // {content:"Collapse All", callback: LGraphCanvas.onMenuCollapseAll } ]; if (Object.keys(this.selected_nodes).length > 1) { - options4.push({ + options22.push({ content: "Align", has_submenu: true, callback: LGraphCanvas.onGroupAlign }); } } - const extra = this.getExtraMenuOptions?.(this, options4); - return Array.isArray(extra) ? options4.concat(extra) : options4; + const extra = this.getExtraMenuOptions?.(this, options22); + return Array.isArray(extra) ? options22.concat(extra) : options22; } // called by processContextMenu to extract the menu list getNodeMenuOptions(node22) { - let options4 = null; + let options22 = null; if (node22.getMenuOptions) { - options4 = node22.getMenuOptions(this); + options22 = node22.getMenuOptions(this); } else { - options4 = [ + options22 = [ { content: "Inputs", has_submenu: true, @@ -64751,8 +65196,8 @@ class LGraphCanvas { }, { content: "Properties Panel", - callback: /* @__PURE__ */ __name(function(item3, options22, e2, menu2, node3) { - LGraphCanvas.active_canvas.showShowNodePanel(node3); + callback: /* @__PURE__ */ __name(function(item3, options222, e2, menu2, node222) { + LGraphCanvas.active_canvas.showShowNodePanel(node222); }, "callback") }, null, @@ -64767,31 +65212,31 @@ class LGraphCanvas { } ]; if (node22.resizable !== false) { - options4.push({ + options22.push({ content: "Resize", callback: LGraphCanvas.onMenuResizeNode }); } if (node22.collapsible) { - options4.push({ + options22.push({ content: node22.collapsed ? "Expand" : "Collapse", callback: LGraphCanvas.onMenuNodeCollapse }); } if (node22.widgets?.some((w2) => w2.advanced)) { - options4.push({ + options22.push({ content: node22.showAdvanced ? "Hide Advanced" : "Show Advanced", callback: LGraphCanvas.onMenuToggleAdvanced }); } - options4.push( + options22.push( { content: node22.pinned ? "Unpin" : "Pin", callback: /* @__PURE__ */ __name((...args) => { LGraphCanvas.onMenuNodePin(...args); for (const i2 in this.selected_nodes) { - const node3 = this.selected_nodes[i2]; - node3.pin(); + const node222 = this.selected_nodes[i2]; + node222.pin(); } this.setDirty(true, true); }, "callback") @@ -64810,39 +65255,39 @@ class LGraphCanvas { ); } const inputs = node22.onGetInputs?.(); - if (inputs?.length) options4[0].disabled = false; + if (inputs?.length) options22[0].disabled = false; const outputs = node22.onGetOutputs?.(); - if (outputs?.length) options4[1].disabled = false; - const extra = node22.getExtraMenuOptions?.(this, options4); + if (outputs?.length) options22[1].disabled = false; + const extra = node22.getExtraMenuOptions?.(this, options22); if (Array.isArray(extra) && extra.length > 0) { extra.push(null); - options4 = extra.concat(options4); + options22 = extra.concat(options22); } if (node22.clonable !== false) { - options4.push({ + options22.push({ content: "Clone", callback: LGraphCanvas.onMenuNodeClone }); } if (Object.keys(this.selected_nodes).length > 1) { - options4.push({ + options22.push({ content: "Align Selected To", has_submenu: true, callback: LGraphCanvas.onNodeAlign }); - options4.push({ + options22.push({ content: "Distribute Nodes", has_submenu: true, callback: LGraphCanvas.createDistributeMenu }); } - options4.push(null, { + options22.push(null, { content: "Remove", disabled: !(node22.removable !== false && !node22.block_delete), callback: LGraphCanvas.onMenuNodeRemove }); - node22.graph?.onGetNodeMenuOptions?.(options4, node22); - return options4; + node22.graph?.onGetNodeMenuOptions?.(options22, node22); + return options22; } getGroupMenuOptions(group) { console.warn("LGraphCanvas.getGroupMenuOptions is deprecated, use LGraphGroup.getMenuOptions instead"); @@ -64850,15 +65295,15 @@ class LGraphCanvas { } processContextMenu(node22, event) { const that = this; - const canvas = LGraphCanvas.active_canvas; - const ref_window = canvas.getCanvasWindow(); + const canvas2 = LGraphCanvas.active_canvas; + const ref_window = canvas2.getCanvasWindow(); let menu_info = null; - const options4 = { + const options22 = { event, callback: inner_option_clicked, extra: node22 }; - if (node22) options4.title = node22.type; + if (node22) options22.title = node22.type; let slot = null; if (node22) { slot = node22.getSlotInPosition(event.canvasX, event.canvasY); @@ -64879,12 +65324,15 @@ class LGraphCanvas { } if (!_slot.nameLocked) menu_info.push({ content: "Rename Slot", slot }); + if (node22.getExtraSlotMenuOptions) { + menu_info.push(...node22.getExtraSlotMenuOptions(slot)); + } } - options4.title = (slot.input ? slot.input.type : slot.output.type) || "*"; + options22.title = (slot.input ? slot.input.type : slot.output.type) || "*"; if (slot.input && slot.input.type == LiteGraph.ACTION) - options4.title = "Action"; + options22.title = "Action"; if (slot.output && slot.output.type == LiteGraph.EVENT) - options4.title = "Event"; + options22.title = "Event"; } else if (node22) { menu_info = this.getNodeMenuOptions(node22); } else { @@ -64915,8 +65363,8 @@ class LGraphCanvas { } } if (!menu_info) return; - new LiteGraph.ContextMenu(menu_info, options4, ref_window); - function inner_option_clicked(v2, options22) { + new LiteGraph.ContextMenu(menu_info, options22, ref_window); + function inner_option_clicked(v2, options222) { if (!v2) return; if (v2.content == "Remove Slot") { const info = v2.slot; @@ -64943,7 +65391,7 @@ class LGraphCanvas { const slot_info = info.input ? node22.getInputInfo(info.slot) : node22.getOutputInfo(info.slot); const dialog = that.createDialog( "Name", - options22 + options222 ); const input = dialog.querySelector("input"); if (input && slot_info) { @@ -65033,9 +65481,9 @@ class LGraphCanvas { * Fits the view to the selected nodes with animation. * If nothing is selected, the view is fitted around all items in the graph. */ - fitViewToSelectionAnimated(options4 = {}) { + fitViewToSelectionAnimated(options22 = {}) { const items2 = this.selectedItems.size ? Array.from(this.selectedItems) : this.positionableItems; - this.animateToBounds(createBounds(items2), options4); + this.animateToBounds(createBounds(items2), options22); } } class MapProxyHandler { @@ -65131,7 +65579,6 @@ let LGraph$1 = class LGraph2 { execution_time; _last_trigger_time; filter; - _subgraph_node; /** Must contain serialisable values, e.g. primitive types */ config; vars; @@ -65273,10 +65720,10 @@ let LGraph$1 = class LGraph2 { */ detachCanvas(graphcanvas) { if (!this.list_of_graphcanvas) return; - const pos2 = this.list_of_graphcanvas.indexOf(graphcanvas); - if (pos2 == -1) return; + const pos = this.list_of_graphcanvas.indexOf(graphcanvas); + if (pos == -1) return; graphcanvas.graph = null; - this.list_of_graphcanvas.splice(pos2, 1); + this.list_of_graphcanvas.splice(pos, 1); } /** * Starts running this graph every interval milliseconds. @@ -65572,12 +66019,6 @@ let LGraph$1 = class LGraph2 { if (!nodes) return; for (let j2 = 0, l2 = nodes.length; j2 < l2; ++j2) { const node22 = nodes[j2]; - if (node22.constructor === LiteGraph.Subgraph && eventname != "onExecute") { - if (node22.mode == mode2) { - node22.sendEventToAllNodes(eventname, params, mode2); - } - continue; - } if (!node22[eventname] || node22.mode != mode2) continue; if (params === void 0) { node22[eventname](); @@ -65691,13 +66132,13 @@ let LGraph$1 = class LGraph2 { this._version++; if (this.list_of_graphcanvas) { for (let i2 = 0; i2 < this.list_of_graphcanvas.length; ++i2) { - const canvas = this.list_of_graphcanvas[i2]; - if (canvas.selected_nodes[node22.id]) - delete canvas.selected_nodes[node22.id]; + const canvas2 = this.list_of_graphcanvas[i2]; + if (canvas2.selected_nodes[node22.id]) + delete canvas2.selected_nodes[node22.id]; } } - const pos2 = this._nodes.indexOf(node22); - if (pos2 != -1) this._nodes.splice(pos2, 1); + const pos = this._nodes.indexOf(node22); + if (pos != -1) this._nodes.splice(pos, 1); delete this._nodes_by_id[node22.id]; this.onNodeRemoved?.(node22); this.canvasAction((c2) => c2.checkPanels()); @@ -65809,8 +66250,8 @@ let LGraph$1 = class LGraph2 { */ getRerouteOnPos(x2, y2) { for (const reroute of this.reroutes.values()) { - const { pos: pos2 } = reroute; - if (isSortaInsideOctagon(x2 - pos2[0], y2 - pos2[1], 2 * Reroute.radius)) + const { pos } = reroute; + if (isSortaInsideOctagon(x2 - pos[0], y2 - pos[1], 2 * Reroute.radius)) return reroute; } } @@ -65860,7 +66301,7 @@ let LGraph$1 = class LGraph2 { this.updateExecutionOrder(); } // ********** GLOBALS ***************** - onAction(action, param, options4) { + onAction(action, param, options22) { this._input_nodes = this.findNodesByClass( // @ts-expect-error Never impl. LiteGraph.GraphInput, @@ -65869,7 +66310,7 @@ let LGraph$1 = class LGraph2 { for (let i2 = 0; i2 < this._input_nodes.length; ++i2) { const node22 = this._input_nodes[i2]; if (node22.properties.name != action) continue; - node22.actionDo(action, param, options4); + node22.actionDo(action, param, options22); break; } } @@ -66061,11 +66502,11 @@ let LGraph$1 = class LGraph2 { * Creates the object if it does not exist. * @param serialisedReroute See {@link SerialisableReroute} */ - setReroute({ id: id3, parentId, pos: pos2, linkIds }) { + setReroute({ id: id3, parentId, pos, linkIds }) { id3 ??= ++this.state.lastRerouteId; if (id3 > this.state.lastRerouteId) this.state.lastRerouteId = id3; const reroute = this.reroutes.get(id3) ?? new Reroute(id3, this); - reroute.update(parentId, pos2, linkIds); + reroute.update(parentId, pos, linkIds); this.reroutes.set(id3, reroute); return reroute; } @@ -66076,10 +66517,10 @@ let LGraph$1 = class LGraph2 { * going from the node output to input. * @returns The newly created reroute - typically ignored. */ - createReroute(pos2, before) { + createReroute(pos, before) { const rerouteId = ++this.state.lastRerouteId; const linkIds = before instanceof Reroute ? before.linkIds : [before.id]; - const reroute = new Reroute(rerouteId, this, pos2, before.parentId, linkIds); + const reroute = new Reroute(rerouteId, this, pos, before.parentId, linkIds); this.reroutes.set(rerouteId, reroute); for (const linkId of linkIds) { const link2 = this._links.get(linkId); @@ -66150,9 +66591,9 @@ let LGraph$1 = class LGraph2 { * Mutating the properties of the return object may result in changes to your graph. * It is intended for use with {@link structuredClone} or {@link JSON.stringify}. */ - asSerialisable(options4) { + asSerialisable(options22) { const { config: config2, state, extra } = this; - const nodeList = !LiteGraph.use_uuids && options4?.sortNodes ? [...this._nodes].sort((a2, b2) => a2.id - b2.id) : this._nodes; + const nodeList = !LiteGraph.use_uuids && options22?.sortNodes ? [...this._nodes].sort((a2, b2) => a2.id - b2.id) : this._nodes; const nodes = nodeList.map((node22) => node22.serialize()); const groups = this._groups.map((x2) => x2.serialize()); const links = [...this._links.values()].map((x2) => x2.asSerialisable()); @@ -66311,31 +66752,31 @@ class ContextMenu { * - ignore_item_callbacks: ignores the callback inside the item, it just calls the options.callback * - event: you can pass a MouseEvent, this way the ContextMenu appears in that position */ - constructor(values, options4) { - options4 ||= {}; - this.options = options4; - const parent = options4.parentMenu; + constructor(values, options22) { + options22 ||= {}; + this.options = options22; + const parent = options22.parentMenu; if (parent) { if (!(parent instanceof ContextMenu)) { console.error("parentMenu must be of class ContextMenu, ignoring it"); - options4.parentMenu = null; + options22.parentMenu = null; } else { this.parentMenu = parent; this.parentMenu.lock = true; this.parentMenu.current_submenu = this; } if (parent.options?.className === "dark") { - options4.className = "dark"; + options22.className = "dark"; } } - const eventClass = options4.event ? options4.event.constructor.name : null; + const eventClass = options22.event ? options22.event.constructor.name : null; if (eventClass !== "MouseEvent" && eventClass !== "CustomEvent" && eventClass !== "PointerEvent") { console.error(`Event passed to ContextMenu is not of type MouseEvent or CustomEvent. Ignoring it. (${eventClass})`); - options4.event = null; + options22.event = null; } const root29 = document.createElement("div"); let classes2 = "litegraph litecontextmenu litemenubar-panel"; - if (options4.className) classes2 += " " + options4.className; + if (options22.className) classes2 += " " + options22.className; root29.className = classes2; root29.style.minWidth = "100"; root29.style.minHeight = "100"; @@ -66374,10 +66815,10 @@ class ContextMenu { true ); this.root = root29; - if (options4.title) { + if (options22.title) { const element = document.createElement("div"); element.className = "litemenu-title"; - element.innerHTML = options4.title; + element.innerHTML = options22.title; root29.appendChild(element); } for (let i2 = 0; i2 < values.length; i2++) { @@ -66386,25 +66827,25 @@ class ContextMenu { if (typeof name2 !== "string") { name2 = name2 != null ? name2.content === void 0 ? String(name2) : name2.content : name2; } - this.addItem(name2, value4, options4); + this.addItem(name2, value4, options22); } LiteGraph.pointerListenerAdd(root29, "enter", function() { if (root29.closing_timer) { clearTimeout(root29.closing_timer); } }); - const ownerDocument = (options4.event?.target).ownerDocument; + const ownerDocument = (options22.event?.target).ownerDocument; const root_document = ownerDocument || document; if (root_document.fullscreenElement) root_document.fullscreenElement.appendChild(root29); else root_document.body.appendChild(root29); - let left = options4.left || 0; - let top = options4.top || 0; - if (options4.event) { - left = options4.event.clientX - 10; - top = options4.event.clientY - 10; - if (options4.title) top -= 20; + let left = options22.left || 0; + let top = options22.top || 0; + if (options22.event) { + left = options22.event.clientX - 10; + top = options22.event.clientY - 10; + if (options22.title) top -= 20; if (parent) { const rect = parent.root.getBoundingClientRect(); left = rect.left + rect.width; @@ -66420,12 +66861,12 @@ class ContextMenu { } root29.style.left = left + "px"; root29.style.top = top + "px"; - if (LiteGraph.context_menu_scaling && options4.scale) { - root29.style.transform = `scale(${Math.round(options4.scale * 4) * 0.25})`; + if (LiteGraph.context_menu_scaling && options22.scale) { + root29.style.transform = `scale(${Math.round(options22.scale * 4) * 0.25})`; } } - addItem(name2, value4, options4) { - options4 ||= {}; + addItem(name2, value4, options22) { + options22 ||= {}; const element = document.createElement("div"); element.className = "litemenu-entry submenu"; let disabled2 = false; @@ -66459,7 +66900,7 @@ class ContextMenu { } this.root.appendChild(element); if (!disabled2) element.addEventListener("click", inner_onclick); - if (!disabled2 && options4.autoopen) + if (!disabled2 && options22.autoopen) LiteGraph.pointerListenerAdd(element, "enter", inner_over); const setAriaExpanded = /* @__PURE__ */ __name(() => { const entries = this.root.querySelectorAll("div.litemenu-entry.has_submenu"); @@ -66485,26 +66926,26 @@ class ContextMenu { if (value22?.has_submenu || value22?.submenu) { setAriaExpanded(); } - if (options4.callback) { - const r2 = options4.callback.call( + if (options22.callback) { + const r2 = options22.callback.call( this, value22, - options4, + options22, e2, that, - options4.node + options22.node ); if (r2 === true) close_parent = false; } if (typeof value22 === "object") { - if (value22.callback && !options4.ignore_item_callbacks && value22.disabled !== true) { + if (value22.callback && !options22.ignore_item_callbacks && value22.disabled !== true) { const r2 = value22.callback.call( this, value22, - options4, + options22, e2, that, - options4.extra + options22.extra ); if (r2 === true) close_parent = false; } @@ -66517,7 +66958,7 @@ class ContextMenu { ignore_item_callbacks: value22.submenu.ignore_item_callbacks, title: value22.submenu.title, extra: value22.submenu.extra, - autoopen: options4.autoopen + autoopen: options22.autoopen }); close_parent = false; } @@ -66648,9 +67089,9 @@ class CurveEditor { const h2 = this.size[1] - this.margin * 2; const x2 = localpos[0] - this.margin; const y2 = localpos[1] - this.margin; - const pos2 = [x2, y2]; + const pos = [x2, y2]; const max_dist = 30 / graphcanvas.ds.scale; - this.selected = this.getCloserPoint(pos2, max_dist); + this.selected = this.getCloserPoint(pos, max_dist); if (this.selected == -1) { const point = [x2 / w2, 1 - y2 / h2]; points.push(point); @@ -66698,7 +67139,7 @@ class CurveEditor { this.selected = -1; return false; } - getCloserPoint(pos2, max_dist) { + getCloserPoint(pos, max_dist) { const points = this.points; if (!points) return -1; max_dist = max_dist || 30; @@ -66712,7 +67153,7 @@ class CurveEditor { const p3 = points[i2]; p2[0] = p3[0] * w2; p2[1] = (1 - p3[1]) * h2; - const dist3 = distance(pos2, p2); + const dist3 = distance(pos, p2); if (dist3 > min_dist || dist3 > max_dist) continue; closest = i2; min_dist = dist3; @@ -66771,6 +67212,7 @@ class LiteGraphGlobal { DEFAULT_POSITION = [100, 100]; /** ,"circle" */ VALID_SHAPES = ["default", "box", "round", "card"]; + ROUND_RADIUS = 8; // shapes are used for nodes but also for slots BOX_SHAPE = RenderShape.BOX; ROUND_SHAPE = RenderShape.ROUND; @@ -66969,8 +67411,8 @@ class LiteGraphGlobal { base_class.type = type; if (this.debug) console.log("Node registered: " + type); const classname = base_class.name; - const pos2 = type.lastIndexOf("/"); - base_class.category = type.substring(0, pos2); + const pos = type.lastIndexOf("/"); + base_class.category = type.substring(0, pos); base_class.title ||= classname; for (const i2 in LGraphNode.prototype) { base_class.prototype[i2] ||= LGraphNode.prototype[i2]; @@ -66979,44 +67421,6 @@ class LiteGraphGlobal { if (prev2) { console.log("replacing node type: " + type); } - if (!Object.prototype.hasOwnProperty.call(base_class.prototype, "shape")) { - Object.defineProperty(base_class.prototype, "shape", { - set(v2) { - switch (v2) { - case "default": - delete this._shape; - break; - case "box": - this._shape = RenderShape.BOX; - break; - case "round": - this._shape = RenderShape.ROUND; - break; - case "circle": - this._shape = RenderShape.CIRCLE; - break; - case "card": - this._shape = RenderShape.CARD; - break; - default: - this._shape = v2; - } - }, - get() { - return this._shape; - }, - enumerable: true, - configurable: true - }); - if (base_class.supported_extensions) { - for (const i2 in base_class.supported_extensions) { - const ext = base_class.supported_extensions[i2]; - if (ext && typeof ext === "string") { - this.node_types_by_file_extension[ext.toLowerCase()] = base_class; - } - } - } - } this.registered_node_types[type] = base_class; if (base_class.constructor.name) this.Nodes[classname] = base_class; this.onNodeTypeRegistered?.(type, base_class); @@ -67068,41 +67472,6 @@ class LiteGraphGlobal { } } } - /** - * Create a new nodetype by passing a function, it wraps it with a proper class and - * generates inputs according to the parameters of the function. - * Useful to wrap simple methods that do not require properties, and that only process some input to generate an output. - * @param name node name with namespace (p.e.: 'math/sum') - * @param func - * @param param_types [optional] an array containing the type of every parameter, - * otherwise parameters will accept any type - * @param return_type [optional] string with the return type, otherwise it will be generic - * @param properties [optional] properties to be configurable - */ - wrapFunctionAsNode(name2, func, param_types, return_type, properties) { - const params = Array(func.length); - let code2 = ""; - const names = this.getParameterNames(func); - for (let i2 = 0; i2 < names.length; ++i2) { - code2 += `this.addInput('${names[i2]}',${param_types && param_types[i2] ? `'${param_types[i2]}'` : "0"}); -`; - } - code2 += `this.addOutput('out',${return_type ? `'${return_type}'` : 0}); -`; - if (properties) code2 += `this.properties = ${JSON.stringify(properties)}; -`; - const classobj = Function(code2); - classobj.title = name2.split("/").pop(); - classobj.desc = "Generated from " + func.name; - classobj.prototype.onExecute = /* @__PURE__ */ __name(function onExecute() { - for (let i2 = 0; i2 < params.length; ++i2) { - params[i2] = this.getInputData(i2); - } - const r2 = func.apply(this, params); - this.setOutputData(0, r2); - }, "onExecute"); - this.registerNodeType(name2, classobj); - } /** * Removes all previously registered node's types */ @@ -67131,7 +67500,7 @@ class LiteGraphGlobal { * @param title a name to distinguish from other nodes * @param options to set options */ - createNode(type, title, options4) { + createNode(type, title, options22) { const base_class = this.registered_node_types[type]; if (!base_class) { if (this.debug) console.log(`GraphNode type "${type}" not registered.`); @@ -67157,9 +67526,9 @@ class LiteGraphGlobal { node22.size ||= node22.computeSize(); node22.pos ||= this.DEFAULT_POSITION.concat(); node22.mode ||= LGraphEventMode.ALWAYS; - if (options4) { - for (const i2 in options4) { - node22[i2] = options4[i2]; + if (options22) { + for (const i2 in options22) { + node22[i2] = options22[i2]; } } node22.onNodeCreated?.(); @@ -67299,54 +67668,6 @@ class LiteGraphGlobal { data: data26 }; } - /** - * Wrapper to load files (from url using fetch or from file using FileReader) - * @param url the url of the file (or the file itself) - * @param type an string to know how to fetch it: "text","arraybuffer","json","blob" - * @param on_complete callback(data) - * @param on_error in case of an error - * @returns returns the object used to - */ - fetchFile(url, type, on_complete, on_error) { - if (!url) return null; - type = type || "text"; - if (typeof url === "string") { - if (url.substr(0, 4) == "http" && this.proxy) - url = this.proxy + url.substr(url.indexOf(":") + 3); - return fetch(url).then(function(response) { - if (!response.ok) - throw new Error("File not found"); - if (type == "arraybuffer") - return response.arrayBuffer(); - else if (type == "text" || type == "string") - return response.text(); - else if (type == "json") - return response.json(); - else if (type == "blob") - return response.blob(); - }).then(function(data26) { - on_complete?.(data26); - }).catch(function(error2) { - console.error("error fetching file:", url); - on_error?.(error2); - }); - } else if (url instanceof File || url instanceof Blob) { - const reader = new FileReader(); - reader.onload = function(e2) { - let v2 = e2.target.result; - if (type == "json") - v2 = JSON.parse(v2); - on_complete?.(v2); - }; - if (type == "arraybuffer") - return reader.readAsArrayBuffer(url); - else if (type == "text" || type == "json") - return reader.readAsText(url); - else if (type == "blob") - return reader.readAsBinaryString(url); - } - return null; - } // used to create nodes from wrapping functions getParameterNames(func) { return (func + "").replace(/[/][/].*$/gm, "").replace(/\s+/g, "").replace(/[/][*][^/*]*[*][/]/g, "").split("){", 1)[0].replace(/^[^(]*[(]/, "").replace(/=[^,]+/g, "").split(",").filter(Boolean); @@ -72536,6 +72857,16 @@ function inputSpec(spec, allowUpcast = true) { ]); } __name(inputSpec, "inputSpec"); +const zRemoteWidgetConfig = z.object({ + route: z.string().url().or(z.string().startsWith("/")), + refresh: z.number().gte(128).safe().or(z.number().lte(0).safe()).optional(), + response_key: z.string().optional(), + query_params: z.record(z.string(), z.string()).optional(), + refresh_button: z.boolean().optional(), + control_after_refresh: z.enum(["first", "last"]).optional(), + timeout: z.number().gte(0).optional(), + max_retries: z.number().gte(0).optional() +}); const zBaseInputSpecValue = z.object({ default: z.any().optional(), defaultInput: z.boolean().optional(), @@ -72554,7 +72885,12 @@ const zIntInputSpec = inputSpec([ step: z.number().optional(), // Note: Many node authors are using INT to pass list of INT. // TODO: Add list of ints type. - default: z.union([z.number(), z.array(z.number())]).optional() + default: z.union([z.number(), z.array(z.number())]).optional(), + /** + * If true, a linked widget will be added to the node to select the mode + * of `control_after_generate`. + */ + control_after_generate: z.boolean().optional() }) ]); const zFloatInputSpec = inputSpec([ @@ -72588,17 +72924,26 @@ const zStringInputSpec = inputSpec([ placeholder: z.string().optional() }) ]); +const zComboInputProps = zBaseInputSpecValue.extend({ + control_after_generate: z.boolean().optional(), + image_upload: z.boolean().optional(), + image_folder: z.enum(["input", "output", "temp"]).optional(), + remote: zRemoteWidgetConfig.optional() +}); const zComboInputSpec = inputSpec( - [ - z.array(z.any()), - zBaseInputSpecValue.extend({ - control_after_generate: z.boolean().optional(), - image_upload: z.boolean().optional() - }) - ], + [z.array(z.any()), zComboInputProps], /* allowUpcast=*/ false ); +const zComboInputSpecV2 = inputSpec( + [z.literal("COMBO"), zComboInputProps], + /* allowUpcast=*/ + false +); +function isComboInputSpecV1(inputSpec2) { + return Array.isArray(inputSpec2[0]); +} +__name(isComboInputSpecV1, "isComboInputSpecV1"); const excludedLiterals = /* @__PURE__ */ new Set(["INT", "FLOAT", "BOOLEAN", "STRING", "COMBO"]); const zCustomInputSpec = inputSpec([ z.string().refine((value4) => !excludedLiterals.has(value4)), @@ -72610,6 +72955,7 @@ const zInputSpec = z.union([ zBooleanInputSpec, zStringInputSpec, zComboInputSpec, + zComboInputSpecV2, zCustomInputSpec ]); const zComfyInputsSpec = z.object({ @@ -72794,7 +73140,8 @@ const zSettings = z.record(z.any()).and( "Comfy.Server.LaunchArgs": z.record(z.string(), z.string()), "LiteGraph.Canvas.MaximumFps": z.number(), "Comfy.Workflow.ConfirmDelete": z.boolean(), - "Comfy.RerouteBeta": z.boolean() + "Comfy.RerouteBeta": z.boolean(), + "LiteGraph.Canvas.LowQualityRenderingZoomThreshold": z.number() }).optional() ); class ComfyApi extends EventTarget { @@ -73523,7 +73870,7 @@ const router = createRouter({ { path: "", name: "GraphView", - component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./GraphView-D9ZzDQZV.js"), true ? __vite__mapDeps([0,1,2,3,4,5]) : void 0, import.meta.url), "component"), + component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./GraphView-CLFBgoGf.js"), true ? __vite__mapDeps([0,1,2,3,4,5,6]) : void 0, import.meta.url), "component"), beforeEnter: /* @__PURE__ */ __name(async (to, from2, next2) => { const userStore = useUserStore(); await userStore.initialize(); @@ -73537,60 +73884,66 @@ const router = createRouter({ { path: "user-select", name: "UserSelectView", - component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./UserSelectView-wxa07xPk.js"), true ? __vite__mapDeps([6,7]) : void 0, import.meta.url), "component") + component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./UserSelectView-CRPNAEVJ.js"), true ? __vite__mapDeps([7,8]) : void 0, import.meta.url), "component") }, { path: "server-start", name: "ServerStartView", - component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./ServerStartView-BpH4TXPO.js"), true ? __vite__mapDeps([8,7,9]) : void 0, import.meta.url), "component"), + component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./ServerStartView-BENqs5bD.js"), true ? __vite__mapDeps([9,8,10]) : void 0, import.meta.url), "component"), beforeEnter: guardElectronAccess }, { path: "install", name: "InstallView", - component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./InstallView-CVZcZZXJ.js"), true ? __vite__mapDeps([10,11,12,7,13]) : void 0, import.meta.url), "component"), + component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./InstallView-x9XCq0hC.js"), true ? __vite__mapDeps([11,12,13,8,14]) : void 0, import.meta.url), "component"), beforeEnter: guardElectronAccess }, { path: "welcome", name: "WelcomeView", - component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./WelcomeView-BrXELNIm.js"), true ? __vite__mapDeps([14,7,15]) : void 0, import.meta.url), "component"), + component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./WelcomeView-Cvtvw05C.js"), true ? __vite__mapDeps([15,8,16]) : void 0, import.meta.url), "component"), beforeEnter: guardElectronAccess }, { path: "not-supported", name: "NotSupportedView", - component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./NotSupportedView-BUpntA4x.js"), true ? __vite__mapDeps([16,7,17]) : void 0, import.meta.url), "component"), + component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./NotSupportedView-BzM0uuqA.js"), true ? __vite__mapDeps([17,8,18]) : void 0, import.meta.url), "component"), beforeEnter: guardElectronAccess }, { path: "download-git", name: "DownloadGitView", - component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./DownloadGitView-DVXUne-M.js"), true ? __vite__mapDeps([18,7]) : void 0, import.meta.url), "component"), + component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./DownloadGitView-SPK8AXQU.js"), true ? __vite__mapDeps([19,8]) : void 0, import.meta.url), "component"), beforeEnter: guardElectronAccess }, { path: "manual-configuration", name: "ManualConfigurationView", - component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./ManualConfigurationView-Cz0_f_T-.js"), true ? __vite__mapDeps([19,7,20]) : void 0, import.meta.url), "component"), + component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./ManualConfigurationView-D3on5kXY.js"), true ? __vite__mapDeps([20,8,21]) : void 0, import.meta.url), "component"), beforeEnter: guardElectronAccess }, { path: "/metrics-consent", name: "MetricsConsentView", - component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./MetricsConsentView-B5NlgqrS.js"), true ? __vite__mapDeps([21,7]) : void 0, import.meta.url), "component"), + component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./MetricsConsentView-DK20ednB.js"), true ? __vite__mapDeps([22,8]) : void 0, import.meta.url), "component"), beforeEnter: guardElectronAccess }, { path: "desktop-start", name: "DesktopStartView", - component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./DesktopStartView-FKlxS2Lt.js"), true ? __vite__mapDeps([22,7]) : void 0, import.meta.url), "component"), + component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./DesktopStartView-B2BMUZxW.js"), true ? __vite__mapDeps([23,8]) : void 0, import.meta.url), "component"), beforeEnter: guardElectronAccess }, { path: "maintenance", name: "MaintenanceView", - component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./MaintenanceView-Df7CHNWW.js"), true ? __vite__mapDeps([23,1,2,24,11,7,25]) : void 0, import.meta.url), "component"), + component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./MaintenanceView-BUmTZX1d.js"), true ? __vite__mapDeps([24,3,1,2,25,26,12,8,27]) : void 0, import.meta.url), "component"), + beforeEnter: guardElectronAccess + }, + { + path: "desktop-update", + name: "DesktopUpdateView", + component: /* @__PURE__ */ __name(() => __vitePreload(() => import("./DesktopUpdateView-DWsew03S.js"), true ? __vite__mapDeps([28,3,26,8,29]) : void 0, import.meta.url), "component"), beforeEnter: guardElectronAccess } ] @@ -75201,9 +75554,9 @@ function watchTriggerable(source, cb, options4 = {}) { cleanupFn = callback; } __name(onCleanup, "onCleanup"); - const _cb = /* @__PURE__ */ __name((value4, oldValue2) => { + const _cb = /* @__PURE__ */ __name((value4, oldValue) => { onEffect(); - return cb(value4, oldValue2, onCleanup); + return cb(value4, oldValue, onCleanup); }, "_cb"); const res = watchIgnorable(source, _cb, options4); const { ignoreUpdates } = res; @@ -76320,12 +76673,12 @@ function useBase64(target2, options4) { const img = _target.cloneNode(false); img.crossOrigin = "Anonymous"; imgLoaded(img).then(() => { - const canvas = document.createElement("canvas"); - const ctx = canvas.getContext("2d"); - canvas.width = img.width; - canvas.height = img.height; - ctx.drawImage(img, 0, 0, canvas.width, canvas.height); - resolve2(canvas.toDataURL(options4 == null ? void 0 : options4.type, options4 == null ? void 0 : options4.quality)); + const canvas2 = document.createElement("canvas"); + const ctx = canvas2.getContext("2d"); + canvas2.width = img.width; + canvas2.height = img.height; + ctx.drawImage(img, 0, 0, canvas2.width, canvas2.height); + resolve2(canvas2.toDataURL(options4 == null ? void 0 : options4.type, options4 == null ? void 0 : options4.quality)); }).catch(reject3); } else if (typeof _target === "object") { const _serializeFn = (options4 == null ? void 0 : options4.serializer) || getDefaultSerialization(_target); @@ -77040,12 +77393,12 @@ function useStorage(key, defaults2, storage, options4 = {}) { } if (!initOnMounted) update(); - function dispatchWriteEvent(oldValue2, newValue2) { + function dispatchWriteEvent(oldValue, newValue2) { if (window2 && !(storage instanceof Storage)) { window2.dispatchEvent(new CustomEvent(customStorageEventName, { detail: { key, - oldValue: oldValue2, + oldValue, newValue: newValue2, storageArea: storage } @@ -77055,15 +77408,15 @@ function useStorage(key, defaults2, storage, options4 = {}) { __name(dispatchWriteEvent, "dispatchWriteEvent"); function write(v2) { try { - const oldValue2 = storage.getItem(key); + const oldValue = storage.getItem(key); if (v2 == null) { - dispatchWriteEvent(oldValue2, null); + dispatchWriteEvent(oldValue, null); storage.removeItem(key); } else { const serialized = serializer.write(v2); - if (oldValue2 !== serialized) { + if (oldValue !== serialized) { storage.setItem(key, serialized); - dispatchWriteEvent(oldValue2, serialized); + dispatchWriteEvent(oldValue, serialized); } } } catch (e2) { @@ -77817,13 +78170,13 @@ function useDraggable(target2, options4 = {}) { const container = toValue$3(containerElement); const containerRect = (_a22 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a22.call(container); const targetRect = toValue$3(target2).getBoundingClientRect(); - const pos2 = { + const pos = { x: e2.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left), y: e2.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top) }; - if ((onStart == null ? void 0 : onStart(pos2, e2)) === false) + if ((onStart == null ? void 0 : onStart(pos, e2)) === false) return; - pressedDelta.value = pos2; + pressedDelta.value = pos; handleEvent(e2); }, "start"); const move = /* @__PURE__ */ __name((e2) => { @@ -78544,13 +78897,13 @@ function useFetch(url, ...args) { const errorEvent = createEventHook(); const finallyEvent = createEventHook(); const isFinished = ref(false); - const isFetching = ref(false); + const isFetching2 = ref(false); const aborted = ref(false); const statusCode = ref(null); const response = shallowRef(null); const error2 = shallowRef(null); const data26 = shallowRef(initialData || null); - const canAbort = computed(() => supportsAbort && isFetching.value); + const canAbort = computed(() => supportsAbort && isFetching2.value); let controller; let timer; const abort = /* @__PURE__ */ __name(() => { @@ -78565,7 +78918,7 @@ function useFetch(url, ...args) { } }, "abort"); const loading2 = /* @__PURE__ */ __name((isLoading) => { - isFetching.value = isLoading; + isFetching2.value = isLoading; isFinished.value = !isLoading; }, "loading"); if (timeout) @@ -78675,7 +79028,7 @@ function useFetch(url, ...args) { ); const shell = { isFinished: readonly(isFinished), - isFetching: readonly(isFetching), + isFetching: readonly(isFetching2), statusCode, response, error: error2, @@ -78704,7 +79057,7 @@ function useFetch(url, ...args) { }; function setMethod(method) { return (payload, payloadType) => { - if (!isFetching.value) { + if (!isFetching2.value) { config2.method = method; config2.payload = payload; config2.payloadType = payloadType; @@ -78737,7 +79090,7 @@ function useFetch(url, ...args) { __name(waitUntilFinished, "waitUntilFinished"); function setType2(type) { return () => { - if (!isFetching.value) { + if (!isFetching2.value) { config2.type = type; return { ...shell, @@ -80049,10 +80402,10 @@ function useMouse(options4 = {}) { const scrollHandler = /* @__PURE__ */ __name(() => { if (!_prevMouseEvent || !window2) return; - const pos2 = extractor(_prevMouseEvent); - if (_prevMouseEvent instanceof MouseEvent && pos2) { - x2.value = pos2[0] + window2.scrollX; - y2.value = pos2[1] + window2.scrollY; + const pos = extractor(_prevMouseEvent); + if (_prevMouseEvent instanceof MouseEvent && pos) { + x2.value = pos[0] + window2.scrollX; + y2.value = pos[1] + window2.scrollY; } }, "scrollHandler"); const reset2 = /* @__PURE__ */ __name(() => { @@ -80774,8 +81127,8 @@ function usePrevious(value4, initialValue) { const previous = shallowRef(initialValue); watch( toRef(value4), - (_2, oldValue2) => { - previous.value = oldValue2; + (_2, oldValue) => { + previous.value = oldValue; }, { flush: "sync" } ); @@ -84799,12 +85152,12 @@ var classes$B = { mask: /* @__PURE__ */ __name(function mask2(_ref3) { var props = _ref3.props; var positions = ["left", "right", "top", "topleft", "topright", "bottom", "bottomleft", "bottomright"]; - var pos2 = positions.find(function(item3) { + var pos = positions.find(function(item3) { return item3 === props.position; }); return ["p-dialog-mask", { "p-overlay-mask p-overlay-mask-enter": props.modal - }, pos2 ? "p-dialog-".concat(pos2) : ""]; + }, pos ? "p-dialog-".concat(pos) : ""]; }, "mask"), root: /* @__PURE__ */ __name(function root4(_ref4) { var props = _ref4.props, instance = _ref4.instance; @@ -85608,7 +85961,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({ }); const config$1 = { app_title: "ComfyUI", - app_version: "1.8.14" + app_version: "1.9.17" }; /*! * shared v9.13.1 @@ -86016,12 +86369,12 @@ function createTokenizer(source, options4 = {}) { }; const context = /* @__PURE__ */ __name(() => _context, "context"); const { onError } = options4; - function emitError(code2, pos2, offset, ...args) { + function emitError(code2, pos, offset, ...args) { const ctx = context(); - pos2.column += offset; - pos2.offset += offset; + pos.column += offset; + pos.offset += offset; if (onError) { - const loc = location2 ? createLocation(ctx.startLoc, pos2) : null; + const loc = location2 ? createLocation(ctx.startLoc, pos) : null; const err = createCompileError(code2, loc, { domain: ERROR_DOMAIN$3, args @@ -86758,14 +87111,14 @@ function createParser(options4 = {}) { return node3; } __name(startNode, "startNode"); - function endNode(node3, offset, pos2, type) { + function endNode(node3, offset, pos, type) { if (type) { node3.type = type; } if (location2) { node3.end = offset; if (node3.loc) { - node3.loc.end = pos2; + node3.loc.end = pos; } } } @@ -91962,7 +92315,8 @@ const g$5 = { workflow: "Workflow", success: "Success", ok: "OK", - feedback: "Feedback" + feedback: "Feedback", + "continue": "Continue" }; const issueReport$5 = { submitErrorReport: "Submit Error Report (Optional)", @@ -91989,6 +92343,39 @@ const color$5 = { yellow: "Yellow", custom: "Custom" }; +const contextMenu$5 = { + Inputs: "Inputs", + Outputs: "Outputs", + Properties: "Properties", + "Properties Panel": "Properties Panel", + Title: "Title", + Mode: "Mode", + Resize: "Resize", + Collapse: "Collapse", + Expand: "Expand", + Pin: "Pin", + Unpin: "Unpin", + Clone: "Clone", + Remove: "Remove", + Colors: "Colors", + Shapes: "Shapes", + Bypass: "Bypass", + "Copy (Clipspace)": "Copy (Clipspace)", + "Convert Widget to Input": "Convert Widget to Input", + "Convert Input to Widget": "Convert Input to Widget", + "Add Node": "Add Node", + "Add Group": "Add Group", + "Convert to Group Node": "Convert to Group Node", + "Manage Group Nodes": "Manage Group Nodes", + "Add Group For Selected Nodes": "Add Group For Selected Nodes", + "Save Selected as Template": "Save Selected as Template", + "Node Templates": "Node Templates", + Manage: "Manage", + "Convert ": "Convert ", + " to input": " to input", + " to widget": " to widget", + Search: "Search" +}; const icon$5 = { bookmark: "Bookmark", folder: "Folder", @@ -92170,6 +92557,7 @@ const sideToolbar$5 = { deleteFailed: "Attempt to delete the workflow failed.", dirtyCloseTitle: "Save Changes?", dirtyClose: "The files below have been changed. Would you like to save them before closing?", + dirtyCloseHint: "Hold Shift to close without prompt", confirmOverwriteTitle: "Overwrite existing file?", confirmOverwrite: "The file below already exists. Would you like to overwrite it?", workflowTreeType: { @@ -92591,6 +92979,7 @@ const dataTypes$5 = { WEBCAM: "WEBCAM" }; const maintenance$5 = { + title: "Maintenance", allOk: "No issues were detected.", status: "Status", detected: "Detected", @@ -92600,9 +92989,12 @@ const maintenance$5 = { Skipped: "Skipped", showManual: "Show maintenance tasks", confirmTitle: "Are you sure?", + terminalDefaultMessage: "When you run a troubleshooting command, any output will be shown here.", + consoleLogs: "Console Logs", error: { toastTitle: "Task error", taskFailed: "Task failed to run.", + cannotContinue: "Unable to continue - errors remain", defaultDescription: "An error occurred while running a maintenance task." } }; @@ -92611,10 +93003,29 @@ const missingModelsDialog$5 = { missingModels: "Missing Models", missingModelsMessage: "When loading the graph, the following models were not found" }; +const desktopUpdate$5 = { + title: "Updating ComfyUI Desktop", + description: "ComfyUI Desktop is installing new dependencies. This may take a few minutes.", + terminalDefaultMessage: "Any console output from the update will be shown here." +}; +const clipboard$5 = { + successMessage: "Copied to clipboard", + errorMessage: "Failed to copy to clipboard", + errorNotSupported: "Clipboard API not supported in your browser" +}; +const load3d$5 = { + switchCamera: "Switch Camera", + showGrid: "Show Grid", + backgroundColor: "Background Color", + lightIntensity: "Light Intensity", + fov: "FOV", + previewOutput: "Preview Output" +}; const en = { g: g$5, issueReport: issueReport$5, color: color$5, + contextMenu: contextMenu$5, icon: icon$5, welcome: welcome$5, userSelect: userSelect$5, @@ -92640,7 +93051,10 @@ const en = { nodeCategories: nodeCategories$5, dataTypes: dataTypes$5, maintenance: maintenance$5, - missingModelsDialog: missingModelsDialog$5 + missingModelsDialog: missingModelsDialog$5, + desktopUpdate: desktopUpdate$5, + clipboard: clipboard$5, + load3d: load3d$5 }; const AddNoise$5 = { display_name: "AddNoise", @@ -98766,13 +99180,20 @@ const Comfy_Workflow_WorkflowTabsPosition$5 = { "Topbar (2nd-row)": "Topbar (2nd-row)" } }; +const LiteGraph_Canvas_LowQualityRenderingZoomThreshold$5 = { + name: "Low quality rendering zoom threshold", + tooltip: "Render low quality shapes when zoomed out" +}; const LiteGraph_Canvas_MaximumFps$5 = { - name: "Maxium FPS", + name: "Maximum 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" }; const LiteGraph_ContextMenu_Scaling$5 = { name: "Scale node combo widget menus (lists) when zoomed in" }; +const LiteGraph_Node_TooltipDelay$5 = { + name: "Tooltip Delay" +}; const pysssss_SnapToGrid$5 = { name: "Always snap to grid" }; @@ -98870,8 +99291,10 @@ const enSettings = { Comfy_Workflow_ShowMissingNodesWarning: Comfy_Workflow_ShowMissingNodesWarning$5, Comfy_Workflow_SortNodeIdOnSave: Comfy_Workflow_SortNodeIdOnSave$5, Comfy_Workflow_WorkflowTabsPosition: Comfy_Workflow_WorkflowTabsPosition$5, + LiteGraph_Canvas_LowQualityRenderingZoomThreshold: LiteGraph_Canvas_LowQualityRenderingZoomThreshold$5, LiteGraph_Canvas_MaximumFps: LiteGraph_Canvas_MaximumFps$5, LiteGraph_ContextMenu_Scaling: LiteGraph_ContextMenu_Scaling$5, + LiteGraph_Node_TooltipDelay: LiteGraph_Node_TooltipDelay$5, pysssss_SnapToGrid: pysssss_SnapToGrid$5 }; const Comfy_BrowseTemplates$4 = { @@ -99125,6 +99548,11 @@ const frCommands = { Workspace_ToggleSidebarTab_queue: Workspace_ToggleSidebarTab_queue$4, Workspace_ToggleSidebarTab_workflows: Workspace_ToggleSidebarTab_workflows$4 }; +const clipboard$4 = { + errorMessage: "Échec de la copie dans le presse-papiers", + errorNotSupported: "L'API du presse-papiers n'est pas prise en charge par votre navigateur", + successMessage: "Copié dans le presse-papiers" +}; const color$4 = { blue: "Bleu", custom: "Personnalisé", @@ -99134,6 +99562,39 @@ const color$4 = { red: "Rouge", yellow: "Jaune" }; +const contextMenu$4 = { + " to input": " en entrée", + " to widget": " en widget", + "Add Group": "Ajouter un Groupe", + "Add Group For Selected Nodes": "Ajouter un Groupe pour les Nœuds Sélectionnés", + "Add Node": "Ajouter un Nœud", + Bypass: "Contourner", + Clone: "Cloner", + Collapse: "Réduire", + Colors: "Couleurs", + "Convert ": "Convertir ", + "Convert Input to Widget": "Convertir l'Entrée en Widget", + "Convert Widget to Input": "Convertir le Widget en Entrée", + "Convert to Group Node": "Convertir en Nœud de Groupe", + "Copy (Clipspace)": "Copier (Clipspace)", + Expand: "Développer", + Inputs: "Entrées", + Manage: "Gérer", + "Manage Group Nodes": "Gérer les Nœuds de Groupe", + Mode: "Mode", + "Node Templates": "Modèles de Nœuds", + Outputs: "Sorties", + Pin: "Épingler", + Properties: "Propriétés", + "Properties Panel": "Panneau des Propriétés", + Remove: "Supprimer", + Resize: "Redimensionner", + "Save Selected as Template": "Enregistrer la Sélection comme Modèle", + Search: "Recherche", + Shapes: "Formes", + Title: "Titre", + Unpin: "Désépingler" +}; const dataTypes$4 = { AUDIO: "AUDIO", BOOLEAN: "BOOLEAN", @@ -99174,6 +99635,11 @@ const desktopMenu$4 = { quit: "Quitter", reinstall: "Réinstaller" }; +const desktopUpdate$4 = { + description: "ComfyUI Desktop installe de nouvelles dépendances. Cela peut prendre quelques minutes.", + terminalDefaultMessage: "Toute sortie de console de la mise à jour sera affichée ici.", + title: "Mise à jour de ComfyUI Desktop" +}; const downloadGit$4 = { gitWebsite: "Télécharger git", instructions: "Veuillez télécharger et installer la dernière version pour votre système d'exploitation. Le bouton Télécharger git ci-dessous ouvre la page de téléchargement de git-scm.com.", @@ -99200,6 +99666,7 @@ const g$4 = { comingSoon: "Bientôt disponible", command: "Commande", confirm: "Confirmer", + "continue": "Continuer", copyToClipboard: "Copier dans le presse-papiers", currentUser: "Utilisateur actuel", customize: "Personnaliser", @@ -99393,21 +99860,33 @@ const issueReport$4 = { maxLength: "Message trop long" } }; +const load3d$4 = { + backgroundColor: "Couleur de fond", + fov: "FOV", + lightIntensity: "Intensité de la lumière", + previewOutput: "Aperçu de la sortie", + showGrid: "Afficher la grille", + switchCamera: "Changer de caméra" +}; const maintenance$4 = { None: "Aucun", OK: "OK", Skipped: "Ignoré", allOk: "Aucun problème détecté.", confirmTitle: "Êtes-vous sûr ?", + consoleLogs: "Journaux de la console", detected: "Détecté", error: { + cannotContinue: "Impossible de continuer - des erreurs subsistent", defaultDescription: "Une erreur s'est produite lors de l'exécution d'une tâche de maintenance.", taskFailed: "La tâche a échoué.", toastTitle: "Erreur de tâche" }, refreshing: "Actualisation", showManual: "Afficher les tâches de maintenance", - status: "Statut" + status: "Statut", + terminalDefaultMessage: "Lorsque vous exécutez une commande de dépannage, toute sortie sera affichée ici.", + title: "Maintenance" }; const menu$4 = { autoQueue: "File d'attente automatique", @@ -99805,6 +100284,7 @@ const sideToolbar$4 = { deleteFailedTitle: "Échec de la suppression", deleted: "Flux de travail supprimé", dirtyClose: "Les fichiers ci-dessous ont été modifiés. Souhaitez-vous les enregistrer avant de fermer ?", + dirtyCloseHint: "Maintenez Shift pour fermer sans invite", dirtyCloseTitle: "Enregistrer les modifications ?", workflowTreeType: { bookmarks: "Favoris", @@ -99849,9 +100329,12 @@ const workflowService$4 = { saveWorkflow: "Enregistrer le flux de travail" }; const fr = { + clipboard: clipboard$4, color: color$4, + contextMenu: contextMenu$4, dataTypes: dataTypes$4, desktopMenu: desktopMenu$4, + desktopUpdate: desktopUpdate$4, downloadGit: downloadGit$4, electronFileDownload: electronFileDownload$4, g: g$4, @@ -99860,6 +100343,7 @@ const fr = { icon: icon$4, install: install$4, issueReport: issueReport$4, + load3d: load3d$4, maintenance: maintenance$4, menu: menu$4, menuLabels: menuLabels$4, @@ -106003,6 +106487,10 @@ const Comfy_Workflow_WorkflowTabsPosition$4 = { "Topbar (2nd-row)": "Barre supérieure (2ème rangée)" } }; +const LiteGraph_Canvas_LowQualityRenderingZoomThreshold$4 = { + name: "Seuil de zoom pour le rendu de faible qualité", + tooltip: "Rendre des formes de faible qualité lorsqu'on est dézoomé" +}; const LiteGraph_Canvas_MaximumFps$4 = { name: "FPS maximum", tooltip: "Le nombre maximum d'images par seconde que le canevas est autorisé à rendre. Limite l'utilisation du GPU au détriment de la fluidité. Si 0, le taux de rafraîchissement de l'écran est utilisé. Par défaut : 0" @@ -106010,6 +106498,9 @@ const LiteGraph_Canvas_MaximumFps$4 = { const LiteGraph_ContextMenu_Scaling$4 = { name: "Mise à l'échelle des menus de widgets combinés de nœuds (listes) lors du zoom" }; +const LiteGraph_Node_TooltipDelay$4 = { + name: "Délai d'infobulle" +}; const pysssss_SnapToGrid$4 = { name: "Toujours aligner sur la grille" }; @@ -106107,8 +106598,10 @@ const frSettings = { Comfy_Workflow_ShowMissingNodesWarning: Comfy_Workflow_ShowMissingNodesWarning$4, Comfy_Workflow_SortNodeIdOnSave: Comfy_Workflow_SortNodeIdOnSave$4, Comfy_Workflow_WorkflowTabsPosition: Comfy_Workflow_WorkflowTabsPosition$4, + LiteGraph_Canvas_LowQualityRenderingZoomThreshold: LiteGraph_Canvas_LowQualityRenderingZoomThreshold$4, LiteGraph_Canvas_MaximumFps: LiteGraph_Canvas_MaximumFps$4, LiteGraph_ContextMenu_Scaling: LiteGraph_ContextMenu_Scaling$4, + LiteGraph_Node_TooltipDelay: LiteGraph_Node_TooltipDelay$4, pysssss_SnapToGrid: pysssss_SnapToGrid$4 }; const Comfy_BrowseTemplates$3 = { @@ -106121,10 +106614,10 @@ const Comfy_Canvas_ResetView$3 = { label: "ビューをリセット" }; const Comfy_Canvas_ToggleLinkVisibility$3 = { - label: "キャンバスのリンクの可視性を切り替え" + label: "キャンバスのリンク表示を切り替える" }; const Comfy_Canvas_ToggleLock$3 = { - label: "キャンバスのロックを切り替え" + label: "キャンバスのロックを切り替える" }; const Comfy_Canvas_ToggleSelectedNodes_Bypass$3 = { label: "選択したノードのバイパス/バイパス解除" @@ -106202,7 +106695,7 @@ const Comfy_LoadDefaultWorkflow$3 = { label: "デフォルトのワークフローを読み込む" }; const Comfy_NewBlankWorkflow$3 = { - label: "新しい空白のワークフロー" + label: "新しい空のワークフロー" }; const Comfy_OpenClipspace$3 = { label: "クリップスペース" @@ -106250,7 +106743,7 @@ const Workspace_SearchBox_Toggle$3 = { label: "検索ボックスの切り替え" }; const Workspace_ToggleBottomPanel$3 = { - label: "ボトムパネルの切り替え" + label: "パネル下部の切り替え" }; const Workspace_ToggleFocusMode$3 = { label: "フォーカスモードの切り替え" @@ -106345,10 +106838,10 @@ const jaCommands = { Workspace_SearchBox_Toggle: Workspace_SearchBox_Toggle$3, Workspace_ToggleBottomPanel: Workspace_ToggleBottomPanel$3, "Workspace_ToggleBottomPanelTab_command-terminal": { - label: "ターミナルボトムパネルの切り替え" + label: "ターミナルパネル下部の切り替え" }, "Workspace_ToggleBottomPanelTab_logs-terminal": { - label: "ログボトムパネルの切り替え" + label: "ログパネル下部の切り替え" }, Workspace_ToggleFocusMode: Workspace_ToggleFocusMode$3, "Workspace_ToggleSidebarTab_model-library": { @@ -106362,6 +106855,11 @@ const jaCommands = { Workspace_ToggleSidebarTab_queue: Workspace_ToggleSidebarTab_queue$3, Workspace_ToggleSidebarTab_workflows: Workspace_ToggleSidebarTab_workflows$3 }; +const clipboard$3 = { + errorMessage: "クリップボードへのコピーに失敗しました", + errorNotSupported: "お使いのブラウザではクリップボードAPIがサポートされていません", + successMessage: "クリップボードにコピーしました" +}; const color$3 = { blue: "青", custom: "カスタム", @@ -106371,6 +106869,39 @@ const color$3 = { red: "赤", yellow: "黄色" }; +const contextMenu$3 = { + " to input": " 入力へ", + " to widget": " ウィジェットへ", + "Add Group": "グループを追加", + "Add Group For Selected Nodes": "選択したノードのグループを追加", + "Add Node": "ノードを追加", + Bypass: "バイパス", + Clone: "クローン", + Collapse: "折りたたむ", + Colors: "色", + "Convert ": "変換 ", + "Convert Input to Widget": "入力をウィジェットに変換", + "Convert Widget to Input": "ウィジェットを入力に変換", + "Convert to Group Node": "グループノードに変換", + "Copy (Clipspace)": "コピー (Clipspace)", + Expand: "展開", + Inputs: "入力", + Manage: "管理", + "Manage Group Nodes": "グループノードを管理", + Mode: "モード", + "Node Templates": "ノードテンプレート", + Outputs: "出力", + Pin: "ピン", + Properties: "プロパティ", + "Properties Panel": "プロパティパネル", + Remove: "削除", + Resize: "リサイズ", + "Save Selected as Template": "選択したものをテンプレートとして保存", + Search: "検索", + Shapes: "形", + Title: "タイトル", + Unpin: "ピンを解除" +}; const dataTypes$3 = { AUDIO: "オーディオ", BOOLEAN: "ブール", @@ -106400,20 +106931,25 @@ const dataTypes$3 = { SIGMAS: "シグマ", STRING: "文字列", STYLE_MODEL: "スタイルモデル", - TIMESTEPS_RANGE: "タイムステップ範囲", + TIMESTEPS_RANGE: "タイムステップの範囲", UPSCALE_MODEL: "アップスケールモデル", VAE: "VAE", WEBCAM: "ウェブカメラ" }; const desktopMenu$3 = { - confirmQuit: "保存されていないワークフローが開いています。保存されていない変更はすべて失われます。これを無視して終了しますか?", + confirmQuit: "保存されていないワークフローを終了しようとしています。保存されていない変更はすべて失われます。これを無視して終了しますか?", confirmReinstall: "これにより、extra_models_config.yamlファイルがクリアされ、再インストールが開始されます。本当によろしいですか?", quit: "終了", reinstall: "再インストール" }; +const desktopUpdate$3 = { + description: "ComfyUIデスクトップは新しい依存関係をインストールしています。これには数分かかる場合があります。", + terminalDefaultMessage: "更新からの任意のコンソール出力はここに表示されます。", + title: "ComfyUIデスクトップの更新" +}; const downloadGit$3 = { gitWebsite: "Gitをダウンロード", - instructions: "お使いのオペレーティングシステムに最新バージョンをダウンロードしてインストールしてください。以下の「Gitをダウンロード」ボタンをクリックすると、git-scm.comのダウンロードページが開きます。", + instructions: "お使いのオペレーティングシステムに最新のバージョンをダウンロードしてインストールしてください。以下の「Gitをダウンロード」ボタンをクリックすると、git-scm.comのダウンロードページが開きます。", message: "Gitを見つけることができません。正常に動作するためには、Gitの作業コピーが必要です。", skip: "スキップ", title: "Gitをダウンロード", @@ -106437,6 +106973,7 @@ const g$3 = { comingSoon: "近日公開", command: "コマンド", confirm: "確認", + "continue": "続ける", copyToClipboard: "クリップボードにコピー", currentUser: "現在のユーザー", customize: "カスタマイズ", @@ -106454,7 +106991,7 @@ const g$3 = { extensionName: "拡張機能名", feedback: "フィードバック", findIssues: "問題を見つける", - firstTimeUIMessage: "新しいUIを初めて使用しています。「メニュー > 新しいメニューを使用 > 無効」を選択して古いUIに戻してください。", + firstTimeUIMessage: "新しいUIを初めて使用しています。「メニュー > 新しいメニューを使用 > 無効」を選択することで古いUIに戻すことが可能です。", goToNode: "ノードに移動", icon: "アイコン", imageFailedToLoad: "画像の読み込みに失敗しました", @@ -106488,7 +107025,7 @@ const g$3 = { resetKeybindingsTooltip: "キーバインディングをデフォルトにリセット", save: "保存", searchExtensions: "拡張機能を検索", - searchFailedMessage: "検索に一致する設定が見つかりませんでした。検索用語を調整してみてください。", + searchFailedMessage: "検索に一致する設定が見つかりませんでした。検索キーワードを調整してみてください。", searchKeybindings: "キーバインディングを検索", searchModels: "モデルを検索", searchNodes: "ノードを検索", @@ -106541,7 +107078,7 @@ const install$3 = { gpu: "GPU", gpuSelection: { cpuMode: "CPUモード", - cpuModeDescription: "CPUモードは開発者やまれなエッジケースのみを対象としています。", + cpuModeDescription: "CPUモードは開発者や、まれなエッジケースのみを対象としています。", cpuModeDescription2: "これが絶対に必要であることが確定していない場合は、このボックスを無視して上でGPUを選択してください。", customComfyNeedsPython: "ComfyUIはpythonがセットアップされるまで動作しません", customInstallRequirements: "すべての要件と依存関係をインストールする(例:カスタムtorch)", @@ -106566,13 +107103,13 @@ const install$3 = { title: "マニュアル設定", virtualEnvironmentPath: "仮想環境のパス" }, - metricsDisabled: "メトリクス無効", - metricsEnabled: "メトリクス有効", + metricsDisabled: "メトリクスを無効にする", + metricsEnabled: "メトリクスを有効にする", migrateFromExistingInstallation: "既存のインストールから移行", migration: "移行", migrationOptional: "移行は任意です。既存のインストールがない場合、このステップをスキップできます。", migrationSourcePathDescription: "既存のComfyUIインストールがある場合、既存のユーザーファイルとモデルを新しいインストールにコピー/リンクすることができます。既存のComfyUIインストールは影響を受けません。", - moreInfo: "詳細は、私たちの", + moreInfo: "詳しくはこちらをご覧ください", parentMissing: "パスが存在しません - 最初に含まれるディレクトリを作成してください", pathExists: "ディレクトリはすでに存在します - すべてのデータをバックアップしたことを確認してください", pathValidationFailed: "パスの検証に失敗しました", @@ -106612,7 +107149,7 @@ const install$3 = { }, systemLocations: "システムの場所", unhandledError: "未知のエラー", - updateConsent: "以前はクラッシュの報告に同意していました。現在、バグの特定とアプリの改善を助けるためにイベントベースのメトリクスを追跡しています。個人を特定できる情報は収集されません。" + updateConsent: "以前、クラッシュレポートを報告することに同意していました。現在、バグの特定とアプリの改善を助けるためにイベントベースのメトリクスを追跡しています。個人を特定できる情報は収集されません。" }; const issueReport$3 = { contactFollowUp: "フォローアップのために私に連絡する", @@ -106630,21 +107167,33 @@ const issueReport$3 = { maxLength: "メッセージが長すぎます" } }; +const load3d$3 = { + backgroundColor: "背景色", + fov: "FOV", + lightIntensity: "光の強度", + previewOutput: "出力のプレビュー", + showGrid: "グリッドを表示", + switchCamera: "カメラを切り替える" +}; const maintenance$3 = { None: "なし", OK: "OK", Skipped: "スキップされました", allOk: "問題は検出されませんでした。", confirmTitle: "よろしいですか?", + consoleLogs: "コンソールログ", detected: "検出されました", error: { + cannotContinue: "続行できません - エラーが残っています", defaultDescription: "メンテナンスタスクの実行中にエラーが発生しました。", taskFailed: "タスクの実行に失敗しました。", toastTitle: "タスクエラー" }, refreshing: "更新中", showManual: "メンテナンスタスクを表示", - status: "ステータス" + status: "ステータス", + terminalDefaultMessage: "トラブルシューティングコマンドを実行すると、出力はここに表示されます。", + title: "メンテナンス" }; const menu$3 = { autoQueue: "自動キュー", @@ -106725,12 +107274,12 @@ const menuLabels$3 = { "Show Settings Dialog": "設定ダイアログを表示", "Toggle Bottom Panel": "下部パネルの切り替え", "Toggle Focus Mode": "フォーカスモードの切り替え", - "Toggle Logs Bottom Panel": "ログボトムパネルを切り替え", + "Toggle Logs Bottom Panel": "ログパネル下部を切り替え", "Toggle Model Library Sidebar": "モデルライブラリサイドバーを切り替え", "Toggle Node Library Sidebar": "ノードライブラリサイドバーを切り替え", "Toggle Queue Sidebar": "キューサイドバーを切り替え", "Toggle Search Box": "検索ボックスの切り替え", - "Toggle Terminal Bottom Panel": "ターミナルボトムパネルを切り替え", + "Toggle Terminal Bottom Panel": "ターミナルパネル下部を切り替え", "Toggle Theme (Dark/Light)": "テーマを切り替え(ダーク/ライト)", "Toggle Workflows Sidebar": "ワークフローサイドバーを切り替え", Undo: "元に戻す", @@ -106749,7 +107298,7 @@ const nodeCategories$3 = { "3d_models": "3Dモデル", DevTools: "デブツール", _for_testing: "_テスト用", - advanced: "高度な", + advanced: "高度な機能", animation: "アニメーション", api: "API", attention_experiments: "アテンション実験", @@ -107042,6 +107591,7 @@ const sideToolbar$3 = { deleteFailedTitle: "削除に失敗しました", deleted: "ワークフローが削除されました", dirtyClose: "以下のファイルが変更されました。閉じる前に保存しますか?", + dirtyCloseHint: "Shiftキーを押しながら閉じると、プロンプトなしで閉じます", dirtyCloseTitle: "変更を保存しますか?", workflowTreeType: { bookmarks: "ブックマーク", @@ -107086,9 +107636,12 @@ const workflowService$3 = { saveWorkflow: "ワークフローを保存" }; const ja = { + clipboard: clipboard$3, color: color$3, + contextMenu: contextMenu$3, dataTypes: dataTypes$3, desktopMenu: desktopMenu$3, + desktopUpdate: desktopUpdate$3, downloadGit: downloadGit$3, electronFileDownload: electronFileDownload$3, g: g$3, @@ -107097,6 +107650,7 @@ const ja = { icon: icon$3, install: install$3, issueReport: issueReport$3, + load3d: load3d$3, maintenance: maintenance$3, menu: menu$3, menuLabels: menuLabels$3, @@ -113240,6 +113794,10 @@ const Comfy_Workflow_WorkflowTabsPosition$3 = { "Topbar (2nd-row)": "トップバー(2行目)" } }; +const LiteGraph_Canvas_LowQualityRenderingZoomThreshold$3 = { + name: "低品質レンダリングズーム閾値", + tooltip: "ズームアウト時に低品質の形状をレンダリングする" +}; const LiteGraph_Canvas_MaximumFps$3 = { name: "最大FPS", tooltip: "キャンバスがレンダリングできる最大フレーム数です。スムーズさの代わりにGPU使用量を制限します。0の場合、画面のリフレッシュレートが使用されます。デフォルト:0" @@ -113247,6 +113805,9 @@ const LiteGraph_Canvas_MaximumFps$3 = { const LiteGraph_ContextMenu_Scaling$3 = { name: "ズームイン時にノードコンボウィジェットメニュー(リスト)をスケーリングする" }; +const LiteGraph_Node_TooltipDelay$3 = { + name: "ツールチップ遅延" +}; const pysssss_SnapToGrid$3 = { name: "常にグリッドにスナップ" }; @@ -113344,8 +113905,10 @@ const jaSettings = { Comfy_Workflow_ShowMissingNodesWarning: Comfy_Workflow_ShowMissingNodesWarning$3, Comfy_Workflow_SortNodeIdOnSave: Comfy_Workflow_SortNodeIdOnSave$3, Comfy_Workflow_WorkflowTabsPosition: Comfy_Workflow_WorkflowTabsPosition$3, + LiteGraph_Canvas_LowQualityRenderingZoomThreshold: LiteGraph_Canvas_LowQualityRenderingZoomThreshold$3, LiteGraph_Canvas_MaximumFps: LiteGraph_Canvas_MaximumFps$3, LiteGraph_ContextMenu_Scaling: LiteGraph_ContextMenu_Scaling$3, + LiteGraph_Node_TooltipDelay: LiteGraph_Node_TooltipDelay$3, pysssss_SnapToGrid: pysssss_SnapToGrid$3 }; const Comfy_BrowseTemplates$2 = { @@ -113599,6 +114162,11 @@ const koCommands = { Workspace_ToggleSidebarTab_queue: Workspace_ToggleSidebarTab_queue$2, Workspace_ToggleSidebarTab_workflows: Workspace_ToggleSidebarTab_workflows$2 }; +const clipboard$2 = { + errorMessage: "클립보드에 복사하지 못했습니다", + errorNotSupported: "브라우저가 클립보드 API를 지원하지 않습니다.", + successMessage: "클립보드에 복사됨" +}; const color$2 = { blue: "파란색", custom: "사용자 정의", @@ -113608,6 +114176,39 @@ const color$2 = { red: "빨간색", yellow: "노란색" }; +const contextMenu$2 = { + " to input": " 위젯을 입력으로", + " to widget": " 입력을 위젯으로", + "Add Group": "그룹 추가", + "Add Group For Selected Nodes": "선택한 노드 그룹 추가", + "Add Node": "노드 추가", + Bypass: "실행 건너뛰기", + Clone: "복제", + Collapse: "접기", + Colors: "색상", + "Convert ": "[변환] ", + "Convert Input to Widget": "입력을 위젯으로 변환", + "Convert Widget to Input": "위젯을 입력으로 변환", + "Convert to Group Node": "그룹 노드로 변환", + "Copy (Clipspace)": "복사 (Clipspace)", + Expand: "확장", + Inputs: "입력", + Manage: "관리", + "Manage Group Nodes": "그룹 노드 관리", + Mode: "모드", + "Node Templates": "노드 템플릿", + Outputs: "출력", + Pin: "고정", + Properties: "속성", + "Properties Panel": "속성 패널", + Remove: "제거", + Resize: "크기 조정", + "Save Selected as Template": "선택된 부분을 템플릿으로 저장", + Search: "검색", + Shapes: "형태", + Title: "제목", + Unpin: "고정 해제" +}; const dataTypes$2 = { AUDIO: "오디오", BOOLEAN: "논리값", @@ -113648,6 +114249,11 @@ const desktopMenu$2 = { quit: "종료", reinstall: "재설치" }; +const desktopUpdate$2 = { + description: "ComfyUI 데스크톱이 새로운 종속성을 설치하고 있습니다. 이 작업은 몇 분 정도 걸릴 수 있습니다.", + terminalDefaultMessage: "업데이트 콘솔 출력은 여기에 표시됩니다.", + title: "ComfyUI 데스크톱 업데이트 중" +}; const downloadGit$2 = { gitWebsite: "git 프로그램 다운로드", instructions: "운영 체제에 맞는 최신 버전을 다운로드하여 설치하십시오. 아래의 'git 프로그램 다운로드' 버튼을 클릭하면 git-scm.com 다운로드 페이지가 열립니다.", @@ -113674,6 +114280,7 @@ const g$2 = { comingSoon: "곧 출시 예정", command: "명령", confirm: "확인", + "continue": "계속", copyToClipboard: "클립보드에 복사", currentUser: "현재 사용자", customize: "사용자 정의", @@ -113867,21 +114474,33 @@ const issueReport$2 = { maxLength: "메시지가 너무 깁니다" } }; +const load3d$2 = { + backgroundColor: "배경색", + fov: "FOV", + lightIntensity: "조명 강도", + previewOutput: "출력 미리보기", + showGrid: "그리드 표시", + switchCamera: "카메라 전환" +}; const maintenance$2 = { None: "없음", OK: "확인", Skipped: "건너뜀", allOk: "문제가 발견되지 않았습니다.", confirmTitle: "확실합니까?", + consoleLogs: "콘솔 로그", detected: "감지됨", error: { + cannotContinue: "계속할 수 없습니다 - 오류가 남아 있습니다", defaultDescription: "유지 보수 작업을 실행하는 동안 오류가 발생했습니다.", taskFailed: "작업 실행에 실패했습니다.", toastTitle: "작업 오류" }, refreshing: "새로 고침 중", showManual: "유지 보수 작업 보기", - status: "상태" + status: "상태", + terminalDefaultMessage: "문제 해결 명령을 실행하면 출력이 여기에 표시됩니다.", + title: "유지 보수" }; const menu$2 = { autoQueue: "자동 실행 큐", @@ -114279,6 +114898,7 @@ const sideToolbar$2 = { deleteFailedTitle: "삭제 실패", deleted: "워크플로가 삭제되었습니다.", dirtyClose: "아래 파일들이 변경되었습니다. 닫기 전에 저장하시겠습니까?", + dirtyCloseHint: "프롬프트 없이 닫으려면 Shift를 누르세요", dirtyCloseTitle: "변경 사항 저장", workflowTreeType: { bookmarks: "북마크", @@ -114323,9 +114943,12 @@ const workflowService$2 = { saveWorkflow: "워크플로 저장" }; const ko = { + clipboard: clipboard$2, color: color$2, + contextMenu: contextMenu$2, dataTypes: dataTypes$2, desktopMenu: desktopMenu$2, + desktopUpdate: desktopUpdate$2, downloadGit: downloadGit$2, electronFileDownload: electronFileDownload$2, g: g$2, @@ -114334,6 +114957,7 @@ const ko = { icon: icon$2, install: install$2, issueReport: issueReport$2, + load3d: load3d$2, maintenance: maintenance$2, menu: menu$2, menuLabels: menuLabels$2, @@ -120477,6 +121101,10 @@ const Comfy_Workflow_WorkflowTabsPosition$2 = { "Topbar (2nd-row)": "상단바 (2번째 행)" } }; +const LiteGraph_Canvas_LowQualityRenderingZoomThreshold$2 = { + name: "저품질 렌더링 줌 임계값", + tooltip: "줌 아웃시 저품질 도형 렌더링" +}; const LiteGraph_Canvas_MaximumFps$2 = { name: "최대 FPS", tooltip: "캔버스가 렌더링할 수 있는 최대 프레임 수입니다. 부드럽게 동작하도록 GPU 사용률을 제한 합니다. 0이면 화면 주사율로 작동 합니다. 기본값: 0" @@ -120484,6 +121112,9 @@ const LiteGraph_Canvas_MaximumFps$2 = { const LiteGraph_ContextMenu_Scaling$2 = { name: "확대시 노드 콤보 위젯 메뉴 (목록) 스케일링" }; +const LiteGraph_Node_TooltipDelay$2 = { + name: "툴팁 지연" +}; const pysssss_SnapToGrid$2 = { name: "항상 그리드에 스냅" }; @@ -120581,8 +121212,10 @@ const koSettings = { Comfy_Workflow_ShowMissingNodesWarning: Comfy_Workflow_ShowMissingNodesWarning$2, Comfy_Workflow_SortNodeIdOnSave: Comfy_Workflow_SortNodeIdOnSave$2, Comfy_Workflow_WorkflowTabsPosition: Comfy_Workflow_WorkflowTabsPosition$2, + LiteGraph_Canvas_LowQualityRenderingZoomThreshold: LiteGraph_Canvas_LowQualityRenderingZoomThreshold$2, LiteGraph_Canvas_MaximumFps: LiteGraph_Canvas_MaximumFps$2, LiteGraph_ContextMenu_Scaling: LiteGraph_ContextMenu_Scaling$2, + LiteGraph_Node_TooltipDelay: LiteGraph_Node_TooltipDelay$2, pysssss_SnapToGrid: pysssss_SnapToGrid$2 }; const Comfy_BrowseTemplates$1 = { @@ -120836,6 +121469,11 @@ const ruCommands = { Workspace_ToggleSidebarTab_queue: Workspace_ToggleSidebarTab_queue$1, Workspace_ToggleSidebarTab_workflows: Workspace_ToggleSidebarTab_workflows$1 }; +const clipboard$1 = { + errorMessage: "Не удалось скопировать в буфер обмена", + errorNotSupported: "API буфера обмена не поддерживается в вашем браузере", + successMessage: "Скопировано в буфер обмена" +}; const color$1 = { blue: "Синий", custom: "Пользовательский", @@ -120845,6 +121483,39 @@ const color$1 = { red: "Красный", yellow: "Жёлтый" }; +const contextMenu$1 = { + " to input": " во вход", + " to widget": " в виджет", + "Add Group": "Добавить группу", + "Add Group For Selected Nodes": "Добавить группу для выбранных узлов", + "Add Node": "Добавить узел", + Bypass: "Обход", + Clone: "Клонировать", + Collapse: "Свернуть", + Colors: "Цвета", + "Convert ": "Преобразовать ", + "Convert Input to Widget": "Преобразовать вход в виджет", + "Convert Widget to Input": "Преобразовать виджет во вход", + "Convert to Group Node": "Преобразовать в групповой узел", + "Copy (Clipspace)": "Копировать (Clipspace)", + Expand: "Развернуть", + Inputs: "Входы", + Manage: "Управлять", + "Manage Group Nodes": "Управление групповыми узлами", + Mode: "Режим", + "Node Templates": "Шаблоны узлов", + Outputs: "Выходы", + Pin: "Закрепить", + Properties: "Свойства", + "Properties Panel": "Панель свойств", + Remove: "Удалить", + Resize: "Изменить размер", + "Save Selected as Template": "Сохранить выбранное как шаблон", + Search: "Поиск", + Shapes: "Формы", + Title: "Заголовок", + Unpin: "Открепить" +}; const dataTypes$1 = { AUDIO: "АУДИО", BOOLEAN: "БУЛЕВО", @@ -120885,6 +121556,11 @@ const desktopMenu$1 = { quit: "Выйти", reinstall: "Переустановить" }; +const desktopUpdate$1 = { + description: "ComfyUI Desktop устанавливает новые зависимости. Это может занять несколько минут.", + terminalDefaultMessage: "Любой вывод консоли из обновления будет отображаться здесь.", + title: "Обновление ComfyUI Desktop" +}; const downloadGit$1 = { gitWebsite: "Скачать git", instructions: "Пожалуйста, скачайте и установите последнюю версию для вашей операционной системы. Кнопка «Скачать git» ниже открывает страницу загрузок git-scm.com.", @@ -120911,6 +121587,7 @@ const g$1 = { comingSoon: "Скоро будет", command: "Команда", confirm: "Подтвердить", + "continue": "Продолжить", copyToClipboard: "Скопировать в буфер обмена", currentUser: "Текущий пользователь", customize: "Настроить", @@ -121104,21 +121781,33 @@ const issueReport$1 = { maxLength: "Сообщение слишком длинное" } }; +const load3d$1 = { + backgroundColor: "Цвет фона", + fov: "Угол обзора", + lightIntensity: "Интенсивность света", + previewOutput: "Предварительный просмотр", + showGrid: "Показать сетку", + switchCamera: "Переключить камеру" +}; const maintenance$1 = { None: "Нет", OK: "OK", Skipped: "Пропущено", allOk: "Проблем не обнаружено.", confirmTitle: "Вы уверены?", + consoleLogs: "Консольные журналы", detected: "Обнаружено", error: { + cannotContinue: "Невозможно продолжить - остались ошибки", defaultDescription: "Произошла ошибка при выполнении задачи по обслуживанию.", taskFailed: "Не удалось выполнить задачу.", toastTitle: "Ошибка задачи" }, refreshing: "Обновление", showManual: "Показать задачи по обслуживанию", - status: "Статус" + status: "Статус", + terminalDefaultMessage: "Когда вы запускаете команду для устранения неполадок, любой вывод будет отображаться здесь.", + title: "Обслуживание" }; const menu$1 = { autoQueue: "Автоочередь", @@ -121516,6 +122205,7 @@ const sideToolbar$1 = { deleteFailedTitle: "Не удалось удалить", deleted: "Рабочий процесс удалён", dirtyClose: "Файлы ниже были изменены. Вы хотите сохранить их перед закрытием?", + dirtyCloseHint: "Удерживайте Shift, чтобы закрыть без подсказки", dirtyCloseTitle: "Сохранить изменения?", workflowTreeType: { bookmarks: "Закладки", @@ -121560,9 +122250,12 @@ const workflowService$1 = { saveWorkflow: "Сохранить рабочий процесс" }; const ru = { + clipboard: clipboard$1, color: color$1, + contextMenu: contextMenu$1, dataTypes: dataTypes$1, desktopMenu: desktopMenu$1, + desktopUpdate: desktopUpdate$1, downloadGit: downloadGit$1, electronFileDownload: electronFileDownload$1, g: g$1, @@ -121571,6 +122264,7 @@ const ru = { icon: icon$1, install: install$1, issueReport: issueReport$1, + load3d: load3d$1, maintenance: maintenance$1, menu: menu$1, menuLabels: menuLabels$1, @@ -127714,6 +128408,10 @@ const Comfy_Workflow_WorkflowTabsPosition$1 = { "Topbar (2nd-row)": "Топбар (2-й ряд)" } }; +const LiteGraph_Canvas_LowQualityRenderingZoomThreshold$1 = { + name: "Порог масштабирования для рендеринга низкого качества", + tooltip: "Рендеринг фигур низкого качества при уменьшении масштаба" +}; const LiteGraph_Canvas_MaximumFps$1 = { name: "Максимум FPS", tooltip: "Максимальное количество кадров в секунду, которое холст может рендерить. Ограничивает использование GPU за счёт плавности. Если 0, используется частота обновления экрана. По умолчанию: 0" @@ -127721,6 +128419,9 @@ const LiteGraph_Canvas_MaximumFps$1 = { const LiteGraph_ContextMenu_Scaling$1 = { name: "Масштабирование комбинированных виджетов меню узлов (списков) при увеличении" }; +const LiteGraph_Node_TooltipDelay$1 = { + name: "Задержка всплывающей подсказки" +}; const pysssss_SnapToGrid$1 = { name: "Всегда привязываться к сетке" }; @@ -127818,8 +128519,10 @@ const ruSettings = { Comfy_Workflow_ShowMissingNodesWarning: Comfy_Workflow_ShowMissingNodesWarning$1, Comfy_Workflow_SortNodeIdOnSave: Comfy_Workflow_SortNodeIdOnSave$1, Comfy_Workflow_WorkflowTabsPosition: Comfy_Workflow_WorkflowTabsPosition$1, + LiteGraph_Canvas_LowQualityRenderingZoomThreshold: LiteGraph_Canvas_LowQualityRenderingZoomThreshold$1, LiteGraph_Canvas_MaximumFps: LiteGraph_Canvas_MaximumFps$1, LiteGraph_ContextMenu_Scaling: LiteGraph_ContextMenu_Scaling$1, + LiteGraph_Node_TooltipDelay: LiteGraph_Node_TooltipDelay$1, pysssss_SnapToGrid: pysssss_SnapToGrid$1 }; const Comfy_BrowseTemplates = { @@ -128073,6 +128776,11 @@ const zhCommands = { Workspace_ToggleSidebarTab_queue, Workspace_ToggleSidebarTab_workflows }; +const clipboard = { + errorMessage: "复制到剪贴板失败", + errorNotSupported: "您的浏览器不支持剪贴板API", + successMessage: "已复制到剪贴板" +}; const color = { blue: "蓝色", custom: "自定义", @@ -128082,6 +128790,39 @@ const color = { red: "红色", yellow: "黄色" }; +const contextMenu = { + " to input": " 为输入", + " to widget": " 为控件", + "Add Group": "添加组", + "Add Group For Selected Nodes": "为选定节点添加组", + "Add Node": "添加节点", + Bypass: "绕过", + Clone: "克隆", + Collapse: "折叠", + Colors: "颜色", + "Convert ": "转换 ", + "Convert Input to Widget": "将输入转换为控件", + "Convert Widget to Input": "将控件转换为输入", + "Convert to Group Node": "转换为组节点", + "Copy (Clipspace)": "复制 (Clipspace)", + Expand: "展开", + Inputs: "输入", + Manage: "管理", + "Manage Group Nodes": "管理组节点", + Mode: "模式", + "Node Templates": "节点模板", + Outputs: "输出", + Pin: "固定", + Properties: "属性", + "Properties Panel": "属性面板", + Remove: "删除", + Resize: "调整大小", + "Save Selected as Template": "将选定节点另存为模板", + Search: "搜索", + Shapes: "形状", + Title: "标题", + Unpin: "取消固定" +}; const dataTypes = { AUDIO: "音频", BOOLEAN: "布尔", @@ -128122,6 +128863,11 @@ const desktopMenu = { quit: "退出", reinstall: "重新安装" }; +const desktopUpdate = { + description: "ComfyUI桌面正在安装新的依赖项。这可能需要几分钟的时间。", + terminalDefaultMessage: "更新过程中的任何控制台输出都将在这里显示。", + title: "正在更新ComfyUI桌面" +}; const downloadGit = { gitWebsite: "下载 git", instructions: "请下载并安装适合您操作系统的最新版本。下面的下载 git 按钮将打开 git-scm.com 下载页面。", @@ -128148,6 +128894,7 @@ const g = { comingSoon: "即将推出", command: "指令", confirm: "确认", + "continue": "继续", copyToClipboard: "复制到剪贴板", currentUser: "当前用户", customize: "自定义", @@ -128341,21 +129088,33 @@ const issueReport = { maxLength: "消息过长" } }; +const load3d = { + backgroundColor: "背景颜色", + fov: "视场", + lightIntensity: "光照强度", + previewOutput: "预览输出", + showGrid: "显示网格", + switchCamera: "切换摄像头" +}; const maintenance = { None: "无", OK: "确定", Skipped: "跳过", allOk: "未检测到任何问题。", confirmTitle: "你确定吗?", + consoleLogs: "控制台日志", detected: "检测到", error: { + cannotContinue: "无法继续 - 仍有错误", defaultDescription: "运行维护任务时发生错误。", taskFailed: "任务运行失败。", toastTitle: "任务错误" }, refreshing: "刷新中", showManual: "显示维护任务", - status: "状态" + status: "状态", + terminalDefaultMessage: "当你运行一个故障排除命令时,任何输出都会在这里显示。", + title: "维护" }; const menu = { autoQueue: "自动执行", @@ -128753,6 +129512,7 @@ const sideToolbar = { deleteFailedTitle: "删除失败", deleted: "工作流已删除", dirtyClose: "以下文件已被更改。您想在关闭之前保存它们吗?", + dirtyCloseHint: "按住 Shift 关闭而不提示", dirtyCloseTitle: "保存更改?", workflowTreeType: { bookmarks: "书签", @@ -128797,9 +129557,12 @@ const workflowService = { saveWorkflow: "保存工作流" }; const zh = { + clipboard, color, + contextMenu, dataTypes, desktopMenu, + desktopUpdate, downloadGit, electronFileDownload, g, @@ -128808,6 +129571,7 @@ const zh = { icon, install, issueReport, + load3d, maintenance, menu, menuLabels, @@ -134951,6 +135715,10 @@ const Comfy_Workflow_WorkflowTabsPosition = { "Topbar (2nd-row)": "顶部栏 (第二行)" } }; +const LiteGraph_Canvas_LowQualityRenderingZoomThreshold = { + name: "低质量渲染缩放阈值", + tooltip: "在缩小时渲染低质量形状" +}; const LiteGraph_Canvas_MaximumFps = { name: "最大FPS", tooltip: "画布允许渲染的最大帧数。限制GPU使用以换取流畅度。如果为0,则使用屏幕刷新率。默认值:0" @@ -134958,6 +135726,9 @@ const LiteGraph_Canvas_MaximumFps = { const LiteGraph_ContextMenu_Scaling = { name: "放大时缩放节点组合部件菜单(列表)" }; +const LiteGraph_Node_TooltipDelay = { + name: "工具提示延迟" +}; const pysssss_SnapToGrid = { name: "始终吸附到网格" }; @@ -135055,8 +135826,10 @@ const zhSettings = { Comfy_Workflow_ShowMissingNodesWarning, Comfy_Workflow_SortNodeIdOnSave, Comfy_Workflow_WorkflowTabsPosition, + LiteGraph_Canvas_LowQualityRenderingZoomThreshold, LiteGraph_Canvas_MaximumFps, LiteGraph_ContextMenu_Scaling, + LiteGraph_Node_TooltipDelay, pysssss_SnapToGrid }; function buildLocale(main, nodes, commands2, settings) { @@ -141171,7 +141944,219 @@ var lodash = lodash$1.exports; })(lodash$1, lodash$1.exports); var lodashExports = lodash$1.exports; const _ = /* @__PURE__ */ getDefaultExportFromCjs(lodashExports); -const _hoisted_1$17 = { class: "prompt-dialog-content flex flex-col gap-6 m-2 mt-4" }; +var theme$w = /* @__PURE__ */ __name(function theme10(_ref) { + var dt2 = _ref.dt; + return "\n.p-message {\n border-radius: ".concat(dt2("message.border.radius"), ";\n outline-width: ").concat(dt2("message.border.width"), ";\n outline-style: solid;\n}\n\n.p-message-content {\n display: flex;\n align-items: center;\n padding: ").concat(dt2("message.content.padding"), ";\n gap: ").concat(dt2("message.content.gap"), ";\n height: 100%;\n}\n\n.p-message-icon {\n flex-shrink: 0;\n}\n\n.p-message-close-button {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n margin-inline-start: auto;\n overflow: hidden;\n position: relative;\n width: ").concat(dt2("message.close.button.width"), ";\n height: ").concat(dt2("message.close.button.height"), ";\n border-radius: ").concat(dt2("message.close.button.border.radius"), ";\n background: transparent;\n transition: background ").concat(dt2("message.transition.duration"), ", color ").concat(dt2("message.transition.duration"), ", outline-color ").concat(dt2("message.transition.duration"), ", box-shadow ").concat(dt2("message.transition.duration"), ", opacity 0.3s;\n outline-color: transparent;\n color: inherit;\n padding: 0;\n border: none;\n cursor: pointer;\n user-select: none;\n}\n\n.p-message-close-icon {\n font-size: ").concat(dt2("message.close.icon.size"), ";\n width: ").concat(dt2("message.close.icon.size"), ";\n height: ").concat(dt2("message.close.icon.size"), ";\n}\n\n.p-message-close-button:focus-visible {\n outline-width: ").concat(dt2("message.close.button.focus.ring.width"), ";\n outline-style: ").concat(dt2("message.close.button.focus.ring.style"), ";\n outline-offset: ").concat(dt2("message.close.button.focus.ring.offset"), ";\n}\n\n.p-message-info {\n background: ").concat(dt2("message.info.background"), ";\n outline-color: ").concat(dt2("message.info.border.color"), ";\n color: ").concat(dt2("message.info.color"), ";\n box-shadow: ").concat(dt2("message.info.shadow"), ";\n}\n\n.p-message-info .p-message-close-button:focus-visible {\n outline-color: ").concat(dt2("message.info.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt2("message.info.close.button.focus.ring.shadow"), ";\n}\n\n.p-message-info .p-message-close-button:hover {\n background: ").concat(dt2("message.info.close.button.hover.background"), ";\n}\n\n.p-message-info.p-message-outlined {\n color: ").concat(dt2("message.info.outlined.color"), ";\n outline-color: ").concat(dt2("message.info.outlined.border.color"), ";\n}\n\n.p-message-info.p-message-simple {\n color: ").concat(dt2("message.info.simple.color"), ";\n}\n\n.p-message-success {\n background: ").concat(dt2("message.success.background"), ";\n outline-color: ").concat(dt2("message.success.border.color"), ";\n color: ").concat(dt2("message.success.color"), ";\n box-shadow: ").concat(dt2("message.success.shadow"), ";\n}\n\n.p-message-success .p-message-close-button:focus-visible {\n outline-color: ").concat(dt2("message.success.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt2("message.success.close.button.focus.ring.shadow"), ";\n}\n\n.p-message-success .p-message-close-button:hover {\n background: ").concat(dt2("message.success.close.button.hover.background"), ";\n}\n\n.p-message-success.p-message-outlined {\n color: ").concat(dt2("message.success.outlined.color"), ";\n outline-color: ").concat(dt2("message.success.outlined.border.color"), ";\n}\n\n.p-message-success.p-message-simple {\n color: ").concat(dt2("message.success.simple.color"), ";\n}\n\n.p-message-warn {\n background: ").concat(dt2("message.warn.background"), ";\n outline-color: ").concat(dt2("message.warn.border.color"), ";\n color: ").concat(dt2("message.warn.color"), ";\n box-shadow: ").concat(dt2("message.warn.shadow"), ";\n}\n\n.p-message-warn .p-message-close-button:focus-visible {\n outline-color: ").concat(dt2("message.warn.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt2("message.warn.close.button.focus.ring.shadow"), ";\n}\n\n.p-message-warn .p-message-close-button:hover {\n background: ").concat(dt2("message.warn.close.button.hover.background"), ";\n}\n\n.p-message-warn.p-message-outlined {\n color: ").concat(dt2("message.warn.outlined.color"), ";\n outline-color: ").concat(dt2("message.warn.outlined.border.color"), ";\n}\n\n.p-message-warn.p-message-simple {\n color: ").concat(dt2("message.warn.simple.color"), ";\n}\n\n.p-message-error {\n background: ").concat(dt2("message.error.background"), ";\n outline-color: ").concat(dt2("message.error.border.color"), ";\n color: ").concat(dt2("message.error.color"), ";\n box-shadow: ").concat(dt2("message.error.shadow"), ";\n}\n\n.p-message-error .p-message-close-button:focus-visible {\n outline-color: ").concat(dt2("message.error.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt2("message.error.close.button.focus.ring.shadow"), ";\n}\n\n.p-message-error .p-message-close-button:hover {\n background: ").concat(dt2("message.error.close.button.hover.background"), ";\n}\n\n.p-message-error.p-message-outlined {\n color: ").concat(dt2("message.error.outlined.color"), ";\n outline-color: ").concat(dt2("message.error.outlined.border.color"), ";\n}\n\n.p-message-error.p-message-simple {\n color: ").concat(dt2("message.error.simple.color"), ";\n}\n\n.p-message-secondary {\n background: ").concat(dt2("message.secondary.background"), ";\n outline-color: ").concat(dt2("message.secondary.border.color"), ";\n color: ").concat(dt2("message.secondary.color"), ";\n box-shadow: ").concat(dt2("message.secondary.shadow"), ";\n}\n\n.p-message-secondary .p-message-close-button:focus-visible {\n outline-color: ").concat(dt2("message.secondary.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt2("message.secondary.close.button.focus.ring.shadow"), ";\n}\n\n.p-message-secondary .p-message-close-button:hover {\n background: ").concat(dt2("message.secondary.close.button.hover.background"), ";\n}\n\n.p-message-secondary.p-message-outlined {\n color: ").concat(dt2("message.secondary.outlined.color"), ";\n outline-color: ").concat(dt2("message.secondary.outlined.border.color"), ";\n}\n\n.p-message-secondary.p-message-simple {\n color: ").concat(dt2("message.secondary.simple.color"), ";\n}\n\n.p-message-contrast {\n background: ").concat(dt2("message.contrast.background"), ";\n outline-color: ").concat(dt2("message.contrast.border.color"), ";\n color: ").concat(dt2("message.contrast.color"), ";\n box-shadow: ").concat(dt2("message.contrast.shadow"), ";\n}\n\n.p-message-contrast .p-message-close-button:focus-visible {\n outline-color: ").concat(dt2("message.contrast.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt2("message.contrast.close.button.focus.ring.shadow"), ";\n}\n\n.p-message-contrast .p-message-close-button:hover {\n background: ").concat(dt2("message.contrast.close.button.hover.background"), ";\n}\n\n.p-message-contrast.p-message-outlined {\n color: ").concat(dt2("message.contrast.outlined.color"), ";\n outline-color: ").concat(dt2("message.contrast.outlined.border.color"), ";\n}\n\n.p-message-contrast.p-message-simple {\n color: ").concat(dt2("message.contrast.simple.color"), ";\n}\n\n.p-message-text {\n font-size: ").concat(dt2("message.text.font.size"), ";\n font-weight: ").concat(dt2("message.text.font.weight"), ";\n}\n\n.p-message-icon {\n font-size: ").concat(dt2("message.icon.size"), ";\n width: ").concat(dt2("message.icon.size"), ";\n height: ").concat(dt2("message.icon.size"), ";\n}\n\n.p-message-enter-from {\n opacity: 0;\n}\n\n.p-message-enter-active {\n transition: opacity 0.3s;\n}\n\n.p-message.p-message-leave-from {\n max-height: 1000px;\n}\n\n.p-message.p-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin: 0;\n}\n\n.p-message-leave-active {\n overflow: hidden;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin 0.3s;\n}\n\n.p-message-leave-active .p-message-close-button {\n opacity: 0;\n}\n\n.p-message-sm .p-message-content {\n padding: ").concat(dt2("message.content.sm.padding"), ";\n}\n\n.p-message-sm .p-message-text {\n font-size: ").concat(dt2("message.text.sm.font.size"), ";\n}\n\n.p-message-sm .p-message-icon {\n font-size: ").concat(dt2("message.icon.sm.size"), ";\n width: ").concat(dt2("message.icon.sm.size"), ";\n height: ").concat(dt2("message.icon.sm.size"), ";\n}\n\n.p-message-sm .p-message-close-icon {\n font-size: ").concat(dt2("message.close.icon.sm.size"), ";\n width: ").concat(dt2("message.close.icon.sm.size"), ";\n height: ").concat(dt2("message.close.icon.sm.size"), ";\n}\n\n.p-message-lg .p-message-content {\n padding: ").concat(dt2("message.content.lg.padding"), ";\n}\n\n.p-message-lg .p-message-text {\n font-size: ").concat(dt2("message.text.lg.font.size"), ";\n}\n\n.p-message-lg .p-message-icon {\n font-size: ").concat(dt2("message.icon.lg.size"), ";\n width: ").concat(dt2("message.icon.lg.size"), ";\n height: ").concat(dt2("message.icon.lg.size"), ";\n}\n\n.p-message-lg .p-message-close-icon {\n font-size: ").concat(dt2("message.close.icon.lg.size"), ";\n width: ").concat(dt2("message.close.icon.lg.size"), ";\n height: ").concat(dt2("message.close.icon.lg.size"), ";\n}\n\n.p-message-outlined {\n background: transparent;\n outline-width: ").concat(dt2("message.outlined.border.width"), ";\n}\n\n.p-message-simple {\n background: transparent;\n outline-color: transparent;\n box-shadow: none;\n}\n\n.p-message-simple .p-message-content {\n padding: ").concat(dt2("message.simple.content.padding"), ";\n}\n\n.p-message-outlined .p-message-close-button:hover,\n.p-message-simple .p-message-close-button:hover {\n background: transparent;\n}\n"); +}, "theme"); +var classes$A = { + root: /* @__PURE__ */ __name(function root5(_ref2) { + var props = _ref2.props; + return ["p-message p-component p-message-" + props.severity, { + "p-message-outlined": props.variant === "outlined", + "p-message-simple": props.variant === "simple", + "p-message-sm": props.size === "small", + "p-message-lg": props.size === "large" + }]; + }, "root"), + content: "p-message-content", + icon: "p-message-icon", + text: "p-message-text", + closeButton: "p-message-close-button", + closeIcon: "p-message-close-icon" +}; +var MessageStyle = BaseStyle$1.extend({ + name: "message", + theme: theme$w, + classes: classes$A +}); +var script$1$A = { + name: "BaseMessage", + "extends": script$14, + props: { + severity: { + type: String, + "default": "info" + }, + closable: { + type: Boolean, + "default": false + }, + life: { + type: Number, + "default": null + }, + icon: { + type: String, + "default": void 0 + }, + closeIcon: { + type: String, + "default": void 0 + }, + closeButtonProps: { + type: null, + "default": null + }, + size: { + type: String, + "default": null + }, + variant: { + type: String, + "default": null + } + }, + style: MessageStyle, + provide: /* @__PURE__ */ __name(function provide9() { + return { + $pcMessage: this, + $parentInstance: this + }; + }, "provide") +}; +var script$S = { + name: "Message", + "extends": script$1$A, + inheritAttrs: false, + emits: ["close", "life-end"], + timeout: null, + data: /* @__PURE__ */ __name(function data5() { + return { + visible: true + }; + }, "data"), + mounted: /* @__PURE__ */ __name(function mounted6() { + var _this = this; + if (this.life) { + setTimeout(function() { + _this.visible = false; + _this.$emit("life-end"); + }, this.life); + } + }, "mounted"), + methods: { + close: /* @__PURE__ */ __name(function close3(event) { + this.visible = false; + this.$emit("close", event); + }, "close") + }, + computed: { + closeAriaLabel: /* @__PURE__ */ __name(function closeAriaLabel2() { + return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : void 0; + }, "closeAriaLabel") + }, + directives: { + ripple: Ripple + }, + components: { + TimesIcon: script$_ + } +}; +function _typeof$g(o2) { + "@babel/helpers - typeof"; + return _typeof$g = "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$g(o2); +} +__name(_typeof$g, "_typeof$g"); +function ownKeys$i(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$i, "ownKeys$i"); +function _objectSpread$i(e2) { + for (var r2 = 1; r2 < arguments.length; r2++) { + var t2 = null != arguments[r2] ? arguments[r2] : {}; + r2 % 2 ? ownKeys$i(Object(t2), true).forEach(function(r3) { + _defineProperty$i(e2, r3, t2[r3]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$i(Object(t2)).forEach(function(r3) { + Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3)); + }); + } + return e2; +} +__name(_objectSpread$i, "_objectSpread$i"); +function _defineProperty$i(e2, r2, t2) { + return (r2 = _toPropertyKey$f(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; +} +__name(_defineProperty$i, "_defineProperty$i"); +function _toPropertyKey$f(t2) { + var i2 = _toPrimitive$f(t2, "string"); + return "symbol" == _typeof$g(i2) ? i2 : i2 + ""; +} +__name(_toPropertyKey$f, "_toPropertyKey$f"); +function _toPrimitive$f(t2, r2) { + if ("object" != _typeof$g(t2) || !t2) return t2; + var e2 = t2[Symbol.toPrimitive]; + if (void 0 !== e2) { + var i2 = e2.call(t2, r2 || "default"); + if ("object" != _typeof$g(i2)) return i2; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r2 ? String : Number)(t2); +} +__name(_toPrimitive$f, "_toPrimitive$f"); +var _hoisted_1$17 = ["aria-label"]; +function render$Q(_ctx, _cache, $props, $setup, $data, $options) { + var _component_TimesIcon = resolveComponent("TimesIcon"); + var _directive_ripple = resolveDirective("ripple"); + return openBlock(), createBlock(Transition, mergeProps$2({ + name: "p-message", + appear: "" + }, _ctx.ptmi("transition")), { + "default": withCtx(function() { + return [withDirectives(createBaseVNode("div", mergeProps$2({ + "class": _ctx.cx("root"), + role: "alert", + "aria-live": "assertive", + "aria-atomic": "true" + }, _ctx.ptm("root")), [_ctx.$slots.container ? renderSlot(_ctx.$slots, "container", { + key: 0, + closeCallback: $options.close + }) : (openBlock(), createElementBlock("div", mergeProps$2({ + key: 1, + "class": _ctx.cx("content") + }, _ctx.ptm("content")), [renderSlot(_ctx.$slots, "icon", { + "class": normalizeClass(_ctx.cx("icon")) + }, function() { + return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ? "span" : null), mergeProps$2({ + "class": [_ctx.cx("icon"), _ctx.icon] + }, _ctx.ptm("icon")), null, 16, ["class"]))]; + }), _ctx.$slots["default"] ? (openBlock(), createElementBlock("div", mergeProps$2({ + key: 0, + "class": _ctx.cx("text") + }, _ctx.ptm("text")), [renderSlot(_ctx.$slots, "default")], 16)) : createCommentVNode("", true), _ctx.closable ? withDirectives((openBlock(), createElementBlock("button", mergeProps$2({ + key: 1, + "class": _ctx.cx("closeButton"), + "aria-label": $options.closeAriaLabel, + type: "button", + onClick: _cache[0] || (_cache[0] = function($event) { + return $options.close($event); + }) + }, _objectSpread$i(_objectSpread$i({}, _ctx.closeButtonProps), _ctx.ptm("closeButton"))), [renderSlot(_ctx.$slots, "closeicon", {}, function() { + return [_ctx.closeIcon ? (openBlock(), createElementBlock("i", mergeProps$2({ + key: 0, + "class": [_ctx.cx("closeIcon"), _ctx.closeIcon] + }, _ctx.ptm("closeIcon")), null, 16)) : (openBlock(), createBlock(_component_TimesIcon, mergeProps$2({ + key: 1, + "class": [_ctx.cx("closeIcon"), _ctx.closeIcon] + }, _ctx.ptm("closeIcon")), null, 16, ["class"]))]; + })], 16, _hoisted_1$17)), [[_directive_ripple]]) : createCommentVNode("", true)], 16))], 16), [[vShow, $data.visible]])]; + }), + _: 3 + }, 16); +} +__name(render$Q, "render$Q"); +script$S.render = render$Q; +const _hoisted_1$16 = { class: "prompt-dialog-content flex flex-col gap-6 m-2 mt-4" }; const _hoisted_2$L = { key: 0, class: "pl-4 m-0 flex flex-col gap-2" @@ -141183,7 +142168,8 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({ message: {}, type: {}, onConfirm: { type: Function }, - itemList: {} + itemList: {}, + hint: {} }, setup(__props) { const props = __props; @@ -141197,13 +142183,25 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({ useDialogStore().closeDialog(); }, "onConfirm"); return (_ctx, _cache) => { - return openBlock(), createElementBlock("section", _hoisted_1$17, [ + return openBlock(), createElementBlock("section", _hoisted_1$16, [ createBaseVNode("span", null, toDisplayString$1(_ctx.message), 1), _ctx.itemList?.length ? (openBlock(), createElementBlock("ul", _hoisted_2$L, [ (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.itemList, (item3) => { return openBlock(), createElementBlock("li", { key: item3 }, toDisplayString$1(item3), 1); }), 128)) ])) : createCommentVNode("", true), + _ctx.hint ? (openBlock(), createBlock(unref(script$S), { + key: 1, + icon: "pi pi-info-circle", + severity: "secondary", + size: "small", + variant: "simple" + }, { + default: withCtx(() => [ + createTextVNode(toDisplayString$1(_ctx.hint), 1) + ]), + _: 1 + })) : createCommentVNode("", true), createBaseVNode("div", _hoisted_3$u, [ createVNode(unref(script$V), { label: _ctx.$t("g.cancel"), @@ -141260,13 +142258,13 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({ }; } }); -const ConfirmationDialogContent = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-3df70997"]]); -var theme$w = /* @__PURE__ */ __name(function theme10(_ref) { +const ConfirmationDialogContent = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-4f1e3bbe"]]); +var theme$v = /* @__PURE__ */ __name(function theme11(_ref) { var dt2 = _ref.dt; return "\n.p-divider-horizontal {\n display: flex;\n width: 100%;\n position: relative;\n align-items: center;\n margin: ".concat(dt2("divider.horizontal.margin"), ";\n padding: ").concat(dt2("divider.horizontal.padding"), ';\n}\n\n.p-divider-horizontal:before {\n position: absolute;\n display: block;\n inset-block-start: 50%;\n inset-inline-start: 0;\n width: 100%;\n content: "";\n border-block-start: 1px solid ').concat(dt2("divider.border.color"), ";\n}\n\n.p-divider-horizontal .p-divider-content {\n padding: ").concat(dt2("divider.horizontal.content.padding"), ";\n}\n\n.p-divider-vertical {\n min-height: 100%;\n display: flex;\n position: relative;\n justify-content: center;\n margin: ").concat(dt2("divider.vertical.margin"), ";\n padding: ").concat(dt2("divider.vertical.padding"), ';\n}\n\n.p-divider-vertical:before {\n position: absolute;\n display: block;\n inset-block-start: 0;\n inset-inline-start: 50%;\n height: 100%;\n content: "";\n border-inline-start: 1px solid ').concat(dt2("divider.border.color"), ";\n}\n\n.p-divider.p-divider-vertical .p-divider-content {\n padding: ").concat(dt2("divider.vertical.content.padding"), ";\n}\n\n.p-divider-content {\n z-index: 1;\n background: ").concat(dt2("divider.content.background"), ";\n color: ").concat(dt2("divider.content.color"), ";\n}\n\n.p-divider-solid.p-divider-horizontal:before {\n border-block-start-style: solid;\n}\n\n.p-divider-solid.p-divider-vertical:before {\n border-inline-start-style: solid;\n}\n\n.p-divider-dashed.p-divider-horizontal:before {\n border-block-start-style: dashed;\n}\n\n.p-divider-dashed.p-divider-vertical:before {\n border-inline-start-style: dashed;\n}\n\n.p-divider-dotted.p-divider-horizontal:before {\n border-block-start-style: dotted;\n}\n\n.p-divider-dotted.p-divider-vertical:before {\n border-inline-start-style: dotted;\n}\n\n.p-divider-left:dir(rtl),\n.p-divider-right:dir(rtl) {\n flex-direction: row-reverse;\n}\n"); }, "theme"); var inlineStyles$3 = { - root: /* @__PURE__ */ __name(function root5(_ref2) { + root: /* @__PURE__ */ __name(function root6(_ref2) { var props = _ref2.props; return { justifyContent: props.layout === "horizontal" ? props.align === "center" || props.align === null ? "center" : props.align === "left" ? "flex-start" : props.align === "right" ? "flex-end" : null : null, @@ -141274,8 +142272,8 @@ var inlineStyles$3 = { }; }, "root") }; -var classes$A = { - root: /* @__PURE__ */ __name(function root6(_ref3) { +var classes$z = { + root: /* @__PURE__ */ __name(function root7(_ref3) { var props = _ref3.props; return ["p-divider p-component", "p-divider-" + props.layout, "p-divider-" + props.type, { "p-divider-left": props.layout === "horizontal" && (!props.align || props.align === "left") @@ -141295,11 +142293,11 @@ var classes$A = { }; var DividerStyle = BaseStyle$1.extend({ name: "divider", - theme: theme$w, - classes: classes$A, + theme: theme$v, + classes: classes$z, inlineStyles: inlineStyles$3 }); -var script$1$A = { +var script$1$z = { name: "BaseDivider", "extends": script$14, props: { @@ -141317,20 +142315,20 @@ var script$1$A = { } }, style: DividerStyle, - provide: /* @__PURE__ */ __name(function provide9() { + provide: /* @__PURE__ */ __name(function provide10() { return { $pcDivider: this, $parentInstance: this }; }, "provide") }; -var script$S = { +var script$R = { name: "Divider", - "extends": script$1$A, + "extends": script$1$z, inheritAttrs: false }; -var _hoisted_1$16 = ["aria-orientation"]; -function render$Q(_ctx, _cache, $props, $setup, $data, $options) { +var _hoisted_1$15 = ["aria-orientation"]; +function render$P(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", mergeProps$2({ "class": _ctx.cx("root"), style: _ctx.sx("root"), @@ -141339,15 +142337,15 @@ function render$Q(_ctx, _cache, $props, $setup, $data, $options) { }, _ctx.ptmi("root")), [_ctx.$slots["default"] ? (openBlock(), createElementBlock("div", mergeProps$2({ key: 0, "class": _ctx.cx("content") - }, _ctx.ptm("content")), [renderSlot(_ctx.$slots, "default")], 16)) : createCommentVNode("", true)], 16, _hoisted_1$16); + }, _ctx.ptm("content")), [renderSlot(_ctx.$slots, "default")], 16)) : createCommentVNode("", true)], 16, _hoisted_1$15); } -__name(render$Q, "render$Q"); -script$S.render = render$Q; -var theme$v = /* @__PURE__ */ __name(function theme11(_ref) { +__name(render$P, "render$P"); +script$R.render = render$P; +var theme$u = /* @__PURE__ */ __name(function theme12(_ref) { var dt2 = _ref.dt; return "\n.p-scrollpanel-content-container {\n overflow: hidden;\n width: 100%;\n height: 100%;\n position: relative;\n z-index: 1;\n float: left;\n}\n\n.p-scrollpanel-content {\n height: calc(100% + calc(2 * ".concat(dt2("scrollpanel.bar.size"), "));\n width: calc(100% + calc(2 * ").concat(dt2("scrollpanel.bar.size"), "));\n padding-inline: 0 calc(2 * ").concat(dt2("scrollpanel.bar.size"), ");\n padding-block: 0 calc(2 * ").concat(dt2("scrollpanel.bar.size"), ");\n position: relative;\n overflow: auto;\n box-sizing: border-box;\n scrollbar-width: none;\n}\n\n.p-scrollpanel-content::-webkit-scrollbar {\n display: none;\n}\n\n.p-scrollpanel-bar {\n position: relative;\n border-radius: ").concat(dt2("scrollpanel.bar.border.radius"), ";\n z-index: 2;\n cursor: pointer;\n opacity: 0;\n outline-color: transparent;\n background: ").concat(dt2("scrollpanel.bar.background"), ";\n border: 0 none;\n transition: outline-color ").concat(dt2("scrollpanel.transition.duration"), ", opacity ").concat(dt2("scrollpanel.transition.duration"), ";\n}\n\n.p-scrollpanel-bar:focus-visible {\n box-shadow: ").concat(dt2("scrollpanel.bar.focus.ring.shadow"), ";\n outline: ").concat(dt2("scrollpanel.barfocus.ring.width"), " ").concat(dt2("scrollpanel.bar.focus.ring.style"), " ").concat(dt2("scrollpanel.bar.focus.ring.color"), ";\n outline-offset: ").concat(dt2("scrollpanel.barfocus.ring.offset"), ";\n}\n\n.p-scrollpanel-bar-y {\n width: ").concat(dt2("scrollpanel.bar.size"), ";\n inset-block-start: 0;\n}\n\n.p-scrollpanel-bar-x {\n height: ").concat(dt2("scrollpanel.bar.size"), ";\n inset-block-end: 0;\n}\n\n.p-scrollpanel-hidden {\n visibility: hidden;\n}\n\n.p-scrollpanel:hover .p-scrollpanel-bar,\n.p-scrollpanel:active .p-scrollpanel-bar {\n opacity: 1;\n}\n\n.p-scrollpanel-grabbed {\n user-select: none;\n}\n"); }, "theme"); -var classes$z = { +var classes$y = { root: "p-scrollpanel p-component", contentContainer: "p-scrollpanel-content-container", content: "p-scrollpanel-content", @@ -141356,10 +142354,10 @@ var classes$z = { }; var ScrollPanelStyle = BaseStyle$1.extend({ name: "scrollpanel", - theme: theme$v, - classes: classes$z + theme: theme$u, + classes: classes$y }); -var script$1$z = { +var script$1$y = { name: "BaseScrollPanel", "extends": script$14, props: { @@ -141369,16 +142367,16 @@ var script$1$z = { } }, style: ScrollPanelStyle, - provide: /* @__PURE__ */ __name(function provide10() { + provide: /* @__PURE__ */ __name(function provide11() { return { $pcScrollPanel: this, $parentInstance: this }; }, "provide") }; -var script$R = { +var script$Q = { name: "ScrollPanel", - "extends": script$1$z, + "extends": script$1$y, inheritAttrs: false, initialized: false, documentResizeListener: null, @@ -141393,7 +142391,7 @@ var script$R = { lastPageY: null, timer: null, outsideClickListener: null, - data: /* @__PURE__ */ __name(function data5() { + data: /* @__PURE__ */ __name(function data6() { return { id: this.$attrs.id, orientation: "vertical", @@ -141406,7 +142404,7 @@ var script$R = { this.id = newValue2 || UniqueComponentId(); }, "$attrsId") }, - mounted: /* @__PURE__ */ __name(function mounted6() { + mounted: /* @__PURE__ */ __name(function mounted7() { this.id = this.id || UniqueComponentId(); if (this.$el.offsetParent) { this.initialize(); @@ -141675,10 +142673,10 @@ var script$R = { }, "contentId") } }; -var _hoisted_1$15 = ["id"]; +var _hoisted_1$14 = ["id"]; var _hoisted_2$K = ["aria-controls", "aria-valuenow"]; var _hoisted_3$t = ["aria-controls", "aria-valuenow"]; -function render$P(_ctx, _cache, $props, $setup, $data, $options) { +function render$O(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", mergeProps$2({ "class": _ctx.cx("root") }, _ctx.ptmi("root")), [createBaseVNode("div", mergeProps$2({ @@ -141693,7 +142691,7 @@ function render$P(_ctx, _cache, $props, $setup, $data, $options) { onMouseenter: _cache[1] || (_cache[1] = function() { return $options.moveBar && $options.moveBar.apply($options, arguments); }) - }, _ctx.ptm("content")), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$15)], 16), createBaseVNode("div", mergeProps$2({ + }, _ctx.ptm("content")), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$14)], 16), createBaseVNode("div", mergeProps$2({ ref: "xBar", "class": _ctx.cx("barx"), tabindex: "0", @@ -141742,13 +142740,13 @@ function render$P(_ctx, _cache, $props, $setup, $data, $options) { "data-pc-group-section": "bar" }), null, 16, _hoisted_3$t)], 16); } -__name(render$P, "render$P"); -script$R.render = render$P; -var theme$u = /* @__PURE__ */ __name(function theme12(_ref) { +__name(render$O, "render$O"); +script$Q.render = render$O; +var theme$t = /* @__PURE__ */ __name(function theme13(_ref) { var dt2 = _ref.dt; return "\n.p-card {\n background: ".concat(dt2("card.background"), ";\n color: ").concat(dt2("card.color"), ";\n box-shadow: ").concat(dt2("card.shadow"), ";\n border-radius: ").concat(dt2("card.border.radius"), ";\n display: flex;\n flex-direction: column;\n}\n\n.p-card-caption {\n display: flex;\n flex-direction: column;\n gap: ").concat(dt2("card.caption.gap"), ";\n}\n\n.p-card-body {\n padding: ").concat(dt2("card.body.padding"), ";\n display: flex;\n flex-direction: column;\n gap: ").concat(dt2("card.body.gap"), ";\n}\n\n.p-card-title {\n font-size: ").concat(dt2("card.title.font.size"), ";\n font-weight: ").concat(dt2("card.title.font.weight"), ";\n}\n\n.p-card-subtitle {\n color: ").concat(dt2("card.subtitle.color"), ";\n}\n"); }, "theme"); -var classes$y = { +var classes$x = { root: "p-card p-component", header: "p-card-header", body: "p-card-body", @@ -141760,26 +142758,26 @@ var classes$y = { }; var CardStyle = BaseStyle$1.extend({ name: "card", - theme: theme$u, - classes: classes$y + theme: theme$t, + classes: classes$x }); -var script$1$y = { +var script$1$x = { name: "BaseCard", "extends": script$14, style: CardStyle, - provide: /* @__PURE__ */ __name(function provide11() { + provide: /* @__PURE__ */ __name(function provide12() { return { $pcCard: this, $parentInstance: this }; }, "provide") }; -var script$Q = { +var script$P = { name: "Card", - "extends": script$1$y, + "extends": script$1$x, inheritAttrs: false }; -function render$O(_ctx, _cache, $props, $setup, $data, $options) { +function render$N(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("div", mergeProps$2({ "class": _ctx.cx("root") }, _ctx.ptmi("root")), [_ctx.$slots.header ? (openBlock(), createElementBlock("div", mergeProps$2({ @@ -141803,9 +142801,9 @@ function render$O(_ctx, _cache, $props, $setup, $data, $options) { "class": _ctx.cx("footer") }, _ctx.ptm("footer")), [renderSlot(_ctx.$slots, "footer")], 16)) : createCommentVNode("", true)], 16)], 16); } -__name(render$O, "render$O"); -script$Q.render = render$O; -const _hoisted_1$14 = { class: "flex flex-col items-center" }; +__name(render$N, "render$N"); +script$P.render = render$N; +const _hoisted_1$13 = { class: "flex flex-col items-center" }; const _hoisted_2$J = { class: "whitespace-pre-line text-center" }; const _sfc_main$Z = /* @__PURE__ */ defineComponent({ __name: "NoResultsPlaceholder", @@ -141823,9 +142821,9 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({ return openBlock(), createElementBlock("div", { class: normalizeClass(["no-results-placeholder p-8 h-full", props.class]) }, [ - createVNode(unref(script$Q), null, { + createVNode(unref(script$P), null, { content: withCtx(() => [ - createBaseVNode("div", _hoisted_1$14, [ + createBaseVNode("div", _hoisted_1$13, [ createBaseVNode("i", { class: normalizeClass(_ctx.icon), style: { "font-size": "3rem", "margin-bottom": "1rem" } @@ -141881,22 +142879,22 @@ function useCopyToClipboard() { await copy2(text2); toast.add({ severity: "success", - summary: "Success", - detail: "Copied to clipboard", + summary: t("g.success"), + detail: t("clipboard.successMessage"), life: 3e3 }); } catch (err) { toast.add({ severity: "error", - summary: "Error", - detail: "Failed to copy report" + summary: t("g.error"), + detail: t("clipboard.errorMessage") }); } } else { toast.add({ severity: "error", - summary: "Error", - detail: "Clipboard API not supported in your browser" + summary: t("g.error"), + detail: t("clipboard.errorNotSupported") }); } }, "copyToClipboard"); @@ -143351,15 +144349,15 @@ function handler() { } __name(handler, "handler"); var ZIndex = handler(); -function _typeof$g(o2) { +function _typeof$f(o2) { "@babel/helpers - typeof"; - return _typeof$g = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) { + return _typeof$f = "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$g(o2); + }, _typeof$f(o2); } -__name(_typeof$g, "_typeof$g"); +__name(_typeof$f, "_typeof$f"); function _slicedToArray$4(r2, e2) { return _arrayWithHoles$4(r2) || _iterableToArrayLimit$4(r2, e2) || _unsupportedIterableToArray$g(r2, e2) || _nonIterableRest$4(); } @@ -143406,7 +144404,7 @@ function _arrayWithHoles$4(r2) { if (Array.isArray(r2)) return r2; } __name(_arrayWithHoles$4, "_arrayWithHoles$4"); -function ownKeys$i(e2, r2) { +function ownKeys$h(e2, r2) { var t2 = Object.keys(e2); if (Object.getOwnPropertySymbols) { var o2 = Object.getOwnPropertySymbols(e2); @@ -143416,39 +144414,39 @@ function ownKeys$i(e2, r2) { } return t2; } -__name(ownKeys$i, "ownKeys$i"); -function _objectSpread$i(e2) { +__name(ownKeys$h, "ownKeys$h"); +function _objectSpread$h(e2) { for (var r2 = 1; r2 < arguments.length; r2++) { var t2 = null != arguments[r2] ? arguments[r2] : {}; - r2 % 2 ? ownKeys$i(Object(t2), true).forEach(function(r3) { - _defineProperty$i(e2, r3, t2[r3]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$i(Object(t2)).forEach(function(r3) { + r2 % 2 ? ownKeys$h(Object(t2), true).forEach(function(r3) { + _defineProperty$h(e2, r3, t2[r3]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$h(Object(t2)).forEach(function(r3) { Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3)); }); } return e2; } -__name(_objectSpread$i, "_objectSpread$i"); -function _defineProperty$i(e2, r2, t2) { - return (r2 = _toPropertyKey$f(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; +__name(_objectSpread$h, "_objectSpread$h"); +function _defineProperty$h(e2, r2, t2) { + return (r2 = _toPropertyKey$e(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; } -__name(_defineProperty$i, "_defineProperty$i"); -function _toPropertyKey$f(t2) { - var i2 = _toPrimitive$f(t2, "string"); - return "symbol" == _typeof$g(i2) ? i2 : i2 + ""; +__name(_defineProperty$h, "_defineProperty$h"); +function _toPropertyKey$e(t2) { + var i2 = _toPrimitive$e(t2, "string"); + return "symbol" == _typeof$f(i2) ? i2 : i2 + ""; } -__name(_toPropertyKey$f, "_toPropertyKey$f"); -function _toPrimitive$f(t2, r2) { - if ("object" != _typeof$g(t2) || !t2) return t2; +__name(_toPropertyKey$e, "_toPropertyKey$e"); +function _toPrimitive$e(t2, r2) { + if ("object" != _typeof$f(t2) || !t2) return t2; var e2 = t2[Symbol.toPrimitive]; if (void 0 !== e2) { var i2 = e2.call(t2, r2 || "default"); - if ("object" != _typeof$g(i2)) return i2; + if ("object" != _typeof$f(i2)) return i2; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r2 ? String : Number)(t2); } -__name(_toPrimitive$f, "_toPrimitive$f"); +__name(_toPrimitive$e, "_toPrimitive$e"); function _regeneratorRuntime() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = /* @__PURE__ */ __name(function _regeneratorRuntime2() { @@ -143512,7 +144510,7 @@ function _regeneratorRuntime() { var c3 = tryCatch(t3[r4], t3, o3); if ("throw" !== c3.type) { var u3 = c3.arg, h3 = u3.value; - return h3 && "object" == _typeof$g(h3) && n2.call(h3, "__await") ? e3.resolve(h3.__await).then(function(t4) { + return h3 && "object" == _typeof$f(h3) && n2.call(h3, "__await") ? e3.resolve(h3.__await).then(function(t4) { invoke2("next", t4, i3, a3); }, function(t4) { invoke2("throw", t4, i3, a3); @@ -143606,7 +144604,7 @@ function _regeneratorRuntime() { return i3.next = i3; } } - throw new TypeError(_typeof$g(e3) + " is not iterable"); + throw new TypeError(_typeof$f(e3) + " is not iterable"); } __name(values, "values"); return GeneratorFunction.prototype = GeneratorFunctionPrototype, o2(g2, "constructor", { value: GeneratorFunctionPrototype, configurable: true }), o2(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: true }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u2, "GeneratorFunction"), e2.isGeneratorFunction = function(t3) { @@ -143852,11 +144850,11 @@ var useForm = /* @__PURE__ */ __name(function useForm2() { }; watch(function() { return states[field2].value; - }, function(newValue2, oldValue2) { + }, function(newValue2, oldValue) { if (states[field2].pristine) { states[field2].pristine = false; } - if (newValue2 !== oldValue2) { + if (newValue2 !== oldValue) { states[field2].dirty = true; } validateFieldOn(field2, fieldOptions, "validateOnValueUpdate", true); @@ -143874,7 +144872,7 @@ var useForm = /* @__PURE__ */ __name(function useForm2() { return validateOn("validateOnSubmit", true); case 2: results = _context2.sent; - return _context2.abrupt("return", callback(_objectSpread$i({ + return _context2.abrupt("return", callback(_objectSpread$h({ originalEvent: event, valid: toValue$4(valid), states: toValue$4(states), @@ -143974,7 +144972,7 @@ var useForm = /* @__PURE__ */ __name(function useForm2() { _context3.t5 = {}; case 33: fieldResult = _context3.t5; - isArray$7(fieldResult.errors) && (fieldResult.errors = _defineProperty$i({}, fieldName, fieldResult.errors)); + isArray$7(fieldResult.errors) && (fieldResult.errors = _defineProperty$h({}, fieldName, fieldResult.errors)); result = mergeKeys$1(result, fieldResult); case 36: errors2 = (_result$errors$fieldN = result.errors[fieldName]) !== null && _result$errors$fieldN !== void 0 ? _result$errors$fieldN : []; @@ -144746,16 +145744,16 @@ var Base = { this._loadedStyleNames.clear(); }, "clearLoadedStyleNames") }; -function _typeof$f(o2) { +function _typeof$e(o2) { "@babel/helpers - typeof"; - return _typeof$f = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) { + return _typeof$e = "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$f(o2); + }, _typeof$e(o2); } -__name(_typeof$f, "_typeof$f"); -function ownKeys$h(e2, r2) { +__name(_typeof$e, "_typeof$e"); +function ownKeys$g(e2, r2) { var t2 = Object.keys(e2); if (Object.getOwnPropertySymbols) { var o2 = Object.getOwnPropertySymbols(e2); @@ -144765,39 +145763,39 @@ function ownKeys$h(e2, r2) { } return t2; } -__name(ownKeys$h, "ownKeys$h"); -function _objectSpread$h(e2) { +__name(ownKeys$g, "ownKeys$g"); +function _objectSpread$g(e2) { for (var r2 = 1; r2 < arguments.length; r2++) { var t2 = null != arguments[r2] ? arguments[r2] : {}; - r2 % 2 ? ownKeys$h(Object(t2), true).forEach(function(r3) { - _defineProperty$h(e2, r3, t2[r3]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$h(Object(t2)).forEach(function(r3) { + r2 % 2 ? ownKeys$g(Object(t2), true).forEach(function(r3) { + _defineProperty$g(e2, r3, t2[r3]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$g(Object(t2)).forEach(function(r3) { Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3)); }); } return e2; } -__name(_objectSpread$h, "_objectSpread$h"); -function _defineProperty$h(e2, r2, t2) { - return (r2 = _toPropertyKey$e(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; +__name(_objectSpread$g, "_objectSpread$g"); +function _defineProperty$g(e2, r2, t2) { + return (r2 = _toPropertyKey$d(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; } -__name(_defineProperty$h, "_defineProperty$h"); -function _toPropertyKey$e(t2) { - var i2 = _toPrimitive$e(t2, "string"); - return "symbol" == _typeof$f(i2) ? i2 : i2 + ""; +__name(_defineProperty$g, "_defineProperty$g"); +function _toPropertyKey$d(t2) { + var i2 = _toPrimitive$d(t2, "string"); + return "symbol" == _typeof$e(i2) ? i2 : i2 + ""; } -__name(_toPropertyKey$e, "_toPropertyKey$e"); -function _toPrimitive$e(t2, r2) { - if ("object" != _typeof$f(t2) || !t2) return t2; +__name(_toPropertyKey$d, "_toPropertyKey$d"); +function _toPrimitive$d(t2, r2) { + if ("object" != _typeof$e(t2) || !t2) return t2; var e2 = t2[Symbol.toPrimitive]; if (void 0 !== e2) { var i2 = e2.call(t2, r2 || "default"); - if ("object" != _typeof$f(i2)) return i2; + if ("object" != _typeof$e(i2)) return i2; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r2 ? String : Number)(t2); } -__name(_toPrimitive$e, "_toPrimitive$e"); +__name(_toPrimitive$d, "_toPrimitive$d"); function tryOnMounted(fn) { var sync = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; if (getCurrentInstance()) onMounted(fn); @@ -144818,7 +145816,7 @@ function useStyle(css4) { var load3 = /* @__PURE__ */ __name(function load4(_css) { var _props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; if (!document2) return; - var _styleProps = _objectSpread$h(_objectSpread$h({}, props), _props); + var _styleProps = _objectSpread$g(_objectSpread$g({}, props), _props); var _name = _styleProps.name || name2, _id2 = _styleProps.id || id3, _nonce = _styleProps.nonce || nonce; styleRef.value = document2.querySelector('style[data-primevue-style-id="'.concat(_name, '"]')) || document2.getElementById(_id2) || document2.createElement("style"); if (!styleRef.value.isConnected) { @@ -144866,15 +145864,15 @@ function useStyle(css4) { }; } __name(useStyle, "useStyle"); -function _typeof$e(o2) { +function _typeof$d(o2) { "@babel/helpers - typeof"; - return _typeof$e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) { + return _typeof$d = "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$e(o2); + }, _typeof$d(o2); } -__name(_typeof$e, "_typeof$e"); +__name(_typeof$d, "_typeof$d"); function _slicedToArray$3(r2, e2) { return _arrayWithHoles$3(r2) || _iterableToArrayLimit$3(r2, e2) || _unsupportedIterableToArray$f(r2, e2) || _nonIterableRest$3(); } @@ -144921,7 +145919,7 @@ function _arrayWithHoles$3(r2) { if (Array.isArray(r2)) return r2; } __name(_arrayWithHoles$3, "_arrayWithHoles$3"); -function ownKeys$g(e2, r2) { +function ownKeys$f(e2, r2) { var t2 = Object.keys(e2); if (Object.getOwnPropertySymbols) { var o2 = Object.getOwnPropertySymbols(e2); @@ -144931,40 +145929,40 @@ function ownKeys$g(e2, r2) { } return t2; } -__name(ownKeys$g, "ownKeys$g"); -function _objectSpread$g(e2) { +__name(ownKeys$f, "ownKeys$f"); +function _objectSpread$f(e2) { for (var r2 = 1; r2 < arguments.length; r2++) { var t2 = null != arguments[r2] ? arguments[r2] : {}; - r2 % 2 ? ownKeys$g(Object(t2), true).forEach(function(r3) { - _defineProperty$g(e2, r3, t2[r3]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$g(Object(t2)).forEach(function(r3) { + r2 % 2 ? ownKeys$f(Object(t2), true).forEach(function(r3) { + _defineProperty$f(e2, r3, t2[r3]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$f(Object(t2)).forEach(function(r3) { Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3)); }); } return e2; } -__name(_objectSpread$g, "_objectSpread$g"); -function _defineProperty$g(e2, r2, t2) { - return (r2 = _toPropertyKey$d(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; +__name(_objectSpread$f, "_objectSpread$f"); +function _defineProperty$f(e2, r2, t2) { + return (r2 = _toPropertyKey$c(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; } -__name(_defineProperty$g, "_defineProperty$g"); -function _toPropertyKey$d(t2) { - var i2 = _toPrimitive$d(t2, "string"); - return "symbol" == _typeof$e(i2) ? i2 : i2 + ""; +__name(_defineProperty$f, "_defineProperty$f"); +function _toPropertyKey$c(t2) { + var i2 = _toPrimitive$c(t2, "string"); + return "symbol" == _typeof$d(i2) ? i2 : i2 + ""; } -__name(_toPropertyKey$d, "_toPropertyKey$d"); -function _toPrimitive$d(t2, r2) { - if ("object" != _typeof$e(t2) || !t2) return t2; +__name(_toPropertyKey$c, "_toPropertyKey$c"); +function _toPrimitive$c(t2, r2) { + if ("object" != _typeof$d(t2) || !t2) return t2; var e2 = t2[Symbol.toPrimitive]; if (void 0 !== e2) { var i2 = e2.call(t2, r2 || "default"); - if ("object" != _typeof$e(i2)) return i2; + if ("object" != _typeof$d(i2)) return i2; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r2 ? String : Number)(t2); } -__name(_toPrimitive$d, "_toPrimitive$d"); -var theme$t = /* @__PURE__ */ __name(function theme13(_ref) { +__name(_toPrimitive$c, "_toPrimitive$c"); +var theme$s = /* @__PURE__ */ __name(function theme14(_ref) { var dt2 = _ref.dt; return "\n*,\n::before,\n::after {\n box-sizing: border-box;\n}\n\n/* Non vue overlay animations */\n.p-connected-overlay {\n opacity: 0;\n transform: scaleY(0.8);\n transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1),\n opacity 0.12s cubic-bezier(0, 0, 0.2, 1);\n}\n\n.p-connected-overlay-visible {\n opacity: 1;\n transform: scaleY(1);\n}\n\n.p-connected-overlay-hidden {\n opacity: 0;\n transform: scaleY(1);\n transition: opacity 0.1s linear;\n}\n\n/* Vue based overlay animations */\n.p-connected-overlay-enter-from {\n opacity: 0;\n transform: scaleY(0.8);\n}\n\n.p-connected-overlay-leave-to {\n opacity: 0;\n}\n\n.p-connected-overlay-enter-active {\n transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1),\n opacity 0.12s cubic-bezier(0, 0, 0.2, 1);\n}\n\n.p-connected-overlay-leave-active {\n transition: opacity 0.1s linear;\n}\n\n/* Toggleable Content */\n.p-toggleable-content-enter-from,\n.p-toggleable-content-leave-to {\n max-height: 0;\n}\n\n.p-toggleable-content-enter-to,\n.p-toggleable-content-leave-from {\n max-height: 1000px;\n}\n\n.p-toggleable-content-leave-active {\n overflow: hidden;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);\n}\n\n.p-toggleable-content-enter-active {\n overflow: hidden;\n transition: max-height 1s ease-in-out;\n}\n\n.p-disabled,\n.p-disabled * {\n cursor: default;\n pointer-events: none;\n user-select: none;\n}\n\n.p-disabled,\n.p-component:disabled {\n opacity: ".concat(dt2("disabled.opacity"), ";\n}\n\n.pi {\n font-size: ").concat(dt2("icon.size"), ";\n}\n\n.p-icon {\n width: ").concat(dt2("icon.size"), ";\n height: ").concat(dt2("icon.size"), ";\n}\n\n.p-overlay-mask {\n background: ").concat(dt2("mask.background"), ";\n color: ").concat(dt2("mask.color"), ";\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.p-overlay-mask-enter {\n animation: p-overlay-mask-enter-animation ").concat(dt2("mask.transition.duration"), " forwards;\n}\n\n.p-overlay-mask-leave {\n animation: p-overlay-mask-leave-animation ").concat(dt2("mask.transition.duration"), " forwards;\n}\n\n@keyframes p-overlay-mask-enter-animation {\n from {\n background: transparent;\n }\n to {\n background: ").concat(dt2("mask.background"), ";\n }\n}\n@keyframes p-overlay-mask-leave-animation {\n from {\n background: ").concat(dt2("mask.background"), ";\n }\n to {\n background: transparent;\n }\n}\n"); }, "theme"); @@ -144972,13 +145970,13 @@ var css$1 = /* @__PURE__ */ __name(function css3(_ref2) { var dt2 = _ref2.dt; return "\n.p-hidden-accessible {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.p-hidden-accessible input,\n.p-hidden-accessible select {\n transform: scale(0);\n}\n\n.p-overflow-hidden {\n overflow: hidden;\n padding-right: ".concat(dt2("scrollbar.width"), ";\n}\n"); }, "css"); -var classes$x = {}; +var classes$w = {}; var inlineStyles$2 = {}; var BaseStyle = { name: "base", css: css$1, - theme: theme$t, - classes: classes$x, + theme: theme$s, + classes: classes$w, inlineStyles: inlineStyles$2, load: /* @__PURE__ */ __name(function load2(style2) { var options4 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; @@ -144988,7 +145986,7 @@ var BaseStyle = { var computedStyle = transform2(resolve$1(style2, { dt })); - return isNotEmpty$1(computedStyle) ? useStyle(minifyCSS$1(computedStyle), _objectSpread$g({ + return isNotEmpty$1(computedStyle) ? useStyle(minifyCSS$1(computedStyle), _objectSpread$f({ name: this.name }, options4)) : {}; }, "load"), @@ -145058,7 +146056,7 @@ var BaseStyle = { return css4.join(""); }, "getThemeStyleSheet"), extend: /* @__PURE__ */ __name(function extend4(style2) { - return _objectSpread$g(_objectSpread$g({}, this), {}, { + return _objectSpread$f(_objectSpread$f({}, this), {}, { css: void 0, theme: void 0 }, style2); @@ -145067,15 +146065,15 @@ var BaseStyle = { var BaseComponentStyle = BaseStyle.extend({ name: "common" }); -function _typeof$d(o2) { +function _typeof$c(o2) { "@babel/helpers - typeof"; - return _typeof$d = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) { + return _typeof$c = "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$d(o2); + }, _typeof$c(o2); } -__name(_typeof$d, "_typeof$d"); +__name(_typeof$c, "_typeof$c"); function _toArray(r2) { return _arrayWithHoles$2(r2) || _iterableToArray$b(r2) || _unsupportedIterableToArray$e(r2) || _nonIterableRest$2(); } @@ -145132,7 +146130,7 @@ function _arrayWithHoles$2(r2) { if (Array.isArray(r2)) return r2; } __name(_arrayWithHoles$2, "_arrayWithHoles$2"); -function ownKeys$f(e2, r2) { +function ownKeys$e(e2, r2) { var t2 = Object.keys(e2); if (Object.getOwnPropertySymbols) { var o2 = Object.getOwnPropertySymbols(e2); @@ -145142,40 +146140,40 @@ function ownKeys$f(e2, r2) { } return t2; } -__name(ownKeys$f, "ownKeys$f"); -function _objectSpread$f(e2) { +__name(ownKeys$e, "ownKeys$e"); +function _objectSpread$e(e2) { for (var r2 = 1; r2 < arguments.length; r2++) { var t2 = null != arguments[r2] ? arguments[r2] : {}; - r2 % 2 ? ownKeys$f(Object(t2), true).forEach(function(r3) { - _defineProperty$f(e2, r3, t2[r3]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$f(Object(t2)).forEach(function(r3) { + r2 % 2 ? ownKeys$e(Object(t2), true).forEach(function(r3) { + _defineProperty$e(e2, r3, t2[r3]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$e(Object(t2)).forEach(function(r3) { Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3)); }); } return e2; } -__name(_objectSpread$f, "_objectSpread$f"); -function _defineProperty$f(e2, r2, t2) { - return (r2 = _toPropertyKey$c(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; +__name(_objectSpread$e, "_objectSpread$e"); +function _defineProperty$e(e2, r2, t2) { + return (r2 = _toPropertyKey$b(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; } -__name(_defineProperty$f, "_defineProperty$f"); -function _toPropertyKey$c(t2) { - var i2 = _toPrimitive$c(t2, "string"); - return "symbol" == _typeof$d(i2) ? i2 : i2 + ""; +__name(_defineProperty$e, "_defineProperty$e"); +function _toPropertyKey$b(t2) { + var i2 = _toPrimitive$b(t2, "string"); + return "symbol" == _typeof$c(i2) ? i2 : i2 + ""; } -__name(_toPropertyKey$c, "_toPropertyKey$c"); -function _toPrimitive$c(t2, r2) { - if ("object" != _typeof$d(t2) || !t2) return t2; +__name(_toPropertyKey$b, "_toPropertyKey$b"); +function _toPrimitive$b(t2, r2) { + if ("object" != _typeof$c(t2) || !t2) return t2; var e2 = t2[Symbol.toPrimitive]; if (void 0 !== e2) { var i2 = e2.call(t2, r2 || "default"); - if ("object" != _typeof$d(i2)) return i2; + if ("object" != _typeof$c(i2)) return i2; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r2 ? String : Number)(t2); } -__name(_toPrimitive$c, "_toPrimitive$c"); -var script$P = { +__name(_toPrimitive$b, "_toPrimitive$b"); +var script$O = { name: "BaseComponent", props: { pt: { @@ -145247,7 +146245,7 @@ var script$P = { this.rootEl = findSingle(this.$el, '[data-pc-name="'.concat(toFlatCase$1(this.$.type.name), '"]')); if (this.rootEl) { this.$attrSelector && !this.rootEl.hasAttribute(this.$attrSelector) && this.rootEl.setAttribute(this.$attrSelector, ""); - this.rootEl.$pc = _objectSpread$f({ + this.rootEl.$pc = _objectSpread$e({ name: this.$.type.name, attrSelector: this.$attrSelector }, this.$params); @@ -145255,7 +146253,7 @@ var script$P = { this._loadStyles(); this._hook("onBeforeMount"); }, "beforeMount"), - mounted: /* @__PURE__ */ __name(function mounted7() { + mounted: /* @__PURE__ */ __name(function mounted8() { this._hook("onMounted"); }, "mounted"), beforeUpdate: /* @__PURE__ */ __name(function beforeUpdate2() { @@ -145309,7 +146307,7 @@ var script$P = { }, "_loadCoreStyles"), _loadGlobalStyles: /* @__PURE__ */ __name(function _loadGlobalStyles2() { var globalCSS = this._useGlobalPT(this._getOptionValue, "global.css", this.$params); - isNotEmpty$1(globalCSS) && BaseStyle.load(globalCSS, _objectSpread$f({ + isNotEmpty$1(globalCSS) && BaseStyle.load(globalCSS, _objectSpread$e({ name: "global" }, this.$styleOptions)); }, "_loadGlobalStyles"), @@ -145319,16 +146317,16 @@ var script$P = { if (!config_default.isStyleNameLoaded("common")) { var _this$$style3, _this$$style3$getComm; var _ref3 = ((_this$$style3 = this.$style) === null || _this$$style3 === void 0 || (_this$$style3$getComm = _this$$style3.getCommonTheme) === null || _this$$style3$getComm === void 0 ? void 0 : _this$$style3$getComm.call(_this$$style3)) || {}, primitive = _ref3.primitive, semantic = _ref3.semantic, global2 = _ref3.global, style2 = _ref3.style; - BaseStyle.load(primitive === null || primitive === void 0 ? void 0 : primitive.css, _objectSpread$f({ + BaseStyle.load(primitive === null || primitive === void 0 ? void 0 : primitive.css, _objectSpread$e({ name: "primitive-variables" }, this.$styleOptions)); - BaseStyle.load(semantic === null || semantic === void 0 ? void 0 : semantic.css, _objectSpread$f({ + BaseStyle.load(semantic === null || semantic === void 0 ? void 0 : semantic.css, _objectSpread$e({ name: "semantic-variables" }, this.$styleOptions)); - BaseStyle.load(global2 === null || global2 === void 0 ? void 0 : global2.css, _objectSpread$f({ + BaseStyle.load(global2 === null || global2 === void 0 ? void 0 : global2.css, _objectSpread$e({ name: "global-variables" }, this.$styleOptions)); - BaseStyle.loadTheme(_objectSpread$f({ + BaseStyle.loadTheme(_objectSpread$e({ name: "global-style" }, this.$styleOptions), style2); config_default.setLoadedStyleName("common"); @@ -145336,10 +146334,10 @@ var script$P = { if (!config_default.isStyleNameLoaded((_this$$style4 = this.$style) === null || _this$$style4 === void 0 ? void 0 : _this$$style4.name) && (_this$$style5 = this.$style) !== null && _this$$style5 !== void 0 && _this$$style5.name) { var _this$$style6, _this$$style6$getComp, _this$$style7, _this$$style8; var _ref4 = ((_this$$style6 = this.$style) === null || _this$$style6 === void 0 || (_this$$style6$getComp = _this$$style6.getComponentTheme) === null || _this$$style6$getComp === void 0 ? void 0 : _this$$style6$getComp.call(_this$$style6)) || {}, css4 = _ref4.css, _style = _ref4.style; - (_this$$style7 = this.$style) === null || _this$$style7 === void 0 || _this$$style7.load(css4, _objectSpread$f({ + (_this$$style7 = this.$style) === null || _this$$style7 === void 0 || _this$$style7.load(css4, _objectSpread$e({ name: "".concat(this.$style.name, "-variables") }, this.$styleOptions)); - (_this$$style8 = this.$style) === null || _this$$style8 === void 0 || _this$$style8.loadTheme(_objectSpread$f({ + (_this$$style8 = this.$style) === null || _this$$style8 === void 0 || _this$$style8.loadTheme(_objectSpread$e({ name: "".concat(this.$style.name, "-style") }, this.$styleOptions), _style); config_default.setLoadedStyleName(this.$style.name); @@ -145347,7 +146345,7 @@ var script$P = { if (!config_default.isStyleNameLoaded("layer-order")) { var _this$$style9, _this$$style9$getLaye; var layerOrder = (_this$$style9 = this.$style) === null || _this$$style9 === void 0 || (_this$$style9$getLaye = _this$$style9.getLayerOrderThemeCSS) === null || _this$$style9$getLaye === void 0 ? void 0 : _this$$style9$getLaye.call(_this$$style9); - BaseStyle.load(layerOrder, _objectSpread$f({ + BaseStyle.load(layerOrder, _objectSpread$e({ name: "layer-order", first: true }, this.$styleOptions)); @@ -145357,7 +146355,7 @@ var script$P = { _loadScopedThemeStyles: /* @__PURE__ */ __name(function _loadScopedThemeStyles3(preset) { var _this$$style10, _this$$style10$getPre, _this$$style11; var _ref5 = ((_this$$style10 = this.$style) === null || _this$$style10 === void 0 || (_this$$style10$getPre = _this$$style10.getPresetTheme) === null || _this$$style10$getPre === void 0 ? void 0 : _this$$style10$getPre.call(_this$$style10, preset, "[".concat(this.$attrSelector, "]"))) || {}, css4 = _ref5.css; - var scopedStyle = (_this$$style11 = this.$style) === null || _this$$style11 === void 0 ? void 0 : _this$$style11.load(css4, _objectSpread$f({ + var scopedStyle = (_this$$style11 = this.$style) === null || _this$$style11 === void 0 ? void 0 : _this$$style11.load(css4, _objectSpread$e({ name: "".concat(this.$attrSelector, "-").concat(this.$style.name) }, this.$styleOptions)); this.scopedStyleEl = scopedStyle.el; @@ -145393,11 +146391,11 @@ var script$P = { var searchOut = /./g.test(key) && !!params[key.split(".")[0]]; var _ref6 = this._getPropValue("ptOptions") || ((_this$$primevueConfig2 = this.$primevueConfig) === null || _this$$primevueConfig2 === void 0 ? void 0 : _this$$primevueConfig2.ptOptions) || {}, _ref6$mergeSections = _ref6.mergeSections, mergeSections = _ref6$mergeSections === void 0 ? true : _ref6$mergeSections, _ref6$mergeProps = _ref6.mergeProps, useMergeProps = _ref6$mergeProps === void 0 ? false : _ref6$mergeProps; var global2 = searchInDefaultPT ? searchOut ? this._useGlobalPT(this._getPTClassValue, key, params) : this._useDefaultPT(this._getPTClassValue, key, params) : void 0; - var self2 = searchOut ? void 0 : this._getPTSelf(obj, this._getPTClassValue, key, _objectSpread$f(_objectSpread$f({}, params), {}, { + var self2 = searchOut ? void 0 : this._getPTSelf(obj, this._getPTClassValue, key, _objectSpread$e(_objectSpread$e({}, params), {}, { global: global2 || {} })); var datasets = this._getPTDatasets(key); - return mergeSections || !mergeSections && self2 ? useMergeProps ? this._mergeProps(useMergeProps, global2, self2, datasets) : _objectSpread$f(_objectSpread$f(_objectSpread$f({}, global2), self2), datasets) : _objectSpread$f(_objectSpread$f({}, self2), datasets); + return mergeSections || !mergeSections && self2 ? useMergeProps ? this._mergeProps(useMergeProps, global2, self2, datasets) : _objectSpread$e(_objectSpread$e(_objectSpread$e({}, global2), self2), datasets) : _objectSpread$e(_objectSpread$e({}, self2), datasets); }, "_getPTValue"), _getPTSelf: /* @__PURE__ */ __name(function _getPTSelf2() { var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; @@ -145416,7 +146414,7 @@ var script$P = { var key = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; var datasetPrefix = "data-pc-"; var isExtended = key === "root" && isNotEmpty$1((_this$pt4 = this.pt) === null || _this$pt4 === void 0 ? void 0 : _this$pt4["data-pc-section"]); - return key !== "transition" && _objectSpread$f(_objectSpread$f({}, key === "root" && _objectSpread$f(_objectSpread$f(_defineProperty$f({}, "".concat(datasetPrefix, "name"), toFlatCase$1(isExtended ? (_this$pt5 = this.pt) === null || _this$pt5 === void 0 ? void 0 : _this$pt5["data-pc-section"] : this.$.type.name)), isExtended && _defineProperty$f({}, "".concat(datasetPrefix, "extend"), toFlatCase$1(this.$.type.name))), isClient() && _defineProperty$f({}, "".concat(this.$attrSelector), ""))), {}, _defineProperty$f({}, "".concat(datasetPrefix, "section"), toFlatCase$1(key))); + return key !== "transition" && _objectSpread$e(_objectSpread$e({}, key === "root" && _objectSpread$e(_objectSpread$e(_defineProperty$e({}, "".concat(datasetPrefix, "name"), toFlatCase$1(isExtended ? (_this$pt5 = this.pt) === null || _this$pt5 === void 0 ? void 0 : _this$pt5["data-pc-section"] : this.$.type.name)), isExtended && _defineProperty$e({}, "".concat(datasetPrefix, "extend"), toFlatCase$1(this.$.type.name))), isClient() && _defineProperty$e({}, "".concat(this.$attrSelector), ""))), {}, _defineProperty$e({}, "".concat(datasetPrefix, "section"), toFlatCase$1(key))); }, "_getPTDatasets"), _getPTClassValue: /* @__PURE__ */ __name(function _getPTClassValue2() { var value4 = this._getOptionValue.apply(this, arguments); @@ -145454,7 +146452,7 @@ var script$P = { if (originalValue === void 0 && value4 === void 0) return void 0; else if (isString$5(value4)) return value4; else if (isString$5(originalValue)) return originalValue; - return mergeSections || !mergeSections && value4 ? useMergeProps ? this._mergeProps(useMergeProps, originalValue, value4) : _objectSpread$f(_objectSpread$f({}, originalValue), value4) : value4; + return mergeSections || !mergeSections && value4 ? useMergeProps ? this._mergeProps(useMergeProps, originalValue, value4) : _objectSpread$e(_objectSpread$e({}, originalValue), value4) : value4; } return fn(pt); }, "_usePT"), @@ -145467,7 +146465,7 @@ var script$P = { ptm: /* @__PURE__ */ __name(function ptm2() { var key = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - return this._getPTValue(this.pt, key, _objectSpread$f(_objectSpread$f({}, this.$params), params)); + return this._getPTValue(this.pt, key, _objectSpread$e(_objectSpread$e({}, this.$params), params)); }, "ptm"), ptmi: /* @__PURE__ */ __name(function ptmi2() { var key = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; @@ -145478,22 +146476,22 @@ var script$P = { var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; var key = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""; var params = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - return this._getPTValue(obj, key, _objectSpread$f({ + return this._getPTValue(obj, key, _objectSpread$e({ instance: this }, params), false); }, "ptmo"), cx: /* @__PURE__ */ __name(function cx2() { var key = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; - return !this.isUnstyled ? this._getOptionValue(this.$style.classes, key, _objectSpread$f(_objectSpread$f({}, this.$params), params)) : void 0; + return !this.isUnstyled ? this._getOptionValue(this.$style.classes, key, _objectSpread$e(_objectSpread$e({}, this.$params), params)) : void 0; }, "cx"), sx: /* @__PURE__ */ __name(function sx2() { var key = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; var when = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true; var params = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; if (when) { - var self2 = this._getOptionValue(this.$style.inlineStyles, key, _objectSpread$f(_objectSpread$f({}, this.$params), params)); - var base2 = this._getOptionValue(BaseComponentStyle.inlineStyles, key, _objectSpread$f(_objectSpread$f({}, this.$params), params)); + var self2 = this._getOptionValue(this.$style.inlineStyles, key, _objectSpread$e(_objectSpread$e({}, this.$params), params)); + var base2 = this._getOptionValue(BaseComponentStyle.inlineStyles, key, _objectSpread$e(_objectSpread$e({}, this.$params), params)); return [base2, self2]; } return void 0; @@ -145511,7 +146509,7 @@ var script$P = { defaultPT: /* @__PURE__ */ __name(function defaultPT2() { var _this$$primevueConfig5, _this5 = this; return this._getPT((_this$$primevueConfig5 = this.$primevueConfig) === null || _this$$primevueConfig5 === void 0 ? void 0 : _this$$primevueConfig5.pt, void 0, function(value4) { - return _this5._getOptionValue(value4, _this5.$name, _objectSpread$f({}, _this5.$params)) || resolve$1(value4, _objectSpread$f({}, _this5.$params)); + return _this5._getOptionValue(value4, _this5.$name, _objectSpread$e({}, _this5.$params)) || resolve$1(value4, _objectSpread$e({}, _this5.$params)); }); }, "defaultPT"), isUnstyled: /* @__PURE__ */ __name(function isUnstyled2() { @@ -145531,7 +146529,7 @@ var script$P = { return (_this$$primevueConfig7 = this.$primevueConfig) === null || _this$$primevueConfig7 === void 0 ? void 0 : _this$$primevueConfig7.theme; }, "$theme"), $style: /* @__PURE__ */ __name(function $style2() { - return _objectSpread$f(_objectSpread$f({ + return _objectSpread$e(_objectSpread$e({ classes: void 0, inlineStyles: void 0, load: /* @__PURE__ */ __name(function load3() { @@ -145596,16 +146594,16 @@ var script$P = { }, "$_attrsWithoutPT") } }; -var classes$w = { +var classes$v = { root: "p-form p-component" }; var FormStyle = BaseStyle.extend({ name: "form", - classes: classes$w + classes: classes$v }); -var script$1$x = { +var script$1$w = { name: "BaseForm", - "extends": script$P, + "extends": script$O, style: FormStyle, props: { resolver: { @@ -145633,198 +146631,9 @@ var script$1$x = { "default": true } }, - provide: /* @__PURE__ */ __name(function provide12() { - return { - $pcForm: this, - $parentInstance: this - }; - }, "provide") -}; -function _typeof$c(o2) { - "@babel/helpers - typeof"; - return _typeof$c = "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$c(o2); -} -__name(_typeof$c, "_typeof$c"); -function ownKeys$e(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$e, "ownKeys$e"); -function _objectSpread$e(e2) { - for (var r2 = 1; r2 < arguments.length; r2++) { - var t2 = null != arguments[r2] ? arguments[r2] : {}; - r2 % 2 ? ownKeys$e(Object(t2), true).forEach(function(r3) { - _defineProperty$e(e2, r3, t2[r3]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$e(Object(t2)).forEach(function(r3) { - Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3)); - }); - } - return e2; -} -__name(_objectSpread$e, "_objectSpread$e"); -function _defineProperty$e(e2, r2, t2) { - return (r2 = _toPropertyKey$b(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; -} -__name(_defineProperty$e, "_defineProperty$e"); -function _toPropertyKey$b(t2) { - var i2 = _toPrimitive$b(t2, "string"); - return "symbol" == _typeof$c(i2) ? i2 : i2 + ""; -} -__name(_toPropertyKey$b, "_toPropertyKey$b"); -function _toPrimitive$b(t2, r2) { - if ("object" != _typeof$c(t2) || !t2) return t2; - var e2 = t2[Symbol.toPrimitive]; - if (void 0 !== e2) { - var i2 = e2.call(t2, r2 || "default"); - if ("object" != _typeof$c(i2)) return i2; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r2 ? String : Number)(t2); -} -__name(_toPrimitive$b, "_toPrimitive$b"); -function _slicedToArray$1(r2, e2) { - return _arrayWithHoles$1(r2) || _iterableToArrayLimit$1(r2, e2) || _unsupportedIterableToArray$d(r2, e2) || _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$d(r2, a2) { - if (r2) { - if ("string" == typeof r2) return _arrayLikeToArray$d(r2, a2); - var t2 = {}.toString.call(r2).slice(8, -1); - return "Object" === t2 && r2.constructor && (t2 = r2.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r2) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$d(r2, a2) : void 0; - } -} -__name(_unsupportedIterableToArray$d, "_unsupportedIterableToArray$d"); -function _arrayLikeToArray$d(r2, a2) { - (null == a2 || a2 > r2.length) && (a2 = r2.length); - for (var e2 = 0, n2 = Array(a2); e2 < a2; e2++) n2[e2] = r2[e2]; - return n2; -} -__name(_arrayLikeToArray$d, "_arrayLikeToArray$d"); -function _iterableToArrayLimit$1(r2, l2) { - var t2 = null == r2 ? null : "undefined" != typeof Symbol && r2[Symbol.iterator] || r2["@@iterator"]; - if (null != t2) { - var e2, n2, i2, u2, a2 = [], f2 = true, o2 = false; - try { - if (i2 = (t2 = t2.call(r2)).next, 0 === l2) ; - else for (; !(f2 = (e2 = i2.call(t2)).done) && (a2.push(e2.value), a2.length !== l2); f2 = true) ; - } catch (r3) { - o2 = true, n2 = r3; - } finally { - try { - if (!f2 && null != t2["return"] && (u2 = t2["return"](), Object(u2) !== u2)) return; - } finally { - if (o2) throw n2; - } - } - return a2; - } -} -__name(_iterableToArrayLimit$1, "_iterableToArrayLimit$1"); -function _arrayWithHoles$1(r2) { - if (Array.isArray(r2)) return r2; -} -__name(_arrayWithHoles$1, "_arrayWithHoles$1"); -var script$O = { - name: "Form", - "extends": script$1$x, - inheritAttrs: false, - emits: ["submit"], - setup: /* @__PURE__ */ __name(function setup2(props, _ref) { - var emit2 = _ref.emit; - var $form = useForm(props); - var register3 = /* @__PURE__ */ __name(function register4(field2, options4) { - var _$form$defineField = $form.defineField(field2, options4), _$form$defineField2 = _slicedToArray$1(_$form$defineField, 2), fieldProps = _$form$defineField2[1]; - return fieldProps; - }, "register"); - var onSubmit = $form.handleSubmit(function(e2) { - emit2("submit", e2); - }); - return _objectSpread$e({ - register: register3, - onSubmit - }, omit$1($form, ["handleSubmit"])); - }, "setup") -}; -function render$N(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("form", mergeProps$2({ - onSubmit: _cache[0] || (_cache[0] = withModifiers(function() { - return $setup.onSubmit && $setup.onSubmit.apply($setup, arguments); - }, ["prevent"])), - "class": _ctx.cx("root") - }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default", mergeProps$2({ - register: $setup.register, - valid: _ctx.valid, - reset: _ctx.reset - }, _ctx.states))], 16); -} -__name(render$N, "render$N"); -script$O.render = render$N; -var classes$v = { - root: "p-formfield p-component" -}; -var FormFieldStyle = BaseStyle.extend({ - name: "formfield", - classes: classes$v -}); -var script$1$w = { - name: "BaseFormField", - "extends": script$P, - style: FormFieldStyle, - props: { - name: { - type: String, - "default": void 0 - }, - resolver: { - type: Function, - "default": void 0 - }, - initialValue: { - type: null, - "default": void 0 - }, - validateOnValueUpdate: { - type: Boolean, - "default": void 0 - }, - validateOnBlur: { - type: Boolean, - "default": void 0 - }, - validateOnMount: { - type: Boolean, - "default": void 0 - }, - validateOnSubmit: { - type: Boolean, - "default": void 0 - }, - as: { - type: [String, Object], - "default": "DIV" - }, - asChild: { - type: Boolean, - "default": false - } - }, provide: /* @__PURE__ */ __name(function provide13() { return { - $pcFormField: this, + $pcForm: this, $parentInstance: this }; }, "provide") @@ -145881,10 +146690,199 @@ function _toPrimitive$a(t2, r2) { return ("string" === r2 ? String : Number)(t2); } __name(_toPrimitive$a, "_toPrimitive$a"); +function _slicedToArray$1(r2, e2) { + return _arrayWithHoles$1(r2) || _iterableToArrayLimit$1(r2, e2) || _unsupportedIterableToArray$d(r2, e2) || _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$d(r2, a2) { + if (r2) { + if ("string" == typeof r2) return _arrayLikeToArray$d(r2, a2); + var t2 = {}.toString.call(r2).slice(8, -1); + return "Object" === t2 && r2.constructor && (t2 = r2.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r2) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray$d(r2, a2) : void 0; + } +} +__name(_unsupportedIterableToArray$d, "_unsupportedIterableToArray$d"); +function _arrayLikeToArray$d(r2, a2) { + (null == a2 || a2 > r2.length) && (a2 = r2.length); + for (var e2 = 0, n2 = Array(a2); e2 < a2; e2++) n2[e2] = r2[e2]; + return n2; +} +__name(_arrayLikeToArray$d, "_arrayLikeToArray$d"); +function _iterableToArrayLimit$1(r2, l2) { + var t2 = null == r2 ? null : "undefined" != typeof Symbol && r2[Symbol.iterator] || r2["@@iterator"]; + if (null != t2) { + var e2, n2, i2, u2, a2 = [], f2 = true, o2 = false; + try { + if (i2 = (t2 = t2.call(r2)).next, 0 === l2) ; + else for (; !(f2 = (e2 = i2.call(t2)).done) && (a2.push(e2.value), a2.length !== l2); f2 = true) ; + } catch (r3) { + o2 = true, n2 = r3; + } finally { + try { + if (!f2 && null != t2["return"] && (u2 = t2["return"](), Object(u2) !== u2)) return; + } finally { + if (o2) throw n2; + } + } + return a2; + } +} +__name(_iterableToArrayLimit$1, "_iterableToArrayLimit$1"); +function _arrayWithHoles$1(r2) { + if (Array.isArray(r2)) return r2; +} +__name(_arrayWithHoles$1, "_arrayWithHoles$1"); var script$N = { - name: "FormField", + name: "Form", "extends": script$1$w, inheritAttrs: false, + emits: ["submit"], + setup: /* @__PURE__ */ __name(function setup2(props, _ref) { + var emit2 = _ref.emit; + var $form = useForm(props); + var register3 = /* @__PURE__ */ __name(function register4(field2, options4) { + var _$form$defineField = $form.defineField(field2, options4), _$form$defineField2 = _slicedToArray$1(_$form$defineField, 2), fieldProps = _$form$defineField2[1]; + return fieldProps; + }, "register"); + var onSubmit = $form.handleSubmit(function(e2) { + emit2("submit", e2); + }); + return _objectSpread$d({ + register: register3, + onSubmit + }, omit$1($form, ["handleSubmit"])); + }, "setup") +}; +function render$M(_ctx, _cache, $props, $setup, $data, $options) { + return openBlock(), createElementBlock("form", mergeProps$2({ + onSubmit: _cache[0] || (_cache[0] = withModifiers(function() { + return $setup.onSubmit && $setup.onSubmit.apply($setup, arguments); + }, ["prevent"])), + "class": _ctx.cx("root") + }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default", mergeProps$2({ + register: $setup.register, + valid: _ctx.valid, + reset: _ctx.reset + }, _ctx.states))], 16); +} +__name(render$M, "render$M"); +script$N.render = render$M; +var classes$u = { + root: "p-formfield p-component" +}; +var FormFieldStyle = BaseStyle.extend({ + name: "formfield", + classes: classes$u +}); +var script$1$v = { + name: "BaseFormField", + "extends": script$O, + style: FormFieldStyle, + props: { + name: { + type: String, + "default": void 0 + }, + resolver: { + type: Function, + "default": void 0 + }, + initialValue: { + type: null, + "default": void 0 + }, + validateOnValueUpdate: { + type: Boolean, + "default": void 0 + }, + validateOnBlur: { + type: Boolean, + "default": void 0 + }, + validateOnMount: { + type: Boolean, + "default": void 0 + }, + validateOnSubmit: { + type: Boolean, + "default": void 0 + }, + as: { + type: [String, Object], + "default": "DIV" + }, + asChild: { + type: Boolean, + "default": false + } + }, + provide: /* @__PURE__ */ __name(function provide14() { + return { + $pcFormField: this, + $parentInstance: this + }; + }, "provide") +}; +function _typeof$a(o2) { + "@babel/helpers - typeof"; + return _typeof$a = "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$a(o2); +} +__name(_typeof$a, "_typeof$a"); +function ownKeys$c(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$c, "ownKeys$c"); +function _objectSpread$c(e2) { + for (var r2 = 1; r2 < arguments.length; r2++) { + var t2 = null != arguments[r2] ? arguments[r2] : {}; + r2 % 2 ? ownKeys$c(Object(t2), true).forEach(function(r3) { + _defineProperty$c(e2, r3, t2[r3]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$c(Object(t2)).forEach(function(r3) { + Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3)); + }); + } + return e2; +} +__name(_objectSpread$c, "_objectSpread$c"); +function _defineProperty$c(e2, r2, t2) { + return (r2 = _toPropertyKey$9(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; +} +__name(_defineProperty$c, "_defineProperty$c"); +function _toPropertyKey$9(t2) { + var i2 = _toPrimitive$9(t2, "string"); + return "symbol" == _typeof$a(i2) ? i2 : i2 + ""; +} +__name(_toPropertyKey$9, "_toPropertyKey$9"); +function _toPrimitive$9(t2, r2) { + if ("object" != _typeof$a(t2) || !t2) return t2; + var e2 = t2[Symbol.toPrimitive]; + if (void 0 !== e2) { + var i2 = e2.call(t2, r2 || "default"); + if ("object" != _typeof$a(i2)) return i2; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r2 ? String : Number)(t2); +} +__name(_toPrimitive$9, "_toPrimitive$9"); +var script$M = { + name: "FormField", + "extends": script$1$v, + inheritAttrs: false, inject: { $pcForm: { "default": void 0 @@ -145916,11 +146914,11 @@ var script$N = { return ((_this$$pcForm2 = this.$pcForm) === null || _this$$pcForm2 === void 0 || (_this$$pcForm2 = _this$$pcForm2.fields) === null || _this$$pcForm2 === void 0 ? void 0 : _this$$pcForm2[this.name]) || {}; }, "field"), fieldAttrs: /* @__PURE__ */ __name(function fieldAttrs() { - return _objectSpread$d(_objectSpread$d({}, this.field.props), this.field.states); + return _objectSpread$c(_objectSpread$c({}, this.field.props), this.field.states); }, "fieldAttrs") } }; -function render$M(_ctx, _cache, $props, $setup, $data, $options) { +function render$L(_ctx, _cache, $props, $setup, $data, $options) { return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps$2({ key: 0, "class": _ctx.cx("root") @@ -145937,8 +146935,8 @@ function render$M(_ctx, _cache, $props, $setup, $data, $options) { props: $options.field.props }, $options.fieldAttrs)); } -__name(render$M, "render$M"); -script$N.render = render$M; +__name(render$L, "render$L"); +script$M.render = render$L; var __defProp$1 = Object.defineProperty; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp = Object.prototype.hasOwnProperty; @@ -146836,9 +147834,9 @@ var defineProperty$1 = function() { } catch (e2) { } }(); -var _defineProperty$b = defineProperty$1; -const _defineProperty$c = /* @__PURE__ */ getDefaultExportFromCjs(_defineProperty$b); -var defineProperty = _defineProperty$b; +var _defineProperty$a = defineProperty$1; +const _defineProperty$b = /* @__PURE__ */ getDefaultExportFromCjs(_defineProperty$a); +var defineProperty = _defineProperty$a; function baseAssignValue$2(object, key, value4) { if (key == "__proto__" && defineProperty) { defineProperty(object, key, { @@ -147533,11 +148531,11 @@ function cloneDeep(value4) { __name(cloneDeep, "cloneDeep"); var cloneDeep_1 = cloneDeep; const cloneDeep$1 = /* @__PURE__ */ getDefaultExportFromCjs(cloneDeep_1); -var script$M = { +var script$L = { name: "CheckIcon", "extends": script$$ }; -function render$L(_ctx, _cache, $props, $setup, $data, $options) { +function render$K(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps$2({ width: "14", height: "14", @@ -147549,13 +148547,13 @@ function render$L(_ctx, _cache, $props, $setup, $data, $options) { fill: "currentColor" }, null, -1)]), 16); } -__name(render$L, "render$L"); -script$M.render = render$L; -var script$L = { +__name(render$K, "render$K"); +script$L.render = render$K; +var script$K = { name: "MinusIcon", "extends": script$$ }; -function render$K(_ctx, _cache, $props, $setup, $data, $options) { +function render$J(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("svg", mergeProps$2({ width: "14", height: "14", @@ -147567,14 +148565,14 @@ function render$K(_ctx, _cache, $props, $setup, $data, $options) { fill: "currentColor" }, null, -1)]), 16); } -__name(render$K, "render$K"); -script$L.render = render$K; -var theme$s = /* @__PURE__ */ __name(function theme14(_ref) { +__name(render$J, "render$J"); +script$K.render = render$J; +var theme$r = /* @__PURE__ */ __name(function theme15(_ref) { var dt2 = _ref.dt; return "\n.p-checkbox {\n position: relative;\n display: inline-flex;\n user-select: none;\n vertical-align: bottom;\n width: ".concat(dt2("checkbox.width"), ";\n height: ").concat(dt2("checkbox.height"), ";\n}\n\n.p-checkbox-input {\n cursor: pointer;\n appearance: none;\n position: absolute;\n inset-block-start: 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: ").concat(dt2("checkbox.border.radius"), ";\n}\n\n.p-checkbox-box {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: ").concat(dt2("checkbox.border.radius"), ";\n border: 1px solid ").concat(dt2("checkbox.border.color"), ";\n background: ").concat(dt2("checkbox.background"), ";\n width: ").concat(dt2("checkbox.width"), ";\n height: ").concat(dt2("checkbox.height"), ";\n transition: background ").concat(dt2("checkbox.transition.duration"), ", color ").concat(dt2("checkbox.transition.duration"), ", border-color ").concat(dt2("checkbox.transition.duration"), ", box-shadow ").concat(dt2("checkbox.transition.duration"), ", outline-color ").concat(dt2("checkbox.transition.duration"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt2("checkbox.shadow"), ";\n}\n\n.p-checkbox-icon {\n transition-duration: ").concat(dt2("checkbox.transition.duration"), ";\n color: ").concat(dt2("checkbox.icon.color"), ";\n font-size: ").concat(dt2("checkbox.icon.size"), ";\n width: ").concat(dt2("checkbox.icon.size"), ";\n height: ").concat(dt2("checkbox.icon.size"), ";\n}\n\n.p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {\n border-color: ").concat(dt2("checkbox.hover.border.color"), ";\n}\n\n.p-checkbox-checked .p-checkbox-box {\n border-color: ").concat(dt2("checkbox.checked.border.color"), ";\n background: ").concat(dt2("checkbox.checked.background"), ";\n}\n\n.p-checkbox-checked .p-checkbox-icon {\n color: ").concat(dt2("checkbox.icon.checked.color"), ";\n}\n\n.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {\n background: ").concat(dt2("checkbox.checked.hover.background"), ";\n border-color: ").concat(dt2("checkbox.checked.hover.border.color"), ";\n}\n\n.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-icon {\n color: ").concat(dt2("checkbox.icon.checked.hover.color"), ";\n}\n\n.p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {\n border-color: ").concat(dt2("checkbox.focus.border.color"), ";\n box-shadow: ").concat(dt2("checkbox.focus.ring.shadow"), ";\n outline: ").concat(dt2("checkbox.focus.ring.width"), " ").concat(dt2("checkbox.focus.ring.style"), " ").concat(dt2("checkbox.focus.ring.color"), ";\n outline-offset: ").concat(dt2("checkbox.focus.ring.offset"), ";\n}\n\n.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {\n border-color: ").concat(dt2("checkbox.checked.focus.border.color"), ";\n}\n\n.p-checkbox.p-invalid > .p-checkbox-box {\n border-color: ").concat(dt2("checkbox.invalid.border.color"), ";\n}\n\n.p-checkbox.p-variant-filled .p-checkbox-box {\n background: ").concat(dt2("checkbox.filled.background"), ";\n}\n\n.p-checkbox-checked.p-variant-filled .p-checkbox-box {\n background: ").concat(dt2("checkbox.checked.background"), ";\n}\n\n.p-checkbox-checked.p-variant-filled:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {\n background: ").concat(dt2("checkbox.checked.hover.background"), ";\n}\n\n.p-checkbox.p-disabled {\n opacity: 1;\n}\n\n.p-checkbox.p-disabled .p-checkbox-box {\n background: ").concat(dt2("checkbox.disabled.background"), ";\n border-color: ").concat(dt2("checkbox.checked.disabled.border.color"), ";\n}\n\n.p-checkbox.p-disabled .p-checkbox-box .p-checkbox-icon {\n color: ").concat(dt2("checkbox.icon.disabled.color"), ";\n}\n\n.p-checkbox-sm,\n.p-checkbox-sm .p-checkbox-box {\n width: ").concat(dt2("checkbox.sm.width"), ";\n height: ").concat(dt2("checkbox.sm.height"), ";\n}\n\n.p-checkbox-sm .p-checkbox-icon {\n font-size: ").concat(dt2("checkbox.icon.sm.size"), ";\n width: ").concat(dt2("checkbox.icon.sm.size"), ";\n height: ").concat(dt2("checkbox.icon.sm.size"), ";\n}\n\n.p-checkbox-lg,\n.p-checkbox-lg .p-checkbox-box {\n width: ").concat(dt2("checkbox.lg.width"), ";\n height: ").concat(dt2("checkbox.lg.height"), ";\n}\n\n.p-checkbox-lg .p-checkbox-icon {\n font-size: ").concat(dt2("checkbox.icon.lg.size"), ";\n width: ").concat(dt2("checkbox.icon.lg.size"), ";\n height: ").concat(dt2("checkbox.icon.lg.size"), ";\n}\n"); }, "theme"); -var classes$u = { - root: /* @__PURE__ */ __name(function root7(_ref2) { +var classes$t = { + root: /* @__PURE__ */ __name(function root8(_ref2) { var instance = _ref2.instance, props = _ref2.props; return ["p-checkbox p-component", { "p-checkbox-checked": instance.checked, @@ -147591,10 +148589,10 @@ var classes$u = { }; var CheckboxStyle = BaseStyle$1.extend({ name: "checkbox", - theme: theme$s, - classes: classes$u + theme: theme$r, + classes: classes$t }); -var script$1$v = { +var script$1$u = { name: "BaseCheckbox", "extends": script$10, props: { @@ -147646,7 +148644,7 @@ var script$1$v = { } }, style: CheckboxStyle, - provide: /* @__PURE__ */ __name(function provide14() { + provide: /* @__PURE__ */ __name(function provide15() { return { $pcCheckbox: this, $parentInstance: this @@ -147683,9 +148681,9 @@ function _arrayLikeToArray$c(r2, a2) { return n2; } __name(_arrayLikeToArray$c, "_arrayLikeToArray$c"); -var script$K = { +var script$J = { name: "Checkbox", - "extends": script$1$v, + "extends": script$1$u, inheritAttrs: false, emits: ["change", "focus", "blur", "update:indeterminate"], inject: { @@ -147693,7 +148691,7 @@ var script$K = { "default": void 0 } }, - data: /* @__PURE__ */ __name(function data6() { + data: /* @__PURE__ */ __name(function data7() { return { d_indeterminate: this.indeterminate }; @@ -147754,13 +148752,13 @@ var script$K = { }, "checked") }, components: { - CheckIcon: script$M, - MinusIcon: script$L + CheckIcon: script$L, + MinusIcon: script$K } }; -var _hoisted_1$13 = ["data-p-checked", "data-p-indeterminate", "data-p-disabled"]; +var _hoisted_1$12 = ["data-p-checked", "data-p-indeterminate", "data-p-disabled"]; var _hoisted_2$I = ["id", "value", "name", "checked", "tabindex", "disabled", "readonly", "required", "aria-labelledby", "aria-label", "aria-invalid", "aria-checked"]; -function render$J(_ctx, _cache, $props, $setup, $data, $options) { +function render$I(_ctx, _cache, $props, $setup, $data, $options) { var _component_CheckIcon = resolveComponent("CheckIcon"); var _component_MinusIcon = resolveComponent("MinusIcon"); return openBlock(), createElementBlock("div", mergeProps$2({ @@ -147808,16 +148806,16 @@ function render$J(_ctx, _cache, $props, $setup, $data, $options) { key: 1, "class": _ctx.cx("icon") }, $options.getPTOptions("icon")), null, 16, ["class"])) : createCommentVNode("", true)]; - })], 16)], 16, _hoisted_1$13); + })], 16)], 16, _hoisted_1$12); } -__name(render$J, "render$J"); -script$K.render = render$J; -var theme$r = /* @__PURE__ */ __name(function theme15(_ref) { +__name(render$I, "render$I"); +script$J.render = render$I; +var theme$q = /* @__PURE__ */ __name(function theme16(_ref) { var dt2 = _ref.dt; return "\n.p-inputtext {\n font-family: inherit;\n font-feature-settings: inherit;\n font-size: 1rem;\n color: ".concat(dt2("inputtext.color"), ";\n background: ").concat(dt2("inputtext.background"), ";\n padding-block: ").concat(dt2("inputtext.padding.y"), ";\n padding-inline: ").concat(dt2("inputtext.padding.x"), ";\n border: 1px solid ").concat(dt2("inputtext.border.color"), ";\n transition: background ").concat(dt2("inputtext.transition.duration"), ", color ").concat(dt2("inputtext.transition.duration"), ", border-color ").concat(dt2("inputtext.transition.duration"), ", outline-color ").concat(dt2("inputtext.transition.duration"), ", box-shadow ").concat(dt2("inputtext.transition.duration"), ";\n appearance: none;\n border-radius: ").concat(dt2("inputtext.border.radius"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt2("inputtext.shadow"), ";\n}\n\n.p-inputtext:enabled:hover {\n border-color: ").concat(dt2("inputtext.hover.border.color"), ";\n}\n\n.p-inputtext:enabled:focus {\n border-color: ").concat(dt2("inputtext.focus.border.color"), ";\n box-shadow: ").concat(dt2("inputtext.focus.ring.shadow"), ";\n outline: ").concat(dt2("inputtext.focus.ring.width"), " ").concat(dt2("inputtext.focus.ring.style"), " ").concat(dt2("inputtext.focus.ring.color"), ";\n outline-offset: ").concat(dt2("inputtext.focus.ring.offset"), ";\n}\n\n.p-inputtext.p-invalid {\n border-color: ").concat(dt2("inputtext.invalid.border.color"), ";\n}\n\n.p-inputtext.p-variant-filled {\n background: ").concat(dt2("inputtext.filled.background"), ";\n}\n\n.p-inputtext.p-variant-filled:enabled:hover {\n background: ").concat(dt2("inputtext.filled.hover.background"), ";\n}\n\n.p-inputtext.p-variant-filled:enabled:focus {\n background: ").concat(dt2("inputtext.filled.focus.background"), ";\n}\n\n.p-inputtext:disabled {\n opacity: 1;\n background: ").concat(dt2("inputtext.disabled.background"), ";\n color: ").concat(dt2("inputtext.disabled.color"), ";\n}\n\n.p-inputtext::placeholder {\n color: ").concat(dt2("inputtext.placeholder.color"), ";\n}\n\n.p-inputtext.p-invalid::placeholder {\n color: ").concat(dt2("inputtext.invalid.placeholder.color"), ";\n}\n\n.p-inputtext-sm {\n font-size: ").concat(dt2("inputtext.sm.font.size"), ";\n padding-block: ").concat(dt2("inputtext.sm.padding.y"), ";\n padding-inline: ").concat(dt2("inputtext.sm.padding.x"), ";\n}\n\n.p-inputtext-lg {\n font-size: ").concat(dt2("inputtext.lg.font.size"), ";\n padding-block: ").concat(dt2("inputtext.lg.padding.y"), ";\n padding-inline: ").concat(dt2("inputtext.lg.padding.x"), ";\n}\n\n.p-inputtext-fluid {\n width: 100%;\n}\n"); }, "theme"); -var classes$t = { - root: /* @__PURE__ */ __name(function root8(_ref2) { +var classes$s = { + root: /* @__PURE__ */ __name(function root9(_ref2) { var instance = _ref2.instance, props = _ref2.props; return ["p-inputtext p-component", { "p-filled": instance.$filled, @@ -147831,23 +148829,23 @@ var classes$t = { }; var InputTextStyle = BaseStyle$1.extend({ name: "inputtext", - theme: theme$r, - classes: classes$t + theme: theme$q, + classes: classes$s }); -var script$1$u = { +var script$1$t = { name: "BaseInputText", "extends": script$10, style: InputTextStyle, - provide: /* @__PURE__ */ __name(function provide15() { + provide: /* @__PURE__ */ __name(function provide16() { return { $pcInputText: this, $parentInstance: this }; }, "provide") }; -var script$J = { +var script$I = { name: "InputText", - "extends": script$1$u, + "extends": script$1$t, inheritAttrs: false, methods: { onInput: /* @__PURE__ */ __name(function onInput(event) { @@ -147865,8 +148863,8 @@ var script$J = { }, "attrs") } }; -var _hoisted_1$12 = ["value", "disabled", "aria-invalid"]; -function render$I(_ctx, _cache, $props, $setup, $data, $options) { +var _hoisted_1$11 = ["value", "disabled", "aria-invalid"]; +function render$H(_ctx, _cache, $props, $setup, $data, $options) { return openBlock(), createElementBlock("input", mergeProps$2({ type: "text", "class": _ctx.cx("root"), @@ -147876,219 +148874,7 @@ function render$I(_ctx, _cache, $props, $setup, $data, $options) { onInput: _cache[0] || (_cache[0] = function() { return $options.onInput && $options.onInput.apply($options, arguments); }) - }, $options.attrs), null, 16, _hoisted_1$12); -} -__name(render$I, "render$I"); -script$J.render = render$I; -var theme$q = /* @__PURE__ */ __name(function theme16(_ref) { - var dt2 = _ref.dt; - return "\n.p-message {\n border-radius: ".concat(dt2("message.border.radius"), ";\n outline-width: ").concat(dt2("message.border.width"), ";\n outline-style: solid;\n}\n\n.p-message-content {\n display: flex;\n align-items: center;\n padding: ").concat(dt2("message.content.padding"), ";\n gap: ").concat(dt2("message.content.gap"), ";\n height: 100%;\n}\n\n.p-message-icon {\n flex-shrink: 0;\n}\n\n.p-message-close-button {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n margin-inline-start: auto;\n overflow: hidden;\n position: relative;\n width: ").concat(dt2("message.close.button.width"), ";\n height: ").concat(dt2("message.close.button.height"), ";\n border-radius: ").concat(dt2("message.close.button.border.radius"), ";\n background: transparent;\n transition: background ").concat(dt2("message.transition.duration"), ", color ").concat(dt2("message.transition.duration"), ", outline-color ").concat(dt2("message.transition.duration"), ", box-shadow ").concat(dt2("message.transition.duration"), ", opacity 0.3s;\n outline-color: transparent;\n color: inherit;\n padding: 0;\n border: none;\n cursor: pointer;\n user-select: none;\n}\n\n.p-message-close-icon {\n font-size: ").concat(dt2("message.close.icon.size"), ";\n width: ").concat(dt2("message.close.icon.size"), ";\n height: ").concat(dt2("message.close.icon.size"), ";\n}\n\n.p-message-close-button:focus-visible {\n outline-width: ").concat(dt2("message.close.button.focus.ring.width"), ";\n outline-style: ").concat(dt2("message.close.button.focus.ring.style"), ";\n outline-offset: ").concat(dt2("message.close.button.focus.ring.offset"), ";\n}\n\n.p-message-info {\n background: ").concat(dt2("message.info.background"), ";\n outline-color: ").concat(dt2("message.info.border.color"), ";\n color: ").concat(dt2("message.info.color"), ";\n box-shadow: ").concat(dt2("message.info.shadow"), ";\n}\n\n.p-message-info .p-message-close-button:focus-visible {\n outline-color: ").concat(dt2("message.info.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt2("message.info.close.button.focus.ring.shadow"), ";\n}\n\n.p-message-info .p-message-close-button:hover {\n background: ").concat(dt2("message.info.close.button.hover.background"), ";\n}\n\n.p-message-info.p-message-outlined {\n color: ").concat(dt2("message.info.outlined.color"), ";\n outline-color: ").concat(dt2("message.info.outlined.border.color"), ";\n}\n\n.p-message-info.p-message-simple {\n color: ").concat(dt2("message.info.simple.color"), ";\n}\n\n.p-message-success {\n background: ").concat(dt2("message.success.background"), ";\n outline-color: ").concat(dt2("message.success.border.color"), ";\n color: ").concat(dt2("message.success.color"), ";\n box-shadow: ").concat(dt2("message.success.shadow"), ";\n}\n\n.p-message-success .p-message-close-button:focus-visible {\n outline-color: ").concat(dt2("message.success.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt2("message.success.close.button.focus.ring.shadow"), ";\n}\n\n.p-message-success .p-message-close-button:hover {\n background: ").concat(dt2("message.success.close.button.hover.background"), ";\n}\n\n.p-message-success.p-message-outlined {\n color: ").concat(dt2("message.success.outlined.color"), ";\n outline-color: ").concat(dt2("message.success.outlined.border.color"), ";\n}\n\n.p-message-success.p-message-simple {\n color: ").concat(dt2("message.success.simple.color"), ";\n}\n\n.p-message-warn {\n background: ").concat(dt2("message.warn.background"), ";\n outline-color: ").concat(dt2("message.warn.border.color"), ";\n color: ").concat(dt2("message.warn.color"), ";\n box-shadow: ").concat(dt2("message.warn.shadow"), ";\n}\n\n.p-message-warn .p-message-close-button:focus-visible {\n outline-color: ").concat(dt2("message.warn.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt2("message.warn.close.button.focus.ring.shadow"), ";\n}\n\n.p-message-warn .p-message-close-button:hover {\n background: ").concat(dt2("message.warn.close.button.hover.background"), ";\n}\n\n.p-message-warn.p-message-outlined {\n color: ").concat(dt2("message.warn.outlined.color"), ";\n outline-color: ").concat(dt2("message.warn.outlined.border.color"), ";\n}\n\n.p-message-warn.p-message-simple {\n color: ").concat(dt2("message.warn.simple.color"), ";\n}\n\n.p-message-error {\n background: ").concat(dt2("message.error.background"), ";\n outline-color: ").concat(dt2("message.error.border.color"), ";\n color: ").concat(dt2("message.error.color"), ";\n box-shadow: ").concat(dt2("message.error.shadow"), ";\n}\n\n.p-message-error .p-message-close-button:focus-visible {\n outline-color: ").concat(dt2("message.error.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt2("message.error.close.button.focus.ring.shadow"), ";\n}\n\n.p-message-error .p-message-close-button:hover {\n background: ").concat(dt2("message.error.close.button.hover.background"), ";\n}\n\n.p-message-error.p-message-outlined {\n color: ").concat(dt2("message.error.outlined.color"), ";\n outline-color: ").concat(dt2("message.error.outlined.border.color"), ";\n}\n\n.p-message-error.p-message-simple {\n color: ").concat(dt2("message.error.simple.color"), ";\n}\n\n.p-message-secondary {\n background: ").concat(dt2("message.secondary.background"), ";\n outline-color: ").concat(dt2("message.secondary.border.color"), ";\n color: ").concat(dt2("message.secondary.color"), ";\n box-shadow: ").concat(dt2("message.secondary.shadow"), ";\n}\n\n.p-message-secondary .p-message-close-button:focus-visible {\n outline-color: ").concat(dt2("message.secondary.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt2("message.secondary.close.button.focus.ring.shadow"), ";\n}\n\n.p-message-secondary .p-message-close-button:hover {\n background: ").concat(dt2("message.secondary.close.button.hover.background"), ";\n}\n\n.p-message-secondary.p-message-outlined {\n color: ").concat(dt2("message.secondary.outlined.color"), ";\n outline-color: ").concat(dt2("message.secondary.outlined.border.color"), ";\n}\n\n.p-message-secondary.p-message-simple {\n color: ").concat(dt2("message.secondary.simple.color"), ";\n}\n\n.p-message-contrast {\n background: ").concat(dt2("message.contrast.background"), ";\n outline-color: ").concat(dt2("message.contrast.border.color"), ";\n color: ").concat(dt2("message.contrast.color"), ";\n box-shadow: ").concat(dt2("message.contrast.shadow"), ";\n}\n\n.p-message-contrast .p-message-close-button:focus-visible {\n outline-color: ").concat(dt2("message.contrast.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt2("message.contrast.close.button.focus.ring.shadow"), ";\n}\n\n.p-message-contrast .p-message-close-button:hover {\n background: ").concat(dt2("message.contrast.close.button.hover.background"), ";\n}\n\n.p-message-contrast.p-message-outlined {\n color: ").concat(dt2("message.contrast.outlined.color"), ";\n outline-color: ").concat(dt2("message.contrast.outlined.border.color"), ";\n}\n\n.p-message-contrast.p-message-simple {\n color: ").concat(dt2("message.contrast.simple.color"), ";\n}\n\n.p-message-text {\n font-size: ").concat(dt2("message.text.font.size"), ";\n font-weight: ").concat(dt2("message.text.font.weight"), ";\n}\n\n.p-message-icon {\n font-size: ").concat(dt2("message.icon.size"), ";\n width: ").concat(dt2("message.icon.size"), ";\n height: ").concat(dt2("message.icon.size"), ";\n}\n\n.p-message-enter-from {\n opacity: 0;\n}\n\n.p-message-enter-active {\n transition: opacity 0.3s;\n}\n\n.p-message.p-message-leave-from {\n max-height: 1000px;\n}\n\n.p-message.p-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin: 0;\n}\n\n.p-message-leave-active {\n overflow: hidden;\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin 0.3s;\n}\n\n.p-message-leave-active .p-message-close-button {\n opacity: 0;\n}\n\n.p-message-sm .p-message-content {\n padding: ").concat(dt2("message.content.sm.padding"), ";\n}\n\n.p-message-sm .p-message-text {\n font-size: ").concat(dt2("message.text.sm.font.size"), ";\n}\n\n.p-message-sm .p-message-icon {\n font-size: ").concat(dt2("message.icon.sm.size"), ";\n width: ").concat(dt2("message.icon.sm.size"), ";\n height: ").concat(dt2("message.icon.sm.size"), ";\n}\n\n.p-message-sm .p-message-close-icon {\n font-size: ").concat(dt2("message.close.icon.sm.size"), ";\n width: ").concat(dt2("message.close.icon.sm.size"), ";\n height: ").concat(dt2("message.close.icon.sm.size"), ";\n}\n\n.p-message-lg .p-message-content {\n padding: ").concat(dt2("message.content.lg.padding"), ";\n}\n\n.p-message-lg .p-message-text {\n font-size: ").concat(dt2("message.text.lg.font.size"), ";\n}\n\n.p-message-lg .p-message-icon {\n font-size: ").concat(dt2("message.icon.lg.size"), ";\n width: ").concat(dt2("message.icon.lg.size"), ";\n height: ").concat(dt2("message.icon.lg.size"), ";\n}\n\n.p-message-lg .p-message-close-icon {\n font-size: ").concat(dt2("message.close.icon.lg.size"), ";\n width: ").concat(dt2("message.close.icon.lg.size"), ";\n height: ").concat(dt2("message.close.icon.lg.size"), ";\n}\n\n.p-message-outlined {\n background: transparent;\n outline-width: ").concat(dt2("message.outlined.border.width"), ";\n}\n\n.p-message-simple {\n background: transparent;\n outline-color: transparent;\n box-shadow: none;\n}\n\n.p-message-simple .p-message-content {\n padding: ").concat(dt2("message.simple.content.padding"), ";\n}\n\n.p-message-outlined .p-message-close-button:hover,\n.p-message-simple .p-message-close-button:hover {\n background: transparent;\n}\n"); -}, "theme"); -var classes$s = { - root: /* @__PURE__ */ __name(function root9(_ref2) { - var props = _ref2.props; - return ["p-message p-component p-message-" + props.severity, { - "p-message-outlined": props.variant === "outlined", - "p-message-simple": props.variant === "simple", - "p-message-sm": props.size === "small", - "p-message-lg": props.size === "large" - }]; - }, "root"), - content: "p-message-content", - icon: "p-message-icon", - text: "p-message-text", - closeButton: "p-message-close-button", - closeIcon: "p-message-close-icon" -}; -var MessageStyle = BaseStyle$1.extend({ - name: "message", - theme: theme$q, - classes: classes$s -}); -var script$1$t = { - name: "BaseMessage", - "extends": script$14, - props: { - severity: { - type: String, - "default": "info" - }, - closable: { - type: Boolean, - "default": false - }, - life: { - type: Number, - "default": null - }, - icon: { - type: String, - "default": void 0 - }, - closeIcon: { - type: String, - "default": void 0 - }, - closeButtonProps: { - type: null, - "default": null - }, - size: { - type: String, - "default": null - }, - variant: { - type: String, - "default": null - } - }, - style: MessageStyle, - provide: /* @__PURE__ */ __name(function provide16() { - return { - $pcMessage: this, - $parentInstance: this - }; - }, "provide") -}; -var script$I = { - name: "Message", - "extends": script$1$t, - inheritAttrs: false, - emits: ["close", "life-end"], - timeout: null, - data: /* @__PURE__ */ __name(function data7() { - return { - visible: true - }; - }, "data"), - mounted: /* @__PURE__ */ __name(function mounted8() { - var _this = this; - if (this.life) { - setTimeout(function() { - _this.visible = false; - _this.$emit("life-end"); - }, this.life); - } - }, "mounted"), - methods: { - close: /* @__PURE__ */ __name(function close3(event) { - this.visible = false; - this.$emit("close", event); - }, "close") - }, - computed: { - closeAriaLabel: /* @__PURE__ */ __name(function closeAriaLabel2() { - return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : void 0; - }, "closeAriaLabel") - }, - directives: { - ripple: Ripple - }, - components: { - TimesIcon: script$_ - } -}; -function _typeof$a(o2) { - "@babel/helpers - typeof"; - return _typeof$a = "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$a(o2); -} -__name(_typeof$a, "_typeof$a"); -function ownKeys$c(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$c, "ownKeys$c"); -function _objectSpread$c(e2) { - for (var r2 = 1; r2 < arguments.length; r2++) { - var t2 = null != arguments[r2] ? arguments[r2] : {}; - r2 % 2 ? ownKeys$c(Object(t2), true).forEach(function(r3) { - _defineProperty$a(e2, r3, t2[r3]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e2, Object.getOwnPropertyDescriptors(t2)) : ownKeys$c(Object(t2)).forEach(function(r3) { - Object.defineProperty(e2, r3, Object.getOwnPropertyDescriptor(t2, r3)); - }); - } - return e2; -} -__name(_objectSpread$c, "_objectSpread$c"); -function _defineProperty$a(e2, r2, t2) { - return (r2 = _toPropertyKey$9(r2)) in e2 ? Object.defineProperty(e2, r2, { value: t2, enumerable: true, configurable: true, writable: true }) : e2[r2] = t2, e2; -} -__name(_defineProperty$a, "_defineProperty$a"); -function _toPropertyKey$9(t2) { - var i2 = _toPrimitive$9(t2, "string"); - return "symbol" == _typeof$a(i2) ? i2 : i2 + ""; -} -__name(_toPropertyKey$9, "_toPropertyKey$9"); -function _toPrimitive$9(t2, r2) { - if ("object" != _typeof$a(t2) || !t2) return t2; - var e2 = t2[Symbol.toPrimitive]; - if (void 0 !== e2) { - var i2 = e2.call(t2, r2 || "default"); - if ("object" != _typeof$a(i2)) return i2; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r2 ? String : Number)(t2); -} -__name(_toPrimitive$9, "_toPrimitive$9"); -var _hoisted_1$11 = ["aria-label"]; -function render$H(_ctx, _cache, $props, $setup, $data, $options) { - var _component_TimesIcon = resolveComponent("TimesIcon"); - var _directive_ripple = resolveDirective("ripple"); - return openBlock(), createBlock(Transition, mergeProps$2({ - name: "p-message", - appear: "" - }, _ctx.ptmi("transition")), { - "default": withCtx(function() { - return [withDirectives(createBaseVNode("div", mergeProps$2({ - "class": _ctx.cx("root"), - role: "alert", - "aria-live": "assertive", - "aria-atomic": "true" - }, _ctx.ptm("root")), [_ctx.$slots.container ? renderSlot(_ctx.$slots, "container", { - key: 0, - closeCallback: $options.close - }) : (openBlock(), createElementBlock("div", mergeProps$2({ - key: 1, - "class": _ctx.cx("content") - }, _ctx.ptm("content")), [renderSlot(_ctx.$slots, "icon", { - "class": normalizeClass(_ctx.cx("icon")) - }, function() { - return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ? "span" : null), mergeProps$2({ - "class": [_ctx.cx("icon"), _ctx.icon] - }, _ctx.ptm("icon")), null, 16, ["class"]))]; - }), _ctx.$slots["default"] ? (openBlock(), createElementBlock("div", mergeProps$2({ - key: 0, - "class": _ctx.cx("text") - }, _ctx.ptm("text")), [renderSlot(_ctx.$slots, "default")], 16)) : createCommentVNode("", true), _ctx.closable ? withDirectives((openBlock(), createElementBlock("button", mergeProps$2({ - key: 1, - "class": _ctx.cx("closeButton"), - "aria-label": $options.closeAriaLabel, - type: "button", - onClick: _cache[0] || (_cache[0] = function($event) { - return $options.close($event); - }) - }, _objectSpread$c(_objectSpread$c({}, _ctx.closeButtonProps), _ctx.ptm("closeButton"))), [renderSlot(_ctx.$slots, "closeicon", {}, function() { - return [_ctx.closeIcon ? (openBlock(), createElementBlock("i", mergeProps$2({ - key: 0, - "class": [_ctx.cx("closeIcon"), _ctx.closeIcon] - }, _ctx.ptm("closeIcon")), null, 16)) : (openBlock(), createBlock(_component_TimesIcon, mergeProps$2({ - key: 1, - "class": [_ctx.cx("closeIcon"), _ctx.closeIcon] - }, _ctx.ptm("closeIcon")), null, 16, ["class"]))]; - })], 16, _hoisted_1$11)), [[_directive_ripple]]) : createCommentVNode("", true)], 16))], 16), [[vShow, $data.visible]])]; - }), - _: 3 - }, 16); + }, $options.attrs), null, 16, _hoisted_1$11); } __name(render$H, "render$H"); script$I.render = render$H; @@ -148205,7 +148991,7 @@ var script$G = { }, components: { PlusIcon: script$H, - MinusIcon: script$L, + MinusIcon: script$K, Button: script$V }, directives: { @@ -148391,7 +149177,7 @@ const _hoisted_1$_ = { class: "flex items-center gap-2" }; const _hoisted_2$G = { class: "font-bold" }; const _hoisted_3$s = { class: "flex justify-end gap-4" }; const _hoisted_4$k = { class: "p-4 mt-2 border border-round surface-border shadow-1" }; -const _hoisted_5$f = { class: "flex flex-row gap-3 mb-2" }; +const _hoisted_5$g = { class: "flex flex-row gap-3 mb-2" }; const _hoisted_6$a = ["for"]; const _hoisted_7$4 = { class: "flex flex-row gap-3 mt-2" }; const _hoisted_8$3 = ["for"]; @@ -148507,7 +149293,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({ }, "submit"); return (_ctx, _cache) => { const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createBlock(unref(script$O), { + return openBlock(), createBlock(unref(script$N), { onSubmit: submit, resolver: unref(zodResolver)(unref(issueReportSchema)) }, { @@ -148535,18 +149321,18 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({ ]), default: withCtx(() => [ createBaseVNode("div", _hoisted_4$k, [ - createBaseVNode("div", _hoisted_5$f, [ + createBaseVNode("div", _hoisted_5$g, [ (openBlock(true), createElementBlock(Fragment$1, null, renderList(fields.value, (field2) => { return openBlock(), createElementBlock("div", { key: field2.value }, [ - field2.optIn ? (openBlock(), createBlock(unref(script$N), { + field2.optIn ? (openBlock(), createBlock(unref(script$M), { key: 0, name: field2.value, class: "flex space-x-1" }, { default: withCtx(($field) => [ - createVNode(unref(script$K), mergeProps$2({ ref_for: true }, $field, { + createVNode(unref(script$J), mergeProps$2({ ref_for: true }, $field, { inputId: field2.value, value: field2.value, modelValue: selection.value, @@ -148561,7 +149347,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({ ]); }), 128)) ]), - createVNode(unref(script$N), { + createVNode(unref(script$M), { class: "mb-4", name: "details" }, { @@ -148572,7 +149358,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({ placeholder: _ctx.$t("issueReport.provideAdditionalDetails"), "aria-label": _ctx.$t("issueReport.provideAdditionalDetails") }), null, 16, ["placeholder", "aria-label"]), - $field?.error && $field.touched && $field.value ? (openBlock(), createBlock(unref(script$I), { + $field?.error && $field.touched && $field.value ? (openBlock(), createBlock(unref(script$S), { key: 0, severity: "error", size: "small", @@ -148586,13 +149372,13 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({ ]), _: 1 }), - createVNode(unref(script$N), { name: "contactInfo" }, { + createVNode(unref(script$M), { name: "contactInfo" }, { default: withCtx(($field) => [ - createVNode(unref(script$J), mergeProps$2($field, { + createVNode(unref(script$I), mergeProps$2($field, { class: "w-full", placeholder: _ctx.$t("issueReport.provideEmail") }), null, 16, ["placeholder"]), - $field?.error && $field.touched && $field.value !== "" ? (openBlock(), createBlock(unref(script$I), { + $field?.error && $field.touched && $field.value !== "" ? (openBlock(), createBlock(unref(script$S), { key: 0, severity: "error", size: "small", @@ -148611,12 +149397,12 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({ return createBaseVNode("div", { key: checkbox.value }, [ - createVNode(unref(script$N), { + createVNode(unref(script$M), { name: checkbox.value, class: "flex space-x-1" }, { default: withCtx(($field) => [ - createVNode(unref(script$K), mergeProps$2({ ref_for: true }, $field, { + createVNode(unref(script$J), mergeProps$2({ ref_for: true }, $field, { inputId: checkbox.value, value: checkbox.value, modelValue: contactPrefs.value, @@ -148781,14 +149567,14 @@ ${workflowText} ]) ]), reportOpen.value ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [ - createVNode(unref(script$S)), - createVNode(unref(script$R), { style: { "width": "100%", "height": "400px", "max-width": "80vw" } }, { + createVNode(unref(script$R)), + createVNode(unref(script$Q), { style: { "width": "100%", "height": "400px", "max-width": "80vw" } }, { default: withCtx(() => [ createBaseVNode("pre", _hoisted_3$r, toDisplayString$1(reportContent.value), 1) ]), _: 1 }), - createVNode(unref(script$S)) + createVNode(unref(script$R)) ], 64)) : createCommentVNode("", true), sendReportOpen.value ? (openBlock(), createBlock(_sfc_main$X, { key: 1, @@ -148815,7 +149601,7 @@ ${workflowText} }; } }); -const ExecutionErrorDialogContent = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-3faf7785"]]); +const ExecutionErrorDialogContent = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-e5000be2"]]); const _hoisted_1$Y = { class: "p-2 h-full", "aria-labelledby": "issue-report-title" @@ -149184,13 +149970,13 @@ var script$A = { numToleratedItems: /* @__PURE__ */ __name(function numToleratedItems(newValue2) { this.d_numToleratedItems = newValue2; }, "numToleratedItems"), - loading: /* @__PURE__ */ __name(function loading(newValue2, oldValue2) { - if (this.lazy && newValue2 !== oldValue2 && newValue2 !== this.d_loading) { + loading: /* @__PURE__ */ __name(function loading(newValue2, oldValue) { + if (this.lazy && newValue2 !== oldValue && newValue2 !== this.d_loading) { this.d_loading = newValue2; } }, "loading"), - items: /* @__PURE__ */ __name(function items(newValue2, oldValue2) { - if (!oldValue2 || oldValue2.length !== (newValue2 || []).length) { + items: /* @__PURE__ */ __name(function items(newValue2, oldValue) { + if (!oldValue || oldValue.length !== (newValue2 || []).length) { this.init(); this.calculateAutoSize(); } @@ -149347,8 +150133,8 @@ var script$A = { } } else { if (viewport.first - first2 > index2) { - var pos2 = (viewport.first - 1) * this.itemSize; - horizontal2 ? scrollTo3(pos2, 0) : scrollTo3(0, pos2); + var pos = (viewport.first - 1) * this.itemSize; + horizontal2 ? scrollTo3(pos, 0) : scrollTo3(0, pos); } } } else if (isToEnd) { @@ -149559,12 +150345,12 @@ var script$A = { } } }, "setSpacerSize"), - setContentPosition: /* @__PURE__ */ __name(function setContentPosition(pos2) { + setContentPosition: /* @__PURE__ */ __name(function setContentPosition(pos) { var _this7 = this; if (this.content && !this.appendOnly) { var both = this.isBoth(); var horizontal2 = this.isHorizontal(); - var first2 = pos2 ? pos2.first : this.first; + var first2 = pos ? pos.first : this.first; var calculateTranslateVal = /* @__PURE__ */ __name(function calculateTranslateVal2(_first, _size) { return _first * _size; }, "calculateTranslateVal"); @@ -150722,12 +151508,12 @@ var script$z = { ripple: Ripple }, components: { - InputText: script$J, + InputText: script$I, VirtualScroller: script$A, InputIcon: script$B, IconField: script$C, SearchIcon: script$D, - CheckIcon: script$M, + CheckIcon: script$L, BlankIcon: script$E } }; @@ -150735,7 +151521,7 @@ var _hoisted_1$W = ["id"]; var _hoisted_2$D = ["tabindex"]; var _hoisted_3$p = ["id", "aria-multiselectable", "aria-label", "aria-labelledby", "aria-activedescendant", "aria-disabled"]; var _hoisted_4$h = ["id"]; -var _hoisted_5$e = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousedown", "onMousemove", "onDblclick", "data-p-selected", "data-p-focused", "data-p-disabled"]; +var _hoisted_5$f = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousedown", "onMousemove", "onDblclick", "data-p-selected", "data-p-focused", "data-p-disabled"]; var _hoisted_6$9 = ["tabindex"]; function render$y(_ctx, _cache, $props, $setup, $data, $options) { var _component_InputText = resolveComponent("InputText"); @@ -150932,7 +151718,7 @@ function render$y(_ctx, _cache, $props, $setup, $data, $options) { index: $options.getOptionIndex(i2, getItemOptions) }, function() { return [createTextVNode(toDisplayString$1($options.getOptionLabel(option3)), 1)]; - })], 16, _hoisted_5$e)), [[_directive_ripple]])], 64); + })], 16, _hoisted_5$f)), [[_directive_ripple]])], 64); }), 128)), $data.filterValue && (!items2 || items2 && items2.length === 0) ? (openBlock(), createElementBlock("li", mergeProps$2({ key: 0, "class": _ctx.cx("emptyMessage"), @@ -151487,7 +152273,7 @@ const _hoisted_3$n = { class: "pi pi-check text-green-500" }; const _hoisted_4$g = { class: "file-info" }; -const _hoisted_5$d = { class: "file-details" }; +const _hoisted_5$e = { class: "file-details" }; const _hoisted_6$8 = ["title"]; const _hoisted_7$3 = { key: 0, @@ -151542,7 +152328,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({ createBaseVNode("div", _hoisted_2$B, [ status.value === "completed" ? (openBlock(), createElementBlock("i", _hoisted_3$n)) : createCommentVNode("", true), createBaseVNode("div", _hoisted_4$g, [ - createBaseVNode("div", _hoisted_5$d, [ + createBaseVNode("div", _hoisted_5$e, [ createBaseVNode("span", { class: "file-type", title: hint.value @@ -151626,7 +152412,7 @@ const _hoisted_1$S = { class: "flex flex-row items-center gap-2" }; const _hoisted_2$A = { class: "file-info" }; const _hoisted_3$m = { class: "file-details" }; const _hoisted_4$f = ["title"]; -const _hoisted_5$c = { +const _hoisted_5$d = { key: 0, class: "file-error" }; @@ -151656,7 +152442,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({ title: hint.value }, toDisplayString$1(label5.value), 9, _hoisted_4$f) ]), - props.error ? (openBlock(), createElementBlock("div", _hoisted_5$c, toDisplayString$1(props.error), 1)) : createCommentVNode("", true) + props.error ? (openBlock(), createElementBlock("div", _hoisted_5$d, toDisplayString$1(props.error), 1)) : createCommentVNode("", true) ]), createBaseVNode("div", _hoisted_6$7, [ createVNode(unref(script$V), { @@ -151780,11 +152566,11 @@ function tryMigrateDeprecatedValue(setting, value4) { return setting?.migrateDeprecatedValue?.(value4) ?? value4; } __name(tryMigrateDeprecatedValue, "tryMigrateDeprecatedValue"); -function onChange(setting, newValue2, oldValue2) { +function onChange(setting, newValue2, oldValue) { if (setting?.onChange) { - setting.onChange(newValue2, oldValue2); + setting.onChange(newValue2, oldValue); } - app$1.ui.settings.dispatchChange(setting.id, newValue2, oldValue2); + app$1.ui.settings.dispatchChange(setting.id, newValue2, oldValue); } __name(onChange, "onChange"); const useSettingStore = /* @__PURE__ */ defineStore("setting", () => { @@ -151819,9 +152605,9 @@ const useSettingStore = /* @__PURE__ */ defineStore("setting", () => { settingsById.value[key], clonedValue ); - const oldValue2 = get3(key); - if (newValue2 === oldValue2) return; - onChange(settingsById.value[key], newValue2, oldValue2); + const oldValue = get3(key); + if (newValue2 === oldValue) return; + onChange(settingsById.value[key], newValue2, oldValue); settingValues.value[key] = newValue2; await api.storeSetting(key, newValue2); } @@ -151956,7 +152742,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({ message: unref(t2)("missingModelsDialog.missingModelsMessage") }, null, 8, ["title", "message"]), createBaseVNode("div", _hoisted_1$R, [ - createVNode(unref(script$K), { + createVNode(unref(script$J), { modelValue: doNotAskAgain.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => doNotAskAgain.value = $event), binary: "", @@ -152066,7 +152852,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({ return openBlock(), createElementBlock("div", _hoisted_1$Q, [ createVNode(unref(script$x), null, { default: withCtx(() => [ - createVNode(unref(script$J), { + createVNode(unref(script$I), { ref_key: "inputRef", ref: inputRef, modelValue: inputValue.value, @@ -152420,7 +153206,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({ severity: "contrast", onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("showFilter", $event)) }, null, 8, ["icon"])) : createCommentVNode("", true), - createVNode(unref(script$J), { + createVNode(unref(script$I), { class: "search-box-input w-full", onInput: handleInput, modelValue: _ctx.modelValue, @@ -152844,15 +153630,15 @@ var script$o = { onPrevButtonClick: /* @__PURE__ */ __name(function onPrevButtonClick() { var content2 = this.$refs.content; var width2 = getWidth$1(content2); - var pos2 = content2.scrollLeft - width2; - content2.scrollLeft = pos2 <= 0 ? 0 : pos2; + var pos = content2.scrollLeft - width2; + content2.scrollLeft = pos <= 0 ? 0 : pos; }, "onPrevButtonClick"), onNextButtonClick: /* @__PURE__ */ __name(function onNextButtonClick() { var content2 = this.$refs.content; var width2 = getWidth$1(content2) - this.getVisibleButtonWidths(); - var pos2 = content2.scrollLeft + width2; + var pos = content2.scrollLeft + width2; var lastPos = content2.scrollWidth - width2; - content2.scrollLeft = pos2 >= lastPos ? lastPos : pos2; + content2.scrollLeft = pos >= lastPos ? lastPos : pos; }, "onNextButtonClick"), onTabClick: /* @__PURE__ */ __name(function onTabClick(event, tab, index2) { this.changeActiveIndex(event, tab, index2); @@ -153081,7 +153867,7 @@ var _hoisted_1$N = ["tabindex", "aria-label"]; var _hoisted_2$x = ["data-p-active", "data-p-disabled", "data-pc-index"]; var _hoisted_3$l = ["id", "tabindex", "aria-disabled", "aria-selected", "aria-controls", "onClick", "onKeydown"]; var _hoisted_4$e = ["tabindex", "aria-label"]; -var _hoisted_5$b = ["id", "aria-labelledby", "data-pc-index", "data-p-active"]; +var _hoisted_5$c = ["id", "aria-labelledby", "data-pc-index", "data-p-active"]; function render$n(_ctx, _cache, $props, $setup, $data, $options) { var _directive_ripple = resolveDirective("ripple"); return openBlock(), createElementBlock("div", mergeProps$2({ @@ -153193,7 +153979,7 @@ function render$n(_ctx, _cache, $props, $setup, $data, $options) { "data-pc-name": "tabpanel", "data-pc-index": index2, "data-p-active": $data.d_activeIndex === index2 - }), [(openBlock(), createBlock(resolveDynamicComponent(tab)))], 16, _hoisted_5$b)), [[vShow, _ctx.lazy ? true : $options.isTabActive(index2)]]) : createCommentVNode("", true)], 64); + }), [(openBlock(), createBlock(resolveDynamicComponent(tab)))], 16, _hoisted_5$c)), [[vShow, _ctx.lazy ? true : $options.isTabActive(index2)]]) : createCommentVNode("", true)], 64); }), 128))], 16)], 16); } __name(render$n, "render$n"); @@ -153241,7 +154027,7 @@ const _hoisted_1$L = { class: "system-stats" }; const _hoisted_2$v = { class: "mb-6" }; const _hoisted_3$k = { class: "text-2xl font-semibold mb-4" }; const _hoisted_4$d = { class: "grid grid-cols-2 gap-2" }; -const _hoisted_5$a = { class: "font-medium" }; +const _hoisted_5$b = { class: "font-medium" }; const _hoisted_6$6 = { class: "text-2xl font-semibold mb-4" }; const _sfc_main$M = /* @__PURE__ */ defineComponent({ __name: "SystemStatsPanel", @@ -153278,13 +154064,13 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({ return openBlock(), createElementBlock(Fragment$1, { key: col.field }, [ - createBaseVNode("div", _hoisted_5$a, toDisplayString$1(col.header), 1), + createBaseVNode("div", _hoisted_5$b, toDisplayString$1(col.header), 1), createBaseVNode("div", null, toDisplayString$1(formatValue2(systemInfo.value[col.field], col.field)), 1) ], 64); }), 64)) ]) ]), - createVNode(unref(script$S)), + createVNode(unref(script$R)), createBaseVNode("div", null, [ createBaseVNode("h2", _hoisted_6$6, toDisplayString$1(_ctx.$t("g.devices")), 1), props.stats.devices.length > 1 ? (openBlock(), createBlock(unref(script$o), { key: 0 }, { @@ -153413,7 +154199,7 @@ const useSystemStatsStore = /* @__PURE__ */ defineStore("systemStats", () => { }; }); const useAboutPanelStore = /* @__PURE__ */ defineStore("aboutPanel", () => { - const frontendVersion = "1.8.14"; + const frontendVersion = "1.9.17"; const extensionStore = useExtensionStore(); const systemStatsStore = useSystemStatsStore(); const coreVersion = computed( @@ -153464,7 +154250,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({ default: withCtx(() => [ createBaseVNode("div", _hoisted_1$K, [ renderSlot(_ctx.$slots, "header"), - createVNode(unref(script$R), { class: "flex-grow h-0 pr-2" }, { + createVNode(unref(script$Q), { class: "flex-grow h-0 pr-2" }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), @@ -153522,7 +154308,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({ ], 8, _hoisted_3$j); }), 128)) ]), - createVNode(unref(script$S)), + createVNode(unref(script$R)), unref(systemStatsStore).systemStats ? (openBlock(), createBlock(_sfc_main$M, { key: 0, stats: unref(systemStatsStore).systemStats @@ -154632,7 +155418,7 @@ var script$m = { ripple: Ripple }, components: { - InputText: script$J, + InputText: script$I, VirtualScroller: script$A, Portal: script$U, InputIcon: script$B, @@ -154641,7 +155427,7 @@ var script$m = { ChevronDownIcon: script$n, SpinnerIcon: script$X, SearchIcon: script$D, - CheckIcon: script$M, + CheckIcon: script$L, BlankIcon: script$E } }; @@ -154649,7 +155435,7 @@ var _hoisted_1$I = ["id"]; var _hoisted_2$t = ["id", "value", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"]; var _hoisted_3$i = ["id", "tabindex", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-disabled"]; var _hoisted_4$c = ["id"]; -var _hoisted_5$9 = ["id"]; +var _hoisted_5$a = ["id"]; var _hoisted_6$5 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove", "data-p-selected", "data-p-focused", "data-p-disabled"]; function render$l(_ctx, _cache, $props, $setup, $data, $options) { var _component_SpinnerIcon = resolveComponent("SpinnerIcon"); @@ -154901,7 +155687,7 @@ function render$l(_ctx, _cache, $props, $setup, $data, $options) { "class": _ctx.cx("optionGroupLabel"), ref_for: true }, _ctx.ptm("optionGroupLabel")), toDisplayString$1($options.getOptionGroupLabel(option3.optionGroup)), 17)]; - })], 16, _hoisted_5$9)) : withDirectives((openBlock(), createElementBlock("li", mergeProps$2({ + })], 16, _hoisted_5$a)) : withDirectives((openBlock(), createElementBlock("li", mergeProps$2({ key: 1, id: $data.id + "_" + $options.getOptionIndex(i2, getItemOptions), "class": _ctx.cx("option", { @@ -155563,7 +156349,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({ } }, "importCustomPalette"); return (_ctx, _cache) => { - return openBlock(), createBlock(unref(script$I), { + return openBlock(), createBlock(unref(script$S), { severity: "info", icon: "pi pi-palette", "pt:text": "w-full" @@ -155618,7 +156404,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({ window.location.reload(); }, "logout"); return (_ctx, _cache) => { - return unref(userStore).isMultiUserServer ? (openBlock(), createBlock(unref(script$I), { + return unref(userStore).isMultiUserServer ? (openBlock(), createBlock(unref(script$S), { key: 0, severity: "info", icon: "pi pi-user", @@ -155649,7 +156435,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({ settingStore.set("Comfy.UseNewMenu", currentValue); }, "handleClose"); return (_ctx, _cache) => { - return show5.value ? (openBlock(), createBlock(unref(script$I), { + return show5.value ? (openBlock(), createBlock(unref(script$S), { key: 0, class: "first-time-ui-message", severity: "info", @@ -155997,35 +156783,35 @@ var script$j = { d_value: /* @__PURE__ */ __name(function d_value(newValue2) { this.d_modelValue = newValue2; }, "d_value"), - locale: /* @__PURE__ */ __name(function locale(newValue2, oldValue2) { - this.updateConstructParser(newValue2, oldValue2); + locale: /* @__PURE__ */ __name(function locale(newValue2, oldValue) { + this.updateConstructParser(newValue2, oldValue); }, "locale"), - localeMatcher: /* @__PURE__ */ __name(function localeMatcher(newValue2, oldValue2) { - this.updateConstructParser(newValue2, oldValue2); + localeMatcher: /* @__PURE__ */ __name(function localeMatcher(newValue2, oldValue) { + this.updateConstructParser(newValue2, oldValue); }, "localeMatcher"), - mode: /* @__PURE__ */ __name(function mode(newValue2, oldValue2) { - this.updateConstructParser(newValue2, oldValue2); + mode: /* @__PURE__ */ __name(function mode(newValue2, oldValue) { + this.updateConstructParser(newValue2, oldValue); }, "mode"), - currency: /* @__PURE__ */ __name(function currency(newValue2, oldValue2) { - this.updateConstructParser(newValue2, oldValue2); + currency: /* @__PURE__ */ __name(function currency(newValue2, oldValue) { + this.updateConstructParser(newValue2, oldValue); }, "currency"), - currencyDisplay: /* @__PURE__ */ __name(function currencyDisplay(newValue2, oldValue2) { - this.updateConstructParser(newValue2, oldValue2); + currencyDisplay: /* @__PURE__ */ __name(function currencyDisplay(newValue2, oldValue) { + this.updateConstructParser(newValue2, oldValue); }, "currencyDisplay"), - useGrouping: /* @__PURE__ */ __name(function useGrouping(newValue2, oldValue2) { - this.updateConstructParser(newValue2, oldValue2); + useGrouping: /* @__PURE__ */ __name(function useGrouping(newValue2, oldValue) { + this.updateConstructParser(newValue2, oldValue); }, "useGrouping"), - minFractionDigits: /* @__PURE__ */ __name(function minFractionDigits(newValue2, oldValue2) { - this.updateConstructParser(newValue2, oldValue2); + minFractionDigits: /* @__PURE__ */ __name(function minFractionDigits(newValue2, oldValue) { + this.updateConstructParser(newValue2, oldValue); }, "minFractionDigits"), - maxFractionDigits: /* @__PURE__ */ __name(function maxFractionDigits(newValue2, oldValue2) { - this.updateConstructParser(newValue2, oldValue2); + maxFractionDigits: /* @__PURE__ */ __name(function maxFractionDigits(newValue2, oldValue) { + this.updateConstructParser(newValue2, oldValue); }, "maxFractionDigits"), - suffix: /* @__PURE__ */ __name(function suffix(newValue2, oldValue2) { - this.updateConstructParser(newValue2, oldValue2); + suffix: /* @__PURE__ */ __name(function suffix(newValue2, oldValue) { + this.updateConstructParser(newValue2, oldValue); }, "suffix"), - prefix: /* @__PURE__ */ __name(function prefix(newValue2, oldValue2) { - this.updateConstructParser(newValue2, oldValue2); + prefix: /* @__PURE__ */ __name(function prefix(newValue2, oldValue) { + this.updateConstructParser(newValue2, oldValue); }, "prefix") }, created: /* @__PURE__ */ __name(function created3() { @@ -156063,8 +156849,8 @@ var script$j = { return index2.get(d2); }; }, "constructParser"), - updateConstructParser: /* @__PURE__ */ __name(function updateConstructParser(newValue2, oldValue2) { - if (newValue2 !== oldValue2) { + updateConstructParser: /* @__PURE__ */ __name(function updateConstructParser(newValue2, oldValue) { + if (newValue2 !== oldValue) { this.constructParser(); } }, "updateConstructParser"), @@ -156799,7 +157585,7 @@ var script$j = { }, "getFormatter") }, components: { - InputText: script$J, + InputText: script$I, AngleUpIcon: script$k, AngleDownIcon: script$l } @@ -157825,6 +158611,9 @@ __name(render$g, "render$g"); script$h.render = render$g; const _hoisted_1$C = { class: "color-picker-wrapper flex items-center gap-2" }; const _sfc_main$F = /* @__PURE__ */ defineComponent({ + ...{ + inheritAttrs: false + }, __name: "FormColorPicker", props: /* @__PURE__ */ mergeModels({ defaultValue: {}, @@ -157838,11 +158627,11 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({ const modelValue3 = useModel(__props, "modelValue"); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", _hoisted_1$C, [ - createVNode(unref(script$h), { + createVNode(unref(script$h), mergeProps$2({ modelValue: modelValue3.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue3.value = $event) - }, null, 8, ["modelValue"]), - createVNode(unref(script$J), { + }, _ctx.$attrs), null, 16, ["modelValue"]), + createVNode(unref(script$I), { modelValue: modelValue3.value, "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => modelValue3.value = $event), class: "w-28", @@ -157859,7 +158648,7 @@ const _hoisted_4$a = { key: 1, class: "pi pi-image text-gray-400 text-xl" }; -const _hoisted_5$8 = { class: "flex flex-col gap-2" }; +const _hoisted_5$9 = { class: "flex flex-col gap-2" }; const _sfc_main$E = /* @__PURE__ */ defineComponent({ __name: "FormImageUpload", props: { @@ -157902,7 +158691,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({ class: "max-w-full max-h-full object-contain" }, null, 8, _hoisted_3$g)) : (openBlock(), createElementBlock("i", _hoisted_4$a)) ], 2), - createBaseVNode("div", _hoisted_5$8, [ + createBaseVNode("div", _hoisted_5$9, [ createVNode(unref(script$V), { icon: "pi pi-upload", label: _ctx.$t("g.upload"), @@ -158077,10 +158866,10 @@ var script$g = { } var newValue2 = (this.max - this.min) * (handleValue / 100) + this.min; if (this.step) { - var oldValue2 = this.range ? this.value[this.handleIndex] : this.value; - var diff2 = newValue2 - oldValue2; - if (diff2 < 0) newValue2 = oldValue2 + Math.ceil(newValue2 / this.step - oldValue2 / this.step) * this.step; - else if (diff2 > 0) newValue2 = oldValue2 + Math.floor(newValue2 / this.step - oldValue2 / this.step) * this.step; + var oldValue = this.range ? this.value[this.handleIndex] : this.value; + var diff2 = newValue2 - oldValue; + if (diff2 < 0) newValue2 = oldValue + Math.ceil(newValue2 / this.step - oldValue / this.step) * this.step; + else if (diff2 > 0) newValue2 = oldValue + Math.floor(newValue2 / this.step - oldValue / this.step) * this.step; } else { newValue2 = Math.floor(newValue2); } @@ -158438,6 +159227,9 @@ __name(render$f, "render$f"); script$g.render = render$f; const _hoisted_1$z = { class: "input-slider flex flex-row items-center gap-2" }; const _sfc_main$D = /* @__PURE__ */ defineComponent({ + ...{ + inheritAttrs: false + }, __name: "InputSlider", props: { modelValue: {}, @@ -158472,14 +159264,14 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({ }, "updateValue"); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", _hoisted_1$z, [ - createVNode(unref(script$g), { + createVNode(unref(script$g), mergeProps$2({ modelValue: _ctx.modelValue, "onUpdate:modelValue": updateValue3, - class: normalizeClass(["slider-part", _ctx.sliderClass]), + class: ["slider-part", _ctx.sliderClass], min: _ctx.min, max: _ctx.max, step: _ctx.step - }, null, 8, ["modelValue", "class", "min", "max", "step"]), + }, _ctx.$attrs), null, 16, ["modelValue", "class", "min", "max", "step"]), createVNode(unref(script$j), { modelValue: _ctx.modelValue, "onUpdate:modelValue": updateValue3, @@ -158506,6 +159298,38 @@ const checkUrlReachable = /* @__PURE__ */ __name(async (url) => { const checkMirrorReachable = /* @__PURE__ */ __name(async (mirror2) => { return isValidUrl(mirror2) && await electronAPI().NetWork.canAccessUrl(mirror2); }, "checkMirrorReachable"); +async function isInChina() { + const isChineseLocale = navigator.language.toLowerCase().startsWith("zh-cn"); + try { + const googleTest = await Promise.race([ + fetch("https://www.google.com", { + mode: "no-cors", + cache: "no-cache" + }), + new Promise((_2, reject3) => setTimeout(() => reject3(), 2e3)) + ]); + if (googleTest) { + return false; + } + } catch { + if (isChineseLocale) { + return true; + } + try { + const start2 = performance.now(); + await fetch("https://www.baidu.com", { + mode: "no-cors", + cache: "no-cache" + }); + const latency = performance.now() - start2; + return latency < 150; + } catch { + return isChineseLocale; + } + } + return false; +} +__name(isInChina, "isInChina"); var ValidationState = /* @__PURE__ */ ((ValidationState2) => { ValidationState2["IDLE"] = "IDLE"; ValidationState2["LOADING"] = "LOADING"; @@ -158593,7 +159417,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({ return (_ctx, _cache) => { return openBlock(), createBlock(unref(script$C), { class: "w-full" }, { default: withCtx(() => [ - createVNode(unref(script$J), mergeProps$2(_ctx.$attrs, { + createVNode(unref(script$I), mergeProps$2(_ctx.$attrs, { "model-value": internalValue.value, class: "w-full", invalid: validationState.value === unref(ValidationState).INVALID, @@ -158616,11 +159440,12 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({ }); const _hoisted_1$y = { class: "flex flex-row items-center gap-2" }; const _hoisted_2$n = { class: "form-label flex flex-grow items-center" }; -const _hoisted_3$e = { +const _hoisted_3$e = ["id"]; +const _hoisted_4$9 = { key: 0, class: "pi pi-info-circle bg-transparent" }; -const _hoisted_4$9 = { class: "form-input flex justify-end" }; +const _hoisted_5$8 = { class: "form-input flex justify-end" }; const _sfc_main$B = /* @__PURE__ */ defineComponent({ __name: "FormItem", props: /* @__PURE__ */ mergeModels({ @@ -158682,7 +159507,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({ case "url": return _sfc_main$C; default: - return script$J; + return script$I; } } __name(getFormComponent, "getFormComponent"); @@ -158691,28 +159516,30 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({ return openBlock(), createElementBlock("div", _hoisted_1$y, [ createBaseVNode("div", _hoisted_2$n, [ createBaseVNode("span", { - class: normalizeClass(["text-muted", props.labelClass]) + class: normalizeClass(["text-muted", props.labelClass]), + id: `${props.id}-label` }, [ renderSlot(_ctx.$slots, "name-prefix", {}, void 0, true), createTextVNode(" " + toDisplayString$1(props.item.name) + " ", 1), - props.item.tooltip ? withDirectives((openBlock(), createElementBlock("i", _hoisted_3$e, null, 512)), [ + props.item.tooltip ? withDirectives((openBlock(), createElementBlock("i", _hoisted_4$9, null, 512)), [ [_directive_tooltip, props.item.tooltip] ]) : createCommentVNode("", true), renderSlot(_ctx.$slots, "name-suffix", {}, void 0, true) - ], 2) + ], 10, _hoisted_3$e) ]), - createBaseVNode("div", _hoisted_4$9, [ + createBaseVNode("div", _hoisted_5$8, [ (openBlock(), createBlock(resolveDynamicComponent(markRaw(getFormComponent(props.item))), mergeProps$2({ id: props.id, + "aria-labelledby": `${props.id}-label`, modelValue: formValue.value, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formValue.value = $event) - }, getFormAttrs(props.item)), null, 16, ["id", "modelValue"])) + }, getFormAttrs(props.item)), null, 16, ["id", "aria-labelledby", "modelValue"])) ]) ]); }; } }); -const FormItem = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-1451da7b"]]); +const FormItem = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-a29c257f"]]); const _sfc_main$A = /* @__PURE__ */ defineComponent({ __name: "SettingItem", props: { @@ -158782,7 +159609,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({ setup(__props) { return (_ctx, _cache) => { return openBlock(), createElementBlock("div", _hoisted_1$x, [ - _ctx.divider ? (openBlock(), createBlock(unref(script$S), { key: 0 })) : createCommentVNode("", true), + _ctx.divider ? (openBlock(), createBlock(unref(script$R), { key: 0 })) : createCommentVNode("", true), createBaseVNode("h3", null, toDisplayString$1(_ctx.$t(`settingsCategories.${unref(normalizeI18nKey)(_ctx.group.label)}`, _ctx.group.label)), 1), (openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.group.settings, (setting) => { return openBlock(), createElementBlock("div", { @@ -158831,13 +159658,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({ setup(__props) { const props = __props; const KeybindingPanel = /* @__PURE__ */ defineAsyncComponent( - () => __vitePreload(() => import("./KeybindingPanel-CeHhC2F4.js"), true ? __vite__mapDeps([26,24,2,3,27]) : void 0, import.meta.url) + () => __vitePreload(() => import("./KeybindingPanel-BIrxefrS.js"), true ? __vite__mapDeps([30,25,2,4,31]) : void 0, import.meta.url) ); const ExtensionPanel = /* @__PURE__ */ defineAsyncComponent( - () => __vitePreload(() => import("./ExtensionPanel-iPOrhDVM.js"), true ? __vite__mapDeps([28,24,2]) : void 0, import.meta.url) + () => __vitePreload(() => import("./ExtensionPanel-1HZtMFvH.js"), true ? __vite__mapDeps([32,25,2]) : void 0, import.meta.url) ); const ServerConfigPanel = /* @__PURE__ */ defineAsyncComponent( - () => __vitePreload(() => import("./ServerConfigPanel-B1lI5M9c.js"), true ? __vite__mapDeps([29,4]) : void 0, import.meta.url) + () => __vitePreload(() => import("./ServerConfigPanel-D0jTW_iX.js"), true ? __vite__mapDeps([33,5]) : void 0, import.meta.url) ); const aboutPanelNode = { key: "about", @@ -158960,14 +159787,14 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({ const tabValue = computed( () => inSearch.value ? "Search Results" : activeCategory.value?.label ); - watch(activeCategory, (_2, oldValue2) => { + watch(activeCategory, (_2, oldValue) => { if (!tabValue.value) { - activeCategory.value = oldValue2; + activeCategory.value = oldValue; } }); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", _hoisted_1$v, [ - createVNode(unref(script$R), { class: "settings-sidebar flex-shrink-0 p-2 w-48 2xl:w-64" }, { + createVNode(unref(script$Q), { class: "settings-sidebar flex-shrink-0 p-2 w-48 2xl:w-64" }, { default: withCtx(() => [ createVNode(SearchBox, { class: "settings-search-box w-full mb-2", @@ -158989,11 +159816,11 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({ ]), _: 1 }), - createVNode(unref(script$S), { + createVNode(unref(script$R), { layout: "vertical", class: "mx-1 2xl:mx-4 hidden md:flex" }), - createVNode(unref(script$S), { + createVNode(unref(script$R), { layout: "horizontal", class: "flex md:hidden" }), @@ -159295,16 +160122,16 @@ var script$e = { circular: /* @__PURE__ */ __name(function circular(newValue2) { this.d_circular = newValue2; }, "circular"), - numVisible: /* @__PURE__ */ __name(function numVisible(newValue2, oldValue2) { + numVisible: /* @__PURE__ */ __name(function numVisible(newValue2, oldValue) { this.d_numVisible = newValue2; - this.d_oldNumVisible = oldValue2; + this.d_oldNumVisible = oldValue; }, "numVisible"), - numScroll: /* @__PURE__ */ __name(function numScroll(newValue2, oldValue2) { - this.d_oldNumScroll = oldValue2; + numScroll: /* @__PURE__ */ __name(function numScroll(newValue2, oldValue) { + this.d_oldNumScroll = oldValue; this.d_numScroll = newValue2; }, "numScroll"), - value: /* @__PURE__ */ __name(function value3(oldValue2) { - this.d_oldValue = oldValue2; + value: /* @__PURE__ */ __name(function value3(oldValue) { + this.d_oldValue = oldValue; }, "value") }, mounted: /* @__PURE__ */ __name(function mounted17() { @@ -159921,7 +160748,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({ const props = __props; const imageError = ref(false); return (_ctx, _cache) => { - return openBlock(), createBlock(unref(script$Q), { + return openBlock(), createBlock(unref(script$P), { "data-testid": `template-workflow-${props.workflowName}` }, { header: withCtx(() => [ @@ -160201,7 +161028,8 @@ const useDialogService = /* @__PURE__ */ __name(() => { title, message: message3, type = "default", - itemList = [] + itemList = [], + hint }) { return new Promise((resolve2) => { const options4 = { @@ -160212,7 +161040,8 @@ const useDialogService = /* @__PURE__ */ __name(() => { message: message3, type, itemList, - onConfirm: resolve2 + onConfirm: resolve2, + hint }, dialogComponentProps: { onClose: /* @__PURE__ */ __name(() => resolve2(null), "onClose") @@ -160234,6 +161063,41 @@ const useDialogService = /* @__PURE__ */ __name(() => { confirm: confirm2 }; }, "useDialogService"); +const RESERVED_BY_TEXT_INPUT = /* @__PURE__ */ new Set([ + "Ctrl + a", + "Ctrl + c", + "Ctrl + v", + "Ctrl + x", + "Ctrl + z", + "Ctrl + y", + "Ctrl + p", + "Enter", + "Shift + Enter", + "Ctrl + Backspace", + "Ctrl + Delete", + "Home", + "Ctrl + Home", + "Ctrl + Shift + Home", + "End", + "Ctrl + End", + "Ctrl + Shift + End", + "PageUp", + "PageDown", + "Shift + PageUp", + "Shift + PageDown", + "ArrowLeft", + "Ctrl + ArrowLeft", + "Shift + ArrowLeft", + "Ctrl + Shift + ArrowLeft", + "ArrowRight", + "Ctrl + ArrowRight", + "Shift + ArrowRight", + "Ctrl + Shift + ArrowRight", + "ArrowUp", + "Shift + ArrowUp", + "ArrowDown", + "Shift + ArrowDown" +]); class KeybindingImpl { static { __name(this, "KeybindingImpl"); @@ -160290,6 +161154,16 @@ class KeyComboImpl { get isModifier() { return ["Control", "Meta", "Alt", "Shift"].includes(this.key); } + get modifierCount() { + const modifiers2 = [this.ctrl, this.alt, this.shift]; + return modifiers2.reduce((acc, cur) => acc + Number(cur), 0); + } + get isShiftOnly() { + return this.shift && this.modifierCount === 1; + } + get isReservedByTextInput() { + return !this.hasModifier || this.isShiftOnly || RESERVED_BY_TEXT_INPUT.has(this.toString()); + } getKeySequences() { const sequences = []; if (this.ctrl) { @@ -160617,6 +161491,437 @@ const useMenuItemStore = /* @__PURE__ */ defineStore("menuItem", () => { registerCoreMenuCommands }; }); +const useBooleanWidget = /* @__PURE__ */ __name(() => { + const widgetConstructor = /* @__PURE__ */ __name((node3, inputName, inputData) => { + const inputOptions = inputData[1]; + const defaultVal = inputOptions?.default ?? false; + const options4 = { + on: inputOptions?.label_on, + off: inputOptions?.label_off + }; + return { + widget: node3.addWidget("toggle", inputName, defaultVal, () => { + }, options4) + }; + }, "widgetConstructor"); + return widgetConstructor; +}, "useBooleanWidget"); +const MAX_RETRIES = 5; +const TIMEOUT = 4096; +const dataCache = /* @__PURE__ */ new Map(); +const createCacheKey = /* @__PURE__ */ __name((config2) => { + const { route, query_params = {}, refresh: refresh2 = 0 } = config2; + const paramsKey = Object.entries(query_params).sort(([a2], [b2]) => a2.localeCompare(b2)).map(([k2, v2]) => `${k2}=${v2}`).join("&"); + return [route, `r=${refresh2}`, paramsKey].join(";"); +}, "createCacheKey"); +const getBackoff = /* @__PURE__ */ __name((retryCount) => Math.min(1e3 * Math.pow(2, retryCount), 512), "getBackoff"); +const isInitialized = /* @__PURE__ */ __name((entry) => entry?.data && entry?.timestamp && entry.timestamp > 0, "isInitialized"); +const isStale = /* @__PURE__ */ __name((entry, ttl) => entry?.timestamp && Date.now() - entry.timestamp >= ttl, "isStale"); +const isFetching = /* @__PURE__ */ __name((entry) => entry?.fetchPromise !== void 0, "isFetching"); +const isFailed = /* @__PURE__ */ __name((entry) => entry?.failed === true, "isFailed"); +const isBackingOff = /* @__PURE__ */ __name((entry) => entry?.error && entry?.lastErrorTime && Date.now() - entry.lastErrorTime < getBackoff(entry.retryCount || 0), "isBackingOff"); +const fetchData = /* @__PURE__ */ __name(async (config2, controller) => { + const { route, response_key, query_params, timeout = TIMEOUT } = config2; + const res = await axios.get(route, { + params: query_params, + signal: controller.signal, + timeout + }); + return response_key ? res.data[response_key] : res.data; +}, "fetchData"); +function useRemoteWidget(options4) { + const { inputData, defaultValue: defaultValue2, node: node3, widget } = options4; + const config2 = inputData[1].remote; + const { refresh: refresh2 = 0, max_retries = MAX_RETRIES } = config2; + const isPermanent = refresh2 <= 0; + const cacheKey = createCacheKey(config2); + let isLoaded = false; + const setSuccess = /* @__PURE__ */ __name((entry, data26) => { + entry.retryCount = 0; + entry.lastErrorTime = 0; + entry.error = null; + entry.timestamp = Date.now(); + entry.data = data26 ?? defaultValue2; + }, "setSuccess"); + const setError = /* @__PURE__ */ __name((entry, error2) => { + entry.retryCount = (entry.retryCount || 0) + 1; + entry.lastErrorTime = Date.now(); + entry.error = error2 instanceof Error ? error2 : new Error(String(error2)); + entry.data ??= defaultValue2; + entry.fetchPromise = void 0; + if (entry.retryCount >= max_retries) { + setFailed(entry); + } + }, "setError"); + const setFailed = /* @__PURE__ */ __name((entry) => { + dataCache.set(cacheKey, { + data: entry.data ?? defaultValue2, + failed: true + }); + }, "setFailed"); + const isFirstLoad = /* @__PURE__ */ __name(() => { + return !isLoaded && isInitialized(dataCache.get(cacheKey)); + }, "isFirstLoad"); + const onFirstLoad = /* @__PURE__ */ __name((data26) => { + isLoaded = true; + widget.value = data26[0]; + widget.callback?.(widget.value); + node3.graph?.setDirtyCanvas(true); + }, "onFirstLoad"); + const fetchValue = /* @__PURE__ */ __name(async () => { + const entry = dataCache.get(cacheKey); + if (isFailed(entry)) return entry.data; + const isValid2 = isInitialized(entry) && (isPermanent || !isStale(entry, refresh2)); + if (isValid2 || isBackingOff(entry) || isFetching(entry)) return entry.data; + const currentEntry = entry || { data: defaultValue2 }; + dataCache.set(cacheKey, currentEntry); + try { + currentEntry.controller = new AbortController(); + currentEntry.fetchPromise = fetchData(config2, currentEntry.controller); + const data26 = await currentEntry.fetchPromise; + setSuccess(currentEntry, data26); + return currentEntry.data; + } catch (err) { + setError(currentEntry, err); + return currentEntry.data; + } finally { + currentEntry.fetchPromise = void 0; + currentEntry.controller = void 0; + } + }, "fetchValue"); + const onRefresh = /* @__PURE__ */ __name(() => { + if (config2.control_after_refresh) { + const data26 = getCachedValue(); + if (!Array.isArray(data26)) return; + switch (config2.control_after_refresh) { + case "first": + widget.value = data26[0] ?? defaultValue2; + break; + case "last": + widget.value = data26.at(-1) ?? defaultValue2; + break; + } + widget.callback?.(widget.value); + node3.graph?.setDirtyCanvas(true); + } + }, "onRefresh"); + const clearCachedValue = /* @__PURE__ */ __name(() => { + const entry = dataCache.get(cacheKey); + if (!entry) return; + if (entry.fetchPromise) entry.controller?.abort(); + dataCache.delete(cacheKey); + }, "clearCachedValue"); + function getCachedValue() { + return dataCache.get(cacheKey)?.data; + } + __name(getCachedValue, "getCachedValue"); + function getValue2(onFulfilled) { + fetchValue().then((data26) => { + if (isFirstLoad()) onFirstLoad(data26); + onFulfilled?.(); + }); + return getCachedValue() ?? defaultValue2; + } + __name(getValue2, "getValue"); + function refreshValue() { + clearCachedValue(); + getValue2(onRefresh); + } + __name(refreshValue, "refreshValue"); + function addRefreshButton() { + node3.addWidget("button", "refresh", "refresh", refreshValue); + } + __name(addRefreshButton, "addRefreshButton"); + return { + getCachedValue, + getValue: getValue2, + refreshValue, + addRefreshButton, + getCacheEntry: /* @__PURE__ */ __name(() => dataCache.get(cacheKey), "getCacheEntry"), + cacheKey + }; +} +__name(useRemoteWidget, "useRemoteWidget"); +const useComboWidget = /* @__PURE__ */ __name(() => { + const widgetConstructor = /* @__PURE__ */ __name((node3, inputName, inputData) => { + const widgetStore = useWidgetStore(); + const { remote, options: options4 } = inputData[1] || {}; + const defaultValue2 = widgetStore.getDefaultValue(inputData); + const res = { + widget: node3.addWidget("combo", inputName, defaultValue2, () => { + }, { + values: options4 ?? inputData[0] + }) + }; + if (remote) { + const remoteWidget = useRemoteWidget({ + inputData, + defaultValue: defaultValue2, + node: node3, + widget: res.widget + }); + if (remote.refresh_button) remoteWidget.addRefreshButton(); + const origOptions = res.widget.options; + res.widget.options = new Proxy( + origOptions, + { + get(target2, prop2) { + if (prop2 !== "values") return target2[prop2]; + return remoteWidget.getValue(); + } + } + ); + } + if (inputData[1]?.control_after_generate) { + res.widget.linkedWidgets = addValueControlWidgets( + node3, + res.widget, + void 0, + void 0, + inputData + ); + } + return res; + }, "widgetConstructor"); + return widgetConstructor; +}, "useComboWidget"); +function getNumberDefaults(inputOptions, options4) { + const { defaultStep } = options4; + const { + default: defaultVal = 0, + min = 0, + max = 2048, + step: step3 = defaultStep + } = inputOptions; + const { precision = Math.max(-Math.floor(Math.log10(step3)), 0) } = options4; + let round = inputOptions.round; + if (options4.enableRounding && (round == void 0 || round === true)) { + round = Math.round(1e6 * Math.pow(0.1, precision)) / 1e6; + } + return { + val: defaultVal, + config: { min, max, step: 10 * step3, round, precision } + }; +} +__name(getNumberDefaults, "getNumberDefaults"); +const useFloatWidget = /* @__PURE__ */ __name(() => { + const widgetConstructor = /* @__PURE__ */ __name((node3, inputName, inputData) => { + const settingStore = useSettingStore(); + const sliderEnabled = !settingStore.get("Comfy.DisableSliders"); + const inputOptions = inputData[1]; + const widgetType = sliderEnabled ? inputOptions?.display === "slider" ? "slider" : "number" : "number"; + const precision = settingStore.get("Comfy.FloatRoundingPrecision") || void 0; + const enableRounding = !settingStore.get("Comfy.DisableFloatRounding"); + const { val, config: config2 } = getNumberDefaults(inputOptions, { + defaultStep: 0.5, + precision, + enableRounding + }); + return { + widget: node3.addWidget( + widgetType, + inputName, + val, + function(v2) { + if (config2.round) { + this.value = Math.round((v2 + Number.EPSILON) / config2.round) * config2.round; + if (this.value > config2.max) this.value = config2.max; + if (this.value < config2.min) this.value = config2.min; + } else { + this.value = v2; + } + }, + config2 + ) + }; + }, "widgetConstructor"); + return widgetConstructor; +}, "useFloatWidget"); +const useImageUploadWidget = /* @__PURE__ */ __name(() => { + const widgetConstructor = /* @__PURE__ */ __name((node3, inputName, inputData, app2) => { + const imageWidget = node3.widgets?.find( + (w2) => w2.name === (inputData[1]?.widget ?? "image") + ); + const { image_folder = "input" } = inputData[1] ?? {}; + function showImage(name2) { + const img = new Image(); + img.onload = () => { + node3.imgs = [img]; + app2.graph.setDirtyCanvas(true); + }; + const folder_separator = name2.lastIndexOf("/"); + let subfolder = ""; + if (folder_separator > -1) { + subfolder = name2.substring(0, folder_separator); + name2 = name2.substring(folder_separator + 1); + } + img.src = api.apiURL( + `/view?filename=${encodeURIComponent(name2)}&type=${image_folder}&subfolder=${subfolder}${app2.getPreviewFormatParam()}${app2.getRandParam()}` + ); + node3.setSizeForImage?.(); + } + __name(showImage, "showImage"); + const default_value = imageWidget.value; + Object.defineProperty(imageWidget, "value", { + set: /* @__PURE__ */ __name(function(value4) { + this._real_value = value4; + }, "set"), + get: /* @__PURE__ */ __name(function() { + if (!this._real_value) { + return default_value; + } + let value4 = this._real_value; + if (value4.filename) { + const real_value = value4; + value4 = ""; + if (real_value.subfolder) { + value4 = real_value.subfolder + "/"; + } + value4 += real_value.filename; + if (real_value.type && real_value.type !== "input") + value4 += ` [${real_value.type}]`; + } + return value4; + }, "get") + }); + const cb = node3.callback; + imageWidget.callback = function(...args) { + showImage(imageWidget.value); + if (cb) { + return cb.apply(this, args); + } + }; + requestAnimationFrame(() => { + if (imageWidget.value) { + showImage(imageWidget.value); + } + }); + async function uploadFile2(file, updateNode, pasted = false) { + try { + const body = new FormData(); + body.append("image", file); + if (pasted) body.append("subfolder", "pasted"); + const resp = await api.fetchApi("/upload/image", { + method: "POST", + body + }); + if (resp.status === 200) { + const data26 = await resp.json(); + let path = data26.name; + if (data26.subfolder) path = data26.subfolder + "/" + path; + if (!imageWidget.options) { + imageWidget.options = { values: [] }; + } + if (!imageWidget.options.values) { + imageWidget.options.values = []; + } + if (!imageWidget.options.values.includes(path)) { + imageWidget.options.values.push(path); + } + if (updateNode) { + showImage(path); + imageWidget.value = path; + } + } else { + useToastStore().addAlert(resp.status + " - " + resp.statusText); + } + } catch (error2) { + useToastStore().addAlert(String(error2)); + } + } + __name(uploadFile2, "uploadFile"); + const fileInput2 = document.createElement("input"); + Object.assign(fileInput2, { + type: "file", + accept: "image/jpeg,image/png,image/webp", + style: "display: none", + onchange: /* @__PURE__ */ __name(async () => { + if (fileInput2.files && fileInput2.files.length) { + await uploadFile2(fileInput2.files[0], true); + } + }, "onchange") + }); + document.body.append(fileInput2); + const uploadWidget = node3.addWidget("button", inputName, "image", () => { + fileInput2.click(); + }); + uploadWidget.label = "choose file to upload"; + uploadWidget.serialize = false; + node3.onDragOver = function(e2) { + if (e2.dataTransfer && e2.dataTransfer.items) { + const image2 = [...e2.dataTransfer.items].find((f2) => f2.kind === "file"); + return !!image2; + } + return false; + }; + node3.onDragDrop = function(e2) { + console.log("onDragDrop called"); + let handled = false; + if (e2.dataTransfer?.files) { + for (const file of e2.dataTransfer.files) { + if (file.type.startsWith("image/")) { + uploadFile2(file, !handled); + handled = true; + } + } + } + return handled; + }; + node3.pasteFile = function(file) { + if (file.type.startsWith("image/")) { + const is_pasted = file.name === "image.png" && file.lastModified - Date.now() < 2e3; + uploadFile2(file, true, is_pasted); + return true; + } + return false; + }; + return { widget: uploadWidget }; + }, "widgetConstructor"); + return widgetConstructor; +}, "useImageUploadWidget"); +const useIntWidget = /* @__PURE__ */ __name(() => { + const widgetConstructor = /* @__PURE__ */ __name((node3, inputName, inputData, app2, widgetName) => { + const settingStore = useSettingStore(); + const sliderEnabled = !settingStore.get("Comfy.DisableSliders"); + const inputOptions = inputData[1]; + const widgetType = sliderEnabled ? inputOptions?.display === "slider" ? "slider" : "number" : "number"; + const { val, config: config2 } = getNumberDefaults(inputOptions, { + defaultStep: 1, + precision: 0, + enableRounding: true + }); + config2.precision = 0; + const result = { + widget: node3.addWidget( + widgetType, + inputName, + val, + function(v2) { + const s2 = (this.options.step ?? 1) / 10; + let sh = (this.options.min ?? 0) % s2; + if (isNaN(sh)) { + sh = 0; + } + this.value = Math.round((v2 - sh) / s2) * s2 + sh; + }, + config2 + ) + }; + if (inputData[1]?.control_after_generate) { + const seedControl = addValueControlWidget( + node3, + result.widget, + "randomize", + void 0, + widgetName, + inputData + ); + result.widget.linkedWidgets = [seedControl]; + } + return result; + }, "widgetConstructor"); + return widgetConstructor; +}, "useIntWidget"); function OrderedMap(content2) { this.content = content2; } @@ -160734,28 +162039,28 @@ OrderedMap.from = function(value4) { if (value4) for (var prop2 in value4) content2.push(prop2, value4[prop2]); return new OrderedMap(content2); }; -function findDiffStart(a2, b2, pos2) { +function findDiffStart(a2, b2, pos) { for (let i2 = 0; ; i2++) { if (i2 == a2.childCount || i2 == b2.childCount) - return a2.childCount == b2.childCount ? null : pos2; + return a2.childCount == b2.childCount ? null : pos; let childA = a2.child(i2), childB = b2.child(i2); if (childA == childB) { - pos2 += childA.nodeSize; + pos += childA.nodeSize; continue; } if (!childA.sameMarkup(childB)) - return pos2; + return pos; if (childA.isText && childA.text != childB.text) { for (let j2 = 0; childA.text[j2] == childB.text[j2]; j2++) - pos2++; - return pos2; + pos++; + return pos; } if (childA.content.size || childB.content.size) { - let inner = findDiffStart(childA.content, childB.content, pos2 + 1); + let inner = findDiffStart(childA.content, childB.content, pos + 1); if (inner != null) return inner; } - pos2 += childA.nodeSize; + pos += childA.nodeSize; } } __name(findDiffStart, "findDiffStart"); @@ -160810,13 +162115,13 @@ class Fragment { into a node when the callback returns `false`. */ nodesBetween(from2, to, f2, nodeStart = 0, parent) { - for (let i2 = 0, pos2 = 0; pos2 < to; i2++) { - let child = this.content[i2], end = pos2 + child.nodeSize; - if (end > from2 && f2(child, nodeStart + pos2, parent || null, i2) !== false && child.content.size) { - let start2 = pos2 + 1; + for (let i2 = 0, pos = 0; pos < to; i2++) { + let child = this.content[i2], end = pos + child.nodeSize; + if (end > from2 && f2(child, nodeStart + pos, parent || null, i2) !== false && child.content.size) { + let start2 = pos + 1; child.nodesBetween(Math.max(0, from2 - start2), Math.min(child.content.size, to - start2), f2, nodeStart + start2); } - pos2 = end; + pos = end; } } /** @@ -160833,8 +162138,8 @@ class Fragment { */ textBetween(from2, to, blockSeparator, leafText) { let text2 = "", first2 = true; - this.nodesBetween(from2, to, (node3, pos2) => { - let nodeText = node3.isText ? node3.text.slice(Math.max(from2, pos2) - pos2, to - pos2) : !node3.isLeaf ? "" : leafText ? typeof leafText === "function" ? leafText(node3) : leafText : node3.type.spec.leafText ? node3.type.spec.leafText(node3) : ""; + this.nodesBetween(from2, to, (node3, pos) => { + let nodeText = node3.isText ? node3.text.slice(Math.max(from2, pos) - pos, to - pos) : !node3.isLeaf ? "" : leafText ? typeof leafText === "function" ? leafText(node3) : leafText : node3.type.spec.leafText ? node3.type.spec.leafText(node3) : ""; if (node3.isBlock && (node3.isLeaf && nodeText || node3.isTextblock) && blockSeparator) { if (first2) first2 = false; @@ -160871,19 +162176,19 @@ class Fragment { return this; let result = [], size = 0; if (to > from2) - for (let i2 = 0, pos2 = 0; pos2 < to; i2++) { - let child = this.content[i2], end = pos2 + child.nodeSize; + for (let i2 = 0, pos = 0; pos < to; i2++) { + let child = this.content[i2], end = pos + child.nodeSize; if (end > from2) { - if (pos2 < from2 || end > to) { + if (pos < from2 || end > to) { if (child.isText) - child = child.cut(Math.max(0, from2 - pos2), Math.min(child.text.length, to - pos2)); + child = child.cut(Math.max(0, from2 - pos), Math.min(child.text.length, to - pos)); else - child = child.cut(Math.max(0, from2 - pos2 - 1), Math.min(child.content.size, to - pos2 - 1)); + child = child.cut(Math.max(0, from2 - pos - 1), Math.min(child.content.size, to - pos - 1)); } result.push(child); size += child.nodeSize; } - pos2 = end; + pos = end; } return new Fragment(result, size); } @@ -160984,8 +162289,8 @@ class Fragment { Find the first position at which this fragment and another fragment differ, or `null` if they are the same. */ - findDiffStart(other, pos2 = 0) { - return findDiffStart(this, other, pos2); + findDiffStart(other, pos = 0) { + return findDiffStart(this, other, pos); } /** Find the first position, searching from the end, at which this @@ -160993,25 +162298,25 @@ class Fragment { the same. Since this position will not be the same in both nodes, an object with two separate positions is returned. */ - findDiffEnd(other, pos2 = this.size, otherPos = other.size) { - return findDiffEnd(this, other, pos2, otherPos); + findDiffEnd(other, pos = this.size, otherPos = other.size) { + return findDiffEnd(this, other, pos, otherPos); } /** Find the index and inner offset corresponding to a given relative position in this fragment. The result object will be reused (overwritten) the next time the function is called. @internal */ - findIndex(pos2, round = -1) { - if (pos2 == 0) - return retIndex(0, pos2); - if (pos2 == this.size) - return retIndex(this.content.length, pos2); - if (pos2 > this.size || pos2 < 0) - throw new RangeError(`Position ${pos2} outside of fragment (${this})`); + findIndex(pos, round = -1) { + if (pos == 0) + return retIndex(0, pos); + if (pos == this.size) + return retIndex(this.content.length, pos); + if (pos > this.size || pos < 0) + throw new RangeError(`Position ${pos} outside of fragment (${this})`); for (let i2 = 0, curPos = 0; ; i2++) { let cur = this.child(i2), end = curPos + cur.nodeSize; - if (end >= pos2) { - if (end == pos2 || round > 0) + if (end >= pos) { + if (end == pos || round > 0) return retIndex(i2 + 1, end); return retIndex(i2, curPos); } @@ -161277,8 +162582,8 @@ class Slice { /** @internal */ - insertAt(pos2, fragment) { - let content2 = insertInto(this.content, pos2 + this.openStart, fragment); + insertAt(pos, fragment) { + let content2 = insertInto(this.content, pos + this.openStart, fragment); return content2 && new Slice(content2, this.openStart, this.openEnd); } /** @@ -161475,8 +162780,8 @@ class ResolvedPos { /** @internal */ - constructor(pos2, path, parentOffset) { - this.pos = pos2; + constructor(pos, path, parentOffset) { + this.pos = pos; this.path = path; this.parentOffset = parentOffset; this.depth = path.length / 3 - 1; @@ -161603,10 +162908,10 @@ class ResolvedPos { */ posAtIndex(index2, depth) { depth = this.resolveDepth(depth); - let node3 = this.path[depth * 3], pos2 = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1; + let node3 = this.path[depth * 3], pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1; for (let i2 = 0; i2 < index2; i2++) - pos2 += node3.child(i2).nodeSize; - return pos2; + pos += node3.child(i2).nodeSize; + return pos; } /** Get the marks at this position, factoring in the surrounding @@ -161654,9 +162959,9 @@ class ResolvedPos { The depth up to which this position and the given (non-resolved) position share the same parent nodes. */ - sharedDepth(pos2) { + sharedDepth(pos) { for (let depth = this.depth; depth > 0; depth--) - if (this.start(depth) <= pos2 && this.end(depth) >= pos2) + if (this.start(depth) <= pos && this.end(depth) >= pos) return depth; return 0; } @@ -161707,11 +163012,11 @@ class ResolvedPos { /** @internal */ - static resolve(doc2, pos2) { - if (!(pos2 >= 0 && pos2 <= doc2.content.size)) - throw new RangeError("Position " + pos2 + " out of range"); + static resolve(doc2, pos) { + if (!(pos >= 0 && pos <= doc2.content.size)) + throw new RangeError("Position " + pos + " out of range"); let path = []; - let start2 = 0, parentOffset = pos2; + let start2 = 0, parentOffset = pos; for (let node3 = doc2; ; ) { let { index: index2, offset } = node3.content.findIndex(parentOffset); let rem = parentOffset - offset; @@ -161724,23 +163029,23 @@ class ResolvedPos { parentOffset = rem - 1; start2 += offset + 1; } - return new ResolvedPos(pos2, path, parentOffset); + return new ResolvedPos(pos, path, parentOffset); } /** @internal */ - static resolveCached(doc2, pos2) { + static resolveCached(doc2, pos) { let cache2 = resolveCache.get(doc2); if (cache2) { for (let i2 = 0; i2 < cache2.elts.length; i2++) { let elt = cache2.elts[i2]; - if (elt.pos == pos2) + if (elt.pos == pos) return elt; } } else { resolveCache.set(doc2, cache2 = new ResolveCache()); } - let result = cache2.elts[cache2.i] = ResolvedPos.resolve(doc2, pos2); + let result = cache2.elts[cache2.i] = ResolvedPos.resolve(doc2, pos); cache2.i = (cache2.i + 1) % resolveCacheSize; return result; } @@ -161980,15 +163285,15 @@ let Node$2 = class Node2 { /** Find the node directly after the given position. */ - nodeAt(pos2) { + nodeAt(pos) { for (let node3 = this; ; ) { - let { index: index2, offset } = node3.content.findIndex(pos2); + let { index: index2, offset } = node3.content.findIndex(pos); node3 = node3.maybeChild(index2); if (!node3) return null; - if (offset == pos2 || node3.isText) + if (offset == pos || node3.isText) return node3; - pos2 -= offset + 1; + pos -= offset + 1; } } /** @@ -161996,8 +163301,8 @@ let Node$2 = class Node2 { and return it along with its index and offset relative to this node. */ - childAfter(pos2) { - let { index: index2, offset } = this.content.findIndex(pos2); + childAfter(pos) { + let { index: index2, offset } = this.content.findIndex(pos); return { node: this.content.maybeChild(index2), index: index2, offset }; } /** @@ -162005,11 +163310,11 @@ let Node$2 = class Node2 { and return it along with its index and offset relative to this node. */ - childBefore(pos2) { - if (pos2 == 0) + childBefore(pos) { + if (pos == 0) return { node: null, index: 0, offset: 0 }; - let { index: index2, offset } = this.content.findIndex(pos2); - if (offset < pos2) + let { index: index2, offset } = this.content.findIndex(pos); + if (offset < pos) return { node: this.content.child(index2), index: index2, offset }; let node3 = this.content.child(index2 - 1); return { node: node3, index: index2 - 1, offset: offset - node3.nodeSize }; @@ -162018,14 +163323,14 @@ let Node$2 = class Node2 { Resolve the given position in the document, returning an [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context. */ - resolve(pos2) { - return ResolvedPos.resolveCached(this, pos2); + resolve(pos) { + return ResolvedPos.resolveCached(this, pos); } /** @internal */ - resolveNoCache(pos2) { - return ResolvedPos.resolve(this, pos2); + resolveNoCache(pos) { + return ResolvedPos.resolve(this, pos); } /** Test whether a given mark or mark type occurs in this document @@ -163691,15 +164996,15 @@ class ParseContext { } get currentPos() { this.closeExtra(); - let pos2 = 0; + let pos = 0; for (let i2 = this.open; i2 >= 0; i2--) { let content2 = this.nodes[i2].content; for (let j2 = content2.length - 1; j2 >= 0; j2--) - pos2 += content2[j2].nodeSize; + pos += content2[j2].nodeSize; if (i2) - pos2++; + pos++; } - return pos2; + return pos; } findAtPoint(parent, offset) { if (this.find) @@ -163719,8 +165024,8 @@ class ParseContext { if (parent != content2 && this.find) for (let i2 = 0; i2 < this.find.length; i2++) { if (this.find[i2].pos == null && parent.nodeType == 1 && parent.contains(this.find[i2].node)) { - let pos2 = content2.compareDocumentPosition(this.find[i2].node); - if (pos2 & (before ? 2 : 4)) + let pos = content2.compareDocumentPosition(this.find[i2].node); + if (pos & (before ? 2 : 4)) this.find[i2].pos = this.currentPos; } } @@ -164061,8 +165366,8 @@ class MapResult { /** @internal */ - constructor(pos2, delInfo, recover) { - this.pos = pos2; + constructor(pos, delInfo, recover) { + this.pos = pos; this.delInfo = delInfo; this.recover = recover; } @@ -164120,49 +165425,49 @@ class StepMap { diff2 += this.ranges[i2 * 3 + 2] - this.ranges[i2 * 3 + 1]; return this.ranges[index2 * 3] + diff2 + recoverOffset(value4); } - mapResult(pos2, assoc = 1) { - return this._map(pos2, assoc, false); + mapResult(pos, assoc = 1) { + return this._map(pos, assoc, false); } - map(pos2, assoc = 1) { - return this._map(pos2, assoc, true); + map(pos, assoc = 1) { + return this._map(pos, assoc, true); } /** @internal */ - _map(pos2, assoc, simple) { + _map(pos, assoc, simple) { let diff2 = 0, oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2; for (let i2 = 0; i2 < this.ranges.length; i2 += 3) { let start2 = this.ranges[i2] - (this.inverted ? diff2 : 0); - if (start2 > pos2) + if (start2 > pos) break; let oldSize = this.ranges[i2 + oldIndex], newSize = this.ranges[i2 + newIndex], end = start2 + oldSize; - if (pos2 <= end) { - let side = !oldSize ? assoc : pos2 == start2 ? -1 : pos2 == end ? 1 : assoc; + if (pos <= end) { + let side = !oldSize ? assoc : pos == start2 ? -1 : pos == end ? 1 : assoc; let result = start2 + diff2 + (side < 0 ? 0 : newSize); if (simple) return result; - let recover = pos2 == (assoc < 0 ? start2 : end) ? null : makeRecover(i2 / 3, pos2 - start2); - let del2 = pos2 == start2 ? DEL_AFTER : pos2 == end ? DEL_BEFORE : DEL_ACROSS; - if (assoc < 0 ? pos2 != start2 : pos2 != end) + let recover = pos == (assoc < 0 ? start2 : end) ? null : makeRecover(i2 / 3, pos - start2); + let del2 = pos == start2 ? DEL_AFTER : pos == end ? DEL_BEFORE : DEL_ACROSS; + if (assoc < 0 ? pos != start2 : pos != end) del2 |= DEL_SIDE; return new MapResult(result, del2, recover); } diff2 += newSize - oldSize; } - return simple ? pos2 + diff2 : new MapResult(pos2 + diff2, 0, null); + return simple ? pos + diff2 : new MapResult(pos + diff2, 0, null); } /** @internal */ - touches(pos2, recover) { + touches(pos, recover) { let diff2 = 0, index2 = recoverIndex(recover); let oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2; for (let i2 = 0; i2 < this.ranges.length; i2 += 3) { let start2 = this.ranges[i2] - (this.inverted ? diff2 : 0); - if (start2 > pos2) + if (start2 > pos) break; let oldSize = this.ranges[i2 + oldIndex], end = start2 + oldSize; - if (pos2 <= end && i2 == index2 * 3) + if (pos <= end && i2 == index2 * 3) return true; diff2 += this.ranges[i2 + newIndex] - oldSize; } @@ -164289,39 +165594,39 @@ class Mapping { /** Map a position through this mapping. */ - map(pos2, assoc = 1) { + map(pos, assoc = 1) { if (this.mirror) - return this._map(pos2, assoc, true); + return this._map(pos, assoc, true); for (let i2 = this.from; i2 < this.to; i2++) - pos2 = this.maps[i2].map(pos2, assoc); - return pos2; + pos = this.maps[i2].map(pos, assoc); + return pos; } /** Map a position through this mapping, returning a mapping result. */ - mapResult(pos2, assoc = 1) { - return this._map(pos2, assoc, false); + mapResult(pos, assoc = 1) { + return this._map(pos, assoc, false); } /** @internal */ - _map(pos2, assoc, simple) { + _map(pos, assoc, simple) { let delInfo = 0; for (let i2 = this.from; i2 < this.to; i2++) { - let map3 = this.maps[i2], result = map3.mapResult(pos2, assoc); + let map3 = this.maps[i2], result = map3.mapResult(pos, assoc); if (result.recover != null) { let corr = this.getMirror(i2); if (corr != null && corr > i2 && corr < this.to) { i2 = corr; - pos2 = this.maps[corr].recover(result.recover); + pos = this.maps[corr].recover(result.recover); continue; } } delInfo |= result.delInfo; - pos2 = result.pos; + pos = result.pos; } - return simple ? pos2 : new MapResult(pos2, delInfo, null); + return simple ? pos : new MapResult(pos, delInfo, null); } } const stepsByID = /* @__PURE__ */ Object.create(null); @@ -164536,9 +165841,9 @@ class AddNodeMarkStep extends Step { /** Create a node mark step. */ - constructor(pos2, mark2) { + constructor(pos, mark2) { super(); - this.pos = pos2; + this.pos = pos; this.mark = mark2; } apply(doc2) { @@ -164562,8 +165867,8 @@ class AddNodeMarkStep extends Step { return new RemoveNodeMarkStep(this.pos, this.mark); } map(mapping) { - let pos2 = mapping.mapResult(this.pos, 1); - return pos2.deletedAfter ? null : new AddNodeMarkStep(pos2.pos, this.mark); + let pos = mapping.mapResult(this.pos, 1); + return pos.deletedAfter ? null : new AddNodeMarkStep(pos.pos, this.mark); } toJSON() { return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() }; @@ -164585,9 +165890,9 @@ class RemoveNodeMarkStep extends Step { /** Create a mark-removing step. */ - constructor(pos2, mark2) { + constructor(pos, mark2) { super(); - this.pos = pos2; + this.pos = pos; this.mark = mark2; } apply(doc2) { @@ -164604,8 +165909,8 @@ class RemoveNodeMarkStep extends Step { return new AddNodeMarkStep(this.pos, this.mark); } map(mapping) { - let pos2 = mapping.mapResult(this.pos, 1); - return pos2.deletedAfter ? null : new RemoveNodeMarkStep(pos2.pos, this.mark); + let pos = mapping.mapResult(this.pos, 1); + return pos.deletedAfter ? null : new RemoveNodeMarkStep(pos.pos, this.mark); } toJSON() { return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() }; @@ -164787,12 +166092,12 @@ __name(contentBetween, "contentBetween"); function addMark(tr2, from2, to, mark2) { let removed = [], added = []; let removing, adding; - tr2.doc.nodesBetween(from2, to, (node3, pos2, parent) => { + tr2.doc.nodesBetween(from2, to, (node3, pos, parent) => { if (!node3.isInline) return; let marks = node3.marks; if (!mark2.isInSet(marks) && parent.type.allowsMarkType(mark2.type)) { - let start2 = Math.max(pos2, from2), end = Math.min(pos2 + node3.nodeSize, to); + let start2 = Math.max(pos, from2), end = Math.min(pos + node3.nodeSize, to); let newSet = mark2.addToSet(marks); for (let i2 = 0; i2 < marks.length; i2++) { if (!marks[i2].isInSet(newSet)) { @@ -164814,7 +166119,7 @@ function addMark(tr2, from2, to, mark2) { __name(addMark, "addMark"); function removeMark(tr2, from2, to, mark2) { let matched = [], step3 = 0; - tr2.doc.nodesBetween(from2, to, (node3, pos2) => { + tr2.doc.nodesBetween(from2, to, (node3, pos) => { if (!node3.isInline) return; step3++; @@ -164832,7 +166137,7 @@ function removeMark(tr2, from2, to, mark2) { toRemove = node3.marks; } if (toRemove && toRemove.length) { - let end = Math.min(pos2 + node3.nodeSize, to); + let end = Math.min(pos + node3.nodeSize, to); for (let i2 = 0; i2 < toRemove.length; i2++) { let style2 = toRemove[i2], found2; for (let j2 = 0; j2 < matched.length; j2++) { @@ -164844,7 +166149,7 @@ function removeMark(tr2, from2, to, mark2) { found2.to = end; found2.step = step3; } else { - matched.push({ style: style2, from: Math.max(pos2, from2), to: end, step: step3 }); + matched.push({ style: style2, from: Math.max(pos, from2), to: end, step: step3 }); } } } @@ -164852,9 +166157,9 @@ function removeMark(tr2, from2, to, mark2) { matched.forEach((m2) => tr2.step(new RemoveMarkStep(m2.from, m2.to, m2.style))); } __name(removeMark, "removeMark"); -function clearIncompatible(tr2, pos2, parentType, match2 = parentType.contentMatch, clearNewlines = true) { - let node3 = tr2.doc.nodeAt(pos2); - let replSteps = [], cur = pos2 + 1; +function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatch, clearNewlines = true) { + let node3 = tr2.doc.nodeAt(pos); + let replSteps = [], cur = pos + 1; for (let i2 = 0; i2 < node3.childCount; i2++) { let child = node3.child(i2), end = cur + child.nodeSize; let allowed = match2.matchType(child.type); @@ -164981,9 +166286,9 @@ function setBlockType$1(tr2, from2, to, type, attrs6) { if (!type.isTextblock) throw new RangeError("Type given to setBlockType should be a textblock"); let mapFrom = tr2.steps.length; - tr2.doc.nodesBetween(from2, to, (node3, pos2) => { + tr2.doc.nodesBetween(from2, to, (node3, pos) => { let attrsHere = typeof attrs6 == "function" ? attrs6(node3) : attrs6; - if (node3.isTextblock && !node3.hasMarkup(type, attrsHere) && canChangeType(tr2.doc, tr2.mapping.slice(mapFrom).map(pos2), type)) { + if (node3.isTextblock && !node3.hasMarkup(type, attrsHere) && canChangeType(tr2.doc, tr2.mapping.slice(mapFrom).map(pos), type)) { let convertNewlines = null; if (type.schema.linebreakReplacement) { let pre = type.whitespace == "pre", supportLinebreak = !!type.contentMatch.matchType(type.schema.linebreakReplacement); @@ -164993,60 +166298,60 @@ function setBlockType$1(tr2, from2, to, type, attrs6) { convertNewlines = true; } if (convertNewlines === false) - replaceLinebreaks(tr2, node3, pos2, mapFrom); - clearIncompatible(tr2, tr2.mapping.slice(mapFrom).map(pos2, 1), type, void 0, convertNewlines === null); + replaceLinebreaks(tr2, node3, pos, mapFrom); + clearIncompatible(tr2, tr2.mapping.slice(mapFrom).map(pos, 1), type, void 0, convertNewlines === null); let mapping = tr2.mapping.slice(mapFrom); - let startM = mapping.map(pos2, 1), endM = mapping.map(pos2 + node3.nodeSize, 1); + let startM = mapping.map(pos, 1), endM = mapping.map(pos + node3.nodeSize, 1); tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment.from(type.create(attrsHere, null, node3.marks)), 0, 0), 1, true)); if (convertNewlines === true) - replaceNewlines(tr2, node3, pos2, mapFrom); + replaceNewlines(tr2, node3, pos, mapFrom); return false; } }); } __name(setBlockType$1, "setBlockType$1"); -function replaceNewlines(tr2, node3, pos2, mapFrom) { +function replaceNewlines(tr2, node3, pos, mapFrom) { node3.forEach((child, offset) => { if (child.isText) { let m2, newline2 = /\r?\n|\r/g; while (m2 = newline2.exec(child.text)) { - let start2 = tr2.mapping.slice(mapFrom).map(pos2 + 1 + offset + m2.index); + let start2 = tr2.mapping.slice(mapFrom).map(pos + 1 + offset + m2.index); tr2.replaceWith(start2, start2 + 1, node3.type.schema.linebreakReplacement.create()); } } }); } __name(replaceNewlines, "replaceNewlines"); -function replaceLinebreaks(tr2, node3, pos2, mapFrom) { +function replaceLinebreaks(tr2, node3, pos, mapFrom) { node3.forEach((child, offset) => { if (child.type == child.type.schema.linebreakReplacement) { - let start2 = tr2.mapping.slice(mapFrom).map(pos2 + 1 + offset); + let start2 = tr2.mapping.slice(mapFrom).map(pos + 1 + offset); tr2.replaceWith(start2, start2 + 1, node3.type.schema.text("\n")); } }); } __name(replaceLinebreaks, "replaceLinebreaks"); -function canChangeType(doc2, pos2, type) { - let $pos = doc2.resolve(pos2), index2 = $pos.index(); +function canChangeType(doc2, pos, type) { + let $pos = doc2.resolve(pos), index2 = $pos.index(); return $pos.parent.canReplaceWith(index2, index2 + 1, type); } __name(canChangeType, "canChangeType"); -function setNodeMarkup(tr2, pos2, type, attrs6, marks) { - let node3 = tr2.doc.nodeAt(pos2); +function setNodeMarkup(tr2, pos, type, attrs6, marks) { + let node3 = tr2.doc.nodeAt(pos); if (!node3) throw new RangeError("No node at given position"); if (!type) type = node3.type; let newNode = type.create(attrs6, null, marks || node3.marks); if (node3.isLeaf) - return tr2.replaceWith(pos2, pos2 + node3.nodeSize, newNode); + return tr2.replaceWith(pos, pos + node3.nodeSize, newNode); if (!type.validContent(node3.content)) throw new RangeError("Invalid content for node type " + type.name); - tr2.step(new ReplaceAroundStep(pos2, pos2 + node3.nodeSize, pos2 + 1, pos2 + node3.nodeSize - 1, new Slice(Fragment.from(newNode), 0, 0), 1, true)); + tr2.step(new ReplaceAroundStep(pos, pos + node3.nodeSize, pos + 1, pos + node3.nodeSize - 1, new Slice(Fragment.from(newNode), 0, 0), 1, true)); } __name(setNodeMarkup, "setNodeMarkup"); -function canSplit(doc2, pos2, depth = 1, typesAfter) { - let $pos = doc2.resolve(pos2), base2 = $pos.depth - depth; +function canSplit(doc2, pos, depth = 1, typesAfter) { + let $pos = doc2.resolve(pos), base2 = $pos.depth - depth; let innerType = typesAfter && typesAfter[typesAfter.length - 1] || $pos.parent; if (base2 < 0 || $pos.parent.type.spec.isolating || !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) || !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount))) return false; @@ -165067,18 +166372,18 @@ function canSplit(doc2, pos2, depth = 1, typesAfter) { return $pos.node(base2).canReplaceWith(index2, index2, baseType ? baseType.type : $pos.node(base2 + 1).type); } __name(canSplit, "canSplit"); -function split(tr2, pos2, depth = 1, typesAfter) { - let $pos = tr2.doc.resolve(pos2), before = Fragment.empty, after = Fragment.empty; +function split(tr2, pos, depth = 1, typesAfter) { + let $pos = tr2.doc.resolve(pos), before = Fragment.empty, after = Fragment.empty; for (let d2 = $pos.depth, e2 = $pos.depth - depth, i2 = depth - 1; d2 > e2; d2--, i2--) { before = Fragment.from($pos.node(d2).copy(before)); let typeAfter = typesAfter && typesAfter[i2]; after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d2).copy(after)); } - tr2.step(new ReplaceStep(pos2, pos2, new Slice(before.append(after), depth, depth), true)); + tr2.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true)); } __name(split, "split"); -function canJoin(doc2, pos2) { - let $pos = doc2.resolve(pos2), index2 = $pos.index(); +function canJoin(doc2, pos) { + let $pos = doc2.resolve(pos), index2 = $pos.index(); return joinable($pos.nodeBefore, $pos.nodeAfter) && $pos.parent.canReplace(index2, index2 + 1); } __name(canJoin, "canJoin"); @@ -165103,8 +166408,8 @@ function joinable(a2, b2) { return !!(a2 && b2 && !a2.isLeaf && canAppendWithSubstitutedLinebreaks(a2, b2)); } __name(joinable, "joinable"); -function joinPoint(doc2, pos2, dir = -1) { - let $pos = doc2.resolve(pos2); +function joinPoint(doc2, pos, dir = -1) { + let $pos = doc2.resolve(pos); for (let d2 = $pos.depth; ; d2--) { let before, after, index2 = $pos.index(d2); if (d2 == $pos.depth) { @@ -165119,17 +166424,17 @@ function joinPoint(doc2, pos2, dir = -1) { after = $pos.node(d2 + 1); } if (before && !before.isTextblock && joinable(before, after) && $pos.node(d2).canReplace(index2, index2 + 1)) - return pos2; + return pos; if (d2 == 0) break; - pos2 = dir < 0 ? $pos.before(d2) : $pos.after(d2); + pos = dir < 0 ? $pos.before(d2) : $pos.after(d2); } } __name(joinPoint, "joinPoint"); -function join(tr2, pos2, depth) { +function join(tr2, pos, depth) { let convertNewlines = null; let { linebreakReplacement } = tr2.doc.type.schema; - let $before = tr2.doc.resolve(pos2 - depth), beforeType = $before.node().type; + let $before = tr2.doc.resolve(pos - depth), beforeType = $before.node().type; if (linebreakReplacement && beforeType.inlineContent) { let pre = beforeType.whitespace == "pre"; let supportLinebreak = !!beforeType.contentMatch.matchType(linebreakReplacement); @@ -165140,13 +166445,13 @@ function join(tr2, pos2, depth) { } let mapFrom = tr2.steps.length; if (convertNewlines === false) { - let $after = tr2.doc.resolve(pos2 + depth); + let $after = tr2.doc.resolve(pos + depth); replaceLinebreaks(tr2, $after.node(), $after.before(), mapFrom); } if (beforeType.inlineContent) - clearIncompatible(tr2, pos2 + depth - 1, beforeType, $before.node().contentMatchAt($before.index()), convertNewlines == null); - let mapping = tr2.mapping.slice(mapFrom), start2 = mapping.map(pos2 - depth); - tr2.step(new ReplaceStep(start2, mapping.map(pos2 + depth, -1), Slice.empty, true)); + clearIncompatible(tr2, pos + depth - 1, beforeType, $before.node().contentMatchAt($before.index()), convertNewlines == null); + let mapping = tr2.mapping.slice(mapFrom), start2 = mapping.map(pos - depth); + tr2.step(new ReplaceStep(start2, mapping.map(pos + depth, -1), Slice.empty, true)); if (convertNewlines === true) { let $full = tr2.doc.resolve(start2); replaceNewlines(tr2, $full.node(), $full.before(), tr2.steps.length); @@ -165154,10 +166459,10 @@ function join(tr2, pos2, depth) { return tr2; } __name(join, "join"); -function insertPoint(doc2, pos2, nodeType) { - let $pos = doc2.resolve(pos2); +function insertPoint(doc2, pos, nodeType) { + let $pos = doc2.resolve(pos); if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType)) - return pos2; + return pos; if ($pos.parentOffset == 0) for (let d2 = $pos.depth - 1; d2 >= 0; d2--) { let index2 = $pos.index(d2); @@ -165177,10 +166482,10 @@ function insertPoint(doc2, pos2, nodeType) { return null; } __name(insertPoint, "insertPoint"); -function dropPoint(doc2, pos2, slice2) { - let $pos = doc2.resolve(pos2); +function dropPoint(doc2, pos, slice2) { + let $pos = doc2.resolve(pos); if (!slice2.content.size) - return pos2; + return pos; let content2 = slice2.content; for (let i2 = 0; i2 < slice2.openStart; i2++) content2 = content2.firstChild.content; @@ -165478,13 +166783,13 @@ function replaceRange(tr2, from2, to, slice2) { targetDepths.pop(); let preferredTarget = -($from.depth + 1); targetDepths.unshift(preferredTarget); - for (let d2 = $from.depth, pos2 = $from.pos - 1; d2 > 0; d2--, pos2--) { + for (let d2 = $from.depth, pos = $from.pos - 1; d2 > 0; d2--, pos--) { let spec = $from.node(d2).type.spec; if (spec.defining || spec.definingAsContext || spec.isolating) break; if (targetDepths.indexOf(d2) > -1) preferredTarget = d2; - else if ($from.before(d2) == pos2) + else if ($from.before(d2) == pos) targetDepths.splice(1, 0, -d2); } let preferredTargetIndex = targetDepths.indexOf(preferredTarget); @@ -165590,9 +166895,9 @@ class AttrStep extends Step { /** Construct an attribute step. */ - constructor(pos2, attr, value4) { + constructor(pos, attr, value4) { super(); - this.pos = pos2; + this.pos = pos; this.attr = attr; this.value = value4; } @@ -165614,8 +166919,8 @@ class AttrStep extends Step { return new AttrStep(this.pos, this.attr, doc2.nodeAt(this.pos).attrs[this.attr]); } map(mapping) { - let pos2 = mapping.mapResult(this.pos, 1); - return pos2.deletedAfter ? null : new AttrStep(pos2.pos, this.attr, this.value); + let pos = mapping.mapResult(this.pos, 1); + return pos.deletedAfter ? null : new AttrStep(pos.pos, this.attr, this.value); } toJSON() { return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value }; @@ -165760,8 +167065,8 @@ class Transform { /** Insert the given content at the given position. */ - insert(pos2, content2) { - return this.replaceWith(pos2, pos2, content2); + insert(pos, content2) { + return this.replaceWith(pos, pos, content2); } /** Replace a range of the document with a given slice, using @@ -165822,8 +167127,8 @@ class Transform { Join the blocks around the given position. If depth is 2, their last and first siblings are also joined, and so on. */ - join(pos2, depth = 1) { - join(this, pos2, depth); + join(pos, depth = 1) { + join(this, pos, depth); return this; } /** @@ -165847,8 +167152,8 @@ class Transform { Change the type, attributes, and/or marks of the node at `pos`. When `type` isn't given, the existing node type is preserved, */ - setNodeMarkup(pos2, type, attrs6 = null, marks) { - setNodeMarkup(this, pos2, type, attrs6, marks); + setNodeMarkup(pos, type, attrs6 = null, marks) { + setNodeMarkup(this, pos, type, attrs6, marks); return this; } /** @@ -165856,8 +167161,8 @@ class Transform { The `pos` addresses the document content. Use `setDocAttribute` to set attributes on the document itself. */ - setNodeAttribute(pos2, attr, value4) { - this.step(new AttrStep(pos2, attr, value4)); + setNodeAttribute(pos, attr, value4) { + this.step(new AttrStep(pos, attr, value4)); return this; } /** @@ -165870,24 +167175,24 @@ class Transform { /** Add a mark to the node at position `pos`. */ - addNodeMark(pos2, mark2) { - this.step(new AddNodeMarkStep(pos2, mark2)); + addNodeMark(pos, mark2) { + this.step(new AddNodeMarkStep(pos, mark2)); return this; } /** Remove a mark (or a mark of the given type) from the node at position `pos`. */ - removeNodeMark(pos2, mark2) { + removeNodeMark(pos, mark2) { if (!(mark2 instanceof Mark$1)) { - let node3 = this.doc.nodeAt(pos2); + let node3 = this.doc.nodeAt(pos); if (!node3) - throw new RangeError("No node at position " + pos2); + throw new RangeError("No node at position " + pos); mark2 = mark2.isInSet(node3.marks); if (!mark2) return this; } - this.step(new RemoveNodeMarkStep(pos2, mark2)); + this.step(new RemoveNodeMarkStep(pos, mark2)); return this; } /** @@ -165897,8 +167202,8 @@ class Transform { This can be changed by passing an array of types and attributes to use after the split. */ - split(pos2, depth = 1, typesAfter) { - split(this, pos2, depth, typesAfter); + split(pos, depth = 1, typesAfter) { + split(this, pos, depth, typesAfter); return this; } /** @@ -165924,8 +167229,8 @@ class Transform { an optional starting [content match](https://prosemirror.net/docs/ref/#model.ContentMatch) as third argument. */ - clearIncompatible(pos2, parentType, match2) { - clearIncompatible(this, pos2, parentType, match2); + clearIncompatible(pos, parentType, match2) { + clearIncompatible(this, pos, parentType, match2); return this; } } @@ -166252,8 +167557,8 @@ class NodeSelection extends Selection { this.node = node3; } map(doc2, mapping) { - let { deleted, pos: pos2 } = mapping.mapResult(this.anchor); - let $pos = doc2.resolve(pos2); + let { deleted, pos } = mapping.mapResult(this.anchor); + let $pos = doc2.resolve(pos); if (deleted) return Selection.near($pos); return new NodeSelection($pos); @@ -166302,8 +167607,8 @@ class NodeBookmark { this.anchor = anchor; } map(mapping) { - let { deleted, pos: pos2 } = mapping.mapResult(this.anchor); - return deleted ? new TextBookmark(pos2, pos2) : new NodeBookmark(pos2); + let { deleted, pos } = mapping.mapResult(this.anchor); + return deleted ? new TextBookmark(pos, pos) : new NodeBookmark(pos); } resolve(doc2) { let $pos = doc2.resolve(this.anchor), node3 = $pos.nodeAfter; @@ -166360,19 +167665,19 @@ const AllBookmark = { return new AllSelection(doc2); } }; -function findSelectionIn(doc2, node3, pos2, index2, dir, text2 = false) { +function findSelectionIn(doc2, node3, pos, index2, dir, text2 = false) { if (node3.inlineContent) - return TextSelection.create(doc2, pos2); + return TextSelection.create(doc2, pos); for (let i2 = index2 - (dir > 0 ? 0 : 1); dir > 0 ? i2 < node3.childCount : i2 >= 0; i2 += dir) { let child = node3.child(i2); if (!child.isAtom) { - let inner = findSelectionIn(doc2, child, pos2 + dir, dir < 0 ? child.childCount : 0, dir, text2); + let inner = findSelectionIn(doc2, child, pos + dir, dir < 0 ? child.childCount : 0, dir, text2); if (inner) return inner; } else if (!text2 && NodeSelection.isSelectable(child)) { - return NodeSelection.create(doc2, pos2 - (dir < 0 ? child.nodeSize : 0)); + return NodeSelection.create(doc2, pos - (dir < 0 ? child.nodeSize : 0)); } - pos2 += child.nodeSize * dir; + pos += child.nodeSize * dir; } return null; } @@ -167025,9 +168330,9 @@ __name(deepActiveElement, "deepActiveElement"); function caretFromPoint(doc2, x2, y2) { if (doc2.caretPositionFromPoint) { try { - let pos2 = doc2.caretPositionFromPoint(x2, y2); - if (pos2) - return { node: pos2.offsetNode, offset: Math.min(nodeSize(pos2.offsetNode), pos2.offset) }; + let pos = doc2.caretPositionFromPoint(x2, y2); + if (pos) + return { node: pos.offsetNode, offset: Math.min(nodeSize(pos.offsetNode), pos.offset) }; } catch (_2) { } } @@ -167327,7 +168632,7 @@ function posAtCoords(view, coords) { if (caret) ({ node: node3, offset } = caret); let elt = (view.root.elementFromPoint ? view.root : doc2).elementFromPoint(coords.left, coords.top); - let pos2; + let pos; if (!elt || !view.dom.contains(elt.nodeType != 1 ? elt.parentNode : elt)) { let box = view.dom.getBoundingClientRect(); if (!inRect(coords, box)) @@ -167355,14 +168660,14 @@ function posAtCoords(view, coords) { if (webkit && offset && node3.nodeType == 1 && (prev2 = node3.childNodes[offset - 1]).nodeType == 1 && prev2.contentEditable == "false" && prev2.getBoundingClientRect().top >= coords.top) offset--; if (node3 == view.dom && offset == node3.childNodes.length - 1 && node3.lastChild.nodeType == 1 && coords.top > node3.lastChild.getBoundingClientRect().bottom) - pos2 = view.state.doc.content.size; + pos = view.state.doc.content.size; else if (offset == 0 || node3.nodeType != 1 || node3.childNodes[offset - 1].nodeName != "BR") - pos2 = posFromCaret(view, node3, offset, coords); + pos = posFromCaret(view, node3, offset, coords); } - if (pos2 == null) - pos2 = posFromElement(view, elt, coords); + if (pos == null) + pos = posFromElement(view, elt, coords); let desc = view.docView.nearestDesc(elt, true); - return { pos: pos2, inside: desc ? desc.posAtStart - desc.border : -1 }; + return { pos, inside: desc ? desc.posAtStart - desc.border : -1 }; } __name(posAtCoords, "posAtCoords"); function nonZero(rect) { @@ -167380,8 +168685,8 @@ function singleRect(target2, bias) { } __name(singleRect, "singleRect"); const BIDI = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; -function coordsAtPos(view, pos2, side) { - let { node: node3, offset, atom } = view.docView.domFromPos(pos2, side < 0 ? -1 : 1); +function coordsAtPos(view, pos, side) { + let { node: node3, offset, atom } = view.docView.domFromPos(pos, side < 0 ? -1 : 1); let supportEmptyRange = webkit || gecko; if (node3.nodeType == 3) { if (supportEmptyRange && (BIDI.test(node3.nodeValue) || (side < 0 ? !offset : offset == node3.nodeValue.length))) { @@ -167411,7 +168716,7 @@ function coordsAtPos(view, pos2, side) { return flattenV(singleRect(textRange(node3, from2, to), takeSide), takeSide < 0); } } - let $dom = view.state.doc.resolve(pos2 - (atom || 0)); + let $dom = view.state.doc.resolve(pos - (atom || 0)); if (!$dom.parent.inlineContent) { if (atom == null && offset && (side < 0 || offset == nodeSize(node3))) { let before = node3.childNodes[offset - 1]; @@ -167562,7 +168867,7 @@ class ViewDesc { } // Used to check whether a given description corresponds to a // widget/mark/node. - matchesWidget(widget2) { + matchesWidget(widget) { return false; } matchesMark(mark2) { @@ -167605,11 +168910,11 @@ class ViewDesc { this.children[i2].destroy(); } posBeforeChild(child) { - for (let i2 = 0, pos2 = this.posAtStart; ; i2++) { + for (let i2 = 0, pos = this.posAtStart; ; i2++) { let cur = this.children[i2]; if (cur == child) - return pos2; - pos2 += cur.size; + return pos; + pos += cur.size; } } get posBefore() { @@ -167706,27 +169011,27 @@ class ViewDesc { } // Find the desc for the node after the given pos, if any. (When a // parent node overrode rendering, there might not be one.) - descAt(pos2) { + descAt(pos) { for (let i2 = 0, offset = 0; i2 < this.children.length; i2++) { let child = this.children[i2], end = offset + child.size; - if (offset == pos2 && end != offset) { + if (offset == pos && end != offset) { while (!child.border && child.children.length) child = child.children[0]; return child; } - if (pos2 < end) - return child.descAt(pos2 - offset - child.border); + if (pos < end) + return child.descAt(pos - offset - child.border); offset = end; } } - domFromPos(pos2, side) { + domFromPos(pos, side) { if (!this.contentDOM) - return { node: this.dom, offset: 0, atom: pos2 + 1 }; + return { node: this.dom, offset: 0, atom: pos + 1 }; let i2 = 0, offset = 0; for (let curPos = 0; i2 < this.children.length; i2++) { let child = this.children[i2], end = curPos + child.size; - if (end > pos2 || child instanceof TrailingHackViewDesc) { - offset = pos2 - curPos; + if (end > pos || child instanceof TrailingHackViewDesc) { + offset = pos - curPos; break; } curPos = end; @@ -167805,10 +169110,10 @@ class ViewDesc { let child = this.children[side < 0 ? 0 : this.children.length - 1]; return child.size == 0 || child.emptyChildAt(side); } - domAfterPos(pos2) { - let { node: node3, offset } = this.domFromPos(pos2, 0); + domAfterPos(pos) { + let { node: node3, offset } = this.domFromPos(pos, 0); if (node3.nodeType != 1 || offset == node3.childNodes.length) - throw new RangeError("No node after pos " + pos2); + throw new RangeError("No node after pos " + pos); return node3.childNodes[offset]; } // View descs are responsible for setting any selection that falls @@ -167930,16 +169235,16 @@ class WidgetViewDesc extends ViewDesc { static { __name(this, "WidgetViewDesc"); } - constructor(parent, widget2, view, pos2) { - let self2, dom = widget2.type.toDOM; + constructor(parent, widget, view, pos) { + let self2, dom = widget.type.toDOM; if (typeof dom == "function") dom = dom(view, () => { if (!self2) - return pos2; + return pos; if (self2.parent) return self2.parent.posBeforeChild(self2); }); - if (!widget2.type.spec.raw) { + if (!widget.type.spec.raw) { if (dom.nodeType != 1) { let wrap2 = document.createElement("span"); wrap2.appendChild(dom); @@ -167949,12 +169254,12 @@ class WidgetViewDesc extends ViewDesc { dom.classList.add("ProseMirror-widget"); } super(parent, [], dom, null); - this.widget = widget2; - this.widget = widget2; + this.widget = widget; + this.widget = widget; self2 = this; } - matchesWidget(widget2) { - return this.dirty == NOT_DIRTY && widget2.type.eq(this.widget.type); + matchesWidget(widget) { + return this.dirty == NOT_DIRTY && widget.type.eq(this.widget.type); } parseRule() { return { ignore: true }; @@ -167994,8 +169299,8 @@ class CompositionViewDesc extends ViewDesc { return this.posAtStart + (offset ? this.size : 0); return this.posAtStart + offset; } - domFromPos(pos2) { - return { node: this.textDOM, offset: pos2 }; + domFromPos(pos) { + return { node: this.textDOM, offset: pos }; } ignoreMutation(mut) { return mut.type === "characterData" && mut.target.nodeValue == mut.oldValue; @@ -168061,7 +169366,7 @@ class NodeViewDesc extends ViewDesc { static { __name(this, "NodeViewDesc"); } - constructor(parent, node3, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos2) { + constructor(parent, node3, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos) { super(parent, [], dom, contentDOM); this.node = node3; this.outerDeco = outerDeco; @@ -168077,11 +169382,11 @@ class NodeViewDesc extends ViewDesc { // since it'd require exposing a whole slew of finicky // implementation details to the user code that they probably will // never need.) - static create(parent, node3, outerDeco, innerDeco, view, pos2) { + static create(parent, node3, outerDeco, innerDeco, view, pos) { let custom2 = view.nodeViews[node3.type.name], descObj; let spec = custom2 && custom2(node3, view, () => { if (!descObj) - return pos2; + return pos; if (descObj.parent) return descObj.parent.posBeforeChild(descObj); }, outerDeco, innerDeco); @@ -168104,11 +169409,11 @@ class NodeViewDesc extends ViewDesc { let nodeDOM = dom; dom = applyOuterDeco(dom, outerDeco, node3); if (spec) - return descObj = new CustomNodeViewDesc(parent, node3, outerDeco, innerDeco, dom, contentDOM || null, nodeDOM, spec, view, pos2 + 1); + return descObj = new CustomNodeViewDesc(parent, node3, outerDeco, innerDeco, dom, contentDOM || null, nodeDOM, spec, view, pos + 1); else if (node3.isText) return new TextViewDesc(parent, node3, outerDeco, innerDeco, dom, nodeDOM, view); else - return new NodeViewDesc(parent, node3, outerDeco, innerDeco, dom, contentDOM || null, nodeDOM, view, pos2 + 1); + return new NodeViewDesc(parent, node3, outerDeco, innerDeco, dom, contentDOM || null, nodeDOM, view, pos + 1); } parseRule() { if (this.node.type.spec.reparseInView) @@ -168146,18 +169451,18 @@ class NodeViewDesc extends ViewDesc { // decorations, possibly introducing nesting for marks. Then, in a // separate step, syncs the DOM inside `this.contentDOM` to // `this.children`. - updateChildren(view, pos2) { - let inline3 = this.node.inlineContent, off = pos2; - let composition = view.composing ? this.localCompositionInfo(view, pos2) : null; + updateChildren(view, pos) { + let inline3 = this.node.inlineContent, off = pos; + let composition = view.composing ? this.localCompositionInfo(view, pos) : null; let localComposition = composition && composition.pos > -1 ? composition : null; let compositionInChild = composition && composition.pos < 0; let updater = new ViewTreeUpdater(this, localComposition && localComposition.node, view); - iterDeco(this.node, this.innerDeco, (widget2, i2, insideNode) => { - if (widget2.spec.marks) - updater.syncToMarks(widget2.spec.marks, inline3, view); - else if (widget2.type.side >= 0 && !insideNode) + iterDeco(this.node, this.innerDeco, (widget, i2, insideNode) => { + if (widget.spec.marks) + updater.syncToMarks(widget.spec.marks, inline3, view); + else if (widget.type.side >= 0 && !insideNode) updater.syncToMarks(i2 == this.node.childCount ? Mark$1.none : this.node.child(i2).marks, inline3, view); - updater.placeWidget(widget2, view, off); + updater.placeWidget(widget, view, off); }, (child, outerDeco, innerDeco, i2) => { updater.syncToMarks(child.marks, inline3, view); let compIndex; @@ -168181,22 +169486,22 @@ class NodeViewDesc extends ViewDesc { iosHacks(this.dom); } } - localCompositionInfo(view, pos2) { + localCompositionInfo(view, pos) { let { from: from2, to } = view.state.selection; - if (!(view.state.selection instanceof TextSelection) || from2 < pos2 || to > pos2 + this.node.content.size) + if (!(view.state.selection instanceof TextSelection) || from2 < pos || to > pos + this.node.content.size) return null; let textNode = view.input.compositionNode; if (!textNode || !this.dom.contains(textNode.parentNode)) return null; if (this.node.inlineContent) { let text2 = textNode.nodeValue; - let textPos = findTextInFragment(this.node.content, text2, from2 - pos2, to - pos2); + let textPos = findTextInFragment(this.node.content, text2, from2 - pos, to - pos); return textPos < 0 ? null : { node: textNode, pos: textPos, text: text2 }; } else { return { node: textNode, pos: -1, text: "" }; } } - protectLocalComposition(view, { node: node3, pos: pos2, text: text2 }) { + protectLocalComposition(view, { node: node3, pos, text: text2 }) { if (this.getDesc(node3)) return; let topNode = node3; @@ -168212,7 +169517,7 @@ class NodeViewDesc extends ViewDesc { } let desc = new CompositionViewDesc(this, topNode, node3, text2); view.input.compositionNodes.push(desc); - this.children = replaceNodes(this.children, pos2, pos2 + text2.length, view, desc); + this.children = replaceNodes(this.children, pos, pos + text2.length, view, desc); } // If this desc must be updated to match the given node decoration, // do so and return true. @@ -168302,8 +169607,8 @@ class TextViewDesc extends NodeViewDesc { return true; return false; } - domFromPos(pos2) { - return { node: this.nodeDOM, offset: pos2 }; + domFromPos(pos) { + return { node: this.nodeDOM, offset: pos }; } localPosFromDOM(dom, offset, bias) { if (dom == this.nodeDOM) @@ -168350,8 +169655,8 @@ class CustomNodeViewDesc extends NodeViewDesc { static { __name(this, "CustomNodeViewDesc"); } - constructor(parent, node3, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec, view, pos2) { - super(parent, node3, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos2); + constructor(parent, node3, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec, view, pos) { + super(parent, node3, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos); this.spec = spec; } // A custom `update` method gets to decide whether the update goes @@ -168407,9 +169712,9 @@ function renderDescs(parentDOM, descs, view) { parentDOM.insertBefore(childDOM, dom); } if (desc instanceof MarkViewDesc) { - let pos2 = dom ? dom.previousSibling : parentDOM.lastChild; + let pos = dom ? dom.previousSibling : parentDOM.lastChild; renderDescs(desc.contentDOM, desc.children, view); - dom = pos2 ? pos2.nextSibling : parentDOM.firstChild; + dom = pos ? pos.nextSibling : parentDOM.firstChild; } } while (dom) { @@ -168642,7 +169947,7 @@ class ViewTreeUpdater { } // Try to update the next node, if any, to the given data. Checks // pre-matches to avoid overwriting nodes that could still be used. - updateNextNode(node3, outerDeco, innerDeco, view, index2, pos2) { + updateNextNode(node3, outerDeco, innerDeco, view, index2, pos) { for (let i2 = this.index; i2 < this.top.children.length; i2++) { let next2 = this.top.children[i2]; if (next2 instanceof NodeViewDesc) { @@ -168657,12 +169962,12 @@ class ViewTreeUpdater { this.changed = true; this.index++; return true; - } else if (!locked && (updated15 = this.recreateWrapper(next2, node3, outerDeco, innerDeco, view, pos2))) { + } else if (!locked && (updated15 = this.recreateWrapper(next2, node3, outerDeco, innerDeco, view, pos))) { this.destroyBetween(this.index, i2); this.top.children[this.index] = updated15; if (updated15.contentDOM) { updated15.dirty = CONTENT_DIRTY; - updated15.updateChildren(view, pos2 + 1); + updated15.updateChildren(view, pos + 1); updated15.dirty = NOT_DIRTY; } this.changed = true; @@ -168676,10 +169981,10 @@ class ViewTreeUpdater { } // When a node with content is replaced by a different node with // identical content, move over its children. - recreateWrapper(next2, node3, outerDeco, innerDeco, view, pos2) { + recreateWrapper(next2, node3, outerDeco, innerDeco, view, pos) { if (next2.dirty || node3.isAtom || !next2.children.length || !next2.node.content.eq(node3.content) || !sameOuterDeco(outerDeco, next2.outerDeco) || !innerDeco.eq(next2.innerDeco)) return null; - let wrapper = NodeViewDesc.create(this.top, node3, outerDeco, innerDeco, view, pos2); + let wrapper = NodeViewDesc.create(this.top, node3, outerDeco, innerDeco, view, pos); if (wrapper.contentDOM) { wrapper.children = next2.children; next2.children = []; @@ -168690,19 +169995,19 @@ class ViewTreeUpdater { return wrapper; } // Insert the node as a newly created node desc. - addNode(node3, outerDeco, innerDeco, view, pos2) { - let desc = NodeViewDesc.create(this.top, node3, outerDeco, innerDeco, view, pos2); + addNode(node3, outerDeco, innerDeco, view, pos) { + let desc = NodeViewDesc.create(this.top, node3, outerDeco, innerDeco, view, pos); if (desc.contentDOM) - desc.updateChildren(view, pos2 + 1); + desc.updateChildren(view, pos + 1); this.top.children.splice(this.index++, 0, desc); this.changed = true; } - placeWidget(widget2, view, pos2) { + placeWidget(widget, view, pos) { let next2 = this.index < this.top.children.length ? this.top.children[this.index] : null; - if (next2 && next2.matchesWidget(widget2) && (widget2 == next2.widget || !next2.widget.type.toDOM.parentNode)) { + if (next2 && next2.matchesWidget(widget) && (widget == next2.widget || !next2.widget.type.toDOM.parentNode)) { this.index++; } else { - let desc = new WidgetViewDesc(this.top, widget2, view, pos2); + let desc = new WidgetViewDesc(this.top, widget, view, pos); this.top.children.splice(this.index++, 0, desc); this.changed = true; } @@ -168796,23 +170101,23 @@ function iterDeco(parent, deco, onWidget, onNode) { } let decoIndex = 0, active3 = [], restNode = null; for (let parentIndex = 0; ; ) { - let widget2, widgets; + let widget, widgets; while (decoIndex < locals.length && locals[decoIndex].to == offset) { let next2 = locals[decoIndex++]; if (next2.widget) { - if (!widget2) - widget2 = next2; + if (!widget) + widget = next2; else - (widgets || (widgets = [widget2])).push(next2); + (widgets || (widgets = [widget])).push(next2); } } - if (widget2) { + if (widget) { if (widgets) { widgets.sort(compareSide); for (let i2 = 0; i2 < widgets.length; i2++) onWidget(widgets[i2], parentIndex, !!restNode); } else { - onWidget(widget2, parentIndex, !!restNode); + onWidget(widget, parentIndex, !!restNode); } } let child, index2; @@ -168865,21 +170170,21 @@ function iosHacks(dom) { } __name(iosHacks, "iosHacks"); function findTextInFragment(frag, text2, from2, to) { - for (let i2 = 0, pos2 = 0; i2 < frag.childCount && pos2 <= to; ) { - let child = frag.child(i2++), childStart = pos2; - pos2 += child.nodeSize; + for (let i2 = 0, pos = 0; i2 < frag.childCount && pos <= to; ) { + let child = frag.child(i2++), childStart = pos; + pos += child.nodeSize; if (!child.isText) continue; let str = child.text; while (i2 < frag.childCount) { let next2 = frag.child(i2++); - pos2 += next2.nodeSize; + pos += next2.nodeSize; if (!next2.isText) break; str += next2.text; } - if (pos2 >= from2) { - if (pos2 >= to && str.slice(to - text2.length - childStart, to - childStart) == text2) + if (pos >= from2) { + if (pos >= to && str.slice(to - text2.length - childStart, to - childStart) == text2) return to - text2.length; let found2 = childStart < to ? str.lastIndexOf(text2, to - childStart - 1) : -1; if (found2 >= 0 && found2 + text2.length + childStart >= from2) @@ -168926,8 +170231,8 @@ function selectionFromDOM(view, origin2 = null) { nearestDesc = nearestDesc.parent; let nearestDescNode = nearestDesc.node; if (nearestDesc && nearestDescNode.isAtom && NodeSelection.isSelectable(nearestDescNode) && nearestDesc.parent && !(nearestDescNode.isInline && isOnEdge(domSel.focusNode, domSel.focusOffset, nearestDesc.dom))) { - let pos2 = nearestDesc.posBefore; - selection = new NodeSelection(head == pos2 ? $head : doc2.resolve(pos2)); + let pos = nearestDesc.posBefore; + selection = new NodeSelection(head == pos ? $head : doc2.resolve(pos)); } } else { if (domSel instanceof view.dom.ownerDocument.defaultView.Selection && domSel.rangeCount > 1) { @@ -169003,8 +170308,8 @@ function selectionToDOM(view, force = false) { } __name(selectionToDOM, "selectionToDOM"); const brokenSelectBetweenUneditable = safari || chrome && chrome_version < 63; -function temporarilyEditableNear(view, pos2) { - let { node: node3, offset } = view.docView.domFromPos(pos2, 0); +function temporarilyEditableNear(view, pos) { + let { node: node3, offset } = view.docView.domFromPos(pos, 0); let after = offset < node3.childNodes.length ? node3.childNodes[offset] : null; let before = offset ? node3.childNodes[offset - 1] : null; if (safari && after && after.contentEditable == "false") @@ -169342,18 +170647,18 @@ function setSelFocus(view, node3, offset) { }, 50); } __name(setSelFocus, "setSelFocus"); -function findDirection(view, pos2) { - let $pos = view.state.doc.resolve(pos2); +function findDirection(view, pos) { + let $pos = view.state.doc.resolve(pos); if (!(chrome || windows) && $pos.parent.inlineContent) { - let coords = view.coordsAtPos(pos2); - if (pos2 > $pos.start()) { - let before = view.coordsAtPos(pos2 - 1); + let coords = view.coordsAtPos(pos); + if (pos > $pos.start()) { + let before = view.coordsAtPos(pos - 1); let mid = (before.top + before.bottom) / 2; if (mid > coords.top && mid < coords.bottom && Math.abs(before.left - coords.left) > 1) return before.left < coords.left ? "ltr" : "rtl"; } - if (pos2 < $pos.end()) { - let after = view.coordsAtPos(pos2 + 1); + if (pos < $pos.end()) { + let after = view.coordsAtPos(pos + 1); let mid = (after.top + after.bottom) / 2; if (mid > coords.top && mid < coords.bottom && Math.abs(after.left - coords.left) > 1) return after.left > coords.left ? "ltr" : "rtl"; @@ -169858,12 +171163,12 @@ function isNear(event, click2) { return dx * dx + dy * dy < 100; } __name(isNear, "isNear"); -function runHandlerOnContext(view, propName, pos2, inside, event) { +function runHandlerOnContext(view, propName, pos, inside, event) { if (inside == -1) return false; let $pos = view.state.doc.resolve(inside); for (let i2 = $pos.depth + 1; i2 > 0; i2--) { - if (view.someProp(propName, (f2) => i2 > $pos.depth ? f2(view, pos2, $pos.nodeAfter, $pos.before(i2), event, true) : f2(view, pos2, $pos.node(i2), $pos.before(i2), event, false))) + if (view.someProp(propName, (f2) => i2 > $pos.depth ? f2(view, pos, $pos.nodeAfter, $pos.before(i2), event, true) : f2(view, pos, $pos.node(i2), $pos.before(i2), event, false))) return true; } return false; @@ -169916,16 +171221,16 @@ function selectClickedNode(view, inside) { } } __name(selectClickedNode, "selectClickedNode"); -function handleSingleClick(view, pos2, inside, event, selectNode) { - return runHandlerOnContext(view, "handleClickOn", pos2, inside, event) || view.someProp("handleClick", (f2) => f2(view, pos2, event)) || (selectNode ? selectClickedNode(view, inside) : selectClickedLeaf(view, inside)); +function handleSingleClick(view, pos, inside, event, selectNode) { + return runHandlerOnContext(view, "handleClickOn", pos, inside, event) || view.someProp("handleClick", (f2) => f2(view, pos, event)) || (selectNode ? selectClickedNode(view, inside) : selectClickedLeaf(view, inside)); } __name(handleSingleClick, "handleSingleClick"); -function handleDoubleClick(view, pos2, inside, event) { - return runHandlerOnContext(view, "handleDoubleClickOn", pos2, inside, event) || view.someProp("handleDoubleClick", (f2) => f2(view, pos2, event)); +function handleDoubleClick(view, pos, inside, event) { + return runHandlerOnContext(view, "handleDoubleClickOn", pos, inside, event) || view.someProp("handleDoubleClick", (f2) => f2(view, pos, event)); } __name(handleDoubleClick, "handleDoubleClick"); -function handleTripleClick$1(view, pos2, inside, event) { - return runHandlerOnContext(view, "handleTripleClickOn", pos2, inside, event) || view.someProp("handleTripleClick", (f2) => f2(view, pos2, event)) || defaultTripleClick(view, inside, event); +function handleTripleClick$1(view, pos, inside, event) { + return runHandlerOnContext(view, "handleTripleClickOn", pos, inside, event) || view.someProp("handleTripleClick", (f2) => f2(view, pos, event)) || defaultTripleClick(view, inside, event); } __name(handleTripleClick$1, "handleTripleClick$1"); function defaultTripleClick(view, inside, event) { @@ -169970,14 +171275,14 @@ handlers.mousedown = (view, _event) => { type = "tripleClick"; } view.input.lastClick = { time: now2, x: event.clientX, y: event.clientY, type }; - let pos2 = view.posAtCoords(eventCoords(event)); - if (!pos2) + let pos = view.posAtCoords(eventCoords(event)); + if (!pos) return; if (type == "singleClick") { if (view.input.mouseDown) view.input.mouseDown.done(); - view.input.mouseDown = new MouseDown(view, pos2, event, !!flushed); - } else if ((type == "doubleClick" ? handleDoubleClick : handleTripleClick$1)(view, pos2.pos, pos2.inside, event)) { + view.input.mouseDown = new MouseDown(view, pos, event, !!flushed); + } else if ((type == "doubleClick" ? handleDoubleClick : handleTripleClick$1)(view, pos.pos, pos.inside, event)) { event.preventDefault(); } else { setSelectionOrigin(view, "pointer"); @@ -169987,9 +171292,9 @@ class MouseDown { static { __name(this, "MouseDown"); } - constructor(view, pos2, event, flushed) { + constructor(view, pos, event, flushed) { this.view = view; - this.pos = pos2; + this.pos = pos; this.event = event; this.flushed = flushed; this.delayedSelectionSync = false; @@ -169998,11 +171303,11 @@ class MouseDown { this.selectNode = !!event[selectNodeModifier]; this.allowDefault = event.shiftKey; let targetNode, targetPos; - if (pos2.inside > -1) { - targetNode = view.state.doc.nodeAt(pos2.inside); - targetPos = pos2.inside; + if (pos.inside > -1) { + targetNode = view.state.doc.nodeAt(pos.inside); + targetPos = pos.inside; } else { - let $pos = view.state.doc.resolve(pos2.pos); + let $pos = view.state.doc.resolve(pos.pos); targetNode = $pos.parent; targetPos = $pos.depth ? $pos.before() : 0; } @@ -170051,13 +171356,13 @@ class MouseDown { this.done(); if (!this.view.dom.contains(event.target)) return; - let pos2 = this.pos; + let pos = this.pos; if (this.view.state.doc != this.startDoc) - pos2 = this.view.posAtCoords(eventCoords(event)); + pos = this.view.posAtCoords(eventCoords(event)); this.updateAllowDefault(event); - if (this.allowDefault || !pos2) { + if (this.allowDefault || !pos) { setSelectionOrigin(this.view, "pointer"); - } else if (handleSingleClick(this.view, pos2.pos, pos2.inside, event, this.selectNode)) { + } else if (handleSingleClick(this.view, pos.pos, pos.inside, event, this.selectNode)) { event.preventDefault(); } else if (event.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements safari && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a @@ -170067,8 +171372,8 @@ class MouseDown { // (hidden) cursor is doesn't change the selection, and // thus doesn't get a reaction from ProseMirror. This // works around that. - chrome && !this.view.state.selection.visible && Math.min(Math.abs(pos2.pos - this.view.state.selection.from), Math.abs(pos2.pos - this.view.state.selection.to)) <= 2)) { - updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos2.pos)), "pointer"); + chrome && !this.view.state.selection.visible && Math.min(Math.abs(pos.pos - this.view.state.selection.from), Math.abs(pos.pos - this.view.state.selection.to)) <= 2)) { + updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos)), "pointer"); event.preventDefault(); } else { setSelectionOrigin(this.view, "pointer"); @@ -170322,9 +171627,9 @@ handlers.dragstart = (view, _event) => { if (!event.dataTransfer) return; let sel = view.state.selection; - let pos2 = sel.empty ? null : view.posAtCoords(eventCoords(event)); + let pos = sel.empty ? null : view.posAtCoords(eventCoords(event)); let node3; - if (pos2 && pos2.pos >= sel.from && pos2.pos <= (sel instanceof NodeSelection ? sel.to - 1 : sel.to)) ; + if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof NodeSelection ? sel.to - 1 : sel.to)) ; else if (mouseDown && mouseDown.mightDrag) { node3 = NodeSelection.create(view.state.doc, mouseDown.mightDrag.pos); } else if (event.target && event.target.nodeType == 1) { @@ -170387,16 +171692,16 @@ editHandlers.drop = (view, _event) => { else tr2.deleteSelection(); } - let pos2 = tr2.mapping.map(insertPos); + let pos = tr2.mapping.map(insertPos); let isNode = slice2.openStart == 0 && slice2.openEnd == 0 && slice2.content.childCount == 1; let beforeInsert = tr2.doc; if (isNode) - tr2.replaceRangeWith(pos2, pos2, slice2.content.firstChild); + tr2.replaceRangeWith(pos, pos, slice2.content.firstChild); else - tr2.replaceRange(pos2, pos2, slice2); + tr2.replaceRange(pos, pos, slice2); if (tr2.doc.eq(beforeInsert)) return; - let $pos = tr2.doc.resolve(pos2); + let $pos = tr2.doc.resolve(pos); if (isNode && NodeSelection.isSelectable(slice2.content.firstChild) && $pos.nodeAfter && $pos.nodeAfter.sameMarkup(slice2.content.firstChild)) { tr2.setSelection(new NodeSelection($pos)); } else { @@ -170473,8 +171778,8 @@ class WidgetType { this.side = this.spec.side || 0; } map(mapping, span, offset, oldOffset) { - let { pos: pos2, deleted } = mapping.mapResult(span.from + oldOffset, this.side < 0 ? -1 : 1); - return deleted ? null : new Decoration(pos2 - offset, pos2 - offset, this); + let { pos, deleted } = mapping.mapResult(span.from + oldOffset, this.side < 0 ? -1 : 1); + return deleted ? null : new Decoration(pos - offset, pos - offset, this); } valid() { return true; @@ -170577,8 +171882,8 @@ class Decoration { also directly pass a DOM node. `getPos` can be used to find the widget's current document position. */ - static widget(pos2, toDOM, spec) { - return new Decoration(pos2, pos2, new WidgetType(toDOM, spec)); + static widget(pos, toDOM, spec) { + return new Decoration(pos, pos, new WidgetType(toDOM, spec)); } /** Creates an inline decoration, which adds the given attributes to @@ -171681,11 +172986,11 @@ function skipClosingAndOpening($pos, fromEnd, mayOpen) { return end; } __name(skipClosingAndOpening, "skipClosingAndOpening"); -function findDiff(a2, b2, pos2, preferredPos, preferredSide) { - let start2 = a2.findDiffStart(b2, pos2); +function findDiff(a2, b2, pos, preferredPos, preferredSide) { + let start2 = a2.findDiffStart(b2, pos); if (start2 == null) return null; - let { a: endA, b: endB } = a2.findDiffEnd(b2, pos2 + a2.size, pos2 + b2.size); + let { a: endA, b: endB } = a2.findDiffEnd(b2, pos + a2.size, pos + b2.size); if (preferredSide == "end") { let adjust = Math.max(0, start2 - Math.min(endA, endB)); preferredPos -= endA + adjust - start2; @@ -172028,8 +173333,8 @@ class EditorView { is used. When < 0, the element before the position is used, otherwise the element after. */ - coordsAtPos(pos2, side = 1) { - return coordsAtPos(this, pos2, side); + coordsAtPos(pos, side = 1) { + return coordsAtPos(this, pos, side); } /** Find the DOM position that corresponds to the given document @@ -172041,8 +173346,8 @@ class EditorView { Note that you should **not** mutate the editor's internal DOM, only inspect it (and even that is usually not necessary). */ - domAtPos(pos2, side = 0) { - return this.docView.domFromPos(pos2, side); + domAtPos(pos, side = 0) { + return this.docView.domFromPos(pos, side); } /** Find the DOM node that represents the document node after the @@ -172054,8 +173359,8 @@ class EditorView { editor DOM directly, or add styling this way, since that will be immediately overriden by the editor as it redraws the node. */ - nodeDOM(pos2) { - let desc = this.docView.descAt(pos2); + nodeDOM(pos) { + let desc = this.docView.descAt(pos); return desc ? desc.nodeDOM : null; } /** @@ -172069,10 +173374,10 @@ class EditorView { node to use when the position is inside a leaf node. */ posAtDOM(node3, offset, bias = -1) { - let pos2 = this.docView.posFromDOM(node3, offset, bias); - if (pos2 == null) + let pos = this.docView.posFromDOM(node3, offset, bias); + if (pos == null) throw new RangeError("DOM position not inside the editor"); - return pos2; + return pos; } /** Find out whether the selection is at the end of a textblock when @@ -172682,8 +173987,8 @@ const exitCode$1 = /* @__PURE__ */ __name((state, dispatch) => { if (!type || !above.canReplaceWith(after, after, type)) return false; if (dispatch) { - let pos2 = $head.after(), tr2 = state.tr.replaceWith(pos2, pos2, type.createAndFill()); - tr2.setSelection(Selection.near(tr2.doc.resolve(pos2), 1)); + let pos = $head.after(), tr2 = state.tr.replaceWith(pos, pos, type.createAndFill()); + tr2.setSelection(Selection.near(tr2.doc.resolve(pos), 1)); dispatch(tr2.scrollIntoView()); } return true; @@ -172783,13 +174088,13 @@ const splitBlockKeepMarks = /* @__PURE__ */ __name((state, dispatch) => { })); }, "splitBlockKeepMarks"); const selectParentNode$1 = /* @__PURE__ */ __name((state, dispatch) => { - let { $from, to } = state.selection, pos2; + let { $from, to } = state.selection, pos; let same = $from.sharedDepth(to); if (same == 0) return false; - pos2 = $from.before(same); + pos = $from.before(same); if (dispatch) - dispatch(state.tr.setSelection(NodeSelection.create(state.doc, pos2))); + dispatch(state.tr.setSelection(NodeSelection.create(state.doc, pos))); return true; }, "selectParentNode$1"); const selectAll$1 = /* @__PURE__ */ __name((state, dispatch) => { @@ -172901,7 +174206,7 @@ function setBlockType(nodeType, attrs6 = null) { let applicable = false; for (let i2 = 0; i2 < state.selection.ranges.length && !applicable; i2++) { let { $from: { pos: from2 }, $to: { pos: to } } = state.selection.ranges[i2]; - state.doc.nodesBetween(from2, to, (node3, pos2) => { + state.doc.nodesBetween(from2, to, (node3, pos) => { if (applicable) return false; if (!node3.isTextblock || node3.hasMarkup(nodeType, attrs6)) @@ -172909,7 +174214,7 @@ function setBlockType(nodeType, attrs6 = null) { if (node3.type == nodeType) { applicable = true; } else { - let $pos = state.doc.resolve(pos2), index2 = $pos.index(); + let $pos = state.doc.resolve(pos), index2 = $pos.index(); applicable = $pos.parent.canReplaceWith(index2, index2 + 1, nodeType); } }); @@ -172932,8 +174237,8 @@ function markApplies(doc2, ranges, type, enterAtoms) { for (let i2 = 0; i2 < ranges.length; i2++) { let { $from, $to } = ranges[i2]; let can = $from.depth == 0 ? doc2.inlineContent && doc2.type.allowsMarkType(type) : false; - doc2.nodesBetween($from.pos, $to.pos, (node3, pos2) => { - if (can || !enterAtoms && node3.isAtom && node3.isInline && pos2 >= $from.pos && pos2 + node3.nodeSize <= $to.pos) + doc2.nodesBetween($from.pos, $to.pos, (node3, pos) => { + if (can || !enterAtoms && node3.isAtom && node3.isInline && pos >= $from.pos && pos + node3.nodeSize <= $to.pos) return false; can = node3.inlineContent && node3.type.allowsMarkType(type); }); @@ -172947,11 +174252,11 @@ function removeInlineAtoms(ranges) { let result = []; for (let i2 = 0; i2 < ranges.length; i2++) { let { $from, $to } = ranges[i2]; - $from.doc.nodesBetween($from.pos, $to.pos, (node3, pos2) => { - if (node3.isAtom && node3.content.size && node3.isInline && pos2 >= $from.pos && pos2 + node3.nodeSize <= $to.pos) { - if (pos2 + 1 > $from.pos) - result.push(new SelectionRange($from, $from.doc.resolve(pos2 + 1))); - $from = $from.doc.resolve(pos2 + 1 + node3.content.size); + $from.doc.nodesBetween($from.pos, $to.pos, (node3, pos) => { + if (node3.isAtom && node3.content.size && node3.isInline && pos >= $from.pos && pos + node3.nodeSize <= $to.pos) { + if (pos + 1 > $from.pos) + result.push(new SelectionRange($from, $from.doc.resolve(pos + 1))); + $from = $from.doc.resolve(pos + 1 + node3.content.size); return false; } }); @@ -172983,10 +174288,10 @@ function toggleMark$1(markType, attrs6 = null, options4) { } else { add3 = !ranges.every((r2) => { let missing = false; - tr2.doc.nodesBetween(r2.$from.pos, r2.$to.pos, (node3, pos2, parent) => { + tr2.doc.nodesBetween(r2.$from.pos, r2.$to.pos, (node3, pos, parent) => { if (missing) return false; - missing = !markType.isInSet(node3.marks) && !!parent && parent.type.allowsMarkType(markType) && !(node3.isText && /^\s*$/.test(node3.textBetween(Math.max(0, r2.$from.pos - pos2), Math.min(node3.nodeSize, r2.$to.pos - pos2)))); + missing = !markType.isInSet(node3.marks) && !!parent && parent.type.allowsMarkType(markType) && !(node3.isText && /^\s*$/.test(node3.textBetween(Math.max(0, r2.$from.pos - pos), Math.min(node3.nodeSize, r2.$to.pos - pos)))); }); return !missing; }); @@ -173028,16 +174333,16 @@ function wrapDispatchForJoin(dispatch, isJoinable) { for (let i2 = 0; i2 < ranges.length; i2 += 2) { let from2 = ranges[i2], to = ranges[i2 + 1]; let $from = tr2.doc.resolve(from2), depth = $from.sharedDepth(to), parent = $from.node(depth); - for (let index2 = $from.indexAfter(depth), pos2 = $from.after(depth + 1); pos2 <= to; ++index2) { + for (let index2 = $from.indexAfter(depth), pos = $from.after(depth + 1); pos <= to; ++index2) { let after = parent.maybeChild(index2); if (!after) break; - if (index2 && joinable2.indexOf(pos2) == -1) { + if (index2 && joinable2.indexOf(pos) == -1) { let before = parent.child(index2 - 1); if (before.type == after.type && isJoinable(before, after)) - joinable2.push(pos2); + joinable2.push(pos); } - pos2 += after.nodeSize; + pos += after.nodeSize; } } joinable2.sort((a2, b2) => a2 - b2); @@ -173205,11 +174510,11 @@ function splitListItem$1(itemType, itemAttrs) { let start2 = $from.before($from.depth - (depthBefore - 1)); let tr3 = state.tr.replace(start2, $from.after(-depthAfter), new Slice(wrap2, 4 - depthBefore, 0)); let sel = -1; - tr3.doc.nodesBetween(start2, tr3.doc.content.size, (node4, pos2) => { + tr3.doc.nodesBetween(start2, tr3.doc.content.size, (node4, pos) => { if (sel > -1) return false; if (node4.isTextblock && node4.content.size == 0) - sel = pos2 + 1; + sel = pos + 1; }); if (sel > -1) tr3.setSelection(Selection.near(tr3.doc.resolve(sel))); @@ -173274,9 +174579,9 @@ function liftToOuterList(state, dispatch, itemType, range2) { __name(liftToOuterList, "liftToOuterList"); function liftOutOfList(state, dispatch, range2) { let tr2 = state.tr, list2 = range2.parent; - for (let pos2 = range2.end, i2 = range2.endIndex - 1, e2 = range2.startIndex; i2 > e2; i2--) { - pos2 -= list2.child(i2).nodeSize; - tr2.delete(pos2 - 1, pos2 + 1); + for (let pos = range2.end, i2 = range2.endIndex - 1, e2 = range2.startIndex; i2 > e2; i2--) { + pos -= list2.child(i2).nodeSize; + tr2.delete(pos - 1, pos + 1); } let $start = tr2.doc.resolve(range2.start), item3 = $start.nodeAfter; if (tr2.mapping.map(range2.end) != range2.start + $start.nodeAfter.nodeSize) @@ -173839,15 +175144,15 @@ __name(getHTMLFromFragment, "getHTMLFromFragment"); const getTextContentFromNodes = /* @__PURE__ */ __name(($from, maxMatch = 500) => { let textBefore = ""; const sliceEndPos = $from.parentOffset; - $from.parent.nodesBetween(Math.max(0, sliceEndPos - maxMatch), sliceEndPos, (node3, pos2, parent, index2) => { + $from.parent.nodesBetween(Math.max(0, sliceEndPos - maxMatch), sliceEndPos, (node3, pos, parent, index2) => { var _a2, _b; const chunk = ((_b = (_a2 = node3.type.spec).toText) === null || _b === void 0 ? void 0 : _b.call(_a2, { node: node3, - pos: pos2, + pos, parent, index: index2 })) || node3.textContent || "%leaf%"; - textBefore += node3.isAtom && !node3.isText ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos2)); + textBefore += node3.isAtom && !node3.isText ? chunk : chunk.slice(0, Math.max(0, sliceEndPos - pos)); }); return textBefore; }, "getTextContentFromNodes"); @@ -174187,13 +175492,13 @@ function run$2(config2) { state }); const handlers2 = []; - state.doc.nodesBetween(from2, to, (node3, pos2) => { + state.doc.nodesBetween(from2, to, (node3, pos) => { if (!node3.isTextblock || node3.type.spec.code) { return; } - const resolvedFrom = Math.max(from2, pos2); - const resolvedTo = Math.min(to, pos2 + node3.content.size); - const textToMatch = node3.textBetween(resolvedFrom - pos2, resolvedTo - pos2, void 0, ""); + const resolvedFrom = Math.max(from2, pos); + const resolvedTo = Math.min(to, pos + node3.content.size); + const textToMatch = node3.textBetween(resolvedFrom - pos, resolvedTo - pos, void 0, ""); const matches2 = pasteRuleMatcherHandler(textToMatch, rule.find, pasteEvent); matches2.forEach((match2) => { if (match2.index === void 0) { @@ -174662,9 +175967,9 @@ function getTextBetween(startNode, range2, options4) { const { from: from2, to } = range2; const { blockSeparator = "\n\n", textSerializers = {} } = options4 || {}; let text2 = ""; - startNode.nodesBetween(from2, to, (node3, pos2, parent, index2) => { + startNode.nodesBetween(from2, to, (node3, pos, parent, index2) => { var _a2; - if (node3.isBlock && pos2 > from2) { + if (node3.isBlock && pos > from2) { text2 += blockSeparator; } const textSerializer = textSerializers === null || textSerializers === void 0 ? void 0 : textSerializers[node3.type.name]; @@ -174672,7 +175977,7 @@ function getTextBetween(startNode, range2, options4) { if (parent) { text2 += textSerializer({ node: node3, - pos: pos2, + pos, parent, index: index2, range: range2 @@ -174681,7 +175986,7 @@ function getTextBetween(startNode, range2, options4) { return false; } if (node3.isText) { - text2 += (_a2 = node3 === null || node3 === void 0 ? void 0 : node3.text) === null || _a2 === void 0 ? void 0 : _a2.slice(Math.max(from2, pos2) - pos2, to - pos2); + text2 += (_a2 = node3 === null || node3 === void 0 ? void 0 : node3.text) === null || _a2 === void 0 ? void 0 : _a2.slice(Math.max(from2, pos) - pos, to - pos); } }); return text2; @@ -174742,13 +176047,13 @@ const clearNodes = /* @__PURE__ */ __name(() => ({ state, tr: tr2, dispatch }) = return true; } ranges.forEach(({ $from, $to }) => { - state.doc.nodesBetween($from.pos, $to.pos, (node3, pos2) => { + state.doc.nodesBetween($from.pos, $to.pos, (node3, pos) => { if (node3.type.isText) { return; } const { doc: doc2, mapping } = tr2; - const $mappedFrom = doc2.resolve(mapping.map(pos2)); - const $mappedTo = doc2.resolve(mapping.map(pos2 + node3.nodeSize)); + const $mappedFrom = doc2.resolve(mapping.map(pos)); + const $mappedTo = doc2.resolve(mapping.map(pos + node3.nodeSize)); const nodeRange = $mappedFrom.blockRange($mappedTo); if (!nodeRange) { return; @@ -175332,12 +176637,12 @@ function isNodeActive(state, typeOrName, attributes = {}) { const { from: from2, to, empty: empty3 } = state.selection; const type = typeOrName ? getNodeType(typeOrName, state.schema) : null; const nodeRanges = []; - state.doc.nodesBetween(from2, to, (node3, pos2) => { + state.doc.nodesBetween(from2, to, (node3, pos) => { if (node3.isText) { return; } - const relativeFrom = Math.max(from2, pos2); - const relativeTo = Math.min(to, pos2 + node3.nodeSize); + const relativeFrom = Math.max(from2, pos); + const relativeTo = Math.min(to, pos + node3.nodeSize); nodeRanges.push({ node: node3, from: relativeFrom, @@ -175411,14 +176716,14 @@ const resetAttributes = /* @__PURE__ */ __name((typeOrName, attributes) => ({ tr } if (dispatch) { tr2.selection.ranges.forEach((range2) => { - state.doc.nodesBetween(range2.$from.pos, range2.$to.pos, (node3, pos2) => { + state.doc.nodesBetween(range2.$from.pos, range2.$to.pos, (node3, pos) => { if (nodeType && nodeType === node3.type) { - tr2.setNodeMarkup(pos2, void 0, deleteProps(node3.attrs, attributes)); + tr2.setNodeMarkup(pos, void 0, deleteProps(node3.attrs, attributes)); } if (markType && node3.marks.length) { node3.marks.forEach((mark2) => { if (markType === mark2.type) { - tr2.addMark(pos2, pos2 + node3.nodeSize, markType.create(deleteProps(mark2.attrs, attributes))); + tr2.addMark(pos, pos + node3.nodeSize, markType.create(deleteProps(mark2.attrs, attributes))); } }); } @@ -175525,11 +176830,11 @@ function defaultBlockAt(match2) { __name(defaultBlockAt, "defaultBlockAt"); function findChildren(node3, predicate) { const nodesWithPos = []; - node3.descendants((child, pos2) => { + node3.descendants((child, pos) => { if (predicate(child)) { nodesWithPos.push({ node: child, - pos: pos2 + pos }); } }); @@ -175538,11 +176843,11 @@ function findChildren(node3, predicate) { __name(findChildren, "findChildren"); function findChildrenInRange(node3, range2, predicate) { const nodesWithPos = []; - node3.nodesBetween(range2.from, range2.to, (child, pos2) => { + node3.nodesBetween(range2.from, range2.to, (child, pos) => { if (predicate(child)) { nodesWithPos.push({ node: child, - pos: pos2 + pos }); } }); @@ -175738,13 +177043,13 @@ function getMarksBetween(from2, to, doc2) { }); }); } else { - doc2.nodesBetween(from2, to, (node3, pos2) => { + doc2.nodesBetween(from2, to, (node3, pos) => { if (!node3 || (node3 === null || node3 === void 0 ? void 0 : node3.nodeSize) === void 0) { return; } marks.push(...node3.marks.map((mark2) => ({ - from: pos2, - to: pos2 + node3.nodeSize, + from: pos, + to: pos + node3.nodeSize, mark: mark2 }))); }); @@ -175752,8 +177057,8 @@ function getMarksBetween(from2, to, doc2) { return marks; } __name(getMarksBetween, "getMarksBetween"); -const getNodeAtPosition = /* @__PURE__ */ __name((state, typeOrName, pos2, maxDepth = 20) => { - const $pos = state.doc.resolve(pos2); +const getNodeAtPosition = /* @__PURE__ */ __name((state, typeOrName, pos, maxDepth = 20) => { + const $pos = state.doc.resolve(pos); let currentDepth = maxDepth; let node3 = null; while (currentDepth > 0 && node3 === null) { @@ -175794,12 +177099,12 @@ function isMarkActive(state, typeOrName, attributes = {}) { ranges.forEach(({ $from, $to }) => { const from2 = $from.pos; const to = $to.pos; - state.doc.nodesBetween(from2, to, (node3, pos2) => { + state.doc.nodesBetween(from2, to, (node3, pos) => { if (!node3.isText && !node3.marks.length) { return; } - const relativeFrom = Math.max(from2, pos2); - const relativeTo = Math.min(to, pos2 + node3.nodeSize); + const relativeFrom = Math.max(from2, pos); + const relativeTo = Math.min(to, pos + node3.nodeSize); const range3 = relativeTo - relativeFrom; selectionRange += range3; markRanges.push(...node3.marks.map((mark2) => ({ @@ -175998,9 +177303,9 @@ const setMark = /* @__PURE__ */ __name((typeOrName, attributes = {}) => ({ tr: t ranges.forEach((range2) => { const from2 = range2.$from.pos; const to = range2.$to.pos; - state.doc.nodesBetween(from2, to, (node3, pos2) => { - const trimmedFrom = Math.max(pos2, from2); - const trimmedTo = Math.min(pos2 + node3.nodeSize, to); + state.doc.nodesBetween(from2, to, (node3, pos) => { + const trimmedFrom = Math.max(pos, from2); + const trimmedTo = Math.min(pos + node3.nodeSize, to); const someHasMark = node3.marks.find((mark2) => mark2.type === type); if (someHasMark) { node3.marks.forEach((mark2) => { @@ -176170,12 +177475,12 @@ const splitListItem = /* @__PURE__ */ __name((typeOrName, overrideAttrs = {}) => const start2 = $from.before($from.depth - (depthBefore - 1)); tr2.replace(start2, $from.after(-depthAfter), new Slice(wrap2, 4 - depthBefore, 0)); let sel = -1; - tr2.doc.nodesBetween(start2, tr2.doc.content.size, (n2, pos2) => { + tr2.doc.nodesBetween(start2, tr2.doc.content.size, (n2, pos) => { if (sel > -1) { return false; } if (n2.isTextblock && n2.content.size === 0) { - sel = pos2 + 1; + sel = pos + 1; } }); if (sel > -1) { @@ -176406,25 +177711,25 @@ const updateAttributes = /* @__PURE__ */ __name((typeOrName, attributes = {}) => let trimmedFrom; let trimmedTo; if (tr2.selection.empty) { - state.doc.nodesBetween(from2, to, (node3, pos2) => { + state.doc.nodesBetween(from2, to, (node3, pos) => { if (nodeType && nodeType === node3.type) { - trimmedFrom = Math.max(pos2, from2); - trimmedTo = Math.min(pos2 + node3.nodeSize, to); - lastPos = pos2; + trimmedFrom = Math.max(pos, from2); + trimmedTo = Math.min(pos + node3.nodeSize, to); + lastPos = pos; lastNode = node3; } }); } else { - state.doc.nodesBetween(from2, to, (node3, pos2) => { - if (pos2 < from2 && nodeType && nodeType === node3.type) { - trimmedFrom = Math.max(pos2, from2); - trimmedTo = Math.min(pos2 + node3.nodeSize, to); - lastPos = pos2; + state.doc.nodesBetween(from2, to, (node3, pos) => { + if (pos < from2 && nodeType && nodeType === node3.type) { + trimmedFrom = Math.max(pos, from2); + trimmedTo = Math.min(pos + node3.nodeSize, to); + lastPos = pos; lastNode = node3; } - if (pos2 >= from2 && pos2 <= to) { + if (pos >= from2 && pos <= to) { if (nodeType && nodeType === node3.type) { - tr2.setNodeMarkup(pos2, void 0, { + tr2.setNodeMarkup(pos, void 0, { ...node3.attrs, ...attributes }); @@ -176432,8 +177737,8 @@ const updateAttributes = /* @__PURE__ */ __name((typeOrName, attributes = {}) => if (markType && node3.marks.length) { node3.marks.forEach((mark2) => { if (markType === mark2.type) { - const trimmedFrom2 = Math.max(pos2, from2); - const trimmedTo2 = Math.min(pos2 + node3.nodeSize, to); + const trimmedFrom2 = Math.max(pos, from2); + const trimmedTo2 = Math.min(pos + node3.nodeSize, to); tr2.addMark(trimmedFrom2, trimmedTo2, markType.create({ ...mark2.attrs, ...attributes @@ -176612,11 +177917,11 @@ const Keymap = Extension.create({ () => commands2.command(({ tr: tr2 }) => { const { selection, doc: doc2 } = tr2; const { empty: empty3, $anchor } = selection; - const { pos: pos2, parent } = $anchor; - const $parentPos = $anchor.parent.isTextblock && pos2 > 0 ? tr2.doc.resolve(pos2 - 1) : $anchor; + const { pos, parent } = $anchor; + const $parentPos = $anchor.parent.isTextblock && pos > 0 ? tr2.doc.resolve(pos - 1) : $anchor; const parentIsIsolating = $parentPos.parent.type.spec.isolating; const parentPos = $anchor.pos - $anchor.parentOffset; - const isAtStart = parentIsIsolating && $parentPos.parent.childCount === 1 ? parentPos === $anchor.pos : Selection.atStart(doc2).from === pos2; + const isAtStart = parentIsIsolating && $parentPos.parent.childCount === 1 ? parentPos === $anchor.pos : Selection.atStart(doc2).from === pos; if (!empty3 || !parent.type.isTextblock || parent.textContent.length || !isAtStart || isAtStart && $anchor.parent.type.name === "paragraph") { return false; } @@ -176762,11 +178067,11 @@ class NodePos { get name() { return this.node.type.name; } - constructor(pos2, editor, isBlock = false, node3 = null) { + constructor(pos, editor, isBlock = false, node3 = null) { this.currentNode = null; this.actualDepth = null; this.isBlock = isBlock; - this.resolvedPos = pos2; + this.resolvedPos = pos; this.editor = editor; this.currentNode = node3; } @@ -177452,8 +178757,8 @@ class Editor extends EventEmitter { var _a2; return ((_a2 = this.$doc) === null || _a2 === void 0 ? void 0 : _a2.querySelectorAll(selector, attributes)) || null; } - $pos(pos2) { - const $pos = this.state.doc.resolve(pos2); + $pos(pos) { + const $pos = this.state.doc.resolve(pos); return new NodePos($pos, this); } get $doc() { @@ -177713,11 +179018,11 @@ class NodeView { y2 = handleBox.y - domBox.y + offsetY; } (_g = event.dataTransfer) === null || _g === void 0 ? void 0 : _g.setDragImage(this.dom, x2, y2); - const pos2 = this.getPos(); - if (typeof pos2 !== "number") { + const pos = this.getPos(); + if (typeof pos !== "number") { return; } - const selection = NodeSelection.create(view.state.doc, pos2); + const selection = NodeSelection.create(view.state.doc, pos); const transaction = view.state.tr.setSelection(selection); view.dispatch(transaction); } @@ -177816,11 +179121,11 @@ class NodeView { */ updateAttributes(attributes) { this.editor.commands.command(({ tr: tr2 }) => { - const pos2 = this.getPos(); - if (typeof pos2 !== "number") { + const pos = this.getPos(); + if (typeof pos !== "number") { return false; } - tr2.setNodeMarkup(pos2, void 0, { + tr2.setNodeMarkup(pos, void 0, { ...this.node.attrs, ...attributes }); @@ -179268,7 +180573,7 @@ function clickHandler(options4) { return new Plugin({ key: new PluginKey("handleClickLink"), props: { - handleClick: /* @__PURE__ */ __name((view, pos2, event) => { + handleClick: /* @__PURE__ */ __name((view, pos, event) => { var _a2, _b; if (event.button !== 0) { return false; @@ -179578,10 +180883,10 @@ var TableMap = class { this.problems = problems; } // Find the dimensions of the cell at the given position. - findCell(pos2) { + findCell(pos) { for (let i2 = 0; i2 < this.map.length; i2++) { const curPos = this.map[i2]; - if (curPos != pos2) + if (curPos != pos) continue; const left = i2 % this.width; const top = i2 / this.width | 0; @@ -179595,21 +180900,21 @@ var TableMap = class { } return { left, top, right, bottom }; } - throw new RangeError(`No cell with offset ${pos2} found`); + throw new RangeError(`No cell with offset ${pos} found`); } // Find the left side of the cell at the given position. - colCount(pos2) { + colCount(pos) { for (let i2 = 0; i2 < this.map.length; i2++) { - if (this.map[i2] == pos2) { + if (this.map[i2] == pos) { return i2 % this.width; } } - throw new RangeError(`No cell with offset ${pos2} found`); + throw new RangeError(`No cell with offset ${pos} found`); } // Find the next cell in the given direction, starting from the cell // at `pos`, if any. - nextCell(pos2, axis, dir) { - const { left, right, top, bottom } = this.findCell(pos2); + nextCell(pos, axis, dir) { + const { left, right, top, bottom } = this.findCell(pos); if (axis == "horiz") { if (dir < 0 ? left == 0 : right == this.width) return null; @@ -179649,14 +180954,14 @@ var TableMap = class { for (let row = rect.top; row < rect.bottom; row++) { for (let col = rect.left; col < rect.right; col++) { const index2 = row * this.width + col; - const pos2 = this.map[index2]; - if (seen2[pos2]) + const pos = this.map[index2]; + if (seen2[pos]) continue; - seen2[pos2] = true; - if (col == rect.left && col && this.map[index2 - 1] == pos2 || row == rect.top && row && this.map[index2 - this.width] == pos2) { + seen2[pos] = true; + if (col == rect.left && col && this.map[index2 - 1] == pos || row == rect.top && row && this.map[index2 - this.width] == pos) { continue; } - result.push(pos2); + result.push(pos); } } return result; @@ -179691,9 +180996,9 @@ function computeMap(table2) { const colWidths = []; for (let i2 = 0, e2 = width2 * height; i2 < e2; i2++) map3[i2] = 0; - for (let row = 0, pos2 = 0; row < height; row++) { + for (let row = 0, pos = 0; row < height; row++) { const rowNode = table2.child(row); - pos2++; + pos++; for (let i2 = 0; ; i2++) { while (mapPos < map3.length && map3[mapPos] != 0) mapPos++; @@ -179705,7 +181010,7 @@ function computeMap(table2) { if (h2 + row >= height) { (problems || (problems = [])).push({ type: "overlong_rowspan", - pos: pos2, + pos, n: rowspan - h2 }); break; @@ -179713,12 +181018,12 @@ function computeMap(table2) { const start2 = mapPos + h2 * width2; for (let w2 = 0; w2 < colspan; w2++) { if (map3[start2 + w2] == 0) - map3[start2 + w2] = pos2; + map3[start2 + w2] = pos; else (problems || (problems = [])).push({ type: "collision", row, - pos: pos2, + pos, n: colspan - w2 }); const colW = colwidth && colwidth[w2]; @@ -179734,7 +181039,7 @@ function computeMap(table2) { } } mapPos += colspan; - pos2 += cellNode.nodeSize; + pos += cellNode.nodeSize; } const expectedPos = (row + 1) * width2; let missing = 0; @@ -179743,7 +181048,7 @@ function computeMap(table2) { missing++; if (missing) (problems || (problems = [])).push({ type: "missing", row, n: missing }); - pos2++; + pos++; } const tableMap = new TableMap(width2, height, map3, problems); let badWidths = false; @@ -179789,13 +181094,13 @@ function findBadColWidths(map3, colWidths, table2) { map3.problems = []; const seen2 = {}; for (let i2 = 0; i2 < map3.map.length; i2++) { - const pos2 = map3.map[i2]; - if (seen2[pos2]) + const pos = map3.map[i2]; + if (seen2[pos]) continue; - seen2[pos2] = true; - const node3 = table2.nodeAt(pos2); + seen2[pos] = true; + const node3 = table2.nodeAt(pos); if (!node3) { - throw new RangeError(`No cell with offset ${pos2} found`); + throw new RangeError(`No cell with offset ${pos} found`); } let updated15 = null; const attrs6 = node3.attrs; @@ -179808,7 +181113,7 @@ function findBadColWidths(map3, colWidths, table2) { if (updated15) map3.problems.unshift({ type: "colwidth mismatch", - pos: pos2, + pos, colwidth: updated15 }); } @@ -179969,15 +181274,15 @@ function selectionCell(state) { } __name(selectionCell, "selectionCell"); function cellNear($pos) { - for (let after = $pos.nodeAfter, pos2 = $pos.pos; after; after = after.firstChild, pos2++) { + for (let after = $pos.nodeAfter, pos = $pos.pos; after; after = after.firstChild, pos++) { const role = after.type.spec.tableRole; if (role == "cell" || role == "header_cell") - return $pos.doc.resolve(pos2); + return $pos.doc.resolve(pos); } - for (let before = $pos.nodeBefore, pos2 = $pos.pos; before; before = before.lastChild, pos2--) { + for (let before = $pos.nodeBefore, pos = $pos.pos; before; before = before.lastChild, pos--) { const role = before.type.spec.tableRole; if (role == "cell" || role == "header_cell") - return $pos.doc.resolve(pos2 - before.nodeSize); + return $pos.doc.resolve(pos - before.nodeSize); } } __name(cellNear, "cellNear"); @@ -180009,23 +181314,23 @@ function nextCell($pos, axis, dir) { return moved == null ? null : $pos.node(0).resolve(tableStart + moved); } __name(nextCell, "nextCell"); -function removeColSpan(attrs6, pos2, n2 = 1) { +function removeColSpan(attrs6, pos, n2 = 1) { const result = { ...attrs6, colspan: attrs6.colspan - n2 }; if (result.colwidth) { result.colwidth = result.colwidth.slice(); - result.colwidth.splice(pos2, n2); + result.colwidth.splice(pos, n2); if (!result.colwidth.some((w2) => w2 > 0)) result.colwidth = null; } return result; } __name(removeColSpan, "removeColSpan"); -function addColSpan(attrs6, pos2, n2 = 1) { +function addColSpan(attrs6, pos, n2 = 1) { const result = { ...attrs6, colspan: attrs6.colspan + n2 }; if (result.colwidth) { result.colwidth = result.colwidth.slice(); for (let i2 = 0; i2 < n2; i2++) - result.colwidth.splice(pos2, 0, 0); + result.colwidth.splice(pos, 0, 0); } return result; } @@ -180057,12 +181362,12 @@ var CellSelection = class _CellSelection extends Selection { const doc2 = $anchorCell.node(0); const cells = map3.cellsInRect(rect).filter((p2) => p2 != $headCell.pos - tableStart); cells.unshift($headCell.pos - tableStart); - const ranges = cells.map((pos2) => { - const cell = table2.nodeAt(pos2); + const ranges = cells.map((pos) => { + const cell = table2.nodeAt(pos); if (!cell) { - throw RangeError(`No cell with offset ${pos2} found`); + throw RangeError(`No cell with offset ${pos} found`); } - const from2 = tableStart + pos2 + 1; + const from2 = tableStart + pos + 1; return new SelectionRange( doc2.resolve(from2), doc2.resolve(from2 + cell.content.size) @@ -180101,14 +181406,14 @@ var CellSelection = class _CellSelection extends Selection { for (let row = rect.top; row < rect.bottom; row++) { const rowContent = []; for (let index2 = row * map3.width + rect.left, col = rect.left; col < rect.right; col++, index2++) { - const pos2 = map3.map[index2]; - if (seen2[pos2]) + const pos = map3.map[index2]; + if (seen2[pos]) continue; - seen2[pos2] = true; - const cellRect = map3.findCell(pos2); - let cell = table2.nodeAt(pos2); + seen2[pos] = true; + const cellRect = map3.findCell(pos); + let cell = table2.nodeAt(pos); if (!cell) { - throw RangeError(`No cell with offset ${pos2} found`); + throw RangeError(`No cell with offset ${pos} found`); } const extraLeft = rect.left - cellRect.left; const extraRight = cellRect.right - rect.right; @@ -180311,9 +181616,9 @@ function drawCellSelection(state) { if (!(state.selection instanceof CellSelection)) return null; const cells = []; - state.selection.forEachCell((node3, pos2) => { + state.selection.forEachCell((node3, pos) => { cells.push( - Decoration.node(pos2, pos2 + node3.nodeSize, { class: "selectedCell" }) + Decoration.node(pos, pos + node3.nodeSize, { class: "selectedCell" }) ); }); return DecorationSet.create(state.doc, cells); @@ -180405,9 +181710,9 @@ function changedDescendants(old, cur, offset, f2) { __name(changedDescendants, "changedDescendants"); function fixTables(state, oldState) { let tr2; - const check = /* @__PURE__ */ __name((node3, pos2) => { + const check = /* @__PURE__ */ __name((node3, pos) => { if (node3.type.spec.tableRole == "table") - tr2 = fixTable(state, node3, pos2, tr2); + tr2 = fixTable(state, node3, pos, tr2); }, "check"); if (!oldState) state.doc.descendants(check); @@ -180466,9 +181771,9 @@ function fixTable(state, table2, tablePos, tr2) { first2 = i2; last = i2; } - for (let i2 = 0, pos2 = tablePos + 1; i2 < map3.height; i2++) { + for (let i2 = 0, pos = tablePos + 1; i2 < map3.height; i2++) { const row = table2.child(i2); - const end = pos2 + row.nodeSize; + const end = pos + row.nodeSize; const add3 = mustAdd[i2]; if (add3 > 0) { let role = "cell"; @@ -180481,10 +181786,10 @@ function fixTable(state, table2, tablePos, tr2) { if (node3) nodes.push(node3); } - const side = (i2 == 0 || first2 == i2 - 1) && last == i2 ? pos2 + 1 : end - 1; + const side = (i2 == 0 || first2 == i2 - 1) && last == i2 ? pos + 1 : end - 1; tr2.insert(tr2.mapping.map(side), nodes); } - pos2 = end; + pos = end; } return tr2.setMeta(fixTablesKey, { fixTables: true }); } @@ -180510,18 +181815,18 @@ function addColumn(tr2, { map: map3, tableStart, table: table2 }, col) { for (let row = 0; row < map3.height; row++) { const index2 = row * map3.width + col; if (col > 0 && col < map3.width && map3.map[index2 - 1] == map3.map[index2]) { - const pos2 = map3.map[index2]; - const cell = table2.nodeAt(pos2); + const pos = map3.map[index2]; + const cell = table2.nodeAt(pos); tr2.setNodeMarkup( - tr2.mapping.map(tableStart + pos2), + tr2.mapping.map(tableStart + pos), null, - addColSpan(cell.attrs, col - map3.colCount(pos2)) + addColSpan(cell.attrs, col - map3.colCount(pos)) ); row += cell.attrs.rowspan - 1; } else { const type = refColumn == null ? tableNodeTypes(table2.type.schema).cell : table2.nodeAt(map3.map[index2 + refColumn]).type; - const pos2 = map3.positionAt(row, col, table2); - tr2.insert(tr2.mapping.map(tableStart + pos2), type.createAndFill()); + const pos = map3.positionAt(row, col, table2); + tr2.insert(tr2.mapping.map(tableStart + pos), type.createAndFill()); } } return tr2; @@ -180551,17 +181856,17 @@ function removeColumn(tr2, { map: map3, table: table2, tableStart }, col) { const mapStart = tr2.mapping.maps.length; for (let row = 0; row < map3.height; ) { const index2 = row * map3.width + col; - const pos2 = map3.map[index2]; - const cell = table2.nodeAt(pos2); + const pos = map3.map[index2]; + const cell = table2.nodeAt(pos); const attrs6 = cell.attrs; - if (col > 0 && map3.map[index2 - 1] == pos2 || col < map3.width - 1 && map3.map[index2 + 1] == pos2) { + if (col > 0 && map3.map[index2 - 1] == pos || col < map3.width - 1 && map3.map[index2 + 1] == pos) { tr2.setNodeMarkup( - tr2.mapping.slice(mapStart).map(tableStart + pos2), + tr2.mapping.slice(mapStart).map(tableStart + pos), null, - removeColSpan(attrs6, col - map3.colCount(pos2)) + removeColSpan(attrs6, col - map3.colCount(pos)) ); } else { - const start2 = tr2.mapping.slice(mapStart).map(tableStart + pos2); + const start2 = tr2.mapping.slice(mapStart).map(tableStart + pos); tr2.delete(start2, start2 + cell.nodeSize); } row += attrs6.rowspan; @@ -180612,9 +181917,9 @@ function addRow(tr2, { map: map3, tableStart, table: table2 }, row) { refRow = row == 0 || row == map3.height ? null : 0; for (let col = 0, index2 = map3.width * row; col < map3.width; col++, index2++) { if (row > 0 && row < map3.height && map3.map[index2] == map3.map[index2 - map3.width]) { - const pos2 = map3.map[index2]; - const attrs6 = table2.nodeAt(pos2).attrs; - tr2.setNodeMarkup(tableStart + pos2, null, { + const pos = map3.map[index2]; + const attrs6 = table2.nodeAt(pos).attrs; + tr2.setNodeMarkup(tableStart + pos, null, { ...attrs6, rowspan: attrs6.rowspan + 1 }); @@ -180659,19 +181964,19 @@ function removeRow(tr2, { map: map3, table: table2, tableStart }, row) { tr2.delete(rowPos + tableStart, nextRow + tableStart); const seen2 = /* @__PURE__ */ new Set(); for (let col = 0, index2 = row * map3.width; col < map3.width; col++, index2++) { - const pos2 = map3.map[index2]; - if (seen2.has(pos2)) + const pos = map3.map[index2]; + if (seen2.has(pos)) continue; - seen2.add(pos2); - if (row > 0 && pos2 == map3.map[index2 - map3.width]) { - const attrs6 = table2.nodeAt(pos2).attrs; - tr2.setNodeMarkup(tr2.mapping.slice(mapFrom).map(pos2 + tableStart), null, { + seen2.add(pos); + if (row > 0 && pos == map3.map[index2 - map3.width]) { + const attrs6 = table2.nodeAt(pos).attrs; + tr2.setNodeMarkup(tr2.mapping.slice(mapFrom).map(pos + tableStart), null, { ...attrs6, rowspan: attrs6.rowspan - 1 }); col += attrs6.colspan - 1; - } else if (row < map3.height && pos2 == map3.map[index2 + map3.width]) { - const cell = table2.nodeAt(pos2); + } else if (row < map3.height && pos == map3.map[index2 + map3.width]) { + const cell = table2.nodeAt(pos); const attrs6 = cell.attrs; const copy2 = cell.type.create( { ...attrs6, rowspan: cell.attrs.rowspan - 1 }, @@ -180833,14 +182138,14 @@ function splitCellWithType(getCellType) { ); let lastCell; for (let row = rect.top; row < rect.bottom; row++) { - let pos2 = rect.map.positionAt(row, rect.left, rect.table); + let pos = rect.map.positionAt(row, rect.left, rect.table); if (row == rect.top) - pos2 += cellNode.nodeSize; + pos += cellNode.nodeSize; for (let col = rect.left, i2 = 0; col < rect.right; col++, i2++) { if (col == rect.left && row == rect.top) continue; tr2.insert( - lastCell = tr2.mapping.map(pos2 + rect.tableStart, 1), + lastCell = tr2.mapping.map(pos + rect.tableStart, 1), getCellType({ node: cellNode, row, col }).createAndFill(attrs6[i2]) ); } @@ -180873,9 +182178,9 @@ function setCellAttr(name2, value4) { if (dispatch) { const tr2 = state.tr; if (state.selection instanceof CellSelection) - state.selection.forEachCell((node3, pos2) => { + state.selection.forEachCell((node3, pos) => { if (node3.attrs[name2] !== value4) - tr2.setNodeMarkup(pos2, null, { + tr2.setNodeMarkup(pos, null, { ...node3.attrs, [name2]: value4 }); @@ -180911,7 +182216,7 @@ function deprecated_toggleHeader(type) { bottom: rect.bottom } : rect ); - const nodes = cells.map((pos2) => rect.table.nodeAt(pos2)); + const nodes = cells.map((pos) => rect.table.nodeAt(pos)); for (let i2 = 0; i2 < cells.length; i2++) if (nodes[i2].type == types.header_cell) tr2.setNodeMarkup( @@ -181067,11 +182372,11 @@ function deleteCellSelection(state, dispatch) { if (dispatch) { const tr2 = state.tr; const baseContent = tableNodeTypes(state.schema).cell.createAndFill().content; - sel.forEachCell((cell, pos2) => { + sel.forEachCell((cell, pos) => { if (!cell.content.eq(baseContent)) tr2.replace( - tr2.mapping.map(pos2 + 1), - tr2.mapping.map(pos2 + cell.nodeSize - 1), + tr2.mapping.map(pos + 1), + tr2.mapping.map(pos + cell.nodeSize - 1), new Slice(baseContent, 0, 0) ); }); @@ -181244,12 +182549,12 @@ function isolateHorizontal(tr2, map3, table2, start2, left, right, top, mapFrom) return false; let found2 = false; for (let col = left; col < right; col++) { - const index2 = top * map3.width + col, pos2 = map3.map[index2]; - if (map3.map[index2 - map3.width] == pos2) { + const index2 = top * map3.width + col, pos = map3.map[index2]; + if (map3.map[index2 - map3.width] == pos) { found2 = true; - const cell = table2.nodeAt(pos2); - const { top: cellTop, left: cellLeft } = map3.findCell(pos2); - tr2.setNodeMarkup(tr2.mapping.slice(mapFrom).map(pos2 + start2), null, { + const cell = table2.nodeAt(pos); + const { top: cellTop, left: cellLeft } = map3.findCell(pos); + tr2.setNodeMarkup(tr2.mapping.slice(mapFrom).map(pos + start2), null, { ...cell.attrs, rowspan: top - cellTop }); @@ -181271,12 +182576,12 @@ function isolateVertical(tr2, map3, table2, start2, top, bottom, left, mapFrom) return false; let found2 = false; for (let row = top; row < bottom; row++) { - const index2 = row * map3.width + left, pos2 = map3.map[index2]; - if (map3.map[index2 - 1] == pos2) { + const index2 = row * map3.width + left, pos = map3.map[index2]; + if (map3.map[index2 - 1] == pos) { found2 = true; - const cell = table2.nodeAt(pos2); - const cellLeft = map3.colCount(pos2); - const updatePos = tr2.mapping.slice(mapFrom).map(pos2 + start2); + const cell = table2.nodeAt(pos); + const cellLeft = map3.colCount(pos); + const updatePos = tr2.mapping.slice(mapFrom).map(pos + start2); tr2.setNodeMarkup( updatePos, null, @@ -181430,8 +182735,8 @@ function shiftArrow(axis, dir) { }; } __name(shiftArrow, "shiftArrow"); -function handleTripleClick(view, pos2) { - const doc2 = view.state.doc, $cell = cellAround(doc2.resolve(pos2)); +function handleTripleClick(view, pos) { + const doc2 = view.state.doc, $cell = cellAround(doc2.resolve(pos)); if (!$cell) return false; view.dispatch(view.state.tr.setSelection(new CellSelection($cell))); @@ -181858,8 +183163,8 @@ function edgeCell(view, event, side, handleWidth) { }); if (!found2) return -1; - const { pos: pos2 } = found2; - const $cell = cellAround(view.state.doc.resolve(pos2)); + const { pos } = found2; + const $cell = cellAround(view.state.doc.resolve(pos)); if (!$cell) return -1; if (side == "right") @@ -181889,14 +183194,14 @@ function updateColumnWidth(view, cell, width2) { const mapIndex = row * map3.width + col; if (row && map3.map[mapIndex] == map3.map[mapIndex - map3.width]) continue; - const pos2 = map3.map[mapIndex]; - const attrs6 = table2.nodeAt(pos2).attrs; - const index2 = attrs6.colspan == 1 ? 0 : col - map3.colCount(pos2); + const pos = map3.map[mapIndex]; + const attrs6 = table2.nodeAt(pos).attrs; + const index2 = attrs6.colspan == 1 ? 0 : col - map3.colCount(pos); if (attrs6.colwidth && attrs6.colwidth[index2] == width2) continue; const colwidth = attrs6.colwidth ? attrs6.colwidth.slice() : zeroes(attrs6.colspan); colwidth[index2] = width2; - tr2.setNodeMarkup(start2 + pos2, null, { ...attrs6, colwidth }); + tr2.setNodeMarkup(start2 + pos, null, { ...attrs6, colwidth }); } if (tr2.docChanged) view.dispatch(tr2); @@ -181941,7 +183246,7 @@ function handleDecorations(state, cell) { const index2 = col + row * map3.width; if ((col == map3.width - 1 || map3.map[index2] != map3.map[index2 + 1]) && (row == 0 || map3.map[index2] != map3.map[index2 - map3.width])) { const cellPos = map3.map[index2]; - const pos2 = start2 + cellPos + table2.nodeAt(cellPos).nodeSize - 1; + const pos = start2 + cellPos + table2.nodeAt(cellPos).nodeSize - 1; const dom = document.createElement("div"); dom.className = "column-resize-handle"; if ((_a2 = columnResizingPluginKey.getState(state)) == null ? void 0 : _a2.dragging) { @@ -181955,7 +183260,7 @@ function handleDecorations(state, cell) { ) ); } - decorations.push(Decoration.widget(pos2, dom)); + decorations.push(Decoration.widget(pos, dom)); } } return DecorationSet.create(state.doc, decorations); @@ -181979,8 +183284,8 @@ function tableEditing({ return set3 == -1 ? null : set3; if (cur == null || !tr2.docChanged) return cur; - const { deleted, pos: pos2 } = tr2.mapping.mapResult(cur); - return deleted ? null : pos2; + const { deleted, pos } = tr2.mapping.mapResult(cur); + return deleted ? null : pos; } }, props: { @@ -182906,11 +184211,11 @@ class DropCursorView { this.updateOverlay(); } } - setCursor(pos2) { - if (pos2 == this.cursorPos) + setCursor(pos) { + if (pos == this.cursorPos) return; - this.cursorPos = pos2; - if (pos2 == null) { + this.cursorPos = pos; + if (pos == null) { this.element.parentNode.removeChild(this.element); this.element = null; } else { @@ -182970,12 +184275,12 @@ class DropCursorView { dragover(event) { if (!this.editorView.editable) return; - let pos2 = this.editorView.posAtCoords({ left: event.clientX, top: event.clientY }); - let node3 = pos2 && pos2.inside >= 0 && this.editorView.state.doc.nodeAt(pos2.inside); + let pos = this.editorView.posAtCoords({ left: event.clientX, top: event.clientY }); + let node3 = pos && pos.inside >= 0 && this.editorView.state.doc.nodeAt(pos.inside); let disableDropCursor = node3 && node3.type.spec.disableDropCursor; - let disabled2 = typeof disableDropCursor == "function" ? disableDropCursor(this.editorView, pos2, event) : disableDropCursor; - if (pos2 && !disabled2) { - let target2 = pos2.pos; + let disabled2 = typeof disableDropCursor == "function" ? disableDropCursor(this.editorView, pos, event) : disableDropCursor; + if (pos && !disabled2) { + let target2 = pos.pos; if (this.editorView.dragging && this.editorView.dragging.slice) { let point = dropPoint(this.editorView.state.doc, target2, this.editorView.dragging.slice); if (point != null) @@ -183068,7 +184373,7 @@ class GapCursor extends Selection { search: for (; ; ) { if (!mustMove && GapCursor.valid($pos)) return $pos; - let pos2 = $pos.pos, next2 = null; + let pos = $pos.pos, next2 = null; for (let d2 = $pos.depth; ; d2--) { let parent = $pos.node(d2); if (dir > 0 ? $pos.indexAfter(d2) < parent.childCount : $pos.index(d2) > 0) { @@ -183077,8 +184382,8 @@ class GapCursor extends Selection { } else if (d2 == 0) { return null; } - pos2 += dir; - let $cur = $pos.doc.resolve(pos2); + pos += dir; + let $cur = $pos.doc.resolve(pos); if (GapCursor.valid($cur)) return $cur; } @@ -183086,15 +184391,15 @@ class GapCursor extends Selection { let inside = dir > 0 ? next2.firstChild : next2.lastChild; if (!inside) { if (next2.isAtom && !next2.isText && !NodeSelection.isSelectable(next2)) { - $pos = $pos.doc.resolve(pos2 + next2.nodeSize * dir); + $pos = $pos.doc.resolve(pos + next2.nodeSize * dir); mustMove = false; continue search; } break; } next2 = inside; - pos2 += dir; - let $cur = $pos.doc.resolve(pos2); + pos += dir; + let $cur = $pos.doc.resolve(pos); if (GapCursor.valid($cur)) return $cur; } @@ -183109,8 +184414,8 @@ class GapBookmark { static { __name(this, "GapBookmark"); } - constructor(pos2) { - this.pos = pos2; + constructor(pos) { + this.pos = pos; } map(mapping) { return new GapBookmark(mapping.map(this.pos)); @@ -183196,10 +184501,10 @@ function arrow(axis, dir) { }; } __name(arrow, "arrow"); -function handleClick(view, pos2, event) { +function handleClick(view, pos, event) { if (!view || !view.editable) return false; - let $pos = view.state.doc.resolve(pos2); + let $pos = view.state.doc.resolve(pos); if (!GapCursor.valid($pos)) return false; let clickPos = view.posAtCoords({ left: event.clientX, top: event.clientY }); @@ -183675,14 +184980,14 @@ class Branch { }, start2); let iRebased = rebasedCount; this.items.forEach((item3) => { - let pos2 = mapping.getMirror(--iRebased); - if (pos2 == null) + let pos = mapping.getMirror(--iRebased); + if (pos == null) return; - newUntil = Math.min(newUntil, pos2); - let map3 = mapping.maps[pos2]; + newUntil = Math.min(newUntil, pos); + let map3 = mapping.maps[pos]; if (item3.step) { - let step3 = rebasedTransform.steps[pos2].invert(rebasedTransform.docs[pos2]); - let selection = item3.selection && item3.selection.map(mapping.slice(iRebased + 1, pos2)); + let step3 = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]); + let selection = item3.selection && item3.selection.map(mapping.slice(iRebased + 1, pos)); if (selection) eventCount++; rebasedItems.push(new Item(map3, step3, selection)); @@ -185393,8 +186698,8 @@ function assign$1(obj) { return obj; } __name(assign$1, "assign$1"); -function arrayReplaceAt(src, pos2, newElements) { - return [].concat(src.slice(0, pos2), newElements, src.slice(pos2 + 1)); +function arrayReplaceAt(src, pos, newElements) { + return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1)); } __name(arrayReplaceAt, "arrayReplaceAt"); function isValidEntityCode(c2) { @@ -185635,16 +186940,16 @@ function parseLinkLabel(state, start2, disableNested) { __name(parseLinkLabel, "parseLinkLabel"); function parseLinkDestination(str, start2, max) { let code2; - let pos2 = start2; + let pos = start2; const result = { ok: false, pos: 0, str: "" }; - if (str.charCodeAt(pos2) === 60) { - pos2++; - while (pos2 < max) { - code2 = str.charCodeAt(pos2); + if (str.charCodeAt(pos) === 60) { + pos++; + while (pos < max) { + code2 = str.charCodeAt(pos); if (code2 === 10) { return result; } @@ -185652,33 +186957,33 @@ function parseLinkDestination(str, start2, max) { return result; } if (code2 === 62) { - result.pos = pos2 + 1; - result.str = unescapeAll(str.slice(start2 + 1, pos2)); + result.pos = pos + 1; + result.str = unescapeAll(str.slice(start2 + 1, pos)); result.ok = true; return result; } - if (code2 === 92 && pos2 + 1 < max) { - pos2 += 2; + if (code2 === 92 && pos + 1 < max) { + pos += 2; continue; } - pos2++; + pos++; } return result; } let level = 0; - while (pos2 < max) { - code2 = str.charCodeAt(pos2); + while (pos < max) { + code2 = str.charCodeAt(pos); if (code2 === 32) { break; } if (code2 < 32 || code2 === 127) { break; } - if (code2 === 92 && pos2 + 1 < max) { - if (str.charCodeAt(pos2 + 1) === 32) { + if (code2 === 92 && pos + 1 < max) { + if (str.charCodeAt(pos + 1) === 32) { break; } - pos2 += 2; + pos += 2; continue; } if (code2 === 40) { @@ -185693,23 +186998,23 @@ function parseLinkDestination(str, start2, max) { } level--; } - pos2++; + pos++; } - if (start2 === pos2) { + if (start2 === pos) { return result; } if (level !== 0) { return result; } - result.str = unescapeAll(str.slice(start2, pos2)); - result.pos = pos2; + result.str = unescapeAll(str.slice(start2, pos)); + result.pos = pos; result.ok = true; return result; } __name(parseLinkDestination, "parseLinkDestination"); function parseLinkTitle(str, start2, max, prev_state) { let code2; - let pos2 = start2; + let pos = start2; const state = { // if `true`, this is a valid link title ok: false, @@ -185726,36 +187031,36 @@ function parseLinkTitle(str, start2, max, prev_state) { state.str = prev_state.str; state.marker = prev_state.marker; } else { - if (pos2 >= max) { + if (pos >= max) { return state; } - let marker = str.charCodeAt(pos2); + let marker = str.charCodeAt(pos); if (marker !== 34 && marker !== 39 && marker !== 40) { return state; } start2++; - pos2++; + pos++; if (marker === 40) { marker = 41; } state.marker = marker; } - while (pos2 < max) { - code2 = str.charCodeAt(pos2); + while (pos < max) { + code2 = str.charCodeAt(pos); if (code2 === state.marker) { - state.pos = pos2 + 1; - state.str += unescapeAll(str.slice(start2, pos2)); + state.pos = pos + 1; + state.str += unescapeAll(str.slice(start2, pos)); state.ok = true; return state; } else if (code2 === 40 && state.marker === 41) { return state; - } else if (code2 === 92 && pos2 + 1 < max) { - pos2++; + } else if (code2 === 92 && pos + 1 < max) { + pos++; } - pos2++; + pos++; } state.can_continue = true; - state.str += unescapeAll(str.slice(start2, pos2)); + state.str += unescapeAll(str.slice(start2, pos)); return state; } __name(parseLinkTitle, "parseLinkTitle"); @@ -186232,10 +187537,10 @@ function linkify$1(state) { } else { urlText = state.md.normalizeLinkText(urlText); } - const pos2 = links[ln].index; - if (pos2 > lastPos) { + const pos = links[ln].index; + if (pos > lastPos) { const token = new state.Token("text", "", 0); - token.content = text2.slice(lastPos, pos2); + token.content = text2.slice(lastPos, pos); token.level = level; nodes.push(token); } @@ -186355,18 +187660,18 @@ function process_inlines(tokens, state) { continue; } let text2 = token.content; - let pos2 = 0; + let pos = 0; let max = text2.length; OUTER: - while (pos2 < max) { - QUOTE_RE.lastIndex = pos2; + while (pos < max) { + QUOTE_RE.lastIndex = pos; const t2 = QUOTE_RE.exec(text2); if (!t2) { break; } let canOpen = true; let canClose = true; - pos2 = t2.index + 1; + pos = t2.index + 1; const isSingle = t2[0] === "'"; let lastChar = 32; if (t2.index - 1 >= 0) { @@ -186380,8 +187685,8 @@ function process_inlines(tokens, state) { } } let nextChar = 32; - if (pos2 < max) { - nextChar = text2.charCodeAt(pos2); + if (pos < max) { + nextChar = text2.charCodeAt(pos); } else { for (j2 = i2 + 1; j2 < tokens.length; j2++) { if (tokens[j2].type === "softbreak" || tokens[j2].type === "hardbreak") break; @@ -186446,9 +187751,9 @@ function process_inlines(tokens, state) { item3.pos, openQuote ); - pos2 += closeQuote.length - 1; + pos += closeQuote.length - 1; if (item3.token === i2) { - pos2 += openQuote.length - 1; + pos += openQuote.length - 1; } text2 = token.content; max = text2.length; @@ -186556,8 +187861,8 @@ function StateBlock(src, md2, env, tokens) { this.parentType = "root"; this.level = 0; const s2 = this.src; - for (let start2 = 0, pos2 = 0, indent = 0, offset = 0, len = s2.length, indent_found = false; pos2 < len; pos2++) { - const ch = s2.charCodeAt(pos2); + for (let start2 = 0, pos = 0, indent = 0, offset = 0, len = s2.length, indent_found = false; pos < len; pos++) { + const ch = s2.charCodeAt(pos); if (!indent_found) { if (isSpace(ch)) { indent++; @@ -186571,19 +187876,19 @@ function StateBlock(src, md2, env, tokens) { indent_found = true; } } - if (ch === 10 || pos2 === len - 1) { + if (ch === 10 || pos === len - 1) { if (ch !== 10) { - pos2++; + pos++; } this.bMarks.push(start2); - this.eMarks.push(pos2); + this.eMarks.push(pos); this.tShift.push(indent); this.sCount.push(offset); this.bsCount.push(0); indent_found = false; indent = 0; offset = 0; - start2 = pos2 + 1; + start2 = pos + 1; } } this.bMarks.push(s2.length); @@ -186614,44 +187919,44 @@ StateBlock.prototype.skipEmptyLines = /* @__PURE__ */ __name(function skipEmptyL } return from2; }, "skipEmptyLines"); -StateBlock.prototype.skipSpaces = /* @__PURE__ */ __name(function skipSpaces(pos2) { - for (let max = this.src.length; pos2 < max; pos2++) { - const ch = this.src.charCodeAt(pos2); +StateBlock.prototype.skipSpaces = /* @__PURE__ */ __name(function skipSpaces(pos) { + for (let max = this.src.length; pos < max; pos++) { + const ch = this.src.charCodeAt(pos); if (!isSpace(ch)) { break; } } - return pos2; + return pos; }, "skipSpaces"); -StateBlock.prototype.skipSpacesBack = /* @__PURE__ */ __name(function skipSpacesBack(pos2, min) { - if (pos2 <= min) { - return pos2; +StateBlock.prototype.skipSpacesBack = /* @__PURE__ */ __name(function skipSpacesBack(pos, min) { + if (pos <= min) { + return pos; } - while (pos2 > min) { - if (!isSpace(this.src.charCodeAt(--pos2))) { - return pos2 + 1; + while (pos > min) { + if (!isSpace(this.src.charCodeAt(--pos))) { + return pos + 1; } } - return pos2; + return pos; }, "skipSpacesBack"); -StateBlock.prototype.skipChars = /* @__PURE__ */ __name(function skipChars(pos2, code2) { - for (let max = this.src.length; pos2 < max; pos2++) { - if (this.src.charCodeAt(pos2) !== code2) { +StateBlock.prototype.skipChars = /* @__PURE__ */ __name(function skipChars(pos, code2) { + for (let max = this.src.length; pos < max; pos++) { + if (this.src.charCodeAt(pos) !== code2) { break; } } - return pos2; + return pos; }, "skipChars"); -StateBlock.prototype.skipCharsBack = /* @__PURE__ */ __name(function skipCharsBack(pos2, code2, min) { - if (pos2 <= min) { - return pos2; +StateBlock.prototype.skipCharsBack = /* @__PURE__ */ __name(function skipCharsBack(pos, code2, min) { + if (pos <= min) { + return pos; } - while (pos2 > min) { - if (code2 !== this.src.charCodeAt(--pos2)) { - return pos2 + 1; + while (pos > min) { + if (code2 !== this.src.charCodeAt(--pos)) { + return pos + 1; } } - return pos2; + return pos; }, "skipCharsBack"); StateBlock.prototype.getLines = /* @__PURE__ */ __name(function getLines(begin, end, indent, keepLastLF) { if (begin >= end) { @@ -186694,33 +187999,33 @@ StateBlock.prototype.getLines = /* @__PURE__ */ __name(function getLines(begin, StateBlock.prototype.Token = Token; const MAX_AUTOCOMPLETED_CELLS = 65536; function getLine(state, line) { - const pos2 = state.bMarks[line] + state.tShift[line]; + const pos = state.bMarks[line] + state.tShift[line]; const max = state.eMarks[line]; - return state.src.slice(pos2, max); + return state.src.slice(pos, max); } __name(getLine, "getLine"); function escapedSplit(str) { const result = []; const max = str.length; - let pos2 = 0; - let ch = str.charCodeAt(pos2); + let pos = 0; + let ch = str.charCodeAt(pos); let isEscaped = false; let lastPos = 0; let current = ""; - while (pos2 < max) { + while (pos < max) { if (ch === 124) { if (!isEscaped) { - result.push(current + str.substring(lastPos, pos2)); + result.push(current + str.substring(lastPos, pos)); current = ""; - lastPos = pos2 + 1; + lastPos = pos + 1; } else { - current += str.substring(lastPos, pos2 - 1); - lastPos = pos2; + current += str.substring(lastPos, pos - 1); + lastPos = pos; } } isEscaped = ch === 92; - pos2++; - ch = str.charCodeAt(pos2); + pos++; + ch = str.charCodeAt(pos); } result.push(current + str.substring(lastPos)); return result; @@ -186737,30 +188042,30 @@ function table(state, startLine, endLine, silent) { if (state.sCount[nextLine] - state.blkIndent >= 4) { return false; } - let pos2 = state.bMarks[nextLine] + state.tShift[nextLine]; - if (pos2 >= state.eMarks[nextLine]) { + let pos = state.bMarks[nextLine] + state.tShift[nextLine]; + if (pos >= state.eMarks[nextLine]) { return false; } - const firstCh = state.src.charCodeAt(pos2++); + const firstCh = state.src.charCodeAt(pos++); if (firstCh !== 124 && firstCh !== 45 && firstCh !== 58) { return false; } - if (pos2 >= state.eMarks[nextLine]) { + if (pos >= state.eMarks[nextLine]) { return false; } - const secondCh = state.src.charCodeAt(pos2++); + const secondCh = state.src.charCodeAt(pos++); if (secondCh !== 124 && secondCh !== 45 && secondCh !== 58 && !isSpace(secondCh)) { return false; } if (firstCh === 45 && isSpace(secondCh)) { return false; } - while (pos2 < state.eMarks[nextLine]) { - const ch = state.src.charCodeAt(pos2); + while (pos < state.eMarks[nextLine]) { + const ch = state.src.charCodeAt(pos); if (ch !== 124 && ch !== 45 && ch !== 58 && !isSpace(ch)) { return false; } - pos2++; + pos++; } let lineText = getLine(state, startLine + 1); let columns = lineText.split("|"); @@ -186909,26 +188214,26 @@ function code(state, startLine, endLine) { } __name(code, "code"); function fence(state, startLine, endLine, silent) { - let pos2 = state.bMarks[startLine] + state.tShift[startLine]; + let pos = state.bMarks[startLine] + state.tShift[startLine]; let max = state.eMarks[startLine]; if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } - if (pos2 + 3 > max) { + if (pos + 3 > max) { return false; } - const marker = state.src.charCodeAt(pos2); + const marker = state.src.charCodeAt(pos); if (marker !== 126 && marker !== 96) { return false; } - let mem = pos2; - pos2 = state.skipChars(pos2, marker); - let len = pos2 - mem; + let mem = pos; + pos = state.skipChars(pos, marker); + let len = pos - mem; if (len < 3) { return false; } - const markup = state.src.slice(mem, pos2); - const params = state.src.slice(pos2, max); + const markup = state.src.slice(mem, pos); + const params = state.src.slice(pos, max); if (marker === 96) { if (params.indexOf(String.fromCharCode(marker)) >= 0) { return false; @@ -186944,23 +188249,23 @@ function fence(state, startLine, endLine, silent) { if (nextLine >= endLine) { break; } - pos2 = mem = state.bMarks[nextLine] + state.tShift[nextLine]; + pos = mem = state.bMarks[nextLine] + state.tShift[nextLine]; max = state.eMarks[nextLine]; - if (pos2 < max && state.sCount[nextLine] < state.blkIndent) { + if (pos < max && state.sCount[nextLine] < state.blkIndent) { break; } - if (state.src.charCodeAt(pos2) !== marker) { + if (state.src.charCodeAt(pos) !== marker) { continue; } if (state.sCount[nextLine] - state.blkIndent >= 4) { continue; } - pos2 = state.skipChars(pos2, marker); - if (pos2 - mem < len) { + pos = state.skipChars(pos, marker); + if (pos - mem < len) { continue; } - pos2 = state.skipSpaces(pos2); - if (pos2 < max) { + pos = state.skipSpaces(pos); + if (pos < max) { continue; } haveEndMarker = true; @@ -186977,13 +188282,13 @@ function fence(state, startLine, endLine, silent) { } __name(fence, "fence"); function blockquote(state, startLine, endLine, silent) { - let pos2 = state.bMarks[startLine] + state.tShift[startLine]; + let pos = state.bMarks[startLine] + state.tShift[startLine]; let max = state.eMarks[startLine]; const oldLineMax = state.lineMax; if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } - if (state.src.charCodeAt(pos2) !== 62) { + if (state.src.charCodeAt(pos) !== 62) { return false; } if (silent) { @@ -187000,24 +188305,24 @@ function blockquote(state, startLine, endLine, silent) { let nextLine; for (nextLine = startLine; nextLine < endLine; nextLine++) { const isOutdented = state.sCount[nextLine] < state.blkIndent; - pos2 = state.bMarks[nextLine] + state.tShift[nextLine]; + pos = state.bMarks[nextLine] + state.tShift[nextLine]; max = state.eMarks[nextLine]; - if (pos2 >= max) { + if (pos >= max) { break; } - if (state.src.charCodeAt(pos2++) === 62 && !isOutdented) { + if (state.src.charCodeAt(pos++) === 62 && !isOutdented) { let initial = state.sCount[nextLine] + 1; let spaceAfterMarker; let adjustTab; - if (state.src.charCodeAt(pos2) === 32) { - pos2++; + if (state.src.charCodeAt(pos) === 32) { + pos++; initial++; adjustTab = false; spaceAfterMarker = true; - } else if (state.src.charCodeAt(pos2) === 9) { + } else if (state.src.charCodeAt(pos) === 9) { spaceAfterMarker = true; if ((state.bsCount[nextLine] + initial) % 4 === 3) { - pos2++; + pos++; initial++; adjustTab = false; } else { @@ -187028,9 +188333,9 @@ function blockquote(state, startLine, endLine, silent) { } let offset = initial; oldBMarks.push(state.bMarks[nextLine]); - state.bMarks[nextLine] = pos2; - while (pos2 < max) { - const ch = state.src.charCodeAt(pos2); + state.bMarks[nextLine] = pos; + while (pos < max) { + const ch = state.src.charCodeAt(pos); if (isSpace(ch)) { if (ch === 9) { offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4; @@ -187040,15 +188345,15 @@ function blockquote(state, startLine, endLine, silent) { } else { break; } - pos2++; + pos++; } - lastLineEmpty = pos2 >= max; + lastLineEmpty = pos >= max; oldBSCount.push(state.bsCount[nextLine]); state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0); oldSCount.push(state.sCount[nextLine]); state.sCount[nextLine] = offset - initial; oldTShift.push(state.tShift[nextLine]); - state.tShift[nextLine] = pos2 - state.bMarks[nextLine]; + state.tShift[nextLine] = pos - state.bMarks[nextLine]; continue; } if (lastLineEmpty) { @@ -187105,14 +188410,14 @@ function hr(state, startLine, endLine, silent) { if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } - let pos2 = state.bMarks[startLine] + state.tShift[startLine]; - const marker = state.src.charCodeAt(pos2++); + let pos = state.bMarks[startLine] + state.tShift[startLine]; + const marker = state.src.charCodeAt(pos++); if (marker !== 42 && marker !== 45 && marker !== 95) { return false; } let cnt = 1; - while (pos2 < max) { - const ch = state.src.charCodeAt(pos2++); + while (pos < max) { + const ch = state.src.charCodeAt(pos++); if (ch !== marker && !isSpace(ch)) { return false; } @@ -187135,38 +188440,38 @@ function hr(state, startLine, endLine, silent) { __name(hr, "hr"); function skipBulletListMarker(state, startLine) { const max = state.eMarks[startLine]; - let pos2 = state.bMarks[startLine] + state.tShift[startLine]; - const marker = state.src.charCodeAt(pos2++); + let pos = state.bMarks[startLine] + state.tShift[startLine]; + const marker = state.src.charCodeAt(pos++); if (marker !== 42 && marker !== 45 && marker !== 43) { return -1; } - if (pos2 < max) { - const ch = state.src.charCodeAt(pos2); + if (pos < max) { + const ch = state.src.charCodeAt(pos); if (!isSpace(ch)) { return -1; } } - return pos2; + return pos; } __name(skipBulletListMarker, "skipBulletListMarker"); function skipOrderedListMarker(state, startLine) { const start2 = state.bMarks[startLine] + state.tShift[startLine]; const max = state.eMarks[startLine]; - let pos2 = start2; - if (pos2 + 1 >= max) { + let pos = start2; + if (pos + 1 >= max) { return -1; } - let ch = state.src.charCodeAt(pos2++); + let ch = state.src.charCodeAt(pos++); if (ch < 48 || ch > 57) { return -1; } for (; ; ) { - if (pos2 >= max) { + if (pos >= max) { return -1; } - ch = state.src.charCodeAt(pos2++); + ch = state.src.charCodeAt(pos++); if (ch >= 48 && ch <= 57) { - if (pos2 - start2 >= 10) { + if (pos - start2 >= 10) { return -1; } continue; @@ -187176,13 +188481,13 @@ function skipOrderedListMarker(state, startLine) { } return -1; } - if (pos2 < max) { - ch = state.src.charCodeAt(pos2); + if (pos < max) { + ch = state.src.charCodeAt(pos); if (!isSpace(ch)) { return -1; } } - return pos2; + return pos; } __name(skipOrderedListMarker, "skipOrderedListMarker"); function markTightParagraphs(state, idx) { @@ -187197,7 +188502,7 @@ function markTightParagraphs(state, idx) { } __name(markTightParagraphs, "markTightParagraphs"); function list(state, startLine, endLine, silent) { - let max, pos2, start2, token; + let max, pos, start2, token; let nextLine = startLine; let tight = true; if (state.sCount[nextLine] - state.blkIndent >= 4) { @@ -187249,12 +188554,12 @@ function list(state, startLine, endLine, silent) { const oldParentType = state.parentType; state.parentType = "list"; while (nextLine < endLine) { - pos2 = posAfterMarker; + pos = posAfterMarker; max = state.eMarks[nextLine]; const initial = state.sCount[nextLine] + posAfterMarker - (state.bMarks[nextLine] + state.tShift[nextLine]); let offset = initial; - while (pos2 < max) { - const ch = state.src.charCodeAt(pos2); + while (pos < max) { + const ch = state.src.charCodeAt(pos); if (ch === 9) { offset += 4 - (offset + state.bsCount[nextLine]) % 4; } else if (ch === 32) { @@ -187262,9 +188567,9 @@ function list(state, startLine, endLine, silent) { } else { break; } - pos2++; + pos++; } - const contentStart = pos2; + const contentStart = pos; let indentAfterMarker; if (contentStart >= max) { indentAfterMarker = 1; @@ -187360,13 +188665,13 @@ function list(state, startLine, endLine, silent) { } __name(list, "list"); function reference(state, startLine, _endLine, silent) { - let pos2 = state.bMarks[startLine] + state.tShift[startLine]; + let pos = state.bMarks[startLine] + state.tShift[startLine]; let max = state.eMarks[startLine]; let nextLine = startLine + 1; if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } - if (state.src.charCodeAt(pos2) !== 91) { + if (state.src.charCodeAt(pos) !== 91) { return false; } function getNextLine(nextLine2) { @@ -187397,20 +188702,20 @@ function reference(state, startLine, _endLine, silent) { return null; } } - const pos3 = state.bMarks[nextLine2] + state.tShift[nextLine2]; + const pos2 = state.bMarks[nextLine2] + state.tShift[nextLine2]; const max2 = state.eMarks[nextLine2]; - return state.src.slice(pos3, max2 + 1); + return state.src.slice(pos2, max2 + 1); } __name(getNextLine, "getNextLine"); - let str = state.src.slice(pos2, max + 1); + let str = state.src.slice(pos, max + 1); max = str.length; let labelEnd = -1; - for (pos2 = 1; pos2 < max; pos2++) { - const ch = str.charCodeAt(pos2); + for (pos = 1; pos < max; pos++) { + const ch = str.charCodeAt(pos); if (ch === 91) { return false; } else if (ch === 93) { - labelEnd = pos2; + labelEnd = pos; break; } else if (ch === 10) { const lineContent = getNextLine(nextLine); @@ -187420,8 +188725,8 @@ function reference(state, startLine, _endLine, silent) { nextLine++; } } else if (ch === 92) { - pos2++; - if (pos2 < max && str.charCodeAt(pos2) === 10) { + pos++; + if (pos < max && str.charCodeAt(pos) === 10) { const lineContent = getNextLine(nextLine); if (lineContent !== null) { str += lineContent; @@ -187434,8 +188739,8 @@ function reference(state, startLine, _endLine, silent) { if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 58) { return false; } - for (pos2 = labelEnd + 2; pos2 < max; pos2++) { - const ch = str.charCodeAt(pos2); + for (pos = labelEnd + 2; pos < max; pos++) { + const ch = str.charCodeAt(pos); if (ch === 10) { const lineContent = getNextLine(nextLine); if (lineContent !== null) { @@ -187448,7 +188753,7 @@ function reference(state, startLine, _endLine, silent) { break; } } - const destRes = state.md.helpers.parseLinkDestination(str, pos2, max); + const destRes = state.md.helpers.parseLinkDestination(str, pos, max); if (!destRes.ok) { return false; } @@ -187456,12 +188761,12 @@ function reference(state, startLine, _endLine, silent) { if (!state.md.validateLink(href)) { return false; } - pos2 = destRes.pos; - const destEndPos = pos2; + pos = destRes.pos; + const destEndPos = pos; const destEndLineNo = nextLine; - const start2 = pos2; - for (; pos2 < max; pos2++) { - const ch = str.charCodeAt(pos2); + const start2 = pos; + for (; pos < max; pos++) { + const ch = str.charCodeAt(pos); if (ch === 10) { const lineContent = getNextLine(nextLine); if (lineContent !== null) { @@ -187474,47 +188779,47 @@ function reference(state, startLine, _endLine, silent) { break; } } - let titleRes = state.md.helpers.parseLinkTitle(str, pos2, max); + let titleRes = state.md.helpers.parseLinkTitle(str, pos, max); while (titleRes.can_continue) { const lineContent = getNextLine(nextLine); if (lineContent === null) break; str += lineContent; - pos2 = max; + pos = max; max = str.length; nextLine++; - titleRes = state.md.helpers.parseLinkTitle(str, pos2, max, titleRes); + titleRes = state.md.helpers.parseLinkTitle(str, pos, max, titleRes); } let title; - if (pos2 < max && start2 !== pos2 && titleRes.ok) { + if (pos < max && start2 !== pos && titleRes.ok) { title = titleRes.str; - pos2 = titleRes.pos; + pos = titleRes.pos; } else { title = ""; - pos2 = destEndPos; + pos = destEndPos; nextLine = destEndLineNo; } - while (pos2 < max) { - const ch = str.charCodeAt(pos2); + while (pos < max) { + const ch = str.charCodeAt(pos); if (!isSpace(ch)) { break; } - pos2++; + pos++; } - if (pos2 < max && str.charCodeAt(pos2) !== 10) { + if (pos < max && str.charCodeAt(pos) !== 10) { if (title) { title = ""; - pos2 = destEndPos; + pos = destEndPos; nextLine = destEndLineNo; - while (pos2 < max) { - const ch = str.charCodeAt(pos2); + while (pos < max) { + const ch = str.charCodeAt(pos); if (!isSpace(ch)) { break; } - pos2++; + pos++; } } } - if (pos2 < max && str.charCodeAt(pos2) !== 10) { + if (pos < max && str.charCodeAt(pos) !== 10) { return false; } const label5 = normalizeReference(str.slice(1, labelEnd)); @@ -187622,7 +188927,7 @@ const HTML_SEQUENCES = [ [new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + "\\s*$"), /^$/, false] ]; function html_block(state, startLine, endLine, silent) { - let pos2 = state.bMarks[startLine] + state.tShift[startLine]; + let pos = state.bMarks[startLine] + state.tShift[startLine]; let max = state.eMarks[startLine]; if (state.sCount[startLine] - state.blkIndent >= 4) { return false; @@ -187630,10 +188935,10 @@ function html_block(state, startLine, endLine, silent) { if (!state.md.options.html) { return false; } - if (state.src.charCodeAt(pos2) !== 60) { + if (state.src.charCodeAt(pos) !== 60) { return false; } - let lineText = state.src.slice(pos2, max); + let lineText = state.src.slice(pos, max); let i2 = 0; for (; i2 < HTML_SEQUENCES.length; i2++) { if (HTML_SEQUENCES[i2][0].test(lineText)) { @@ -187652,9 +188957,9 @@ function html_block(state, startLine, endLine, silent) { if (state.sCount[nextLine] < state.blkIndent) { break; } - pos2 = state.bMarks[nextLine] + state.tShift[nextLine]; + pos = state.bMarks[nextLine] + state.tShift[nextLine]; max = state.eMarks[nextLine]; - lineText = state.src.slice(pos2, max); + lineText = state.src.slice(pos, max); if (HTML_SEQUENCES[i2][1].test(lineText)) { if (lineText.length !== 0) { nextLine++; @@ -187671,30 +188976,30 @@ function html_block(state, startLine, endLine, silent) { } __name(html_block, "html_block"); function heading(state, startLine, endLine, silent) { - let pos2 = state.bMarks[startLine] + state.tShift[startLine]; + let pos = state.bMarks[startLine] + state.tShift[startLine]; let max = state.eMarks[startLine]; if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } - let ch = state.src.charCodeAt(pos2); - if (ch !== 35 || pos2 >= max) { + let ch = state.src.charCodeAt(pos); + if (ch !== 35 || pos >= max) { return false; } let level = 1; - ch = state.src.charCodeAt(++pos2); - while (ch === 35 && pos2 < max && level <= 6) { + ch = state.src.charCodeAt(++pos); + while (ch === 35 && pos < max && level <= 6) { level++; - ch = state.src.charCodeAt(++pos2); + ch = state.src.charCodeAt(++pos); } - if (level > 6 || pos2 < max && !isSpace(ch)) { + if (level > 6 || pos < max && !isSpace(ch)) { return false; } if (silent) { return true; } - max = state.skipSpacesBack(max, pos2); - const tmp = state.skipCharsBack(max, 35, pos2); - if (tmp > pos2 && isSpace(state.src.charCodeAt(tmp - 1))) { + max = state.skipSpacesBack(max, pos); + const tmp = state.skipCharsBack(max, 35, pos); + if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) { max = tmp; } state.line = startLine + 1; @@ -187702,7 +189007,7 @@ function heading(state, startLine, endLine, silent) { token_o.markup = "########".slice(0, level); token_o.map = [startLine, state.line]; const token_i = state.push("inline", "", 0); - token_i.content = state.src.slice(pos2, max).trim(); + token_i.content = state.src.slice(pos, max).trim(); token_i.map = [startLine, state.line]; token_i.children = []; const token_c = state.push("heading_close", "h" + String(level), -1); @@ -187725,14 +189030,14 @@ function lheading(state, startLine, endLine) { continue; } if (state.sCount[nextLine] >= state.blkIndent) { - let pos2 = state.bMarks[nextLine] + state.tShift[nextLine]; + let pos = state.bMarks[nextLine] + state.tShift[nextLine]; const max = state.eMarks[nextLine]; - if (pos2 < max) { - marker = state.src.charCodeAt(pos2); + if (pos < max) { + marker = state.src.charCodeAt(pos); if (marker === 45 || marker === 61) { - pos2 = state.skipChars(pos2, marker); - pos2 = state.skipSpaces(pos2); - if (pos2 >= max) { + pos = state.skipChars(pos, marker); + pos = state.skipSpaces(pos); + if (pos >= max) { level = marker === 61 ? 1 : 2; break; } @@ -187932,12 +189237,12 @@ StateInline.prototype.scanDelims = function(start2, canSplitWord) { const max = this.posMax; const marker = this.src.charCodeAt(start2); const lastChar = start2 > 0 ? this.src.charCodeAt(start2 - 1) : 32; - let pos2 = start2; - while (pos2 < max && this.src.charCodeAt(pos2) === marker) { - pos2++; + let pos = start2; + while (pos < max && this.src.charCodeAt(pos) === marker) { + pos++; } - const count = pos2 - start2; - const nextChar = pos2 < max ? this.src.charCodeAt(pos2) : 32; + const count = pos - start2; + const nextChar = pos < max ? this.src.charCodeAt(pos) : 32; const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar)); const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar)); const isLastWhiteSpace = isWhiteSpace(lastChar); @@ -187981,17 +189286,17 @@ function isTerminatorChar(ch) { } __name(isTerminatorChar, "isTerminatorChar"); function text(state, silent) { - let pos2 = state.pos; - while (pos2 < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos2))) { - pos2++; + let pos = state.pos; + while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) { + pos++; } - if (pos2 === state.pos) { + if (pos === state.pos) { return false; } if (!silent) { - state.pending += state.src.slice(state.pos, pos2); + state.pending += state.src.slice(state.pos, pos); } - state.pos = pos2; + state.pos = pos; return true; } __name(text, "text"); @@ -187999,16 +189304,16 @@ const SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i; function linkify(state, silent) { if (!state.md.options.linkify) return false; if (state.linkLevel > 0) return false; - const pos2 = state.pos; + const pos = state.pos; const max = state.posMax; - if (pos2 + 3 > max) return false; - if (state.src.charCodeAt(pos2) !== 58) return false; - if (state.src.charCodeAt(pos2 + 1) !== 47) return false; - if (state.src.charCodeAt(pos2 + 2) !== 47) return false; + if (pos + 3 > max) return false; + if (state.src.charCodeAt(pos) !== 58) return false; + if (state.src.charCodeAt(pos + 1) !== 47) return false; + if (state.src.charCodeAt(pos + 2) !== 47) return false; const match2 = state.pending.match(SCHEME_RE); if (!match2) return false; const proto = match2[1]; - const link2 = state.md.linkify.matchAtStart(state.src.slice(pos2 - proto.length)); + const link2 = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length)); if (!link2) return false; let url = link2.url; if (url.length <= proto.length) return false; @@ -188032,8 +189337,8 @@ function linkify(state, silent) { } __name(linkify, "linkify"); function newline(state, silent) { - let pos2 = state.pos; - if (state.src.charCodeAt(pos2) !== 10) { + let pos = state.pos; + if (state.src.charCodeAt(pos) !== 10) { return false; } const pmax = state.pending.length - 1; @@ -188053,11 +189358,11 @@ function newline(state, silent) { state.push("softbreak", "br", 0); } } - pos2++; - while (pos2 < max && isSpace(state.src.charCodeAt(pos2))) { - pos2++; + pos++; + while (pos < max && isSpace(state.src.charCodeAt(pos))) { + pos++; } - state.pos = pos2; + state.pos = pos; return true; } __name(newline, "newline"); @@ -188069,31 +189374,31 @@ for (let i2 = 0; i2 < 256; i2++) { ESCAPED[ch.charCodeAt(0)] = 1; }); function escape$1(state, silent) { - let pos2 = state.pos; + let pos = state.pos; const max = state.posMax; - if (state.src.charCodeAt(pos2) !== 92) return false; - pos2++; - if (pos2 >= max) return false; - let ch1 = state.src.charCodeAt(pos2); + if (state.src.charCodeAt(pos) !== 92) return false; + pos++; + if (pos >= max) return false; + let ch1 = state.src.charCodeAt(pos); if (ch1 === 10) { if (!silent) { state.push("hardbreak", "br", 0); } - pos2++; - while (pos2 < max) { - ch1 = state.src.charCodeAt(pos2); + pos++; + while (pos < max) { + ch1 = state.src.charCodeAt(pos); if (!isSpace(ch1)) break; - pos2++; + pos++; } - state.pos = pos2; + state.pos = pos; return true; } - let escapedStr = state.src[pos2]; - if (ch1 >= 55296 && ch1 <= 56319 && pos2 + 1 < max) { - const ch2 = state.src.charCodeAt(pos2 + 1); + let escapedStr = state.src[pos]; + if (ch1 >= 55296 && ch1 <= 56319 && pos + 1 < max) { + const ch2 = state.src.charCodeAt(pos + 1); if (ch2 >= 56320 && ch2 <= 57343) { - escapedStr += state.src[pos2 + 1]; - pos2++; + escapedStr += state.src[pos + 1]; + pos++; } } const origStr = "\\" + escapedStr; @@ -188107,30 +189412,30 @@ function escape$1(state, silent) { token.markup = origStr; token.info = "escape"; } - state.pos = pos2 + 1; + state.pos = pos + 1; return true; } __name(escape$1, "escape$1"); function backtick(state, silent) { - let pos2 = state.pos; - const ch = state.src.charCodeAt(pos2); + let pos = state.pos; + const ch = state.src.charCodeAt(pos); if (ch !== 96) { return false; } - const start2 = pos2; - pos2++; + const start2 = pos; + pos++; const max = state.posMax; - while (pos2 < max && state.src.charCodeAt(pos2) === 96) { - pos2++; + while (pos < max && state.src.charCodeAt(pos) === 96) { + pos++; } - const marker = state.src.slice(start2, pos2); + const marker = state.src.slice(start2, pos); const openerLength = marker.length; if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start2) { if (!silent) state.pending += marker; state.pos += openerLength; return true; } - let matchEnd = pos2; + let matchEnd = pos; let matchStart; while ((matchStart = state.src.indexOf("`", matchEnd)) !== -1) { matchEnd = matchStart + 1; @@ -188142,7 +189447,7 @@ function backtick(state, silent) { if (!silent) { const token = state.push("code_inline", "code", 0); token.markup = marker; - token.content = state.src.slice(pos2, matchStart).replace(/\n/g, " ").replace(/^ (.+) $/, "$1"); + token.content = state.src.slice(pos, matchStart).replace(/\n/g, " ").replace(/^ (.+) $/, "$1"); } state.pos = matchEnd; return true; @@ -188356,66 +189661,66 @@ function link(state, silent) { if (labelEnd < 0) { return false; } - let pos2 = labelEnd + 1; - if (pos2 < max && state.src.charCodeAt(pos2) === 40) { + let pos = labelEnd + 1; + if (pos < max && state.src.charCodeAt(pos) === 40) { parseReference = false; - pos2++; - for (; pos2 < max; pos2++) { - code2 = state.src.charCodeAt(pos2); + pos++; + for (; pos < max; pos++) { + code2 = state.src.charCodeAt(pos); if (!isSpace(code2) && code2 !== 10) { break; } } - if (pos2 >= max) { + if (pos >= max) { return false; } - start2 = pos2; - res = state.md.helpers.parseLinkDestination(state.src, pos2, state.posMax); + start2 = pos; + res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax); if (res.ok) { href = state.md.normalizeLink(res.str); if (state.md.validateLink(href)) { - pos2 = res.pos; + pos = res.pos; } else { href = ""; } - start2 = pos2; - for (; pos2 < max; pos2++) { - code2 = state.src.charCodeAt(pos2); + start2 = pos; + for (; pos < max; pos++) { + code2 = state.src.charCodeAt(pos); if (!isSpace(code2) && code2 !== 10) { break; } } - res = state.md.helpers.parseLinkTitle(state.src, pos2, state.posMax); - if (pos2 < max && start2 !== pos2 && res.ok) { + res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax); + if (pos < max && start2 !== pos && res.ok) { title = res.str; - pos2 = res.pos; - for (; pos2 < max; pos2++) { - code2 = state.src.charCodeAt(pos2); + pos = res.pos; + for (; pos < max; pos++) { + code2 = state.src.charCodeAt(pos); if (!isSpace(code2) && code2 !== 10) { break; } } } } - if (pos2 >= max || state.src.charCodeAt(pos2) !== 41) { + if (pos >= max || state.src.charCodeAt(pos) !== 41) { parseReference = true; } - pos2++; + pos++; } if (parseReference) { if (typeof state.env.references === "undefined") { return false; } - if (pos2 < max && state.src.charCodeAt(pos2) === 91) { - start2 = pos2 + 1; - pos2 = state.md.helpers.parseLinkLabel(state, pos2); - if (pos2 >= 0) { - label5 = state.src.slice(start2, pos2++); + if (pos < max && state.src.charCodeAt(pos) === 91) { + start2 = pos + 1; + pos = state.md.helpers.parseLinkLabel(state, pos); + if (pos >= 0) { + label5 = state.src.slice(start2, pos++); } else { - pos2 = labelEnd + 1; + pos = labelEnd + 1; } } else { - pos2 = labelEnd + 1; + pos = labelEnd + 1; } if (!label5) { label5 = state.src.slice(labelStart, labelEnd); @@ -188442,13 +189747,13 @@ function link(state, silent) { state.linkLevel--; state.push("link_close", "a", -1); } - state.pos = pos2; + state.pos = pos; state.posMax = max; return true; } __name(link, "link"); function image(state, silent) { - let code2, content2, label5, pos2, ref2, res, title, start2; + let code2, content2, label5, pos, ref2, res, title, start2; let href = ""; const oldPos = state.pos; const max = state.posMax; @@ -188463,41 +189768,41 @@ function image(state, silent) { if (labelEnd < 0) { return false; } - pos2 = labelEnd + 1; - if (pos2 < max && state.src.charCodeAt(pos2) === 40) { - pos2++; - for (; pos2 < max; pos2++) { - code2 = state.src.charCodeAt(pos2); + pos = labelEnd + 1; + if (pos < max && state.src.charCodeAt(pos) === 40) { + pos++; + for (; pos < max; pos++) { + code2 = state.src.charCodeAt(pos); if (!isSpace(code2) && code2 !== 10) { break; } } - if (pos2 >= max) { + if (pos >= max) { return false; } - start2 = pos2; - res = state.md.helpers.parseLinkDestination(state.src, pos2, state.posMax); + start2 = pos; + res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax); if (res.ok) { href = state.md.normalizeLink(res.str); if (state.md.validateLink(href)) { - pos2 = res.pos; + pos = res.pos; } else { href = ""; } } - start2 = pos2; - for (; pos2 < max; pos2++) { - code2 = state.src.charCodeAt(pos2); + start2 = pos; + for (; pos < max; pos++) { + code2 = state.src.charCodeAt(pos); if (!isSpace(code2) && code2 !== 10) { break; } } - res = state.md.helpers.parseLinkTitle(state.src, pos2, state.posMax); - if (pos2 < max && start2 !== pos2 && res.ok) { + res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax); + if (pos < max && start2 !== pos && res.ok) { title = res.str; - pos2 = res.pos; - for (; pos2 < max; pos2++) { - code2 = state.src.charCodeAt(pos2); + pos = res.pos; + for (; pos < max; pos++) { + code2 = state.src.charCodeAt(pos); if (!isSpace(code2) && code2 !== 10) { break; } @@ -188505,25 +189810,25 @@ function image(state, silent) { } else { title = ""; } - if (pos2 >= max || state.src.charCodeAt(pos2) !== 41) { + if (pos >= max || state.src.charCodeAt(pos) !== 41) { state.pos = oldPos; return false; } - pos2++; + pos++; } else { if (typeof state.env.references === "undefined") { return false; } - if (pos2 < max && state.src.charCodeAt(pos2) === 91) { - start2 = pos2 + 1; - pos2 = state.md.helpers.parseLinkLabel(state, pos2); - if (pos2 >= 0) { - label5 = state.src.slice(start2, pos2++); + if (pos < max && state.src.charCodeAt(pos) === 91) { + start2 = pos + 1; + pos = state.md.helpers.parseLinkLabel(state, pos); + if (pos >= 0) { + label5 = state.src.slice(start2, pos++); } else { - pos2 = labelEnd + 1; + pos = labelEnd + 1; } } else { - pos2 = labelEnd + 1; + pos = labelEnd + 1; } if (!label5) { label5 = state.src.slice(labelStart, labelEnd); @@ -188554,7 +189859,7 @@ function image(state, silent) { attrs6.push(["title", title]); } } - state.pos = pos2; + state.pos = pos; state.posMax = max; return true; } @@ -188562,19 +189867,19 @@ __name(image, "image"); const EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/; const AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/; function autolink(state, silent) { - let pos2 = state.pos; - if (state.src.charCodeAt(pos2) !== 60) { + let pos = state.pos; + if (state.src.charCodeAt(pos) !== 60) { return false; } const start2 = state.pos; const max = state.posMax; for (; ; ) { - if (++pos2 >= max) return false; - const ch = state.src.charCodeAt(pos2); + if (++pos >= max) return false; + const ch = state.src.charCodeAt(pos); if (ch === 60) return false; if (ch === 62) break; } - const url = state.src.slice(start2 + 1, pos2); + const url = state.src.slice(start2 + 1, pos); if (AUTOLINK_RE.test(url)) { const fullUrl = state.md.normalizeLink(url); if (!state.md.validateLink(fullUrl)) { @@ -188634,15 +189939,15 @@ function html_inline(state, silent) { return false; } const max = state.posMax; - const pos2 = state.pos; - if (state.src.charCodeAt(pos2) !== 60 || pos2 + 2 >= max) { + const pos = state.pos; + if (state.src.charCodeAt(pos) !== 60 || pos + 2 >= max) { return false; } - const ch = state.src.charCodeAt(pos2 + 1); + const ch = state.src.charCodeAt(pos + 1); if (ch !== 33 && ch !== 63 && ch !== 47 && !isLetter(ch)) { return false; } - const match2 = state.src.slice(pos2).match(HTML_TAG_RE); + const match2 = state.src.slice(pos).match(HTML_TAG_RE); if (!match2) { return false; } @@ -188659,13 +189964,13 @@ __name(html_inline, "html_inline"); const DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i; const NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i; function entity(state, silent) { - const pos2 = state.pos; + const pos = state.pos; const max = state.posMax; - if (state.src.charCodeAt(pos2) !== 38) return false; - if (pos2 + 1 >= max) return false; - const ch = state.src.charCodeAt(pos2 + 1); + if (state.src.charCodeAt(pos) !== 38) return false; + if (pos + 1 >= max) return false; + const ch = state.src.charCodeAt(pos + 1); if (ch === 35) { - const match2 = state.src.slice(pos2).match(DIGITAL_RE); + const match2 = state.src.slice(pos).match(DIGITAL_RE); if (match2) { if (!silent) { const code2 = match2[1][0].toLowerCase() === "x" ? parseInt(match2[1].slice(1), 16) : parseInt(match2[1], 10); @@ -188678,7 +189983,7 @@ function entity(state, silent) { return true; } } else { - const match2 = state.src.slice(pos2).match(NAMED_RE); + const match2 = state.src.slice(pos).match(NAMED_RE); if (match2) { const decoded = decodeHTML(match2[0]); if (decoded !== match2[0]) { @@ -188817,13 +190122,13 @@ function ParserInline() { } __name(ParserInline, "ParserInline"); ParserInline.prototype.skipToken = function(state) { - const pos2 = state.pos; + const pos = state.pos; const rules = this.ruler.getRules(""); const len = rules.length; const maxNesting = state.md.options.maxNesting; const cache2 = state.cache; - if (typeof cache2[pos2] !== "undefined") { - state.pos = cache2[pos2]; + if (typeof cache2[pos] !== "undefined") { + state.pos = cache2[pos]; return; } let ok = false; @@ -188833,7 +190138,7 @@ ParserInline.prototype.skipToken = function(state) { ok = rules[i2](state, true); state.level--; if (ok) { - if (pos2 >= state.pos) { + if (pos >= state.pos) { throw new Error("inline rule didn't increment state.pos"); } break; @@ -188845,7 +190150,7 @@ ParserInline.prototype.skipToken = function(state) { if (!ok) { state.pos++; } - cache2[pos2] = state.pos; + cache2[pos] = state.pos; }; ParserInline.prototype.tokenize = function(state) { const rules = this.ruler.getRules(""); @@ -188979,8 +190284,8 @@ function isOptionsObj(obj) { __name(isOptionsObj, "isOptionsObj"); const defaultSchemas = { "http:": { - validate: /* @__PURE__ */ __name(function(text2, pos2, self2) { - const tail = text2.slice(pos2); + validate: /* @__PURE__ */ __name(function(text2, pos, self2) { + const tail = text2.slice(pos); if (!self2.re.http) { self2.re.http = new RegExp( "^\\/\\/" + self2.re.src_auth + self2.re.src_host_port_strict + self2.re.src_path, @@ -188996,8 +190301,8 @@ const defaultSchemas = { "https:": "http:", "ftp:": "http:", "//": { - validate: /* @__PURE__ */ __name(function(text2, pos2, self2) { - const tail = text2.slice(pos2); + validate: /* @__PURE__ */ __name(function(text2, pos, self2) { + const tail = text2.slice(pos); if (!self2.re.no_http) { self2.re.no_http = new RegExp( "^" + self2.re.src_auth + // Don't allow single-level domains, because of false positives like '//test' @@ -189007,10 +190312,10 @@ const defaultSchemas = { ); } if (self2.re.no_http.test(tail)) { - if (pos2 >= 3 && text2[pos2 - 3] === ":") { + if (pos >= 3 && text2[pos - 3] === ":") { return 0; } - if (pos2 >= 3 && text2[pos2 - 3] === "/") { + if (pos >= 3 && text2[pos - 3] === "/") { return 0; } return tail.match(self2.re.no_http)[0].length; @@ -189019,8 +190324,8 @@ const defaultSchemas = { }, "validate") }, "mailto:": { - validate: /* @__PURE__ */ __name(function(text2, pos2, self2) { - const tail = text2.slice(pos2); + validate: /* @__PURE__ */ __name(function(text2, pos, self2) { + const tail = text2.slice(pos); if (!self2.re.mailto) { self2.re.mailto = new RegExp( "^" + self2.re.src_email_name + "@" + self2.re.src_host_strict, @@ -189042,8 +190347,8 @@ function resetScanCache(self2) { } __name(resetScanCache, "resetScanCache"); function createValidator(re) { - return function(text2, pos2) { - const tail = text2.slice(pos2); + return function(text2, pos) { + const tail = text2.slice(pos); if (re.test(tail)) { return tail.match(re)[0].length; } @@ -189235,11 +190540,11 @@ LinkifyIt.prototype.test = /* @__PURE__ */ __name(function test2(text2) { LinkifyIt.prototype.pretest = /* @__PURE__ */ __name(function pretest(text2) { return this.re.pretest.test(text2); }, "pretest"); -LinkifyIt.prototype.testSchemaAt = /* @__PURE__ */ __name(function testSchemaAt(text2, schema2, pos2) { +LinkifyIt.prototype.testSchemaAt = /* @__PURE__ */ __name(function testSchemaAt(text2, schema2, pos) { if (!this.__compiled__[schema2.toLowerCase()]) { return 0; } - return this.__compiled__[schema2.toLowerCase()].validate(text2, pos2, this); + return this.__compiled__[schema2.toLowerCase()].validate(text2, pos, this); }, "testSchemaAt"); LinkifyIt.prototype.match = /* @__PURE__ */ __name(function match(text2) { const result = []; @@ -190821,13 +192126,13 @@ const MarkdownTightLists = Extension.create({ } }); const md = MarkdownIt(); -function scanDelims(text2, pos2) { +function scanDelims(text2, pos) { md.inline.State.prototype.scanDelims.call({ src: text2, posMax: text2.length }); const state = new md.inline.State(text2, null, null, []); - return state.scanDelims(pos2, true); + return state.scanDelims(pos, true); } __name(scanDelims, "scanDelims"); function shiftDelim(text2, delim, start2, offset) { @@ -190837,34 +192142,34 @@ function shiftDelim(text2, delim, start2, offset) { } __name(shiftDelim, "shiftDelim"); function trimStart(text2, delim, from2, to) { - let pos2 = from2, res = text2; - while (pos2 < to) { - if (scanDelims(res, pos2).can_open) { + let pos = from2, res = text2; + while (pos < to) { + if (scanDelims(res, pos).can_open) { break; } - res = shiftDelim(res, delim, pos2, 1); - pos2++; + res = shiftDelim(res, delim, pos, 1); + pos++; } return { text: res, - from: pos2, + from: pos, to }; } __name(trimStart, "trimStart"); function trimEnd(text2, delim, from2, to) { - let pos2 = to, res = text2; - while (pos2 > from2) { - if (scanDelims(res, pos2).can_close) { + let pos = to, res = text2; + while (pos > from2) { + if (scanDelims(res, pos).can_close) { break; } - res = shiftDelim(res, delim, pos2, -1); - pos2--; + res = shiftDelim(res, delim, pos, -1); + pos--; } return { text: res, from: from2, - to: pos2 + to: pos }; } __name(trimEnd, "trimEnd"); @@ -191794,6 +193099,202 @@ const Markdown = Extension.create({ })]; } }); +function addMarkdownWidget(node3, name2, opts, app2) { + Markdown.configure({ + html: false, + breaks: true, + transformPastedText: true + }); + const editor = new Editor({ + extensions: [ + StarterKit, + Markdown, + Link$2, + Table$2, + TableCell, + TableHeader, + TableRow + ], + content: opts.defaultVal, + editable: false + }); + const inputEl = editor.options.element; + inputEl.classList.add("comfy-markdown"); + const textarea = document.createElement("textarea"); + inputEl.append(textarea); + const widget = node3.addDOMWidget(name2, "MARKDOWN", inputEl, { + getValue() { + return textarea.value; + }, + setValue(v2) { + textarea.value = v2; + editor.commands.setContent(v2); + } + }); + widget.inputEl = inputEl; + inputEl.addEventListener("pointerdown", (event) => { + if (event.button !== 0) { + app2.canvas.processMouseDown(event); + return; + } + if (event.target instanceof HTMLAnchorElement) { + return; + } + inputEl.classList.add("editing"); + setTimeout(() => { + textarea.focus(); + }, 0); + }); + textarea.addEventListener("blur", () => { + inputEl.classList.remove("editing"); + }); + textarea.addEventListener("change", () => { + editor.commands.setContent(textarea.value); + widget.callback?.(widget.value); + }); + inputEl.addEventListener("keydown", (event) => { + event.stopPropagation(); + }); + inputEl.addEventListener("pointerdown", (event) => { + if (event.button === 1) { + app2.canvas.processMouseDown(event); + } + }); + inputEl.addEventListener("pointermove", (event) => { + if ((event.buttons & 4) === 4) { + app2.canvas.processMouseMove(event); + } + }); + inputEl.addEventListener("pointerup", (event) => { + if (event.button === 1) { + app2.canvas.processMouseUp(event); + } + }); + return { minWidth: 400, minHeight: 200, widget }; +} +__name(addMarkdownWidget, "addMarkdownWidget"); +const useMarkdownWidget = /* @__PURE__ */ __name(() => { + const widgetConstructor = /* @__PURE__ */ __name((node3, inputName, inputData, app2) => { + const defaultVal = inputData[1]?.default || ""; + return addMarkdownWidget( + node3, + inputName, + { defaultVal, ...inputData[1] }, + app2 + ); + }, "widgetConstructor"); + return widgetConstructor; +}, "useMarkdownWidget"); +const useSeedWidget = /* @__PURE__ */ __name(() => { + const IntWidget = useIntWidget(); + const widgetConstructor = /* @__PURE__ */ __name((node3, inputName, inputData, app2, widgetName) => { + inputData[1] = { + ...inputData[1], + control_after_generate: true + }; + return IntWidget(node3, inputName, inputData, app2, widgetName); + }, "widgetConstructor"); + return widgetConstructor; +}, "useSeedWidget"); +function addMultilineWidget(node3, name2, opts, app2) { + const inputEl = document.createElement("textarea"); + inputEl.className = "comfy-multiline-input"; + inputEl.value = opts.defaultVal; + inputEl.placeholder = opts.placeholder || name2; + if (app2.vueAppReady) { + inputEl.spellcheck = useSettingStore().get( + "Comfy.TextareaWidget.Spellcheck" + ); + } + const widget = node3.addDOMWidget(name2, "customtext", inputEl, { + getValue() { + return inputEl.value; + }, + setValue(v2) { + inputEl.value = v2; + } + }); + widget.inputEl = inputEl; + inputEl.addEventListener("input", () => { + widget.callback?.(widget.value); + }); + inputEl.addEventListener("pointerdown", (event) => { + if (event.button === 1) { + app2.canvas.processMouseDown(event); + } + }); + inputEl.addEventListener("pointermove", (event) => { + if ((event.buttons & 4) === 4) { + app2.canvas.processMouseMove(event); + } + }); + inputEl.addEventListener("pointerup", (event) => { + if (event.button === 1) { + app2.canvas.processMouseUp(event); + } + }); + return { minWidth: 400, minHeight: 200, widget }; +} +__name(addMultilineWidget, "addMultilineWidget"); +const useStringWidget = /* @__PURE__ */ __name(() => { + const widgetConstructor = /* @__PURE__ */ __name((node3, inputName, inputData, app2) => { + const defaultVal = inputData[1]?.default || ""; + const multiline = !!inputData[1]?.multiline; + let res; + if (multiline) { + res = addMultilineWidget( + node3, + inputName, + { defaultVal, ...inputData[1] }, + app2 + ); + } else { + res = { + widget: node3.addWidget("text", inputName, defaultVal, () => { + }, {}) + }; + } + if (inputData[1]?.dynamicPrompts != void 0) + res.widget.dynamicPrompts = inputData[1].dynamicPrompts; + return res; + }, "widgetConstructor"); + return widgetConstructor; +}, "useStringWidget"); +function distributeSpace(totalSpace, requests) { + if (requests.length === 0) return []; + const totalMinSize = requests.reduce((sum, req) => sum + req.minSize, 0); + if (totalSpace < totalMinSize) { + return requests.map((req) => req.minSize); + } + let allocations = requests.map((req) => ({ + computedSize: req.minSize, + maxSize: req.maxSize ?? Infinity, + remaining: (req.maxSize ?? Infinity) - req.minSize + })); + let remainingSpace = totalSpace - totalMinSize; + while (remainingSpace > 0 && allocations.some((alloc) => alloc.remaining > 0)) { + const growableItems = allocations.filter( + (alloc) => alloc.remaining > 0 + ).length; + if (growableItems === 0) break; + const sharePerItem = remainingSpace / growableItems; + let spaceUsedThisRound = 0; + allocations = allocations.map((alloc) => { + if (alloc.remaining <= 0) return alloc; + const growth = Math.min(sharePerItem, alloc.remaining); + spaceUsedThisRound += growth; + return { + ...alloc, + computedSize: alloc.computedSize + growth, + remaining: alloc.remaining - growth + }; + }); + remainingSpace -= spaceUsedThisRound; + if (spaceUsedThisRound === 0) break; + } + return allocations.map(({ computedSize }) => computedSize); +} +__name(distributeSpace, "distributeSpace"); const SIZE = Symbol(); function intersect(a2, b2) { const x2 = Math.max(a2.x, b2.x); @@ -191806,7 +193307,7 @@ function intersect(a2, b2) { __name(intersect, "intersect"); function getClipPath(node3, element, canvasRect) { const selectedNode = Object.values( - app$1.canvas.selected_nodes + app$1.canvas.selected_nodes ?? {} )[0]; if (selectedNode && selectedNode !== node3) { const elRect = element.getBoundingClientRect(); @@ -191841,95 +193342,44 @@ function getClipPath(node3, element, canvasRect) { } __name(getClipPath, "getClipPath"); function computeSize(size) { - if (this.widgets?.[0]?.last_y == null) return; + if (!this.widgets?.[0]?.last_y) return; let y2 = this.widgets[0].last_y; let freeSpace = size[1] - y2; - let widgetHeight = 0; - let dom = []; + let fixedWidgetHeight = 0; + const layoutWidgets = []; for (const w2 of this.widgets) { if (w2.type === "converted-widget") { delete w2.computedHeight; - } else if (w2.computeSize) { - widgetHeight += w2.computeSize()[1] + 4; - } else if (w2.element) { - const styles = getComputedStyle(w2.element); - let minHeight = w2.options.getMinHeight?.() ?? parseInt(styles.getPropertyValue("--comfy-widget-min-height")); - let maxHeight = w2.options.getMaxHeight?.() ?? parseInt(styles.getPropertyValue("--comfy-widget-max-height")); - let prefHeight = w2.options.getHeight?.() ?? styles.getPropertyValue("--comfy-widget-height"); - if (prefHeight.endsWith?.("%")) { - prefHeight = size[1] * (parseFloat(prefHeight.substring(0, prefHeight.length - 1)) / 100); - } else { - prefHeight = parseInt(prefHeight); - if (isNaN(minHeight)) { - minHeight = prefHeight; - } - } - if (isNaN(minHeight)) { - minHeight = 50; - } - if (!isNaN(maxHeight)) { - if (!isNaN(prefHeight)) { - prefHeight = Math.min(prefHeight, maxHeight); - } else { - prefHeight = maxHeight; - } - } - dom.push({ + } else if (w2.computeLayoutSize) { + const { minHeight, maxHeight } = w2.computeLayoutSize(this); + layoutWidgets.push({ minHeight, - prefHeight, + prefHeight: maxHeight, w: w2 }); + } else if (w2.computeSize) { + fixedWidgetHeight += w2.computeSize()[1] + 4; } else { - widgetHeight += LiteGraph.NODE_WIDGET_HEIGHT + 4; + fixedWidgetHeight += LiteGraph.NODE_WIDGET_HEIGHT + 4; } } - freeSpace -= widgetHeight; - const prefGrow = []; - const canGrow = []; - let growBy = 0; - for (const d2 of dom) { - freeSpace -= d2.minHeight; - if (isNaN(d2.prefHeight)) { - canGrow.push(d2); - d2.w.computedHeight = d2.minHeight; - } else { - const diff2 = d2.prefHeight - d2.minHeight; - if (diff2 > 0) { - prefGrow.push(d2); - growBy += diff2; - d2.diff = diff2; - } else { - d2.w.computedHeight = d2.minHeight; - } - } - } - if (this.imgs && !this.widgets.find((w2) => w2.name === ANIM_PREVIEW_WIDGET)) { - freeSpace -= 220; + if (this.imgs && !this.widgets?.find((w2) => w2.name === ANIM_PREVIEW_WIDGET)) { + fixedWidgetHeight += 220; } + freeSpace -= fixedWidgetHeight; this.freeWidgetSpace = freeSpace; - if (freeSpace < 0) { - size[1] -= freeSpace; - this.graph.setDirtyCanvas(true); - } else { - const growDiff = freeSpace - growBy; - if (growDiff > 0) { - freeSpace = growDiff; - for (const d2 of prefGrow) { - d2.w.computedHeight = d2.prefHeight; - } - } else { - const shared = -growDiff / prefGrow.length; - for (const d2 of prefGrow) { - d2.w.computedHeight = d2.prefHeight - shared; - } - freeSpace = 0; - } - if (freeSpace > 0 && canGrow.length) { - const shared = freeSpace / canGrow.length; - for (const d2 of canGrow) { - d2.w.computedHeight += shared; - } - } + const spaceRequests = layoutWidgets.map((d2) => ({ + minSize: d2.minHeight, + maxSize: d2.prefHeight + })); + const allocations = distributeSpace(Math.max(0, freeSpace), spaceRequests); + layoutWidgets.forEach((d2, i2) => { + d2.w.computedHeight = allocations[i2]; + }); + const totalNeeded = fixedWidgetHeight + allocations.reduce((sum, h2) => sum + h2, 0); + if (totalNeeded > size[1] - this.widgets[0].last_y) { + size[1] = totalNeeded + this.widgets[0].last_y; + this.graph?.setDirtyCanvas(true); } for (const w2 of this.widgets) { w2.y = y2; @@ -191945,12 +193395,12 @@ function computeSize(size) { __name(computeSize, "computeSize"); const elementWidgets = /* @__PURE__ */ new Set(); const computeVisibleNodes = LGraphCanvas.prototype.computeVisibleNodes; -LGraphCanvas.prototype.computeVisibleNodes = function() { - const visibleNodes = computeVisibleNodes.apply(this, arguments); +LGraphCanvas.prototype.computeVisibleNodes = function(nodes, out) { + const visibleNodes = computeVisibleNodes.call(this, nodes, out); for (const node3 of app$1.graph.nodes) { if (elementWidgets.has(node3)) { const hidden = visibleNodes.indexOf(node3) === -1; - for (const w2 of node3.widgets) { + for (const w2 of node3.widgets ?? []) { if (w2.element) { w2.element.dataset.isInVisibleNodes = hidden ? "false" : "true"; const shouldOtherwiseHide = w2.element.dataset.shouldHide === "true"; @@ -191958,7 +193408,7 @@ LGraphCanvas.prototype.computeVisibleNodes = function() { const wasHidden = w2.element.hidden; const actualHidden = hidden || shouldOtherwiseHide || isCollapsed; w2.element.hidden = actualHidden; - w2.element.style.display = actualHidden ? "none" : null; + w2.element.style.display = actualHidden ? "none" : ""; if (actualHidden && !wasHidden) { w2.options.onHide?.(w2); } @@ -191968,6 +193418,108 @@ LGraphCanvas.prototype.computeVisibleNodes = function() { } return visibleNodes; }; +class DOMWidgetImpl { + static { + __name(this, "DOMWidgetImpl"); + } + type; + name; + element; + options; + computedHeight; + callback; + mouseDownHandler; + constructor(name2, type, element, options4 = {}) { + this.type = type; + this.name = name2; + this.element = element; + this.options = options4; + if (element.blur) { + this.mouseDownHandler = (event) => { + if (!element.contains(event.target)) { + element.blur(); + } + }; + document.addEventListener("mousedown", this.mouseDownHandler); + } + } + get value() { + return this.options.getValue?.() ?? ""; + } + set value(v2) { + this.options.setValue?.(v2); + this.callback?.(this.value); + } + /** Extract DOM widget size info */ + computeLayoutSize(node3) { + const styles = getComputedStyle(this.element); + let minHeight = this.options.getMinHeight?.() ?? parseInt(styles.getPropertyValue("--comfy-widget-min-height")); + let maxHeight = this.options.getMaxHeight?.() ?? parseInt(styles.getPropertyValue("--comfy-widget-max-height")); + let prefHeight = this.options.getHeight?.() ?? styles.getPropertyValue("--comfy-widget-height"); + if (typeof prefHeight === "string" && prefHeight.endsWith?.("%")) { + prefHeight = node3.size[1] * (parseFloat(prefHeight.substring(0, prefHeight.length - 1)) / 100); + } else { + prefHeight = typeof prefHeight === "number" ? prefHeight : parseInt(prefHeight); + if (isNaN(minHeight)) { + minHeight = prefHeight; + } + } + return { + minHeight: isNaN(minHeight) ? 50 : minHeight, + maxHeight: isNaN(maxHeight) ? void 0 : maxHeight, + minWidth: 0 + }; + } + draw(ctx, node3, widgetWidth, y2) { + if (this.computedHeight == null) { + computeSize.call(node3, node3.size); + } + const { offset, scale } = app$1.canvas.ds; + const hidden = !!this.options.hideOnZoom && app$1.canvas.low_quality || (this.computedHeight ?? 0) <= 0 || // @ts-expect-error custom widget type + this.type === "converted-widget" || // @ts-expect-error custom widget type + this.type === "hidden"; + this.element.dataset.shouldHide = hidden ? "true" : "false"; + const isInVisibleNodes = this.element.dataset.isInVisibleNodes === "true"; + const isCollapsed = this.element.dataset.collapsed === "true"; + const actualHidden = hidden || !isInVisibleNodes || isCollapsed; + const wasHidden = this.element.hidden; + this.element.hidden = actualHidden; + this.element.style.display = actualHidden ? "none" : ""; + if (actualHidden && !wasHidden) { + this.options.onHide?.(this); + } + if (actualHidden) { + return; + } + const elRect = ctx.canvas.getBoundingClientRect(); + const margin = 10; + const top = node3.pos[0] + offset[0] + margin; + const left = node3.pos[1] + offset[1] + margin + y2; + Object.assign(this.element.style, { + transformOrigin: "0 0", + transform: `scale(${scale})`, + left: `${top * scale}px`, + top: `${left * scale}px`, + width: `${widgetWidth - margin * 2}px`, + height: `${(this.computedHeight ?? 50) - margin * 2}px`, + position: "absolute", + zIndex: app$1.graph.nodes.indexOf(node3), + pointerEvents: app$1.canvas.read_only ? "none" : "auto" + }); + if (useSettingStore().get("Comfy.DOMClippingEnabled")) { + const clipPath = getClipPath(node3, this.element, elRect); + this.element.style.clipPath = clipPath ?? "none"; + this.element.style.willChange = "clip-path"; + } + this.options.onDraw?.(this); + } + onRemove() { + if (this.mouseDownHandler) { + document.removeEventListener("mousedown", this.mouseDownHandler); + } + this.element.remove(); + } +} LGraphNode.prototype.addDOMWidget = function(name2, type, element, options4 = {}) { options4 = { hideOnZoom: true, selectOn: ["focus", "click"], ...options4 }; if (!element.parentElement) { @@ -191975,167 +193527,90 @@ LGraphNode.prototype.addDOMWidget = function(name2, type, element, options4 = {} } element.hidden = true; element.style.display = "none"; - let mouseDownHandler; - if (element.blur) { - mouseDownHandler = /* @__PURE__ */ __name((event) => { - if (!element.contains(event.target)) { - element.blur(); - } - }, "mouseDownHandler"); - document.addEventListener("mousedown", mouseDownHandler); - } const { nodeData } = this.constructor; const tooltip = (nodeData?.input.required?.[name2] ?? nodeData?.input.optional?.[name2])?.[1]?.tooltip; if (tooltip && !element.title) { element.title = tooltip; } - const widget2 = { - // @ts-expect-error All unrecognized types will be treated the same way as 'custom' - // in litegraph internally. - type, - name: name2, - get value() { - return options4.getValue?.() ?? void 0; + const widget = new DOMWidgetImpl(name2, type, element, options4); + Object.defineProperty(widget, "value", { + get() { + return this.options.getValue?.() ?? ""; }, - set value(v2) { - options4.setValue?.(v2); - widget2.callback?.(widget2.value); - }, - draw: /* @__PURE__ */ __name(function(ctx, node3, widgetWidth, y2, widgetHeight) { - if (widget2.computedHeight == null) { - computeSize.call(node3, node3.size); - } - const { offset, scale } = app$1.canvas.ds; - const hidden = !!options4.hideOnZoom && scale < 0.5 || widget2.computedHeight <= 0 || // @ts-expect-error Used by widgetInputs.ts - widget2.type === "converted-widget" || // @ts-expect-error Used by groupNode.ts - widget2.type === "hidden"; - element.dataset.shouldHide = hidden ? "true" : "false"; - const isInVisibleNodes = element.dataset.isInVisibleNodes === "true"; - const isCollapsed = element.dataset.collapsed === "true"; - const actualHidden = hidden || !isInVisibleNodes || isCollapsed; - const wasHidden = element.hidden; - element.hidden = actualHidden; - element.style.display = actualHidden ? "none" : null; - if (actualHidden && !wasHidden) { - widget2.options.onHide?.(widget2); - } - if (actualHidden) { - return; - } - const elRect = ctx.canvas.getBoundingClientRect(); - const margin = 10; - const top = node3.pos[0] + offset[0] + margin; - const left = node3.pos[1] + offset[1] + margin + y2; - Object.assign(element.style, { - transformOrigin: "0 0", - transform: `scale(${scale})`, - left: `${top * scale}px`, - top: `${left * scale}px`, - width: `${widgetWidth - margin * 2}px`, - height: `${(widget2.computedHeight ?? 50) - margin * 2}px`, - position: "absolute", - zIndex: app$1.graph.nodes.indexOf(node3), - pointerEvents: app$1.canvas.read_only ? "none" : "auto" - }); - if (useSettingStore().get("Comfy.DOMClippingEnabled")) { - element.style.clipPath = getClipPath(node3, element, elRect); - element.style.willChange = "clip-path"; - } - this.options.onDraw?.(widget2); - }, "draw"), - element, - options: options4, - onRemove() { - if (mouseDownHandler) { - document.removeEventListener("mousedown", mouseDownHandler); - } - element.remove(); + set(v2) { + this.options.setValue?.(v2); + this.callback?.(this.value); } - }; - for (const evt of options4.selectOn) { + }); + const selectEvents = options4.selectOn ?? ["focus", "click"]; + for (const evt of selectEvents) { element.addEventListener(evt, () => { app$1.canvas.selectNode(this); app$1.canvas.bringToFront(this); }); } - this.addCustomWidget(widget2); + this.addCustomWidget(widget); elementWidgets.add(this); const collapse = this.collapse; - this.collapse = function() { - collapse.apply(this, arguments); - if (this.flags?.collapsed) { + this.collapse = function(force) { + collapse.call(this, force); + if (this.collapsed) { element.hidden = true; element.style.display = "none"; } - element.dataset.collapsed = this.flags?.collapsed ? "true" : "false"; + element.dataset.collapsed = this.collapsed ? "true" : "false"; }; const { onConfigure } = this; - this.onConfigure = function() { - onConfigure?.apply(this, arguments); - element.dataset.collapsed = this.flags?.collapsed ? "true" : "false"; + this.onConfigure = function(serializedNode) { + onConfigure?.call(this, serializedNode); + element.dataset.collapsed = this.collapsed ? "true" : "false"; }; const onRemoved = this.onRemoved; this.onRemoved = function() { element.remove(); elementWidgets.delete(this); - onRemoved?.apply(this, arguments); + onRemoved?.call(this); }; if (!this[SIZE]) { this[SIZE] = true; const onResize2 = this.onResize; this.onResize = function(size) { - options4.beforeResize?.call(widget2, this); + options4.beforeResize?.call(widget, this); computeSize.call(this, size); - onResize2?.apply(this, arguments); - options4.afterResize?.call(widget2, this); + onResize2?.call(this, size); + options4.afterResize?.call(widget, this); }; } - return widget2; + return widget; }; +window.comfyAPI = window.comfyAPI || {}; +window.comfyAPI.domWidget = window.comfyAPI.domWidget || {}; +window.comfyAPI.domWidget.DOMWidgetImpl = DOMWidgetImpl; function controlValueRunBefore() { return useSettingStore().get("Comfy.WidgetControlMode") === "before"; } __name(controlValueRunBefore, "controlValueRunBefore"); -function updateControlWidgetLabel(widget2) { +function updateControlWidgetLabel(widget) { let replacement = "after"; let find2 = "before"; if (controlValueRunBefore()) { ; [find2, replacement] = [replacement, find2]; } - widget2.label = (widget2.label ?? widget2.name).replace(find2, replacement); + widget.label = (widget.label ?? widget.name ?? "").replace(find2, replacement); } __name(updateControlWidgetLabel, "updateControlWidgetLabel"); const IS_CONTROL_WIDGET = Symbol(); const HAS_EXECUTED = Symbol(); -function getNumberDefaults(inputData, defaultStep, precision, enable_rounding) { - let defaultVal = inputData[1]["default"]; - let { min, max, step: step3, round } = inputData[1]; - if (defaultVal == void 0) defaultVal = 0; - if (min == void 0) min = 0; - if (max == void 0) max = 2048; - if (step3 == void 0) step3 = defaultStep; - if (precision == void 0) { - precision = Math.max(-Math.floor(Math.log10(step3)), 0); - } - if (enable_rounding && (round == void 0 || round === true)) { - round = Math.round(1e6 * Math.pow(0.1, precision)) / 1e6; - } - return { - val: defaultVal, - config: { min, max, step: 10 * step3, round, precision } - }; -} -__name(getNumberDefaults, "getNumberDefaults"); -function addValueControlWidget(node3, targetWidget, defaultValue2 = "randomize", values, widgetName, inputData) { - let name2 = inputData[1]?.control_after_generate; +function addValueControlWidget(node3, targetWidget, defaultValue2, values, widgetName, inputData) { + let name2 = inputData?.[1]?.control_after_generate; if (typeof name2 !== "string") { name2 = widgetName; } const widgets = addValueControlWidgets( node3, targetWidget, - defaultValue2, + defaultValue2 ?? "randomize", { addFilterList: false, controlAfterGenerateName: name2 @@ -192145,7 +193620,7 @@ function addValueControlWidget(node3, targetWidget, defaultValue2 = "randomize", return widgets[0]; } __name(addValueControlWidget, "addValueControlWidget"); -function addValueControlWidgets(node3, targetWidget, defaultValue2 = "randomize", options4, inputData) { +function addValueControlWidgets(node3, targetWidget, defaultValue2, options4, inputData) { if (!defaultValue2) defaultValue2 = "randomize"; if (!options4) options4 = {}; const getName = /* @__PURE__ */ __name((defaultName, optionName) => { @@ -192178,7 +193653,7 @@ function addValueControlWidgets(node3, targetWidget, defaultValue2 = "randomize" widgets.push(valueControl); const isCombo = targetWidget.type === "combo"; let comboFilter; - if (isCombo) { + if (isCombo && valueControl.options.values) { valueControl.options.values.push("increment-wrap"); } if (isCombo && options4.addFilterList !== false) { @@ -192200,7 +193675,7 @@ function addValueControlWidgets(node3, targetWidget, defaultValue2 = "randomize" const applyWidgetControl = /* @__PURE__ */ __name(() => { var v2 = valueControl.value; if (isCombo && v2 !== "fixed") { - let values = targetWidget.options.values; + let values = targetWidget.options.values ?? []; const filter4 = comboFilter?.value; if (filter4) { let check; @@ -192221,7 +193696,7 @@ function addValueControlWidgets(node3, targetWidget, defaultValue2 = "randomize" check = /* @__PURE__ */ __name((item3) => item3.toLocaleLowerCase().includes(lower), "check"); } values = values.filter((item3) => check(item3)); - if (!values.length && targetWidget.options.values.length) { + if (!values.length && targetWidget.options.values?.length) { console.warn( "Filter for node " + node3.id + " has filtered out all items", filter4 @@ -192254,32 +193729,31 @@ function addValueControlWidgets(node3, targetWidget, defaultValue2 = "randomize" if (current_index >= 0) { let value4 = values[current_index]; targetWidget.value = value4; - targetWidget.callback(value4); + targetWidget.callback?.(value4); } } else { - let min = targetWidget.options.min; - let max = targetWidget.options.max; + let { min = 0, max = 1, step: step3 = 1 } = targetWidget.options; max = Math.min(1125899906842624, max); min = Math.max(-1125899906842624, min); - let range2 = (max - min) / (targetWidget.options.step / 10); + let range2 = (max - min) / (step3 / 10); switch (v2) { case "fixed": break; case "increment": - targetWidget.value += targetWidget.options.step / 10; + targetWidget.value += step3 / 10; break; case "decrement": - targetWidget.value -= targetWidget.options.step / 10; + targetWidget.value -= step3 / 10; break; case "randomize": - targetWidget.value = Math.floor(Math.random() * range2) * (targetWidget.options.step / 10) + min; + targetWidget.value = Math.floor(Math.random() * range2) * (step3 / 10) + min; break; default: break; } if (targetWidget.value < min) targetWidget.value = min; if (targetWidget.value > max) targetWidget.value = max; - targetWidget.callback(targetWidget.value); + targetWidget.callback?.(targetWidget.value); } }, "applyWidgetControl"); valueControl.beforeQueued = () => { @@ -192298,414 +193772,17 @@ function addValueControlWidgets(node3, targetWidget, defaultValue2 = "randomize" return widgets; } __name(addValueControlWidgets, "addValueControlWidgets"); -function seedWidget(node3, inputName, inputData, app2, widgetName) { - const seed = createIntWidget(node3, inputName, inputData, app2, true); - const seedControl = addValueControlWidget( - node3, - seed.widget, - "randomize", - void 0, - widgetName, - inputData - ); - seed.widget.linkedWidgets = [seedControl]; - return seed; -} -__name(seedWidget, "seedWidget"); -function createIntWidget(node3, inputName, inputData, app2, isSeedInput = false) { - const control = inputData[1]?.control_after_generate; - if (!isSeedInput && control) { - return seedWidget( - node3, - inputName, - inputData, - app2, - typeof control === "string" ? control : void 0 - ); - } - let widgetType = isSlider(inputData[1]["display"], app2); - const { val, config: config2 } = getNumberDefaults(inputData, 1, 0, true); - Object.assign(config2, { precision: 0 }); - return { - widget: node3.addWidget( - widgetType, - inputName, - val, - function(v2) { - const s2 = this.options.step / 10; - let sh = this.options.min % s2; - if (isNaN(sh)) { - sh = 0; - } - this.value = Math.round((v2 - sh) / s2) * s2 + sh; - }, - config2 - ) - }; -} -__name(createIntWidget, "createIntWidget"); -function addMultilineWidget(node3, name2, opts, app2) { - const inputEl = document.createElement("textarea"); - inputEl.className = "comfy-multiline-input"; - inputEl.value = opts.defaultVal; - inputEl.placeholder = opts.placeholder || name2; - if (app2.vueAppReady) { - inputEl.spellcheck = useSettingStore().get( - "Comfy.TextareaWidget.Spellcheck" - ); - } - const widget2 = node3.addDOMWidget(name2, "customtext", inputEl, { - getValue() { - return inputEl.value; - }, - setValue(v2) { - inputEl.value = v2; - } - }); - widget2.inputEl = inputEl; - inputEl.addEventListener("input", () => { - widget2.callback?.(widget2.value); - }); - inputEl.addEventListener("pointerdown", (event) => { - if (event.button === 1) { - app2.canvas.processMouseDown(event); - } - }); - inputEl.addEventListener("pointermove", (event) => { - if ((event.buttons & 4) === 4) { - app2.canvas.processMouseMove(event); - } - }); - inputEl.addEventListener("pointerup", (event) => { - if (event.button === 1) { - app2.canvas.processMouseUp(event); - } - }); - return { minWidth: 400, minHeight: 200, widget: widget2 }; -} -__name(addMultilineWidget, "addMultilineWidget"); -function addMarkdownWidget(node3, name2, opts, app2) { - Markdown.configure({ - html: false, - breaks: true, - transformPastedText: true - }); - const editor = new Editor({ - extensions: [ - StarterKit, - Markdown, - Link$2, - Table$2, - TableCell, - TableHeader, - TableRow - ], - content: opts.defaultVal, - editable: false - }); - const inputEl = editor.options.element; - inputEl.classList.add("comfy-markdown"); - const textarea = document.createElement("textarea"); - inputEl.append(textarea); - const widget2 = node3.addDOMWidget(name2, "MARKDOWN", inputEl, { - getValue() { - return textarea.value; - }, - setValue(v2) { - textarea.value = v2; - editor.commands.setContent(v2); - } - }); - widget2.inputEl = inputEl; - editor.options.element.addEventListener( - "pointerdown", - (event) => { - if (event.button !== 0) { - app2.canvas.processMouseDown(event); - return; - } - if (event.target instanceof HTMLAnchorElement) { - return; - } - inputEl.classList.add("editing"); - setTimeout(() => { - textarea.focus(); - }, 0); - } - ); - textarea.addEventListener("blur", () => { - inputEl.classList.remove("editing"); - }); - textarea.addEventListener("change", () => { - editor.commands.setContent(textarea.value); - widget2.callback?.(widget2.value); - }); - inputEl.addEventListener("keydown", (event) => { - event.stopPropagation(); - }); - inputEl.addEventListener("pointerdown", (event) => { - if (event.button === 1) { - app2.canvas.processMouseDown(event); - } - }); - inputEl.addEventListener("pointermove", (event) => { - if ((event.buttons & 4) === 4) { - app2.canvas.processMouseMove(event); - } - }); - inputEl.addEventListener("pointerup", (event) => { - if (event.button === 1) { - app2.canvas.processMouseUp(event); - } - }); - return { minWidth: 400, minHeight: 200, widget: widget2 }; -} -__name(addMarkdownWidget, "addMarkdownWidget"); -function isSlider(display, app2) { - if (app2.ui.settings.getSettingValue("Comfy.DisableSliders")) { - return "number"; - } - return display === "slider" ? "slider" : "number"; -} -__name(isSlider, "isSlider"); +const SeedWidget = useSeedWidget(); const ComfyWidgets = { - "INT:seed": seedWidget, - "INT:noise_seed": seedWidget, - FLOAT(node3, inputName, inputData, app2) { - let widgetType = isSlider(inputData[1]["display"], app2); - let precision = app2.ui.settings.getSettingValue( - "Comfy.FloatRoundingPrecision" - ); - let disable_rounding = app2.ui.settings.getSettingValue( - "Comfy.DisableFloatRounding" - ); - if (precision == 0) precision = void 0; - const { val, config: config2 } = getNumberDefaults( - inputData, - 0.5, - precision, - !disable_rounding - ); - return { - widget: node3.addWidget( - widgetType, - inputName, - val, - function(v2) { - if (config2.round) { - this.value = Math.round((v2 + Number.EPSILON) / config2.round) * config2.round; - if (this.value > config2.max) this.value = config2.max; - if (this.value < config2.min) this.value = config2.min; - } else { - this.value = v2; - } - }, - config2 - ) - }; - }, - INT(node3, inputName, inputData, app2) { - return createIntWidget(node3, inputName, inputData, app2); - }, - BOOLEAN(node3, inputName, inputData) { - let defaultVal = false; - let options4 = {}; - if (inputData[1]) { - if (inputData[1].default) defaultVal = inputData[1].default; - if (inputData[1].label_on) options4["on"] = inputData[1].label_on; - if (inputData[1].label_off) options4["off"] = inputData[1].label_off; - } - return { - widget: node3.addWidget("toggle", inputName, defaultVal, () => { - }, options4) - }; - }, - STRING(node3, inputName, inputData, app2) { - const defaultVal = inputData[1].default || ""; - const multiline = !!inputData[1].multiline; - let res; - if (multiline) { - res = addMultilineWidget( - node3, - inputName, - { defaultVal, ...inputData[1] }, - app2 - ); - } else { - res = { - widget: node3.addWidget("text", inputName, defaultVal, () => { - }, {}) - }; - } - if (inputData[1].dynamicPrompts != void 0) - res.widget.dynamicPrompts = inputData[1].dynamicPrompts; - return res; - }, - MARKDOWN(node3, inputName, inputData, app2) { - const defaultVal = inputData[1].default || ""; - let res; - res = addMarkdownWidget( - node3, - inputName, - { defaultVal, ...inputData[1] }, - app2 - ); - return res; - }, - COMBO(node3, inputName, inputData) { - const type = inputData[0]; - let defaultValue2 = type[0]; - if (inputData[1] && inputData[1].default) { - defaultValue2 = inputData[1].default; - } - const res = { - widget: node3.addWidget("combo", inputName, defaultValue2, () => { - }, { - values: type - }) - }; - if (inputData[1]?.control_after_generate) { - res.widget.linkedWidgets = addValueControlWidgets( - node3, - res.widget, - void 0, - void 0, - inputData - ); - } - return res; - }, - IMAGEUPLOAD(node3, inputName, inputData, app2) { - const imageWidget = node3.widgets.find( - (w2) => w2.name === (inputData[1]?.widget ?? "image") - ); - let uploadWidget; - function showImage(name2) { - const img = new Image(); - img.onload = () => { - node3.imgs = [img]; - app2.graph.setDirtyCanvas(true); - }; - let folder_separator = name2.lastIndexOf("/"); - let subfolder = ""; - if (folder_separator > -1) { - subfolder = name2.substring(0, folder_separator); - name2 = name2.substring(folder_separator + 1); - } - img.src = api.apiURL( - `/view?filename=${encodeURIComponent(name2)}&type=input&subfolder=${subfolder}${app2.getPreviewFormatParam()}${app2.getRandParam()}` - ); - node3.setSizeForImage?.(); - } - __name(showImage, "showImage"); - var default_value = imageWidget.value; - Object.defineProperty(imageWidget, "value", { - set: /* @__PURE__ */ __name(function(value4) { - this._real_value = value4; - }, "set"), - get: /* @__PURE__ */ __name(function() { - if (!this._real_value) { - return default_value; - } - let value4 = this._real_value; - if (value4.filename) { - let real_value = value4; - value4 = ""; - if (real_value.subfolder) { - value4 = real_value.subfolder + "/"; - } - value4 += real_value.filename; - if (real_value.type && real_value.type !== "input") - value4 += ` [${real_value.type}]`; - } - return value4; - }, "get") - }); - const cb = node3.callback; - imageWidget.callback = function() { - showImage(imageWidget.value); - if (cb) { - return cb.apply(this, arguments); - } - }; - requestAnimationFrame(() => { - if (imageWidget.value) { - showImage(imageWidget.value); - } - }); - async function uploadFile2(file, updateNode, pasted = false) { - try { - const body = new FormData(); - body.append("image", file); - if (pasted) body.append("subfolder", "pasted"); - const resp = await api.fetchApi("/upload/image", { - method: "POST", - body - }); - if (resp.status === 200) { - const data26 = await resp.json(); - let path = data26.name; - if (data26.subfolder) path = data26.subfolder + "/" + path; - if (!imageWidget.options.values.includes(path)) { - imageWidget.options.values.push(path); - } - if (updateNode) { - showImage(path); - imageWidget.value = path; - } - } else { - useToastStore().addAlert(resp.status + " - " + resp.statusText); - } - } catch (error2) { - useToastStore().addAlert(error2); - } - } - __name(uploadFile2, "uploadFile"); - const fileInput2 = document.createElement("input"); - Object.assign(fileInput2, { - type: "file", - accept: "image/jpeg,image/png,image/webp", - style: "display: none", - onchange: /* @__PURE__ */ __name(async () => { - if (fileInput2.files.length) { - await uploadFile2(fileInput2.files[0], true); - } - }, "onchange") - }); - document.body.append(fileInput2); - uploadWidget = node3.addWidget("button", inputName, "image", () => { - fileInput2.click(); - }); - uploadWidget.label = "choose file to upload"; - uploadWidget.serialize = false; - node3.onDragOver = function(e2) { - if (e2.dataTransfer && e2.dataTransfer.items) { - const image2 = [...e2.dataTransfer.items].find((f2) => f2.kind === "file"); - return !!image2; - } - return false; - }; - node3.onDragDrop = function(e2) { - console.log("onDragDrop called"); - let handled = false; - for (const file of e2.dataTransfer.files) { - if (file.type.startsWith("image/")) { - uploadFile2(file, !handled); - handled = true; - } - } - return handled; - }; - node3.pasteFile = function(file) { - if (file.type.startsWith("image/")) { - const is_pasted = file.name === "image.png" && file.lastModified - Date.now() < 2e3; - uploadFile2(file, true, is_pasted); - return true; - } - return false; - }; - return { widget: uploadWidget }; - } + "INT:seed": SeedWidget, + "INT:noise_seed": SeedWidget, + INT: useIntWidget(), + FLOAT: useFloatWidget(), + BOOLEAN: useBooleanWidget(), + STRING: useStringWidget(), + MARKDOWN: useMarkdownWidget(), + COMBO: useComboWidget(), + IMAGEUPLOAD: useImageUploadWidget() }; window.comfyAPI = window.comfyAPI || {}; window.comfyAPI.widgets = window.comfyAPI.widgets || {}; @@ -192744,11 +193821,33 @@ const useWidgetStore = /* @__PURE__ */ defineStore("widget", () => { }; } __name(registerCustomWidgets, "registerCustomWidgets"); + function getDefaultValue(inputData) { + if (Array.isArray(inputData[0])) + return getDefaultValue(transformComboInput(inputData)); + const widgetType = getWidgetType(inputData[0], inputData[1]?.name); + const [_2, props] = inputData; + if (!props) return void 0; + if (props.default) return props.default; + if (widgetType === "COMBO" && props.options?.length) return props.options[0]; + if (props.remote) return "Loading..."; + return void 0; + } + __name(getDefaultValue, "getDefaultValue"); + const transformComboInput = /* @__PURE__ */ __name((inputData) => { + return isComboInputSpecV1(inputData) ? [ + "COMBO", + { + options: inputData[0], + ...Object(inputData[1] || {}) + } + ] : inputData; + }, "transformComboInput"); return { widgets, getWidgetType, inputIsWidget, - registerCustomWidgets + registerCustomWidgets, + getDefaultValue }; }); var addonFit$2 = { exports: {} }; @@ -199050,12 +200149,13 @@ __name(useTerminal, "useTerminal"); const _hoisted_1$q = { class: "p-terminal rounded-none h-full w-full p-2" }; const _sfc_main$t = /* @__PURE__ */ defineComponent({ __name: "BaseTerminal", - emits: ["created"], + emits: ["created", "unmounted"], setup(__props, { emit: __emit }) { const emit2 = __emit; const terminalEl = ref(); const rootEl = ref(); emit2("created", useTerminal(terminalEl), rootEl); + onUnmounted(() => emit2("unmounted")); return (_ctx, _cache) => { return openBlock(), createElementBlock("div", { class: "relative overflow-hidden h-full w-full bg-black", @@ -199073,7 +200173,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({ }; } }); -const BaseTerminal = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-250ab9af"]]); +const BaseTerminal = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-873a313f"]]); const _sfc_main$s = /* @__PURE__ */ defineComponent({ __name: "CommandTerminal", setup(__props) { @@ -199115,7 +200215,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({ }; } }); -const CommandTerminal = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-90a7f075"]]); +const CommandTerminal = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-14fef2e4"]]); const useExecutionStore = /* @__PURE__ */ defineStore("execution", () => { const clientId = ref(null); const activePromptId = ref(null); @@ -199331,7 +200431,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({ }; } }); -const LogsTerminal = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-03daf1c8"]]); +const LogsTerminal = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-cf0c7d52"]]); const useLogsTerminalTab = /* @__PURE__ */ __name(() => { const { t: t2 } = useI18n(); return { @@ -199422,7 +200522,7 @@ const useExtensionService = /* @__PURE__ */ __name(() => { settingStore.get("Comfy.Extension.Disabled") ); const extensions = await api.getExtensions(); - await __vitePreload(() => import("./index-BYzwFNH3.js"), true ? __vite__mapDeps([30,12,31]) : void 0, import.meta.url); + await __vitePreload(() => import("./index-D9D9jjLT.js"), true ? __vite__mapDeps([34,13,35]) : void 0, import.meta.url); extensionStore.captureCoreExtensions(); await Promise.all( extensions.filter((extension) => !extension.includes("extensions/core")).map(async (ext) => { @@ -199555,12 +200655,12 @@ class ComfySettingsDialog extends ComfyDialog$1 { super(); this.app = app2; } - dispatchChange(id3, value4, oldValue2) { + dispatchChange(id3, value4, oldValue) { this.dispatchEvent( new CustomEvent(id3 + ".change", { detail: { value: value4, - oldValue: oldValue2 + oldValue } }) ); @@ -199799,9 +200899,9 @@ function dragElement(dragEl, settings) { function restorePos() { let posString = localStorage.getItem("Comfy.MenuPosition"); if (posString) { - const pos2 = JSON.parse(posString); - newPosX = pos2.x; - newPosY = pos2.y; + const pos = JSON.parse(posString); + newPosX = pos.x; + newPosY = pos.y; positionElement(); ensureInBounds(); } @@ -200197,7 +201297,7 @@ class ComfyUI { if (!useSettingStore().get("Comfy.ConfirmClear") || confirm("Clear workflow?")) { app$1.clean(); app$1.graph.clear(); - app$1.resetView(); + useLitegraphService().resetView(); api.dispatchCustomEvent("graphCleared"); } }, "onclick") @@ -200207,7 +201307,7 @@ class ComfyUI { textContent: "Load Default", onclick: /* @__PURE__ */ __name(async () => { if (!useSettingStore().get("Comfy.ConfirmClear") || confirm("Load default workflow?")) { - app$1.resetView(); + useLitegraphService().resetView(); await app$1.loadGraphData(); } }, "onclick") @@ -200216,7 +201316,7 @@ class ComfyUI { id: "comfy-reset-view-button", textContent: "Reset View", onclick: /* @__PURE__ */ __name(async () => { - app$1.resetView(); + useLitegraphService().resetView(); }, "onclick") }) ] @@ -200337,9 +201437,26 @@ window.comfyAPI = window.comfyAPI || {}; window.comfyAPI.imagePreview = window.comfyAPI.imagePreview || {}; window.comfyAPI.imagePreview.calculateImageGrid = calculateImageGrid; window.comfyAPI.imagePreview.createImageHost = createImageHost; +const useTitleEditorStore = /* @__PURE__ */ defineStore("titleEditor", () => { + const titleEditorTarget = shallowRef(null); + return { + titleEditorTarget + }; +}); +const useCanvasStore = /* @__PURE__ */ defineStore("canvas", () => { + const canvas2 = shallowRef(null); + return { + canvas: canvas2 + }; +}); +function isImageNode(node3) { + return node3.imgs || node3 && node3.widgets && node3.widgets.findIndex((obj) => obj.name === "image") >= 0; +} +__name(isImageNode, "isImageNode"); const useLitegraphService = /* @__PURE__ */ __name(() => { const extensionService = useExtensionService(); const toastStore = useToastStore(); + const canvasStore = useCanvasStore(); async function registerNodeDef(nodeId, nodeData) { const node3 = class ComfyNode extends LGraphNode { static { @@ -200499,11 +201616,11 @@ const useLitegraphService = /* @__PURE__ */ __name(() => { await writeImage(blob); } catch (error2) { if (blob.type !== "image/png") { - const canvas = $el("canvas", { + const canvas2 = $el("canvas", { width: img.naturalWidth, height: img.naturalHeight }); - const ctx = canvas.getContext("2d"); + const ctx = canvas2.getContext("2d"); let image2; if (typeof window.createImageBitmap === "undefined") { image2 = new Image(); @@ -200520,7 +201637,7 @@ const useLitegraphService = /* @__PURE__ */ __name(() => { } try { ctx.drawImage(image2, 0, 0); - canvas.toBlob(writeImage, "image/png"); + canvas2.toBlob(writeImage, "image/png"); } finally { if (typeof image2.close === "function") { image2.close(); @@ -200603,7 +201720,7 @@ const useLitegraphService = /* @__PURE__ */ __name(() => { }, "callback") }); } - if (ComfyApp.isImageNode(this)) { + if (isImageNode(this)) { options4.push({ content: "Open in MaskEditor", callback: /* @__PURE__ */ __name((obj) => { @@ -200712,12 +201829,12 @@ const useLitegraphService = /* @__PURE__ */ __name(() => { ); if (this.animatedImages) { if (widgetIdx > -1) { - const widget2 = this.widgets[widgetIdx]; - widget2.options.host.updateImages(this.imgs); + const widget = this.widgets[widgetIdx]; + widget.options.host.updateImages(this.imgs); } else { const host = createImageHost(this); this.setSizeForImage(true); - const widget2 = this.addDOMWidget( + const widget = this.addDOMWidget( ANIM_PREVIEW_WIDGET, "img", host.el, @@ -200728,8 +201845,8 @@ const useLitegraphService = /* @__PURE__ */ __name(() => { hideOnZoom: false } ); - widget2.serializeValue = () => void 0; - widget2.options.host.updateImages(this.imgs); + widget.serializeValue = () => void 0; + widget.options.host.updateImages(this.imgs); } return; } @@ -200737,9 +201854,9 @@ const useLitegraphService = /* @__PURE__ */ __name(() => { this.widgets[widgetIdx].onRemove?.(); this.widgets.splice(widgetIdx, 1); } - const canvas = app$1.graph.list_of_graphcanvas[0]; - const mouse = canvas.graph_mouse; - if (!canvas.pointer_is_down && this.pointerDown) { + const canvas2 = app$1.graph.list_of_graphcanvas[0]; + const mouse = canvas2.graph_mouse; + if (!canvas2.pointer_is_down && this.pointerDown) { if (mouse[0] === this.pointerDown.pos[0] && mouse[1] === this.pointerDown.pos[1]) { this.imageIndex = this.pointerDown.index; } @@ -200805,14 +201922,14 @@ const useLitegraphService = /* @__PURE__ */ __name(() => { if (anyHovered) { this.overIndex = i2; let value4 = 110; - if (canvas.pointer_is_down) { + if (canvas2.pointer_is_down) { if (!this.pointerDown || this.pointerDown.index !== i2) { this.pointerDown = { index: i2, pos: [...mouse] }; } value4 = 125; } ctx.filter = `contrast(${value4}%) brightness(${value4}%)`; - canvas.canvas.style.cursor = "pointer"; + canvas2.canvas.style.cursor = "pointer"; } } this.imageRects.push([x22, y22, cellWidth, cellHeight]); @@ -200871,8 +201988,8 @@ const useLitegraphService = /* @__PURE__ */ __name(() => { let textFill = "#fff"; let isClicking = false; if (hovered) { - canvas.canvas.style.cursor = "pointer"; - if (canvas.pointer_is_down) { + canvas2.canvas.style.cursor = "pointer"; + if (canvas2.pointer_is_down) { fill2 = "#1e90ff"; isClicking = true; } else { @@ -200970,11 +202087,20 @@ const useLitegraphService = /* @__PURE__ */ __name(() => { app$1.canvas.animateToBounds(graphNode.boundingRect); } __name(goToNode, "goToNode"); + function resetView() { + const canvas2 = canvasStore.canvas; + if (!canvas2) return; + canvas2.ds.scale = 1; + canvas2.ds.offset = [0, 0]; + canvas2.setDirty(true, true); + } + __name(resetView, "resetView"); return { registerNodeDef, addNodeOnGraph, getCanvasCenter, - goToNode + goToNode, + resetView }; }, "useLitegraphService"); const defaultGraph = { @@ -201093,7 +202219,7 @@ const defaultGraph = { { name: "VAE", type: "VAE", links: [8], slot_index: 2 } ], properties: {}, - widgets_values: ["v1-5-pruned-emaonly.ckpt"] + widgets_values: ["v1-5-pruned-emaonly-fp16.safetensors"] } ], links: [ @@ -201184,12 +202310,12 @@ function applyTextReplacements(app2, value4) { console.warn("Multiple nodes matched", split2[0], "using first match"); } const node3 = nodes[0]; - const widget2 = node3.widgets?.find((w2) => w2.name === split2[1]); - if (!widget2) { + const widget = node3.widgets?.find((w2) => w2.name === split2[1]); + if (!widget) { console.warn("Unable to find widget", split2[1], "on node", split2[0], node3); return match2; } - return ((widget2.value ?? "") + "").replaceAll(/\/|\\/g, "_"); + return ((widget.value ?? "") + "").replaceAll(/\/|\\/g, "_"); }); } __name(applyTextReplacements, "applyTextReplacements"); @@ -203630,13 +204756,16 @@ const useWorkflowService = /* @__PURE__ */ __name(() => { } ); }, "openWorkflow"); - const closeWorkflow = /* @__PURE__ */ __name(async (workflow, options4 = { warnIfUnsaved: true }) => { + const closeWorkflow = /* @__PURE__ */ __name(async (workflow, options4 = { + warnIfUnsaved: true + }) => { if (workflow.isModified && options4.warnIfUnsaved) { const confirmed = await dialogService.confirm({ title: t("sideToolbar.workflowTab.dirtyCloseTitle"), type: "dirtyClose", message: t("sideToolbar.workflowTab.dirtyClose"), - itemList: [workflow.path] + itemList: [workflow.path], + hint: options4.hint }); if (confirmed === null) return false; if (confirmed === true) { @@ -203716,20 +204845,20 @@ const useWorkflowService = /* @__PURE__ */ __name(() => { loadedWorkflow.changeTracker.reset(workflowData); loadedWorkflow.changeTracker.restore(); }, "afterLoadNewGraph"); - const insertWorkflow = /* @__PURE__ */ __name(async (workflow) => { + const insertWorkflow = /* @__PURE__ */ __name(async (workflow, options4 = {}) => { const loadedWorkflow = await workflow.load(); const data26 = loadedWorkflow.initialState; const old = localStorage.getItem("litegrapheditor_clipboard"); const graph = new LGraph(data26); const canvasElement = document.createElement("canvas"); - const canvas = new LGraphCanvas(canvasElement, graph, { + const canvas2 = new LGraphCanvas(canvasElement, graph, { skip_events: true, skip_render: true }); - canvas.reroutesEnabled = app$1.canvas.reroutesEnabled; - canvas.selectItems(); - canvas.copyToClipboard(); - app$1.canvas.pasteFromClipboard(); + canvas2.reroutesEnabled = app$1.canvas.reroutesEnabled; + canvas2.selectItems(); + canvas2.copyToClipboard(); + app$1.canvas.pasteFromClipboard(options4); if (old !== null) { localStorage.setItem("litegrapheditor_clipboard", old); } @@ -206074,17 +207203,17 @@ function serialise(nodes, graph) { return JSON.stringify(serialisable); } __name(serialise, "serialise"); -function deserialiseAndCreate(data26, canvas) { +function deserialiseAndCreate(data26, canvas2) { if (!data26) return; - const { graph, graph_mouse } = canvas; - canvas.emitBeforeChange(); + const { graph, graph_mouse } = canvas2; + canvas2.emitBeforeChange(); try { graph.beforeChange(); const deserialised = JSON.parse(data26); const topLeft = [Infinity, Infinity]; - for (const { pos: pos2 } of deserialised.nodes) { - if (topLeft[0] > pos2[0]) topLeft[0] = pos2[0]; - if (topLeft[1] > pos2[1]) topLeft[1] = pos2[1]; + for (const { pos } of deserialised.nodes) { + if (topLeft[0] > pos[0]) topLeft[0] = pos[0]; + if (topLeft[1] > pos[1]) topLeft[1] = pos[1]; } if (!Number.isFinite(topLeft[0]) || !Number.isFinite(topLeft[1])) { topLeft[0] = graph_mouse[0]; @@ -206107,10 +207236,10 @@ function deserialiseAndCreate(data26, canvas) { if (outNode && inNode) outNode.connect(info[1], inNode, info[3]); else console.warn("Warning, nodes missing on pasting"); } - canvas.selectNodes(nodes); + canvas2.selectNodes(nodes); graph.afterChange(); } finally { - canvas.emitAfterChange(); + canvas2.emitAfterChange(); } } __name(deserialiseAndCreate, "deserialiseAndCreate"); @@ -206384,7 +207513,7 @@ async function importA1111(graph, parameters) { const getWidget = /* @__PURE__ */ __name((node3, name2) => { return node3.widgets.find((w2) => w2.name === name2); }, "getWidget"); - const setWidgetValue2 = /* @__PURE__ */ __name((node3, name2, value4, isOptionPrefix) => { + const setWidgetValue = /* @__PURE__ */ __name((node3, name2, value4, isOptionPrefix) => { const w2 = getWidget(node3, name2); if (isOptionPrefix) { const o2 = w2.options.values.find((w22) => w22.startsWith(value4)); @@ -206413,9 +207542,9 @@ async function importA1111(graph, parameters) { for (const l2 of loras) { const loraNode = LiteGraph.createNode("LoraLoader"); graph.add(loraNode); - setWidgetValue2(loraNode, "lora_name", l2.name, true); - setWidgetValue2(loraNode, "strength_model", l2.weight); - setWidgetValue2(loraNode, "strength_clip", l2.weight); + setWidgetValue(loraNode, "lora_name", l2.name, true); + setWidgetValue(loraNode, "strength_model", l2.weight); + setWidgetValue(loraNode, "strength_clip", l2.weight); prevModel.node.connect(prevModel.index, loraNode, 0); prevClip.node.connect(prevClip.index, loraNode, 1); prevModel = { node: loraNode, index: 0 }; @@ -206465,31 +207594,31 @@ async function importA1111(graph, parameters) { vaeLoaderNode.connect(0, vaeNode, 1); const handlers2 = { model(v2) { - setWidgetValue2(ckptNode, "ckpt_name", v2, true); + setWidgetValue(ckptNode, "ckpt_name", v2, true); }, vae(v2) { - setWidgetValue2(vaeLoaderNode, "vae_name", v2, true); + setWidgetValue(vaeLoaderNode, "vae_name", v2, true); }, "cfg scale"(v2) { - setWidgetValue2(samplerNode, "cfg", +v2); + setWidgetValue(samplerNode, "cfg", +v2); }, "clip skip"(v2) { - setWidgetValue2(clipSkipNode, "stop_at_clip_layer", -v2); + setWidgetValue(clipSkipNode, "stop_at_clip_layer", -v2); }, sampler(v2) { let name2 = v2.toLowerCase().replace("++", "pp").replaceAll(" ", "_"); if (name2.includes("karras")) { name2 = name2.replace("karras", "").replace(/_+$/, ""); - setWidgetValue2(samplerNode, "scheduler", "karras"); + setWidgetValue(samplerNode, "scheduler", "karras"); } else { - setWidgetValue2(samplerNode, "scheduler", "normal"); + setWidgetValue(samplerNode, "scheduler", "normal"); } const w2 = getWidget(samplerNode, "sampler_name"); const o2 = w2.options.values.find( (w22) => w22 === name2 || w22 === "sample_" + name2 ); if (o2) { - setWidgetValue2(samplerNode, "sampler_name", o2); + setWidgetValue(samplerNode, "sampler_name", o2); } }, size(v2) { @@ -206500,8 +207629,8 @@ async function importA1111(graph, parameters) { const hrSz = popOpt("hires resize"); hrSteps = popOpt("hires steps"); let hrMethod = popOpt("hires upscaler"); - setWidgetValue2(imageNode, "width", w2); - setWidgetValue2(imageNode, "height", h2); + setWidgetValue(imageNode, "width", w2); + setWidgetValue(imageNode, "height", h2); if (hrUp || hrSz) { let uw, uh; if (hrUp) { @@ -206523,7 +207652,7 @@ async function importA1111(graph, parameters) { hrMethod = "nearest-exact"; break; } - setWidgetValue2(upscaleNode, "upscale_method", hrMethod, true); + setWidgetValue(upscaleNode, "upscale_method", hrMethod, true); } else { const decode2 = LiteGraph.createNode("VAEDecodeTiled"); graph.add(decode2); @@ -206531,7 +207660,7 @@ async function importA1111(graph, parameters) { vaeLoaderNode.connect(0, decode2, 1); const upscaleLoaderNode = LiteGraph.createNode("UpscaleModelLoader"); graph.add(upscaleLoaderNode); - setWidgetValue2(upscaleLoaderNode, "model_name", hrMethod, true); + setWidgetValue(upscaleLoaderNode, "model_name", hrMethod, true); const modelUpscaleNode = LiteGraph.createNode( "ImageUpscaleWithModel" ); @@ -206546,8 +207675,8 @@ async function importA1111(graph, parameters) { upscaleNode.connect(0, vaeEncodeNode, 0); vaeLoaderNode.connect(0, vaeEncodeNode, 1); } - setWidgetValue2(upscaleNode, "width", ceil64(uw)); - setWidgetValue2(upscaleNode, "height", ceil64(uh)); + setWidgetValue(upscaleNode, "width", ceil64(uw)); + setWidgetValue(upscaleNode, "height", ceil64(uh)); hrSamplerNode = LiteGraph.createNode("KSampler"); graph.add(hrSamplerNode); ckptNode.connect(0, hrSamplerNode, 0); @@ -206558,10 +207687,10 @@ async function importA1111(graph, parameters) { } }, steps(v2) { - setWidgetValue2(samplerNode, "steps", +v2); + setWidgetValue(samplerNode, "steps", +v2); }, seed(v2) { - setWidgetValue2(samplerNode, "seed", +v2); + setWidgetValue(samplerNode, "seed", +v2); } }; for (const opt in opts) { @@ -206570,27 +207699,27 @@ async function importA1111(graph, parameters) { } } if (hrSamplerNode) { - setWidgetValue2( + setWidgetValue( hrSamplerNode, "steps", hrSteps ? +hrSteps : getWidget(samplerNode, "steps").value ); - setWidgetValue2( + setWidgetValue( hrSamplerNode, "cfg", getWidget(samplerNode, "cfg").value ); - setWidgetValue2( + setWidgetValue( hrSamplerNode, "scheduler", getWidget(samplerNode, "scheduler").value ); - setWidgetValue2( + setWidgetValue( hrSamplerNode, "sampler_name", getWidget(samplerNode, "sampler_name").value ); - setWidgetValue2( + setWidgetValue( hrSamplerNode, "denoise", +(popOpt("denoising strength") || "1") @@ -206605,8 +207734,8 @@ async function importA1111(graph, parameters) { positive = n2.text; n2 = createLoraNodes(negativeNode, negative, n2.prevClip, n2.prevModel); negative = n2.text; - setWidgetValue2(positiveNode, "text", replaceEmbeddings(positive)); - setWidgetValue2(negativeNode, "text", replaceEmbeddings(negative)); + setWidgetValue(positiveNode, "text", replaceEmbeddings(positive)); + setWidgetValue(negativeNode, "text", replaceEmbeddings(negative)); graph.arrange(); for (const opt of [ "model hash", @@ -207403,8 +208532,6 @@ class ComfyApp { canvas; dragOverNode; canvasEl; - // x, y, scale - zoom_drag_start; lastNodeErrors; /** @type {ExecutionErrorWsMessage} */ lastExecutionError; @@ -207467,17 +208594,28 @@ class ComfyApp { get progress() { return useExecutionStore()._executingNodeProgress; } + /** + * @deprecated Use {@link isImageNode} from @/utils/litegraphUtil instead + */ + static isImageNode(node3) { + return isImageNode(node3); + } + /** + * Resets the canvas view to the default + * @deprecated Use {@link useLitegraphService().resetView} instead + */ + resetView() { + useLitegraphService().resetView(); + } constructor() { this.vueAppReady = false; this.ui = new ComfyUI(this); this.api = api; - this.bodyTop = $el("div.comfyui-body-top", { parent: document.body }); - this.bodyLeft = $el("div.comfyui-body-left", { parent: document.body }); - this.bodyRight = $el("div.comfyui-body-right", { parent: document.body }); - this.bodyBottom = $el("div.comfyui-body-bottom", { parent: document.body }); - this.canvasContainer = $el("div.graph-canvas-container", { - parent: document.body - }); + this.bodyTop = $el("div.comfyui-body-top"); + this.bodyLeft = $el("div.comfyui-body-left"); + this.bodyRight = $el("div.comfyui-body-right"); + this.bodyBottom = $el("div.comfyui-body-bottom"); + this.canvasContainer = $el("div.graph-canvas-container"); this.menu = new ComfyAppMenu(this); this.bypassBgColor = "#FF00FF"; this.nodeOutputs = {}; @@ -207499,9 +208637,6 @@ class ComfyApp { getRandParam() { return "&rand=" + Math.random(); } - static isImageNode(node3) { - return node3.imgs || node3 && node3.widgets && node3.widgets.findIndex((obj) => obj.name === "image") >= 0; - } static onClipspaceEditorSave() { if (ComfyApp.clipspace_return_node) { ComfyApp.pasteFromClipspace(ComfyApp.clipspace_return_node); @@ -207685,113 +208820,6 @@ class ComfyApp { false ); } - /** - * Adds a handler on paste that extracts and loads images or workflows from pasted JSON data - */ - #addPasteHandler() { - document.addEventListener("paste", async (e2) => { - if (this.shiftDown) return; - let data26 = e2.clipboardData || window.clipboardData; - const items2 = data26.items; - for (const item3 of items2) { - if (item3.type.startsWith("image/")) { - var imageNode = null; - if (this.canvas.current_node && this.canvas.current_node.is_selected && ComfyApp.isImageNode(this.canvas.current_node)) { - imageNode = this.canvas.current_node; - } - if (!imageNode) { - const newNode = LiteGraph.createNode("LoadImage"); - newNode.pos = [...this.canvas.graph_mouse]; - imageNode = this.graph.add(newNode); - this.graph.change(); - } - const blob = item3.getAsFile(); - imageNode.pasteFile(blob); - return; - } - } - data26 = data26.getData("text/plain"); - let workflow = null; - try { - data26 = data26.slice(data26.indexOf("{")); - workflow = JSON.parse(data26); - } catch (err) { - try { - data26 = data26.slice(data26.indexOf("workflow\n")); - data26 = data26.slice(data26.indexOf("{")); - workflow = JSON.parse(data26); - } catch (error2) { - workflow = null; - } - } - if (workflow && workflow.version && workflow.nodes && workflow.extra) { - await this.loadGraphData(workflow); - } else { - if (e2.target instanceof HTMLTextAreaElement && e2.target.type === "textarea" || e2.target instanceof HTMLInputElement && e2.target.type === "text") { - return; - } - this.canvas.pasteFromClipboard(); - } - }); - } - /** - * Adds a handler on copy that serializes selected nodes to JSON - */ - #addCopyHandler() { - document.addEventListener("copy", (e2) => { - if (!(e2.target instanceof Element)) { - return; - } - if (e2.target instanceof HTMLTextAreaElement && e2.target.type === "textarea" || e2.target instanceof HTMLInputElement && e2.target.type === "text") { - return; - } - const isTargetInGraph = e2.target.classList.contains("litegraph") || e2.target.classList.contains("graph-canvas-container") || e2.target.id === "graph-canvas"; - if (isTargetInGraph && this.canvas.selected_nodes) { - this.canvas.copyToClipboard(); - e2.clipboardData.setData("text", " "); - e2.preventDefault(); - e2.stopImmediatePropagation(); - return false; - } - }); - } - /** - * Handle mouse - * - * Move group by header - */ - #addProcessMouseHandler() { - const self2 = this; - const origProcessMouseDown = LGraphCanvas.prototype.processMouseDown; - LGraphCanvas.prototype.processMouseDown = function(e2) { - const useFastZoom = useSettingStore().get("Comfy.Graph.CtrlShiftZoom"); - if (useFastZoom && e2.ctrlKey && e2.shiftKey && !e2.altKey && e2.buttons) { - self2.zoom_drag_start = [e2.x, e2.y, this.ds.scale]; - return; - } - const res = origProcessMouseDown.apply(this, arguments); - return res; - }; - const origProcessMouseMove = LGraphCanvas.prototype.processMouseMove; - LGraphCanvas.prototype.processMouseMove = function(e2) { - if (e2.ctrlKey && e2.shiftKey && self2.zoom_drag_start) { - if (!e2.buttons) { - self2.zoom_drag_start = null; - return; - } - let deltaY = e2.y - self2.zoom_drag_start[1]; - let startScale = self2.zoom_drag_start[2]; - let scale = startScale - deltaY / 100; - this.ds.changeScale(scale, [ - self2.zoom_drag_start[0], - self2.zoom_drag_start[1] - ]); - this.graph.change(); - return; - } - return origProcessMouseMove.apply(this, arguments); - }; - } /** * Handle keypress */ @@ -207829,40 +208857,6 @@ class ComfyApp { return origProcessKey.apply(this, arguments); }; } - /** - * Draws group header bar - */ - #addDrawGroupsHandler() { - const self2 = this; - const origDrawGroups = LGraphCanvas.prototype.drawGroups; - LGraphCanvas.prototype.drawGroups = function(canvas, ctx) { - if (!this.graph) { - return; - } - var groups = this.graph.groups; - ctx.save(); - ctx.globalAlpha = 0.7 * this.editor_alpha; - for (var i2 = 0; i2 < groups.length; ++i2) { - var group = groups[i2]; - if (!LiteGraph.overlapBounding(this.visible_area, group._bounding)) { - continue; - } - ctx.fillStyle = group.color || "#335"; - ctx.strokeStyle = group.color || "#335"; - var pos2 = group._pos; - var size = group._size; - ctx.globalAlpha = 0.25 * this.editor_alpha; - ctx.beginPath(); - var font_size = group.font_size || LiteGraph.DEFAULT_GROUP_FONT_SIZE; - ctx.rect(pos2[0] + 0.5, pos2[1] + 0.5, size[0], font_size * 1.4); - ctx.fill(); - ctx.globalAlpha = this.editor_alpha; - } - ctx.restore(); - const res = origDrawGroups.apply(this, arguments); - return res; - }; - } /** * Draws node highlights (executing, drag drop) and progress bar */ @@ -207886,45 +208880,19 @@ class ComfyApp { lineWidth = 2; } if (color2) { - const shape = node3._shape || node3.constructor.shape || LiteGraph.ROUND_SHAPE; - ctx.lineWidth = lineWidth; - ctx.globalAlpha = 0.8; - ctx.beginPath(); - if (shape == LiteGraph.BOX_SHAPE) - ctx.rect( - -6, - -6 - LiteGraph.NODE_TITLE_HEIGHT, - 12 + size[0] + 1, - 12 + size[1] + LiteGraph.NODE_TITLE_HEIGHT - ); - else if (shape == LiteGraph.ROUND_SHAPE || shape == LiteGraph.CARD_SHAPE && node3.flags.collapsed) - ctx.roundRect( - -6, - -6 - LiteGraph.NODE_TITLE_HEIGHT, - 12 + size[0] + 1, - 12 + size[1] + LiteGraph.NODE_TITLE_HEIGHT, - this.round_radius * 2 - ); - else if (shape == LiteGraph.CARD_SHAPE) - ctx.roundRect( - -6, - -6 - LiteGraph.NODE_TITLE_HEIGHT, - 12 + size[0] + 1, - 12 + size[1] + LiteGraph.NODE_TITLE_HEIGHT, - [this.round_radius * 2, this.round_radius * 2, 2, 2] - ); - else if (shape == LiteGraph.CIRCLE_SHAPE) - ctx.arc( - size[0] * 0.5, - size[1] * 0.5, - size[0] * 0.5 + 6, - 0, - Math.PI * 2 - ); - ctx.strokeStyle = color2; - ctx.stroke(); - ctx.strokeStyle = fgcolor; - ctx.globalAlpha = 1; + const area = [ + 0, + -LiteGraph.NODE_TITLE_HEIGHT, + size[0], + size[1] + LiteGraph.NODE_TITLE_HEIGHT + ]; + strokeShape(ctx, area, { + shape: node3._shape || node3.constructor.shape || LiteGraph.ROUND_SHAPE, + thickness: lineWidth, + colour: color2, + title_height: LiteGraph.NODE_TITLE_HEIGHT, + collapsed: node3.collapsed + }); } if (self2.progress && node3.id === +self2.runningNodeId) { ctx.fillStyle = "green"; @@ -207943,11 +208911,11 @@ class ComfyApp { if (error2.extra_info && error2.extra_info.input_name) { const inputIndex = node3.findInputSlot(error2.extra_info.input_name); if (inputIndex !== -1) { - let pos2 = node3.getConnectionPos(true, inputIndex); + let pos = node3.getConnectionPos(true, inputIndex); ctx.beginPath(); ctx.arc( - pos2[0] - node3.pos[0], - pos2[1] - node3.pos[1], + pos[0] - node3.pos[0], + pos[1] - node3.pos[1], 12, 0, 2 * Math.PI, @@ -208077,11 +209045,15 @@ class ComfyApp { * Set up the app on the page */ async setup(canvasEl) { + this.bodyTop = document.getElementById("comfyui-body-top"); + this.bodyLeft = document.getElementById("comfyui-body-left"); + this.bodyRight = document.getElementById("comfyui-body-right"); + this.bodyBottom = document.getElementById("comfyui-body-bottom"); + this.canvasContainer = document.getElementById("graph-canvas-container"); this.canvasEl = canvasEl; this.resizeCanvas(); await useWorkspaceStore().workflow.syncWorkflows(); await useExtensionService().loadExtensions(); - this.#addProcessMouseHandler(); this.#addProcessKeyHandler(); this.#addConfigureHandler(); this.#addApiUpdateHandlers(); @@ -208103,10 +209075,7 @@ class ComfyApp { await useExtensionService().invokeExtensionsAsync("init"); await this.registerNodes(); this.#addDrawNodeHandler(); - this.#addDrawGroupsHandler(); this.#addDropHandler(); - this.#addCopyHandler(); - this.#addPasteHandler(); await useExtensionService().invokeExtensionsAsync("setup"); } resizeCanvas() { @@ -208310,8 +209279,8 @@ class ComfyApp { } catch (error2) { let errorHint = []; const filename = error2.fileName || (error2.stack || "").match(/(\/extensions\/.*\.js)/)?.[1]; - const pos2 = (filename || "").indexOf("/extensions/"); - if (pos2 > -1) { + const pos = (filename || "").indexOf("/extensions/"); + if (pos > -1) { errorHint.push( $el("span", { textContent: "This may be due to the following script:" @@ -208321,7 +209290,7 @@ class ComfyApp { style: { fontWeight: "bold" }, - textContent: filename.substring(pos2) + textContent: filename.substring(pos) }) ); } @@ -208356,27 +209325,27 @@ class ComfyApp { size[1] = Math.max(node3.size[1], size[1]); node3.size = size; if (node3.widgets) { - for (let widget2 of node3.widgets) { + for (let widget of node3.widgets) { if (node3.type == "KSampler" || node3.type == "KSamplerAdvanced") { - if (widget2.name == "sampler_name") { - if (typeof widget2.value === "string" && widget2.value.startsWith("sample_")) { - widget2.value = widget2.value.slice(7); + if (widget.name == "sampler_name") { + if (typeof widget.value === "string" && widget.value.startsWith("sample_")) { + widget.value = widget.value.slice(7); } } } if (node3.type == "KSampler" || node3.type == "KSamplerAdvanced" || node3.type == "PrimitiveNode") { - if (widget2.name == "control_after_generate") { - if (widget2.value === true) { - widget2.value = "randomize"; - } else if (widget2.value === false) { - widget2.value = "fixed"; + if (widget.name == "control_after_generate") { + if (widget.value === true) { + widget.value = "randomize"; + } else if (widget.value === false) { + widget.value = "fixed"; } } } if (reset_invalid_values) { - if (widget2.type == "combo") { - if (!widget2.options.values.includes(widget2.value) && widget2.options.values.length > 0) { - widget2.value = widget2.options.values[0]; + if (widget.type == "combo") { + if (!widget.options.values.includes(widget.value) && widget.options.values.length > 0) { + widget.value = widget.options.values[0]; } } } @@ -208421,8 +209390,8 @@ class ComfyApp { async graphToPrompt(graph = this.graph, clean = true) { for (const outerNode of graph.computeExecutionOrder(false)) { if (outerNode.widgets) { - for (const widget2 of outerNode.widgets) { - widget2.beforeQueued?.(); + for (const widget of outerNode.widgets) { + widget.beforeQueued?.(); } } const innerNodes = outerNode.getInnerNodes ? outerNode.getInnerNodes() : [outerNode]; @@ -208457,14 +209426,14 @@ class ComfyApp { const inputs = {}; const widgets = node3.widgets; if (widgets) { - for (const i2 in widgets) { - const widget2 = widgets[i2]; - if (!widget2.options || widget2.options.serialize !== false) { - inputs[widget2.name] = widget2.serializeValue ? await widget2.serializeValue(node3, i2) : widget2.value; + for (let i2 = 0; i2 < widgets.length; i2++) { + const widget = widgets[i2]; + if (!widget.options || widget.options.serialize !== false) { + inputs[widget.name] = widget.serializeValue ? await widget.serializeValue(node3, i2) : widget.value; } } } - for (let i2 in node3.inputs) { + for (let i2 = 0; i2 < node3.inputs.length; i2++) { let parent = node3.getInputNode(i2); if (parent) { let link2 = node3.getInputLink(i2); @@ -208506,6 +209475,7 @@ class ComfyApp { if (link2) { inputs[node3.inputs[i2].name] = [ String(link2.origin_id), + // @ts-expect-error link.origin_slot is already number. parseInt(link2.origin_slot) ]; } @@ -208596,9 +209566,9 @@ class ComfyApp { for (const n2 of p2.workflow.nodes) { const node3 = this.graph.getNodeById(n2.id); if (node3.widgets) { - for (const widget2 of node3.widgets) { - if (widget2.afterQueued) { - widget2.afterQueued(); + for (const widget of node3.widgets) { + if (widget.afterQueued) { + widget.afterQueued(); } } } @@ -208746,8 +209716,8 @@ class ComfyApp { let toSlot = node3.inputs?.findIndex((inp) => inp.name === input); if (toSlot == null || toSlot === -1) { try { - const widget2 = node3.widgets?.find((w2) => w2.name === input); - if (widget2 && node3.convertWidgetToInput?.(widget2)) { + const widget = node3.widgets?.find((w2) => w2.name === input); + if (widget && node3.convertWidgetToInput?.(widget)) { toSlot = node3.inputs?.length - 1; } } catch (error2) { @@ -208757,10 +209727,10 @@ class ComfyApp { fromNode.connect(fromSlot, node3, toSlot); } } else { - const widget2 = node3.widgets?.find((w2) => w2.name === input); - if (widget2) { - widget2.value = value4; - widget2.callback?.(value4); + const widget = node3.widgets?.find((w2) => w2.name === input); + if (widget) { + widget.value = value4; + widget.callback?.(value4); } } } @@ -208777,8 +209747,8 @@ class ComfyApp { let toSlot = node3.inputs?.findIndex((inp) => inp.name === input); if (toSlot == null || toSlot === -1) { try { - const widget2 = node3.widgets?.find((w2) => w2.name === input); - if (widget2 && node3.convertWidgetToInput?.(widget2)) { + const widget = node3.widgets?.find((w2) => w2.name === input); + if (widget && node3.convertWidgetToInput?.(widget)) { toSlot = node3.inputs?.length - 1; } } catch (error2) { @@ -208788,10 +209758,10 @@ class ComfyApp { fromNode.connect(fromSlot, node3, toSlot); } } else { - const widget2 = node3.widgets?.find((w2) => w2.name === input); - if (widget2) { - widget2.value = value4; - widget2.callback?.(value4); + const widget = node3.widgets?.find((w2) => w2.name === input); + if (widget) { + widget.value = value4; + widget.callback?.(value4); } } } @@ -208829,9 +209799,9 @@ class ComfyApp { node3.refreshComboInNode?.(defs); if (!def2) continue; for (const widgetNum in node3.widgets) { - const widget2 = node3.widgets[widgetNum]; - if (widget2.type == "combo" && def2["input"]["required"][widget2.name] !== void 0) { - widget2.options.values = def2["input"]["required"][widget2.name][0]; + const widget = node3.widgets[widgetNum]; + if (widget.type == "combo" && def2["input"]["required"][widget.name] !== void 0) { + widget.options.values = def2["input"]["required"][widget.name][0]; } } } @@ -208850,11 +209820,6 @@ class ComfyApp { }); } } - resetView() { - app$1.canvas.ds.scale = 1; - app$1.canvas.ds.offset = [0, 0]; - app$1.graph.setDirtyCanvas(true, true); - } /** * Frees memory allocated to image preview blobs for a specific node, by revoking the URLs associated with them. * @param nodeId ID of the node to revoke all preview images of @@ -208877,17 +209842,17 @@ class ComfyApp { this.lastNodeErrors = null; this.lastExecutionError = null; } - clientPosToCanvasPos(pos2) { + clientPosToCanvasPos(pos) { const rect = this.canvasContainer.getBoundingClientRect(); const containerOffsets = [rect.left, rect.top]; - return _.zip(pos2, this.canvas.ds.offset, containerOffsets).map( + return _.zip(pos, this.canvas.ds.offset, containerOffsets).map( ([p2, o1, o2]) => (p2 - o2) / this.canvas.ds.scale - o1 ); } - canvasPosToClientPos(pos2) { + canvasPosToClientPos(pos) { const rect = this.canvasContainer.getBoundingClientRect(); const containerOffsets = [rect.left, rect.top]; - return _.zip(pos2, this.canvas.ds.offset, containerOffsets).map( + return _.zip(pos, this.canvas.ds.offset, containerOffsets).map( ([p2, o1, o2]) => (p2 + o1) * this.canvas.ds.scale + o2 ); } @@ -210998,11 +211963,11 @@ var script$1$7 = { }, "ariaSelected") }, components: { - Checkbox: script$K, + Checkbox: script$J, ChevronDownIcon: script$n, ChevronRightIcon: script$p, - CheckIcon: script$M, - MinusIcon: script$L, + CheckIcon: script$L, + MinusIcon: script$K, SpinnerIcon: script$X }, directives: { @@ -211455,7 +212420,7 @@ var script$b = { }, components: { TreeNode: script$1$7, - InputText: script$J, + InputText: script$I, InputIcon: script$B, IconField: script$C, SearchIcon: script$D, @@ -213411,7 +214376,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({ }; return (_ctx, _cache) => { return openBlock(), createElementBlock("div", _hoisted_1$m, [ - !props.isEditing ? (openBlock(), createElementBlock("span", _hoisted_2$g, toDisplayString$1(_ctx.modelValue), 1)) : withDirectives((openBlock(), createBlock(unref(script$J), { + !props.isEditing ? (openBlock(), createElementBlock("span", _hoisted_2$g, toDisplayString$1(_ctx.modelValue), 1)) : withDirectives((openBlock(), createBlock(unref(script$I), { key: 1, type: "text", size: "small", @@ -213502,7 +214467,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({ const errorHandling = useErrorHandling(); const handleRename = errorHandling.wrapWithErrorHandlingAsync( async (newName) => { - await props.node.handleRename(props.node, newName); + await props.node.handleRename(newName); }, props.node.handleError, () => { @@ -213525,7 +214490,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({ onGenerateDragPreview: props.node.renderDragPreview ? ({ nativeSetDragImage }) => { setCustomNativeDragPreview({ render: /* @__PURE__ */ __name(({ container: container2 }) => { - return props.node.renderDragPreview(props.node, container2); + return props.node.renderDragPreview(container2); }, "render"), nativeSetDragImage }); @@ -213537,7 +214502,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({ onDrop: /* @__PURE__ */ __name(async (event) => { const dndData = event.source.data; if (dndData.type === "tree-explorer-node") { - await props.node.handleDrop?.(props.node, dndData); + await props.node.handleDrop?.(dndData); canDrop.value = false; emit2("itemDropped", props.node, dndData.data); } @@ -213596,7 +214561,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({ }; } }); -const TreeExplorerTreeNode = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-654109c7"]]); +const TreeExplorerTreeNode = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-a945b5a8"]]); const _sfc_main$o = /* @__PURE__ */ defineComponent({ __name: "TreeExplorer", props: /* @__PURE__ */ mergeModels({ @@ -213622,7 +214587,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({ }); const getTreeNodeIcon = /* @__PURE__ */ __name((node3) => { if (node3.getIcon) { - const icon3 = node3.getIcon(node3); + const icon3 = node3.getIcon(); if (icon3) { return icon3; } @@ -213644,7 +214609,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({ children, type: node3.leaf ? "node" : "folder", totalLeaves, - badgeText: node3.getBadgeText ? node3.getBadgeText(node3) : null + badgeText: node3.getBadgeText ? node3.getBadgeText() : null }; }, "fillNodeInfo"); const onNodeContentClick = /* @__PURE__ */ __name(async (e2, node3) => { @@ -213652,7 +214617,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({ selectionKeys.value = {}; } if (node3.handleClick) { - await node3.handleClick(node3, e2); + await node3.handleClick(e2); } emit2("nodeClick", node3, e2); }, "onNodeContentClick"); @@ -213669,7 +214634,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({ renameEditingNode.value = node3; }, "renameCommand"); const deleteCommand = /* @__PURE__ */ __name(async (node3) => { - await node3.handleDelete?.(node3); + await node3.handleDelete?.(); emit2("nodeDelete", node3); }, "deleteCommand"); const menuItems = computed( @@ -213762,7 +214727,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({ }; } }); -const TreeExplorer = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-976a6d58"]]); +const TreeExplorer = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-e3a237e6"]]); var theme$6 = /* @__PURE__ */ __name(function theme36(_ref) { var dt2 = _ref.dt; return "\n.p-toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n padding: ".concat(dt2("toolbar.padding"), ";\n background: ").concat(dt2("toolbar.background"), ";\n border: 1px solid ").concat(dt2("toolbar.border.color"), ";\n color: ").concat(dt2("toolbar.color"), ";\n border-radius: ").concat(dt2("toolbar.border.radius"), ";\n gap: ").concat(dt2("toolbar.gap"), ";\n}\n\n.p-toolbar-start,\n.p-toolbar-center,\n.p-toolbar-end {\n display: flex;\n align-items: center;\n}\n"); @@ -213848,7 +214813,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({ }), renderSlot(_ctx.$slots, "header", {}, void 0, true) ]), - createVNode(unref(script$R), { class: "comfy-vue-side-bar-body flex-grow h-0" }, { + createVNode(unref(script$Q), { class: "comfy-vue-side-bar-body flex-grow h-0" }, { default: withCtx(() => [ renderSlot(_ctx.$slots, "body", {}, void 0, true) ]), @@ -214331,7 +215296,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({ label: model ? nameFormat === "title" ? model.title : model.simplified_file_name : node3.label, leaf: node3.leaf, data: node3.data, - getIcon: /* @__PURE__ */ __name(() => { + getIcon() { if (model) { return model.image ? "pi pi-image" : "pi pi-file"; } @@ -214339,31 +215304,31 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({ return folder.state === ResourceState.Loading ? "pi pi-spin pi-spinner" : "pi pi-folder"; } return "pi pi-folder"; - }, "getIcon"), - getBadgeText: /* @__PURE__ */ __name(() => { + }, + getBadgeText() { if (!folder) { return null; } return folder.state === ResourceState.Loaded ? null : ""; - }, "getBadgeText"), + }, children, draggable: node3.leaf, - handleClick: /* @__PURE__ */ __name((node22, e2) => { - if (node22.leaf) { + handleClick(e2) { + if (this.leaf) { const provider = modelToNodeStore.getNodeProvider(model.directory); if (provider) { - const node32 = useLitegraphService().addNodeOnGraph(provider.nodeDef); - const widget2 = node32.widgets.find( - (widget22) => widget22.name === provider.key + const node22 = useLitegraphService().addNodeOnGraph(provider.nodeDef); + const widget = node22.widgets.find( + (widget2) => widget2.name === provider.key ); - if (widget2) { - widget2.value = model.file_name; + if (widget) { + widget.value = model.file_name; } } } else { - toggleNodeOnEvent(e2, node22); + toggleNodeOnEvent(e2, node3); } - }, "handleClick") + } }; }, "fillNodeInfo"); return fillNodeInfo(root29.value); @@ -214452,7 +215417,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({ }; } }); -const ModelLibrarySidebarTab = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-0bb2ac55"]]); +const ModelLibrarySidebarTab = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-3be51840"]]); const useModelLibrarySidebarTab = /* @__PURE__ */ __name(() => { const { t: t2 } = useI18n(); return { @@ -215779,7 +216744,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({ _: 1 }, 8, ["modelValue"]) ]), - createVNode(unref(script$S)), + createVNode(unref(script$R)), createBaseVNode("div", _hoisted_4$3, [ createBaseVNode("label", _hoisted_5$3, toDisplayString$1(_ctx.$t("g.color")), 1), createBaseVNode("div", _hoisted_6$2, [ @@ -215950,38 +216915,49 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({ label: node3.leaf ? node3.data.display_name : node3.label, leaf: node3.leaf, data: node3.data, - getIcon: /* @__PURE__ */ __name((node22) => { - if (node22.leaf) { + getIcon() { + if (this.leaf) { return "pi pi-circle-fill"; } - const customization = nodeBookmarkStore.bookmarksCustomization[node22.data?.nodePath]; + const customization = nodeBookmarkStore.bookmarksCustomization[node3.data?.nodePath]; return customization?.icon ? "pi " + customization.icon : "pi pi-bookmark-fill"; - }, "getIcon"), + }, children: sortedChildren, draggable: node3.leaf, + renderDragPreview(container) { + const vnode = h(NodePreview, { nodeDef: node3.data }); + render$$(vnode, container); + return () => { + render$$(null, container); + }; + }, droppable: !node3.leaf, - handleDrop: /* @__PURE__ */ __name((node22, data26) => { + handleDrop(data26) { const nodeDefToAdd = data26.data.data; if (nodeBookmarkStore.isBookmarked(nodeDefToAdd)) { nodeBookmarkStore.toggleBookmark(nodeDefToAdd); } - const folderNodeDef = node22.data; + const folderNodeDef = node3.data; const nodePath = folderNodeDef.category + "/" + nodeDefToAdd.name; nodeBookmarkStore.addBookmark(nodePath); - }, "handleDrop"), - handleClick: /* @__PURE__ */ __name((node22, e2) => { - if (node22.leaf) { - useLitegraphService().addNodeOnGraph(node22.data); + }, + handleClick(e2) { + if (this.leaf) { + useLitegraphService().addNodeOnGraph(this.data); } else { - toggleNodeOnEvent(e2, node22); + toggleNodeOnEvent(e2, node3); } - }, "handleClick"), + }, contextMenuItems: extraMenuItems, ...node3.leaf ? {} : { - handleRename, - handleDelete: /* @__PURE__ */ __name((node22) => { - nodeBookmarkStore.deleteBookmarkFolder(node22.data); - }, "handleDelete") + handleRename(newName) { + if (this.data && this.data.isDummyFolder) { + nodeBookmarkStore.renameBookmarkFolder(this.data, newName); + } + }, + handleDelete() { + nodeBookmarkStore.deleteBookmarkFolder(this.data); + } } }; }, "fillNodeInfo"); @@ -216006,11 +216982,6 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({ __expose({ addNewBookmarkFolder }); - const handleRename = /* @__PURE__ */ __name((node3, newName) => { - if (node3.data && node3.data.isDummyFolder) { - nodeBookmarkStore.renameBookmarkFolder(node3.data, newName); - } - }, "handleRename"); const showCustomizationDialog = ref(false); const initialIcon = ref(nodeBookmarkStore.defaultBookmarkIcon); const initialColor = ref(nodeBookmarkStore.defaultBookmarkColor); @@ -216074,27 +217045,27 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({ label: node3.leaf ? node3.data.display_name : node3.label, leaf: node3.leaf, data: node3.data, - getIcon: /* @__PURE__ */ __name((node22) => { - if (node22.leaf) { + getIcon() { + if (this.leaf) { return "pi pi-circle-fill"; } - }, "getIcon"), + }, children, draggable: node3.leaf, - renderDragPreview: /* @__PURE__ */ __name((node22, container) => { - const vnode = h(NodePreview, { nodeDef: node22.data }); + renderDragPreview(container) { + const vnode = h(NodePreview, { nodeDef: node3.data }); render$$(vnode, container); return () => { render$$(null, container); }; - }, "renderDragPreview"), - handleClick: /* @__PURE__ */ __name((node22, e2) => { - if (node22.leaf) { - useLitegraphService().addNodeOnGraph(node22.data); + }, + handleClick(e2) { + if (this.leaf) { + useLitegraphService().addNodeOnGraph(this.data); } else { - toggleNodeOnEvent(e2, node22); + toggleNodeOnEvent(e2, this); } - }, "handleClick") + } }; }, "fillNodeInfo"); return fillNodeInfo(root29.value); @@ -216211,7 +217182,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({ ref: nodeBookmarkTreeExplorerRef, "filtered-node-defs": filteredNodeDefs.value }, null, 8, ["filtered-node-defs"]), - withDirectives(createVNode(unref(script$S), { + withDirectives(createVNode(unref(script$R), { type: "dashed", class: "m-2" }, null, 512), [ @@ -217371,13 +218342,13 @@ var script$2 = { }; }, "data"), watch: { - numVisible: /* @__PURE__ */ __name(function numVisible2(newValue2, oldValue2) { + numVisible: /* @__PURE__ */ __name(function numVisible2(newValue2, oldValue) { this.d_numVisible = newValue2; - this.d_oldNumVisible = oldValue2; + this.d_oldNumVisible = oldValue; }, "numVisible"), - activeIndex: /* @__PURE__ */ __name(function activeIndex2(newValue2, oldValue2) { + activeIndex: /* @__PURE__ */ __name(function activeIndex2(newValue2, oldValue) { this.d_activeIndex = newValue2; - this.d_oldActiveItemIndex = oldValue2; + this.d_oldActiveItemIndex = oldValue; }, "activeIndex") }, mounted: /* @__PURE__ */ __name(function mounted23() { @@ -217970,10 +218941,10 @@ var script$1$1 = { }, "stopSlideShow"), getPositionClass: /* @__PURE__ */ __name(function getPositionClass(preClassName, position3) { var positions = ["top", "left", "bottom", "right"]; - var pos2 = positions.find(function(item3) { + var pos = positions.find(function(item3) { return item3 === position3; }); - return pos2 ? "".concat(preClassName, "-").concat(pos2) : ""; + return pos ? "".concat(preClassName, "-").concat(pos) : ""; }, "getPositionClass"), isVertical: /* @__PURE__ */ __name(function isVertical4() { return this.$attrs.thumbnailsPosition === "left" || this.$attrs.thumbnailsPosition === "right"; @@ -219236,7 +220207,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({ class: normalizeClass(["flex items-center", props.class]) }, [ _ctx.position === "left" ? (openBlock(), createElementBlock("span", _hoisted_1$1, toDisplayString$1(_ctx.text), 1)) : createCommentVNode("", true), - createVNode(unref(script$S), { + createVNode(unref(script$R), { align: _ctx.align, type: _ctx.type, layout: _ctx.layout, @@ -219356,34 +220327,36 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({ const renderTreeNode = /* @__PURE__ */ __name((node3, type) => { const children = node3.children?.map((child) => renderTreeNode(child, type)); const workflow = node3.data; - const handleClick2 = /* @__PURE__ */ __name((node22, e2) => { - if (node22.leaf) { + function handleClick2(e2) { + if (this.leaf) { workflowService2.openWorkflow(workflow); } else { - toggleNodeOnEvent(e2, node22); + toggleNodeOnEvent(e2, this); } - }, "handleClick"); + } + __name(handleClick2, "handleClick"); const actions = node3.leaf ? { handleClick: handleClick2, - handleRename: /* @__PURE__ */ __name(async (node22, newName) => { + async handleRename(newName) { const newPath = type === "Browse" ? workflow.directory + "/" + appendJsonExt(newName) : ComfyWorkflow.basePath + appendJsonExt(newName); await workflowService2.renameWorkflow(workflow, newPath); - }, "handleRename"), - handleDelete: workflow.isTemporary ? void 0 : async () => { + }, + handleDelete: workflow.isTemporary ? void 0 : async function() { await workflowService2.deleteWorkflow(workflow); }, - contextMenuItems: /* @__PURE__ */ __name((node22) => { + contextMenuItems() { return [ { label: t2("g.insert"), icon: "pi pi-file-export", command: /* @__PURE__ */ __name(() => { - const workflow2 = node22.data; + const workflow2 = node3.data; workflowService2.insertWorkflow(workflow2); }, "command") } ]; - }, "contextMenuItems") + }, + draggable: true } : { handleClick: handleClick2 }; return { key: node3.key, @@ -219659,6 +220632,7 @@ const useWorkspaceStore = /* @__PURE__ */ defineStore("workspace", () => { const workflow = computed(() => useWorkflowStore()); const colorPalette = useColorPaletteService(); const dialog = useDialogService(); + const bottomPanel = useBottomPanelStore(); function registerSidebarTab(tab) { sidebarTab.value.registerSidebarTab(tab); } @@ -219686,6 +220660,7 @@ const useWorkspaceStore = /* @__PURE__ */ defineStore("workspace", () => { workflow, colorPalette, dialog, + bottomPanel, registerSidebarTab, unregisterSidebarTab, getSidebarTabs @@ -219745,7 +220720,7 @@ init$3({ app, dsn: "https://e2d0c0bd392ffdce48e856c2a055f437@o4507954455314432.ingest.us.sentry.io/4508621568475136", enabled: true, - release: "1.8.14", + release: "1.9.17", integrations: [], autoSessionTracking: false, defaultIntegrations: false, @@ -219778,195 +220753,195 @@ export { Fragment$1 as F, script$v as G, markRaw as H, - defineStore as I, - shallowRef as J, - useI18n as K, - useCommandStore as L, - LiteGraph as M, - useColorPaletteStore as N, - watch as O, - useNodeDefStore as P, - BadgePosition as Q, - LGraphBadge as R, - _ as S, - NodeBadgeMode as T, - ref as U, - useEventListener as V, - nextTick as W, - st as X, - normalizeI18nKey as Y, + useI18n as I, + useCommandStore as J, + useCanvasStore as K, + LiteGraph as L, + useColorPaletteStore as M, + watch as N, + useNodeDefStore as O, + BadgePosition as P, + LGraphBadge as Q, + _ as R, + NodeBadgeMode as S, + ref as T, + useEventListener as U, + nextTick as V, + st as W, + normalizeI18nKey as X, + useTitleEditorStore as Y, LGraphGroup as Z, _export_sfc as _, useSettingStore as a, - script$G as a$, + useDraggable as a$, EditableText as a0, - useNodeFrequencyStore as a1, - useNodeBookmarkStore as a2, - highlightQuery as a3, - script$s as a4, - formatNumberWithSuffix as a5, - NodeSourceType as a6, - createTextVNode as a7, - script$t as a8, - NodePreview as a9, + defineStore as a1, + useNodeFrequencyStore as a2, + useNodeBookmarkStore as a3, + highlightQuery as a4, + script$s as a5, + formatNumberWithSuffix as a6, + NodeSourceType as a7, + createTextVNode as a8, + script$t as a9, ComfyNodeDefImpl as aA, ComfyModelDef as aB, - LGraph$1 as aC, - LLink as aD, - DragAndScale as aE, - LGraphCanvas as aF, - ContextMenu as aG, - api as aH, - getStorageValue as aI, - useModelStore as aJ, - setStorageValue as aK, - CanvasPointer as aL, - IS_CONTROL_WIDGET as aM, - updateControlWidgetLabel as aN, - useColorPaletteService as aO, - ChangeTracker as aP, - i18n as aQ, - useToast as aR, - useToastStore as aS, - useQueueSettingsStore as aT, - script$j as aU, - useQueuePendingTaskCountStore as aV, - useLocalStorage as aW, - useDraggable as aX, - watchDebounced as aY, - inject as aZ, - useElementBounding as a_, - NodeSearchFilter as aa, - script$T as ab, - SearchFilterChip as ac, - useLitegraphService as ad, - storeToRefs as ae, - isRef as af, - toRaw as ag, - LinkReleaseTriggerAction as ah, - normalizeClass as ai, - useUserStore as aj, - useDialogStore as ak, - SettingDialogHeader as al, - SettingDialogContent as am, - useKeybindingStore as an, - Teleport as ao, - usePragmaticDraggable as ap, - usePragmaticDroppable as aq, - withModifiers as ar, - mergeProps$2 as as, - useWorkflowService as at, - useWorkflowBookmarkStore as au, - script$7 as av, - script$R as aw, - script$c as ax, - LinkMarkerShape as ay, + ComfyWorkflow as aC, + LGraphCanvas as aD, + te as aE, + LGraph$1 as aF, + LLink as aG, + DragAndScale as aH, + ContextMenu as aI, + CanvasPointer as aJ, + isImageNode as aK, + api as aL, + getStorageValue as aM, + useModelStore as aN, + setStorageValue as aO, + LinkMarkerShape as aP, + IS_CONTROL_WIDGET as aQ, + updateControlWidgetLabel as aR, + useColorPaletteService as aS, + ChangeTracker as aT, + i18n as aU, + useToast as aV, + useToastStore as aW, + useQueueSettingsStore as aX, + script$j as aY, + useQueuePendingTaskCountStore as aZ, + useLocalStorage as a_, + NodePreview as aa, + NodeSearchFilter as ab, + script$T as ac, + SearchFilterChip as ad, + useLitegraphService as ae, + storeToRefs as af, + isRef as ag, + toRaw as ah, + LinkReleaseTriggerAction as ai, + normalizeClass as aj, + useUserStore as ak, + useDialogStore as al, + SettingDialogHeader as am, + SettingDialogContent as an, + useKeybindingStore as ao, + Teleport as ap, + usePragmaticDraggable as aq, + usePragmaticDroppable as ar, + withModifiers as as, + mergeProps$2 as at, + useWorkflowService as au, + useWorkflowBookmarkStore as av, + script$7 as aw, + script$Q as ax, + script$c as ay, useModelToNodeStore as az, useWorkflowStore as b, - addStyle$1 as b$, - lodashExports as b0, - useEventBus as b1, - useMenuItemStore as b2, - provide as b3, - isElectron as b4, - electronAPI as b5, - isNativeWindow as b6, - useDialogService as b7, - LGraphEventMode as b8, - useQueueStore as b9, - BaseStyle$1 as bA, - script$14 as bB, - ZIndex$1 as bC, - addClass$1 as bD, - focus$2 as bE, - blockBodyScroll$1 as bF, - unblockBodyScroll$1 as bG, - FocusTrap as bH, - script$U as bI, - script$_ as bJ, - resolveComponent as bK, - Transition as bL, - script$12 as bM, - PrimeIcons as bN, - findSingle$1 as bO, - getAttribute$1 as bP, - script$f as bQ, - script$n as bR, - Ripple as bS, - UniqueComponentId as bT, - script$p as bU, - BaseDirective as bV, - removeClass$1 as bW, - createElement$1 as bX, - hasClass$1 as bY, - script$$ as bZ, - script$10 as b_, - DEFAULT_DARK_COLOR_PALETTE as ba, - DEFAULT_LIGHT_COLOR_PALETTE as bb, - t as bc, - useErrorHandling as bd, - useRouter as be, - withKeys as bf, - script$J as bg, - script$S as bh, - script$m as bi, - script$I as bj, - ProgressStatus as bk, - BaseTerminal as bl, - useModel as bm, - script$i as bn, - script$B as bo, - script$C as bp, - MigrationItems as bq, - script$K as br, - mergeModels as bs, - ValidationState as bt, - checkMirrorReachable as bu, - _sfc_main$C as bv, - mergeValidationStates as bw, - CUDA_TORCH_URL as bx, - NIGHTLY_CPU_TORCH_URL as by, - script$y as bz, + ConnectedOverlayScrollHandler as b$, + watchDebounced as b0, + inject as b1, + useElementBounding as b2, + script$G as b3, + lodashExports as b4, + useEventBus as b5, + useMenuItemStore as b6, + provide as b7, + isElectron as b8, + electronAPI as b9, + isInChina as bA, + mergeValidationStates as bB, + CUDA_TORCH_URL as bC, + NIGHTLY_CPU_TORCH_URL as bD, + script$12 as bE, + PrimeIcons as bF, + BaseStyle$1 as bG, + script$14 as bH, + Transition as bI, + findSingle$1 as bJ, + getAttribute$1 as bK, + focus$2 as bL, + script$f as bM, + script$n as bN, + Ripple as bO, + UniqueComponentId as bP, + script$p as bQ, + resolveComponent as bR, + BaseDirective as bS, + removeClass$1 as bT, + addClass$1 as bU, + createElement$1 as bV, + hasClass$1 as bW, + script$$ as bX, + script$10 as bY, + ZIndex$1 as bZ, + addStyle$1 as b_, + isNativeWindow as ba, + useDialogService as bb, + LGraphEventMode as bc, + useQueueStore as bd, + DEFAULT_DARK_COLOR_PALETTE as be, + DEFAULT_LIGHT_COLOR_PALETTE as bf, + t as bg, + useErrorHandling as bh, + useRouter as bi, + withKeys as bj, + script$I as bk, + script$R as bl, + script$m as bm, + script$S as bn, + ProgressStatus as bo, + BaseTerminal as bp, + useModel as bq, + script$i as br, + script$B as bs, + script$C as bt, + MigrationItems as bu, + script$J as bv, + mergeModels as bw, + ValidationState as bx, + checkMirrorReachable as by, + _sfc_main$C as bz, computed as c, - useTimeout as c$, - ConnectedOverlayScrollHandler as c0, - isTouchDevice$1 as c1, - relativePosition$1 as c2, - getOuterWidth$1 as c3, - absolutePosition$1 as c4, - find$2 as c5, - getIndex$1 as c6, - getFocusableElements$1 as c7, - OverlayEventBus as c8, - setAttribute$1 as c9, - script$M as cA, - script$u as cB, - getUserAgent$1 as cC, - script$l as cD, - getFirstFocusableElement$1 as cE, - getLastFocusableElement$1 as cF, - FilterService as cG, - script$A as cH, - script$D as cI, - findIndexInList$2 as cJ, - scrollInView$1 as cK, - script$z as cL, - script$k as cM, - script$9 as cN, - findLast$3 as cO, - getWindowScrollTop$1 as cP, - getWidth$1 as cQ, - getOffset$1 as cR, - vModelText as cS, - script$b as cT, - getVNodeProp as cU, - getNextElementSibling$1 as cV, - getPreviousElementSibling$1 as cW, - isClickable$1 as cX, - _default as cY, - clearSelection$1 as cZ, - isRTL$1 as c_, - localeComparator$2 as ca, + getPreviousElementSibling$1 as c$, + isTouchDevice$1 as c0, + relativePosition$1 as c1, + getOuterWidth$1 as c2, + absolutePosition$1 as c3, + find$2 as c4, + getIndex$1 as c5, + getFocusableElements$1 as c6, + OverlayEventBus as c7, + setAttribute$1 as c8, + localeComparator$2 as c9, + unblockBodyScroll$1 as cA, + FocusTrap as cB, + guardReactiveProps as cC, + setCSSProperty$1 as cD, + $dt$1 as cE, + script$L as cF, + script$u as cG, + getUserAgent$1 as cH, + script$l as cI, + getFirstFocusableElement$1 as cJ, + getLastFocusableElement$1 as cK, + FilterService as cL, + script$A as cM, + script$D as cN, + findIndexInList$2 as cO, + scrollInView$1 as cP, + script$z as cQ, + script$k as cR, + script$9 as cS, + findLast$3 as cT, + getWindowScrollTop$1 as cU, + getWidth$1 as cV, + getOffset$1 as cW, + vModelText as cX, + script$b as cY, + getVNodeProp as cZ, + getNextElementSibling$1 as c_, + script$U as ca, script$q as cb, resolveFieldData$2 as cc, isNotEmpty$2 as cd, @@ -219977,57 +220952,68 @@ export { isEmpty$3 as ci, findLastIndex$2 as cj, script$X as ck, - script$11 as cl, - uuid$1 as cm, - sort$2 as cn, - createSlots as co, - EventBus$1 as cp, - resolve$4 as cq, - Tooltip as cr, - script$H as cs, - script$L as ct, - script$W as cu, - normalizeProps as cv, - isAttributeEquals$1 as cw, - guardReactiveProps as cx, - setCSSProperty$1 as cy, - $dt$1 as cz, + script$_ as cl, + script$11 as cm, + uuid$1 as cn, + sort$2 as co, + createSlots as cp, + EventBus$1 as cq, + resolve$4 as cr, + Tooltip as cs, + script$H as ct, + script$K as cu, + script$W as cv, + script$y as cw, + normalizeProps as cx, + blockBodyScroll$1 as cy, + isAttributeEquals$1 as cz, defineComponent as d, - script$Q as d0, - useConfirm as d1, - script$6 as d2, - onUnmounted as d3, - getHeight$1 as d4, - getOuterHeight$1 as d5, - isArray$c as d6, - ToastEventBus as d7, - TransitionGroup as d8, - nestedPosition$1 as d9, - ComfyDialog as da, - $el as db, - ComfyApp as dc, - useExtensionService as dd, - processDynamicPrompt as de, - DraggableList as df, - applyTextReplacements as dg, - ComfyWidgets as dh, - addValueControlWidgets as di, - serialise as dj, - deserialiseAndCreate as dk, - FilterMatchMode as dl, - SearchBox as dm, - _sfc_main$L as dn, - KeyComboImpl as dp, - KeybindingImpl as dq, - useExtensionStore as dr, - invokeElementMethod$1 as ds, - FilterOperator as dt, - exportCSV$1 as du, - getHiddenElementOuterWidth$1 as dv, - getHiddenElementOuterHeight$1 as dw, - reorderArray$2 as dx, - useCopyToClipboard as dy, - FormItem as dz, + isClickable$1 as d0, + _default as d1, + clearSelection$1 as d2, + isRTL$1 as d3, + useTimeout as d4, + script$P as d5, + useConfirm as d6, + script$6 as d7, + onUnmounted as d8, + getHeight$1 as d9, + KeyComboImpl as dA, + KeybindingImpl as dB, + useExtensionStore as dC, + invokeElementMethod$1 as dD, + FilterOperator as dE, + exportCSV$1 as dF, + getHiddenElementOuterWidth$1 as dG, + getHiddenElementOuterHeight$1 as dH, + reorderArray$2 as dI, + useCopyToClipboard as dJ, + FormItem as dK, + getOuterHeight$1 as da, + isArray$c as db, + nestedPosition$1 as dc, + commonjsGlobal as dd, + getDefaultExportFromCjs as de, + xtermExports as df, + ToastEventBus as dg, + TransitionGroup as dh, + ComfyDialog as di, + $el as dj, + ComfyApp as dk, + useExtensionService as dl, + processDynamicPrompt as dm, + DraggableList as dn, + applyTextReplacements as dp, + ComfyWidgets as dq, + addValueControlWidgets as dr, + serialise as ds, + deserialiseAndCreate as dt, + script$g as du, + createApp as dv, + PrimeVue as dw, + FilterMatchMode as dx, + SearchBox as dy, + _sfc_main$L as dz, useTitle as e, createElementBlock as f, useWorkspaceStore as g, @@ -220051,4 +221037,4 @@ export { createBlock as y, withCtx as z }; -//# sourceMappingURL=index-DqqhYDnY.js.map +//# sourceMappingURL=index-DqXp9vW4.js.map diff --git a/web/assets/index-BapOFhAR.js b/web/assets/index-KUUE4Ew8.js similarity index 99% rename from web/assets/index-BapOFhAR.js rename to web/assets/index-KUUE4Ew8.js index a8d55691..dd2a87a8 100644 --- a/web/assets/index-BapOFhAR.js +++ b/web/assets/index-KUUE4Ew8.js @@ -1,7 +1,7 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -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-DqqhYDnY.js"; -import { s as script$D } from "./index-DXE47DZl.js"; +import { bG as BaseStyle, bH as script$s, bX as script$t, o as openBlock, f as createElementBlock, at as mergeProps, m as createBaseVNode, E as toDisplayString, bO as Ripple, r as resolveDirective, i as withDirectives, y as createBlock, C as resolveDynamicComponent, bm as script$u, bR as resolveComponent, aj as normalizeClass, cp as createSlots, z as withCtx, aY as script$v, cf as script$w, F as Fragment, D as renderList, a8 as createTextVNode, c8 as setAttribute, cx as normalizeProps, A as renderSlot, B as createCommentVNode, bY as script$x, ce as equals, cF as script$y, bv as script$z, cJ as getFirstFocusableElement, c7 as OverlayEventBus, cZ as getVNodeProp, cc as resolveFieldData, dD as invokeElementMethod, bK as getAttribute, c_ as getNextElementSibling, c2 as getOuterWidth, c$ as getPreviousElementSibling, l as script$A, bN as script$B, bQ as script$C, cl as script$E, cd as isNotEmpty, as as withModifiers, da as getOuterHeight, bP as UniqueComponentId, d1 as _default, bZ as ZIndex, bL as focus, b_ as addStyle, c3 as absolutePosition, b$ as ConnectedOverlayScrollHandler, c0 as isTouchDevice, dE as FilterOperator, ca as script$F, ct as script$G, cB as FocusTrap, k as createVNode, bI as Transition, bj as withKeys, c5 as getIndex, cv as script$H, d0 as isClickable, d2 as clearSelection, c9 as localeComparator, co as sort, cL as FilterService, dx as FilterMatchMode, bJ as findSingle, cO as findIndexInList, c4 as find, dF as exportCSV, cW as getOffset, d3 as isRTL, dG as getHiddenElementOuterWidth, dH as getHiddenElementOuterHeight, dI as reorderArray, bT as removeClass, bU as addClass, ci as isEmpty, cM as script$I, ck as script$J } from "./index-DqXp9vW4.js"; +import { s as script$D } from "./index-BTHx8UHZ.js"; var ColumnStyle = BaseStyle.extend({ name: "column" }); @@ -8787,4 +8787,4 @@ export { script as h, script$l as s }; -//# sourceMappingURL=index-BapOFhAR.js.map +//# sourceMappingURL=index-KUUE4Ew8.js.map diff --git a/web/assets/keybindingService-DEgCutrm.js b/web/assets/keybindingService-DgS0S2M6.js similarity index 93% rename from web/assets/keybindingService-DEgCutrm.js rename to web/assets/keybindingService-DgS0S2M6.js index 91a668b7..6b2f26f0 100644 --- a/web/assets/keybindingService-DEgCutrm.js +++ b/web/assets/keybindingService-DgS0S2M6.js @@ -1,6 +1,6 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { an as useKeybindingStore, L as useCommandStore, a as useSettingStore, dp as KeyComboImpl, dq as KeybindingImpl } from "./index-DqqhYDnY.js"; +import { ao as useKeybindingStore, J as useCommandStore, a as useSettingStore, dA as KeyComboImpl, dB as KeybindingImpl } from "./index-DqXp9vW4.js"; const CORE_KEYBINDINGS = [ { combo: { @@ -186,7 +186,7 @@ const useKeybindingService = /* @__PURE__ */ __name(() => { return; } const target = event.composedPath()[0]; - if (!keyCombo.hasModifier && (target.tagName === "TEXTAREA" || target.tagName === "INPUT" || target.tagName === "SPAN" && target.classList.contains("property_value"))) { + if (keyCombo.isReservedByTextInput && (target.tagName === "TEXTAREA" || target.tagName === "INPUT" || target.tagName === "SPAN" && target.classList.contains("property_value"))) { return; } const keybinding = keybindingStore.getKeybinding(keyCombo); @@ -247,4 +247,4 @@ const useKeybindingService = /* @__PURE__ */ __name(() => { export { useKeybindingService as u }; -//# sourceMappingURL=keybindingService-DEgCutrm.js.map +//# sourceMappingURL=keybindingService-DgS0S2M6.js.map diff --git a/web/assets/serverConfigStore-Kb5DJVFt.js b/web/assets/serverConfigStore-C8uoM7Sm.js similarity index 95% rename from web/assets/serverConfigStore-Kb5DJVFt.js rename to web/assets/serverConfigStore-C8uoM7Sm.js index c1ff0646..b447c27b 100644 --- a/web/assets/serverConfigStore-Kb5DJVFt.js +++ b/web/assets/serverConfigStore-C8uoM7Sm.js @@ -1,6 +1,6 @@ var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { I as defineStore, U as ref, c as computed } from "./index-DqqhYDnY.js"; +import { a1 as defineStore, T as ref, c as computed } from "./index-DqXp9vW4.js"; const useServerConfigStore = defineStore("serverConfig", () => { const serverConfigById = ref({}); const serverConfigs = computed(() => { @@ -87,4 +87,4 @@ const useServerConfigStore = defineStore("serverConfig", () => { export { useServerConfigStore as u }; -//# sourceMappingURL=serverConfigStore-Kb5DJVFt.js.map +//# sourceMappingURL=serverConfigStore-C8uoM7Sm.js.map diff --git a/web/index.html b/web/index.html index c1463353..f8b1fc2f 100644 --- a/web/index.html +++ b/web/index.html @@ -6,8 +6,8 @@ - - + +
diff --git a/web/scripts/domWidget.js b/web/scripts/domWidget.js new file mode 100644 index 00000000..a5fd049e --- /dev/null +++ b/web/scripts/domWidget.js @@ -0,0 +1,2 @@ +// Shim for scripts/domWidget.ts +export const DOMWidgetImpl = window.comfyAPI.domWidget.DOMWidgetImpl; diff --git a/web/templates/image2image.json b/web/templates/image2image.json index 81da539d..7aaf5a21 100644 --- a/web/templates/image2image.json +++ b/web/templates/image2image.json @@ -330,7 +330,7 @@ "Node name for S&R": "CheckpointLoaderSimple" }, "widgets_values": [ - "v1-5-pruned-emaonly.safetensors" + "v1-5-pruned-emaonly-fp16.safetensors" ] } ], @@ -440,8 +440,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" }] }