From b6be3936c988fbc422be87d999e26185e5d1b1f3 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Mon, 16 Dec 2024 20:36:18 +0100 Subject: [PATCH] updated ui --- ...{index-OITkUI9z.css => index-BiJRqTDS.css} | 2 +- .../{index-CwgJHVV1.js => index-EUOeEYd1.js} | 340 +++++++++--------- web/dist/index.html | 4 +- web/src/views/SettingsView.vue | 1 + 4 files changed, 174 insertions(+), 173 deletions(-) rename web/dist/assets/{index-OITkUI9z.css => index-BiJRqTDS.css} (99%) rename web/dist/assets/{index-CwgJHVV1.js => index-EUOeEYd1.js} (92%) diff --git a/web/dist/assets/index-OITkUI9z.css b/web/dist/assets/index-BiJRqTDS.css similarity index 99% rename from web/dist/assets/index-OITkUI9z.css rename to web/dist/assets/index-BiJRqTDS.css index af2f1c5d..08f24aae 100644 --- a/web/dist/assets/index-OITkUI9z.css +++ b/web/dist/assets/index-BiJRqTDS.css @@ -5,4 +5,4 @@ Author: (c) Henri Vandersleyen License: see project LICENSE Touched: 2022 -*/.hljs-meta,.hljs-comment{color:#565f89}.hljs-tag,.hljs-doctag,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-template-tag,.hljs-selector-pseudo,.hljs-selector-attr,.hljs-variable.language_,.hljs-deletion{color:#f7768e}.hljs-variable,.hljs-template-variable,.hljs-number,.hljs-literal,.hljs-type,.hljs-params,.hljs-link{color:#ff9e64}.hljs-built_in,.hljs-attribute{color:#e0af68}.hljs-selector-tag{color:#2ac3de}.hljs-keyword,.hljs-title.function_,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-subst,.hljs-property{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-quote,.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-name,.hljs-keyword,.hljs-operator,.hljs-char.escape_,.hljs-attr{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.code-container{display:flex;margin:0}.line-numbers{flex-shrink:0;padding-right:5px;color:#999;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;margin:0}.code-content{flex-grow:1;margin:0;outline:none}.katex-display{display:inline-block;margin:0}.katex{display:inline-block;white-space:nowrap}.inline-latex{display:inline!important}.progress-bar-container{background-color:#f0f0f0;border-radius:4px;height:8px;overflow:hidden}.progress-bar{background-color:#3498db;height:100%;transition:width .3s ease}.custom-scrollbar[data-v-8a34bb65]{scrollbar-width:thin;scrollbar-color:rgba(156,163,175,.5) transparent}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar-thumb{background-color:#9ca3af80;border-radius:3px}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar-thumb:hover{background-color:#9ca3afb3}.toastItem-enter-active[data-v-46f379e5],.toastItem-leave-active[data-v-46f379e5]{transition:all .5s ease}.toastItem-enter-from[data-v-46f379e5],.toastItem-leave-to[data-v-46f379e5]{opacity:0;transform:translate(-30px)}.topbar-container[data-v-8d9a9d0d]{position:fixed;top:0;left:0;right:0;z-index:1000}.topbar[data-v-8d9a9d0d]{background-color:#ffffff1a;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);transition:transform .3s ease-in-out;display:flex;justify-content:center}.topbar-hidden[data-v-8d9a9d0d]{transform:translateY(-100%)}.topbar-content[data-v-8d9a9d0d]{display:flex;justify-content:space-between;align-items:center;max-width:1200px;width:100%}.pin-button[data-v-8d9a9d0d]{background-color:transparent;border:none;cursor:pointer;padding:5px;display:flex;align-items:center;justify-content:center}.pin-button svg[data-v-8d9a9d0d]{width:24px;height:24px;transition:transform .3s ease}.pin-button:hover svg[data-v-8d9a9d0d]{transform:scale(1.2)}.placeholder[data-v-8d9a9d0d]{height:10px}.topbar-container[data-v-8d9a9d0d]{position:relative;width:100%}.hover-zone[data-v-8d9a9d0d]{opacity:0}.error[data-v-8d9a9d0d]{color:red;margin-left:1rem}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:1000}.hovered{transform:scale(1.05);transition:transform .2s ease-in-out}.active{transform:scale(1.1);transition:transform .2s ease-in-out}.dropdown-shadow[data-v-6c3ea3a5]{box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}:root.dark .dropdown-shadow[data-v-6c3ea3a5]{box-shadow:0 4px 6px -1px #ffffff1a,0 2px 4px -1px #ffffff0f}select{width:200px}body{background-color:#fafafa;font-family:sans-serif}.container{margin:4px auto;width:800px}.settings{position:fixed;top:0;right:0;width:500px;background-color:#fff;z-index:1000;overflow-y:auto;height:100%}.slider-container{margin-top:20px}.slider-value{display:inline-block;margin-left:10px;color:#6b7280;font-size:14px}.small-button{padding:.5rem .75rem;font-size:.875rem}.active-tab{font-weight:700}.help-view[data-v-8c1798f3]{min-height:100vh}.big-card[data-v-8c1798f3]{margin-left:auto;margin-right:auto;border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:2rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.big-card[data-v-8c1798f3]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.help-sections-container[data-v-8c1798f3]{max-height:70vh;overflow-y:auto;padding-right:1rem}.help-section[data-v-8c1798f3]{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.help-content[data-v-8c1798f3]{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.help-content[data-v-8c1798f3]:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar{width:12px}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar-thumb{background:#888;border-radius:10px;border:3px solid #f1f1f1}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar-thumb:hover{background:#555}.help-sections-container[data-v-8c1798f3]{scrollbar-width:thin;scrollbar-color:#888 #f1f1f1}.menu-container{position:relative;display:inline-block}.menu-button{background-color:#007bff;color:#fff;padding:10px;border:none;cursor:pointer;border-radius:4px}.menu-list{position:absolute;background-color:#fff;color:#000;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;padding:10px;max-width:500px;z-index:1000}.slide-enter-active,.slide-leave-active{transition:transform .2s}.slide-enter-to,.slide-leave-from{transform:translateY(-10px)}.menu-ul{list-style:none;padding:0;margin:0}.menu-li{cursor:pointer;display:flex;align-items:center;padding:5px}.menu-icon{width:20px;height:20px;margin-right:8px}.menu-command{min-width:200px;text-align:left}.fade-enter-active[data-v-f43216be],.fade-leave-active[data-v-f43216be]{transition:opacity .3s}.fade-enter[data-v-f43216be],.fade-leave-to[data-v-f43216be]{opacity:0}.heartbeat-text[data-v-cb1f211d]{font-size:24px;animation:pulsate-cb1f211d 1.5s infinite}@keyframes pulsate-cb1f211d{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}to{transform:scale(1);opacity:1}}.list-move[data-v-cb1f211d],.list-enter-active[data-v-cb1f211d],.list-leave-active[data-v-cb1f211d]{transition:all .5s ease}.list-enter-from[data-v-cb1f211d]{transform:translatey(-30px)}.list-leave-to[data-v-cb1f211d]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-cb1f211d]{position:absolute}.bounce-enter-active[data-v-cb1f211d]{animation:bounce-in-cb1f211d .5s}.bounce-leave-active[data-v-cb1f211d]{animation:bounce-in-cb1f211d .5s reverse}@keyframes bounce-in-cb1f211d{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-cb1f211d]{background-color:#0ff}.hover[data-v-cb1f211d]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-cb1f211d]{font-weight:700}.control-buttons[data-v-2b3580ce]{position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;transform:translate(100%);transition:transform .3s}.group:hover .control-buttons[data-v-2b3580ce]{transform:translate(0)}.control-buttons-inner[data-v-2b3580ce]{display:flex;gap:10px;align-items:center;background-color:#fff;padding:8px;border-radius:0 0 0 8px;box-shadow:0 2px 8px #0000001a}.json-tree-view[data-v-40406ec6]{margin-left:16px}.json-item[data-v-40406ec6]{margin-bottom:4px}.json-key[data-v-40406ec6]{cursor:pointer;display:flex;align-items:center}.toggle-icon[data-v-40406ec6]{margin-right:4px;width:12px}.key[data-v-40406ec6]{font-weight:700;margin-right:4px}.value[data-v-40406ec6]{margin-left:4px}.string[data-v-40406ec6]{color:#0b7285}.number[data-v-40406ec6]{color:#d9480f}.boolean[data-v-40406ec6]{color:#5c940d}.null[data-v-40406ec6]{color:#868e96}.json-nested[data-v-40406ec6]{margin-left:16px;border-left:1px dashed #ccc;padding-left:8px}.json-viewer[data-v-83fc9727]{font-family:Monaco,Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace;font-size:14px;line-height:1.5;color:#333}.collapsible-section[data-v-83fc9727]{cursor:pointer;padding:8px;background-color:#f0f0f0;border-radius:4px;display:flex;align-items:center;transition:background-color .2s}.collapsible-section[data-v-83fc9727]:hover{background-color:#e0e0e0}.toggle-icon[data-v-83fc9727]{margin-right:8px;transition:transform .2s}.json-content[data-v-83fc9727]{margin-top:8px;padding-left:16px}.expand-button{margin-left:10px;margin-right:10px;background:none;border:none;padding:0;cursor:pointer}.htmljs{background:none}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.animate-fadeIn{animation:fadeIn .5s ease-out forwards}details[open] summary~*{animation:slideDown .3s ease-in-out}details summary::marker{display:none}details summary::-webkit-details-marker{display:none}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.bounce-enter-active[data-v-f44002af]{animation:bounce-in-f44002af .5s}.bounce-leave-active[data-v-f44002af]{animation:bounce-in-f44002af .5s reverse}@keyframes bounce-in-f44002af{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-track{background-color:#f1f1f1}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb{background-color:#888;border-radius:4px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb:hover{background-color:#555}.menu[data-v-1a32c141]{display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper[data-v-1a32c141]{position:relative;display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper>#commands-menu-items[data-v-1a32c141]{top:calc(-100% - 2rem)}.personalities-hover-area[data-v-908c73f4]{position:relative;padding-top:10px}.custom-scrollbar[data-v-908c73f4]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-908c73f4]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-908c73f4]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-908c73f4]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}.list-move[data-v-908c73f4],.list-enter-active[data-v-908c73f4],.list-leave-active[data-v-908c73f4]{transition:all .5s ease}.list-enter-from[data-v-908c73f4]{transform:translatey(-30px)}.list-leave-to[data-v-908c73f4]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-908c73f4]{position:absolute}@keyframes rolling-ball-d9375d3e{0%{transform:translate(-50px) rotate(0)}25%{transform:translate(0) rotate(90deg)}50%{transform:translate(50px) rotate(180deg)}75%{transform:translate(0) rotate(270deg)}to{transform:translate(-50px) rotate(360deg)}}@keyframes bounce-d9375d3e{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}@keyframes fade-in-up-d9375d3e{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.animate-rolling-ball[data-v-d9375d3e]{animation:rolling-ball-d9375d3e 4s infinite ease-in-out,bounce-d9375d3e 1s infinite ease-in-out}.animate-fade-in-up[data-v-d9375d3e]{animation:fade-in-up-d9375d3e 1.5s ease-out}.floating-button-container[data-v-d9375d3e]{position:fixed;bottom:30px;right:30px;z-index:9999}.floating-button[data-v-d9375d3e]{position:fixed;bottom:30px;right:30px;width:100px;height:100px;border-radius:50%;background-color:#ff4500e6;display:flex;justify-content:center;align-items:center;box-shadow:0 0 30px #ff4500cc;animation:pulse-d9375d3e 1.5s infinite,glow-d9375d3e 2s infinite,wobble-d9375d3e 3s infinite;overflow:hidden;z-index:9999;transition:all .3s ease}.floating-button[data-v-d9375d3e]:hover{transform:scale(1.2) rotate(5deg);background-color:#ff4500}.tooltip[data-v-d9375d3e]{position:absolute;background-color:#000c;color:#fff;padding:8px 12px;border-radius:8px;font-size:16px;font-weight:700;white-space:nowrap;opacity:0;transition:opacity .3s ease,transform .3s ease;pointer-events:none;top:-50px;left:50%;transform:translate(-50%) scale(.9)}.floating-button:hover .tooltip[data-v-d9375d3e]{opacity:1;transform:translate(-50%) scale(1)}@keyframes pulse-d9375d3e{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}@keyframes glow-d9375d3e{0%{box-shadow:0 0 30px #ff4500cc}50%{box-shadow:0 0 60px #ff4500,0 0 90px #ff450099}to{box-shadow:0 0 30px #ff4500cc}}@keyframes wobble-d9375d3e{0%,to{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}.hidden[data-v-d9375d3e]{display:none}.popup-container[data-v-d504dfc9]{background-color:#fff;color:#333;border-radius:8px;box-shadow:0 4px 6px #0000001a;padding:24px;width:100%;height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.close-button[data-v-d504dfc9]{position:absolute;top:16px;right:16px;background-color:#3490dc;color:#fff;font-weight:700;padding:8px 16px;border-radius:8px;cursor:pointer;transition:background-color .3s ease}.close-button[data-v-d504dfc9]:hover{background-color:#2779bd}.iframe-content[data-v-d504dfc9]{width:100%;height:80%;border:none;margin-bottom:16px}.checkbox-container[data-v-d504dfc9]{display:flex;align-items:center;justify-content:center}.styled-checkbox[data-v-d504dfc9]{width:24px;height:24px;accent-color:#3490dc;cursor:pointer}.checkbox-label[data-v-d504dfc9]{margin-left:8px;font-size:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fade-enter-active[data-v-d504dfc9],.fade-leave-active[data-v-d504dfc9]{transition:opacity .5s}.fade-enter[data-v-d504dfc9],.fade-leave-to[data-v-d504dfc9]{opacity:0}.glow-effect[data-v-31178107]{box-shadow:0 0 5px 2px #00ffffb3;animation:glow-31178107 1.5s ease-in-out infinite alternate}@keyframes glow-31178107{0%{box-shadow:0 0 5px 2px #00ffffb3}to{box-shadow:0 0 20px 2px #00ffffb3}}.personalities-container[data-v-57566b64]{position:relative}.skills-lib-icon[data-v-57566b64]{position:absolute;top:-2px;right:-2px;z-index:10;font-size:5px;width:2px;height:2px}.skills-lib-icon i[data-v-57566b64]{width:2px;height:2px}@keyframes giggle-57566b64{0%,to{transform:translate(0) rotate(0) scale(1)}25%{transform:translate(-5px) rotate(-10deg) scale(1.05)}50%{transform:translate(5px) rotate(10deg) scale(.95)}75%{transform:translate(-5px) rotate(-10deg) scale(1.05)}}.animate-giggle[data-v-57566b64]{animation:giggle-57566b64 1.5s infinite ease-in-out}.custom-scrollbar[data-v-57566b64]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-57566b64]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-57566b64]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-57566b64]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}@keyframes custom-pulse-57566b64{0%,to{box-shadow:0 0 #3b82f680}50%{box-shadow:0 0 0 15px #3b82f600}}.animate-pulse[data-v-57566b64]{animation:custom-pulse-57566b64 2s infinite}.slide-right-enter-active[data-v-57566b64],.slide-right-leave-active[data-v-57566b64]{transition:transform .3s ease}.slide-right-enter[data-v-57566b64],.slide-right-leave-to[data-v-57566b64]{transform:translate(-100%)}.slide-left-enter-active[data-v-57566b64],.slide-left-leave-active[data-v-57566b64]{transition:transform .3s ease}.slide-left-enter[data-v-57566b64],.slide-left-leave-to[data-v-57566b64]{transform:translate(100%)}.fade-and-fly-enter-active[data-v-57566b64]{animation:fade-and-fly-enter-57566b64 .5s ease}.fade-and-fly-leave-active[data-v-57566b64]{animation:fade-and-fly-leave-57566b64 .5s ease}@keyframes fade-and-fly-enter-57566b64{0%{opacity:0;transform:translateY(20px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes fade-and-fly-leave-57566b64{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-20px) scale(1.2)}}.list-move[data-v-57566b64],.list-enter-active[data-v-57566b64],.list-leave-active[data-v-57566b64]{transition:all .5s ease}.list-enter-from[data-v-57566b64]{transform:translatey(-30px)}.list-leave-to[data-v-57566b64]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-57566b64]{position:absolute}@keyframes float-57566b64{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}.animate-float[data-v-57566b64]{animation:float-57566b64 linear infinite}@keyframes star-move-57566b64{0%{transform:translate(0) rotate(0)}50%{transform:translate(20px,20px) rotate(180deg)}to{transform:translate(0) rotate(360deg)}}.animate-star[data-v-57566b64]{animation:star-move-57566b64 linear infinite}@keyframes fall-57566b64{0%{transform:translateY(-20px) rotate(0);opacity:1}to{transform:translateY(calc(100vh + 20px)) rotate(360deg);opacity:0}}.animate-fall[data-v-57566b64]{animation:fall-57566b64 linear infinite}@keyframes glow-57566b64{0%,to{text-shadow:0 0 5px rgba(66,153,225,.5),0 0 10px rgba(66,153,225,.5)}50%{text-shadow:0 0 20px rgba(66,153,225,.8),0 0 30px rgba(66,153,225,.8)}}.animate-glow[data-v-57566b64]{animation:glow-57566b64 2s ease-in-out infinite}@media (prefers-color-scheme: dark){@keyframes glow-57566b64{0%,to{text-shadow:0 0 5px rgba(147,197,253,.5),0 0 10px rgba(147,197,253,.5)}50%{text-shadow:0 0 20px rgba(147,197,253,.8),0 0 30px rgba(147,197,253,.8)}0%,to{text-shadow:0 0 5px rgba(147,197,253,.5),0 0 10px rgba(147,197,253,.5)}50%{text-shadow:0 0 20px rgba(147,197,253,.8),0 0 30px rgba(147,197,253,.8)}}}@keyframes roll-57566b64{0%{transform:translate(-50%) rotate(0)}to{transform:translate(50%) rotate(360deg)}}.animate-roll[data-v-57566b64]{animation:roll-57566b64 4s linear infinite}.toolbar[data-v-57566b64]{position:relative;width:100%}.toolbar-container[data-v-57566b64]{display:flex;height:2.5rem;align-items:center}.toolbar-button[data-v-57566b64]{cursor:pointer;border-style:none;background-color:transparent;padding:.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.toolbar-button[data-v-57566b64]:hover{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.menu-container[data-v-57566b64]{position:relative}.expandable-menu[data-v-57566b64]{position:absolute;top:100%;left:.625rem;flex-direction:column;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.menu-container:hover .expandable-menu[data-v-57566b64],.menu-visible[data-v-57566b64]{display:flex}.menu-item[data-v-57566b64]{background:none;border:none;cursor:pointer;padding:8px;color:#333;transition:background-color .3s}.menu-item[data-v-57566b64]:hover{background-color:#f0f0f0}.dot[data-v-57566b64]{width:10px;height:10px;border-radius:50%}.dot-green[data-v-57566b64]{background-color:green}.dot-red[data-v-57566b64]{background-color:red}.animate-pulse[data-v-57566b64]{animation:pulse-57566b64 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse-57566b64{0%,to{opacity:1}50%{opacity:.7}}.logo-container[data-v-57566b64]{position:relative;width:48px;height:48px}.logo-image[data-v-57566b64]{width:100%;height:100%;border-radius:50%;-o-object-fit:cover;object-fit:cover}@keyframes bounce-57566b64{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:translateY(0);animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce[data-v-57566b64]{animation:bounce-57566b64 1s infinite}@keyframes roll-and-bounce-57566b64{0%,to{transform:translate(0) rotate(0)}45%{transform:translate(100px) rotate(360deg)}50%{transform:translate(90px) rotate(390deg)}55%{transform:translate(100px) rotate(360deg)}95%{transform:translate(0) rotate(0)}}@keyframes spin-57566b64{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.container{display:flex;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.floating-frame{margin:15px;float:left;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;z-index:5000;position:fixed;cursor:move;bottom:0;right:0}.handle{width:100%;height:20px;background:#ccc;cursor:move;text-align:center}.floating-frame img{width:100%;height:auto}.controls{margin-top:10px}#webglContainer{top:0;left:0}.floating-frame2{margin:15px;width:800px;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;min-height:200px;z-index:5000}:root{--baklava-control-color-primary: #e28b46;--baklava-control-color-error: #d00000;--baklava-control-color-background: #2c3748;--baklava-control-color-foreground: white;--baklava-control-color-hover: #455670;--baklava-control-color-active: #556986;--baklava-control-color-disabled-foreground: #666c75;--baklava-control-border-radius: 3px;--baklava-sidebar-color-background: #1b202c;--baklava-sidebar-color-foreground: white;--baklava-node-color-background: #1b202c;--baklava-node-color-foreground: white;--baklava-node-color-hover: #e28c4677;--baklava-node-color-selected: var(--baklava-control-color-primary);--baklava-node-color-resize-handle: var(--baklava-control-color-background);--baklava-node-title-color-background: #151a24;--baklava-node-title-color-foreground: white;--baklava-group-node-title-color-background: #215636;--baklava-group-node-title-color-foreground: white;--baklava-node-interface-port-tooltip-color-foreground: var(--baklava-control-color-primary);--baklava-node-interface-port-tooltip-color-background: var(--baklava-editor-background-pattern-black);--baklava-node-border-radius: 6px;--baklava-color-connection-default: #737f96;--baklava-color-connection-allowed: #48bc79;--baklava-color-connection-forbidden: #bc4848;--baklava-editor-background-pattern-default: #202b3c;--baklava-editor-background-pattern-line: #263140;--baklava-editor-background-pattern-black: #263140;--baklava-context-menu-background: #1b202c;--baklava-context-menu-shadow: 0 0 8px rgba(0, 0, 0, .65);--baklava-toolbar-background: #1b202caa;--baklava-toolbar-foreground: white;--baklava-node-palette-background: #1b202caa;--baklava-node-palette-foreground: white;--baklava-selectionbox-color-border: var(--baklava-node-color-background);--baklava-selectionbox-color-background: var(--baklava-node-color-hover);--baklava-visual-transition: .1s linear}.baklava-button{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);transition:background-color var(--baklava-visual-transition);border:none;padding:.45em .35em;border-radius:var(--baklava-control-border-radius);font-size:inherit;cursor:pointer;overflow-x:hidden}.baklava-button:hover{background-color:var(--baklava-control-color-hover)}.baklava-button:active{background-color:var(--baklava-control-color-primary)}.baklava-button.--block{width:100%}.baklava-checkbox{display:flex;padding:.35em 0;cursor:pointer;overflow-x:hidden;align-items:center}.baklava-checkbox .__checkmark-container{display:flex;background-color:var(--baklava-control-color-background);border-radius:var(--baklava-control-border-radius);transition:background-color var(--baklava-visual-transition);width:18px;height:18px}.baklava-checkbox:hover .__checkmark-container{background-color:var(--baklava-control-color-hover)}.baklava-checkbox:active .__checkmark-container{background-color:var(--baklava-control-color-active)}.baklava-checkbox .__checkmark{stroke-dasharray:15;stroke-dashoffset:15;stroke:var(--baklava-control-color-foreground);stroke-width:2px;fill:none;transition:stroke-dashoffset var(--baklava-visual-transition)}.baklava-checkbox.--checked .__checkmark{stroke-dashoffset:0}.baklava-checkbox.--checked .__checkmark-container{background-color:var(--baklava-control-color-primary)}.baklava-checkbox .__label{margin-left:.5rem}.baklava-context-menu{color:var(--baklava-control-color-foreground);position:absolute;display:inline-block;z-index:100;background-color:var(--baklava-context-menu-background);box-shadow:var(--baklava-context-menu-shadow);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);min-width:6rem;width:-moz-max-content;width:max-content}.baklava-context-menu>.item{display:flex;align-items:center;padding:.35em 1em;transition:background .05s linear;position:relative}.baklava-context-menu>.item>.__label{flex:1 1 auto}.baklava-context-menu>.item>.__submenu-icon{margin-left:.75rem}.baklava-context-menu>.item.--disabled{color:var(--baklava-control-color-hover)}.baklava-context-menu>.item:not(.--header):not(.--active):not(.--disabled):hover{background:var(--baklava-control-color-primary)}.baklava-context-menu>.item.--active{background:var(--baklava-control-color-primary)}.baklava-context-menu.--nested{left:100%;top:0}.baklava-context-menu.--flipped-x.--nested{left:unset;right:100%}.baklava-context-menu.--flipped-y.--nested{top:unset;bottom:0}.baklava-context-menu>.divider{margin:.35em 0;height:1px;background-color:var(--baklava-control-color-hover)}.baklava-icon{display:block;height:100%}.baklava-icon.--clickable{cursor:pointer;transition:color var(--baklava-visual-transition)}.baklava-icon.--clickable:hover{color:var(--baklava-control-color-primary)}.baklava-input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);border:none;border-radius:var(--baklava-control-border-radius);padding:.45em .75em;width:100%;transition:background-color var(--baklava-visual-transition);font-size:inherit;font:inherit}.baklava-input:hover{background-color:var(--baklava-control-color-hover)}.baklava-input:active{background-color:var(--baklava-control-color-active)}.baklava-input:focus-visible{outline:1px solid var(--baklava-control-color-primary)}.baklava-input[type=number]::-webkit-inner-spin-button,.baklava-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.baklava-input.--invalid{box-shadow:0 0 2px 2px var(--baklava-control-color-error)}.baklava-num-input{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);width:100%;display:grid;grid-template-columns:20px 1fr 20px}.baklava-num-input>.__button{display:flex;flex:0 0 auto;width:20px;justify-content:center;align-items:center;transition:background var(--baklava-visual-transition);cursor:pointer}.baklava-num-input>.__button:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__button:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__button.--dec{grid-area:1/1/span 1/span 1}.baklava-num-input>.__button.--dec>svg{transform:rotate(90deg)}.baklava-num-input>.__button.--inc{grid-area:1/3/span 1/span 1}.baklava-num-input>.__button.--inc>svg{transform:rotate(-90deg)}.baklava-num-input>.__button path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-num-input>.__content{grid-area:1/2/span 1/span 1;display:inline-flex;cursor:pointer;max-width:100%;min-width:0;align-items:center;transition:background-color var(--baklava-visual-transition)}.baklava-num-input>.__content:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__content:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__content>.__label,.baklava-num-input>.__content>.__value{margin:.35em 0;padding:0 .5em}.baklava-num-input>.__content>.__label{flex:1;min-width:0;overflow:hidden}.baklava-num-input>.__content>.__value{text-align:right}.baklava-num-input>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-select{width:100%;position:relative;color:var(--baklava-control-color-foreground)}.baklava-select.--open>.__selected{border-bottom-left-radius:0;border-bottom-right-radius:0}.baklava-select.--open>.__selected>.__icon{transform:rotate(180deg)}.baklava-select>.__selected{background-color:var(--baklava-control-color-background);padding:.35em .75em;border-radius:var(--baklava-control-border-radius);transition:background var(--baklava-visual-transition);min-height:1.7em;display:flex;align-items:center;cursor:pointer}.baklava-select>.__selected:hover{background:var(--baklava-control-color-hover)}.baklava-select>.__selected:active{background:var(--baklava-control-color-active)}.baklava-select>.__selected>.__text{flex:1 0 auto;flex-basis:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.baklava-select>.__selected>.__icon{flex:0 0 auto;display:flex;justify-content:center;align-items:center;transition:transform .25s ease;width:18px;height:18px}.baklava-select>.__selected>.__icon path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-select>.__dropdown{position:absolute;top:100%;left:0;right:0;z-index:10;background-color:var(--baklava-context-menu-background);filter:drop-shadow(0 0 4px black);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);max-height:15em;overflow-y:scroll}.baklava-select>.__dropdown::-webkit-scrollbar{width:0px;background:transparent}.baklava-select>.__dropdown>.item{padding:.35em .35em .35em 1em;transition:background .05s linear}.baklava-select>.__dropdown>.item:not(.--header):not(.--active){cursor:pointer}.baklava-select>.__dropdown>.item:not(.--header):not(.--active):hover{background:var(--baklava-control-color-hover)}.baklava-select>.__dropdown>.item.--active{background:var(--baklava-control-color-primary)}.baklava-select>.__dropdown>.item.--header{color:var(--baklava-control-color-disabled-foreground);border-bottom:1px solid var(--baklava-control-color-disabled-foreground);padding:.5em .35em .5em 1em}.baklava-slider{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);position:relative;cursor:pointer}.baklava-slider>.__content{display:flex;position:relative}.baklava-slider>.__content>.__label,.baklava-slider>.__content>.__value{flex:1 1 auto;margin:.35em 0;padding:0 .5em;text-overflow:ellipsis}.baklava-slider>.__content>.__value{text-align:right}.baklava-slider>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-slider>.__slider{position:absolute;top:0;bottom:0;left:0;background-color:var(--baklava-control-color-primary);border-radius:var(--baklava-control-border-radius)}.baklava-connection{stroke:var(--baklava-color-connection-default);stroke-width:2px;fill:none}.baklava-connection.--temporary{stroke-width:4px;stroke-dasharray:5 5;stroke-dashoffset:0;animation:dash 1s linear infinite;transform:translateY(-1px)}@keyframes dash{to{stroke-dashoffset:20}}.baklava-connection.--allowed{stroke:var(--baklava-color-connection-allowed)}.baklava-connection.--forbidden{stroke:var(--baklava-color-connection-forbidden)}.baklava-minimap{position:absolute;height:15%;width:15%;min-width:150px;max-width:90%;top:20px;right:20px;z-index:900}.baklava-editor{width:100%;height:100%;position:relative;overflow:hidden;outline:none!important;font-family:Lato,Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:15px;touch-action:none}.baklava-editor .background{background-color:var(--baklava-editor-background-pattern-default);background-image:linear-gradient(var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(90deg,var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(var(--baklava-editor-background-pattern-line) 1px,transparent 1px),linear-gradient(90deg,var(--baklava-editor-background-pattern-line) 1px,transparent 1px);background-repeat:repeat;width:100%;height:100%;pointer-events:none!important}.baklava-editor .selection-box{position:absolute;border:1px solid var(--baklava-selectionbox-color-border);background-color:var(--baklava-selectionbox-color-background);pointer-events:none;opacity:.5}.baklava-editor.--start-selection-box{cursor:crosshair}.baklava-editor *:not(input):not(textarea){user-select:none;-moz-user-select:none;-webkit-user-select:none;touch-action:none}.baklava-editor .input-user-select{user-select:auto;-moz-user-select:auto;-webkit-user-select:auto}.baklava-editor *,.baklava-editor *:after,.baklava-editor *:before{box-sizing:border-box}.baklava-editor.--temporary-connection{cursor:crosshair}.baklava-editor .connections-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none!important}.baklava-editor .node-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.baklava-editor .node-container *{pointer-events:all}.baklava-ignore-mouse *{pointer-events:none!important}.baklava-ignore-mouse .__port{pointer-events:all!important}.baklava-node-interface{padding:.25em 0;position:relative}.baklava-node-interface .__port{position:absolute;width:10px;height:10px;background:#fff;border-radius:50%;top:calc(50% - 5px);cursor:crosshair}.baklava-node-interface .__port.--selected{outline:2px var(--baklava-color-connection-default) solid;outline-offset:4px}.baklava-node-interface.--input{text-align:left;padding-left:.5em}.baklava-node-interface.--input .__port{left:-1.1em}.baklava-node-interface.--output{text-align:right;padding-right:.5em}.baklava-node-interface.--output .__port{right:-1.1em}.baklava-node-interface .__tooltip{position:absolute;left:5px;top:15px;transform:translate(-50%);background:var(--baklava-node-interface-port-tooltip-color-background);color:var(--baklava-node-interface-port-tooltip-color-foreground);padding:.25em .5em;text-align:center;z-index:2}.baklava-node-palette{position:absolute;left:0;top:60px;width:250px;height:calc(100% - 60px);z-index:3;padding:2rem;overflow-y:auto;background:var(--baklava-node-palette-background);color:var(--baklava-node-palette-foreground)}.baklava-node-palette h1{margin-top:2rem}.baklava-node.--palette{position:unset;margin:1rem 0;cursor:grab}.baklava-node.--palette:first-child{margin-top:0}.baklava-node.--palette .__title{padding:.5rem;border-radius:var(--baklava-node-border-radius)}.baklava-dragged-node{position:absolute;width:calc(250px - 4rem);height:40px;z-index:4;pointer-events:none}.baklava-node{background:var(--baklava-node-color-background);color:var(--baklava-node-color-foreground);border:1px solid transparent;border-radius:var(--baklava-node-border-radius);position:absolute;box-shadow:0 0 4px #000c;transition:border-color var(--baklava-visual-transition),box-shadow var(--baklava-visual-transition);width:var(--width)}.baklava-node:hover{border-color:var(--baklava-node-color-hover)}.baklava-node:hover .__resize-handle:after{opacity:1}.baklava-node.--selected{z-index:5;border-color:var(--baklava-node-color-selected)}.baklava-node.--dragging{box-shadow:0 0 12px #000c}.baklava-node.--dragging>.__title{cursor:grabbing}.baklava-node>.__title{display:flex;background:var(--baklava-node-title-color-background);color:var(--baklava-node-title-color-foreground);padding:.4em .75em;border-radius:var(--baklava-node-border-radius) var(--baklava-node-border-radius) 0 0;cursor:grab}.baklava-node>.__title>*:first-child{flex-grow:1}.baklava-node>.__title>.__title-label{pointer-events:none}.baklava-node>.__title>.__menu{position:relative;cursor:initial}.baklava-node[data-node-type^=__baklava_]>.__title{background:var(--baklava-group-node-title-color-background);color:var(--baklava-group-node-title-color-foreground)}.baklava-node>.__content{padding:.75em}.baklava-node>.__content.--reverse-y{display:flex;flex-direction:column-reverse}.baklava-node>.__content>div>div{margin:.5em 0}.baklava-node.--two-column>.__content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;grid-template-areas:". ." ". ."}.baklava-node.--two-column>.__content>.__inputs{grid-row:1;grid-column:1}.baklava-node.--two-column>.__content>.__outputs{grid-row:1;grid-column:2}.baklava-node .__resize-handle{position:absolute;right:0;bottom:0;width:1rem;height:1rem;transform:translate(50%);cursor:ew-resize}.baklava-node .__resize-handle:after{content:"";position:absolute;bottom:0;left:-.5rem;width:1rem;height:1rem;opacity:0;border-bottom-right-radius:var(--baklava-node-border-radius);transition:opacity var(--baklava-visual-transition);background:linear-gradient(-45deg,transparent 10%,var(--baklava-node-color-resize-handle) 10%,var(--baklava-node-color-resize-handle) 15%,transparent 15%,transparent 30%,var(--baklava-node-color-resize-handle) 30%,var(--baklava-node-color-resize-handle) 35%,transparent 35%,transparent 50%,var(--baklava-node-color-resize-handle) 50%,var(--baklava-node-color-resize-handle) 55%,transparent 55%)}.baklava-sidebar{position:absolute;height:100%;width:25%;min-width:300px;max-width:90%;top:0;right:0;z-index:1000;background-color:var(--baklava-sidebar-color-background);color:var(--baklava-sidebar-color-foreground);box-shadow:none;overflow-x:hidden;padding:1em;transform:translate(100%);transition:transform .5s;display:flex;flex-direction:column}.baklava-sidebar.--open{transform:translate(0);box-shadow:0 0 15px #000}.baklava-sidebar .__resizer{position:absolute;left:0;top:0;height:100%;width:4px;cursor:col-resize}.baklava-sidebar .__header{display:flex;align-items:center}.baklava-sidebar .__header .__node-name{margin-left:.5rem}.baklava-sidebar .__close{font-size:2em;border:none;background:none;color:inherit;cursor:pointer}.baklava-sidebar .__interface{margin:.5em 0}.baklava-toolbar{position:absolute;left:0;top:0;width:100%;height:60px;z-index:3;padding:.5rem 2rem;background:var(--baklava-toolbar-background);color:var(--baklava-toolbar-foreground);display:flex;align-items:center}.baklava-toolbar-entry{margin-left:.5rem;margin-right:.5rem}.baklava-toolbar-button{color:var(--baklava-toolbar-foreground);background:none;border:none;transition:color var(--baklava-visual-transition)}.baklava-toolbar-button:not([disabled]){cursor:pointer}.baklava-toolbar-button:hover:not([disabled]){color:var(--baklava-control-color-primary)}.baklava-toolbar-button[disabled]{color:var(--baklava-control-color-disabled-foreground)}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .1s ease-out}.slide-fade-enter-from,.slide-fade-leave-to{transform:translateY(5px);opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease-out!important}.fade-enter-from,.fade-leave-to{opacity:0}.loading-indicator[data-v-f8c39e0b]{display:flex;justify-content:center;align-items:center;height:100px;font-size:1.2em;color:#666}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:PTSans,Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.tooltip-arrow,.tooltip-arrow:before{position:absolute;width:8px;height:8px;background:inherit}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";visibility:visible;transform:rotate(45deg)}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:#e5e7eb}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{position:absolute;width:8px;height:8px;background:inherit}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;transform:rotate(45deg);position:absolute;width:9px;height:9px;background:inherit}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#4b5563}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#4b5563}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:before{visibility:hidden}[role=tooltip].invisible>[data-popper-arrow]:after{visibility:hidden}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#1c64f2}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select:not([size]){background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#1c64f2;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:.55em .55em;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-color:currentColor;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:#1f2937;border:0;font-weight:500;font-size:.875rem;cursor:pointer;padding:.625rem 1rem .625rem 2rem;margin-inline-start:-1rem;margin-inline-end:1rem}input[type=file]::file-selector-button:hover{background:#374151}.dark input[type=file]::file-selector-button{color:#fff;background:#4b5563}.dark input[type=file]::file-selector-button:hover{background:#6b7280}input[type=range]::-webkit-slider-thumb{height:1.25rem;width:1.25rem;background:#1c64f2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-webkit-slider-thumb{background:#9ca3af}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6b7280}input[type=range]:focus::-webkit-slider-thumb{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1px;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}input[type=range]::-moz-range-thumb{height:1.25rem;width:1.25rem;background:#1c64f2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-moz-range-thumb{background:#9ca3af}.dark input[type=range]:disabled::-moz-range-thumb{background:#6b7280}input[type=range]::-moz-range-progress{background:#3f83f8}input[type=range]::-ms-fill-lower{background:#3f83f8}.toggle-bg:after{content:"";position:absolute;top:.125rem;left:.125rem;background:#fff;border-color:#d1d5db;border-width:1px;border-radius:9999px;height:1.25rem;width:1.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}input:checked+.toggle-bg:after{transform:translate(100%);border-color:#fff}input:checked+.toggle-bg{background:#1c64f2;border-color:#1c64f2}*{scrollbar-color:initial;scrollbar-width:initial}body{min-height:100vh;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #e0eaff var(--tw-gradient-from-position);--tw-gradient-to: rgb(224 234 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #f0e6ff var(--tw-gradient-to-position)}body:is(.dark *){background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #0f2647 var(--tw-gradient-from-position);--tw-gradient-to: rgb(15 38 71 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1e1b4b var(--tw-gradient-to-position)}html{scroll-behavior:smooth}body{font-family:Roboto,sans-serif}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-0\.5{bottom:-.125rem}.-bottom-1{bottom:-.25rem}.-bottom-1\.5{bottom:-.375rem}.-bottom-2{bottom:-.5rem}.-bottom-4{bottom:-1rem}.-left-1\.5{left:-.375rem}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-1\.5{top:-.375rem}.-top-2{top:-.5rem}.bottom-0{bottom:0}.bottom-16{bottom:4rem}.bottom-2{bottom:.5rem}.bottom-2\.5{bottom:.625rem}.bottom-20{bottom:5rem}.bottom-4{bottom:1rem}.bottom-5{bottom:1.25rem}.bottom-6{bottom:1.5rem}.bottom-\[60px\]{bottom:60px}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-20{left:5rem}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-20{right:5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.top-full{top:100%}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.-m-1{margin:-.25rem}.-m-2{margin:-.5rem}.-m-4{margin:-1rem}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-0{margin-left:0;margin-right:0}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-8{margin-top:2rem;margin-bottom:2rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0px}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-4\/5{height:80%}.h-48{height:12rem}.h-5{height:1.25rem}.h-5\/6{height:83.333333%}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[200px\]{height:200px}.h-\[400px\]{height:400px}.h-auto{height:auto}.h-full{height:100%}.h-modal{height:calc(100% - 2rem)}.h-px{height:1px}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\[400px\]{max-height:400px}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-\[220px\]{min-height:220px}.min-h-\[500px\]{min-height:500px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-3\/5{width:60%}.w-36{width:9rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[15rem\]{width:15rem}.w-\[16rem\]{width:16rem}.w-\[300px\]{width:300px}.w-\[500px\]{width:500px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.min-w-96,.min-w-\[24rem\]{min-width:24rem}.min-w-\[300px\]{min-width:300px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[24rem\]{max-width:24rem}.max-w-\[300px\]{max-width:300px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.flex-grow-0{flex-grow:0}.grow{flex-grow:1}.origin-left{transform-origin:left}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-0{--tw-translate-y: -0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\/2{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-x-0{--tw-scale-x: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1rem * var(--tw-space-x-reverse));margin-left:calc(-1rem * calc(1 - var(--tw-space-x-reverse)))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-bg-dark{border-color:var(--color-bg-dark)}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(195 221 253 / var(--tw-border-opacity))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity))}.border-pink-600{--tw-border-opacity: 1;border-color:rgb(214 31 105 / var(--tw-border-opacity))}.border-pink-700{--tw-border-opacity: 1;border-color:rgb(191 18 93 / var(--tw-border-opacity))}.border-primary{border-color:var(--color-primary)}.border-primary-light{border-color:var(--color-primary-light)}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(126 58 242 / var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(108 43 217 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(200 30 30 / var(--tw-border-opacity))}.border-secondary{border-color:var(--color-secondary)}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(227 160 8 / var(--tw-border-opacity))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(194 120 3 / var(--tw-border-opacity))}.bg-accent{background-color:var(--color-accent)}.bg-bg-dark-tone-panel{background-color:var(--color-bg-dark-tone-panel)}.bg-bg-light{background-color:var(--color-bg-light)}.bg-bg-light-tone{background-color:var(--color-bg-light-tone)}.bg-bg-light-tone-panel{background-color:var(--color-bg-light-tone-panel)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(222 247 236 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(229 237 255 / var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(88 80 236 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(254 236 220 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 232 243 / var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--color-primary)}.bg-primary-light{background-color:var(--color-primary-light)}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(237 235 254 / var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/30{background-color:#ffffff4d}.bg-white\/50{background-color:#ffffff80}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(253 246 178 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-70{--tw-bg-opacity: .7}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-bg-light{--tw-gradient-from: var(--color-bg-light) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500\/10{--tw-gradient-from: rgb(63 131 248 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #0E9F6E var(--tw-gradient-from-position);--tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-600{--tw-gradient-from: #5850EC var(--tw-gradient-from-position);--tw-gradient-to: rgb(88 80 236 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-lime-500{--tw-gradient-from: #84cc16 var(--tw-gradient-from-position);--tw-gradient-to: rgb(132 204 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #F05252 var(--tw-gradient-from-position);--tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-500{--tw-gradient-from: #0694A2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-5\%{--tw-gradient-from-position: 5%}.via-bg-light{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-light) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-600{--tw-gradient-to: rgb(8 145 178 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0891b2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-green-600{--tw-gradient-to: rgb(5 122 85 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #057A55 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-600{--tw-gradient-to: rgb(101 163 13 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #65a30d var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600{--tw-gradient-to: rgb(214 31 105 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #D61F69 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-600{--tw-gradient-to: rgb(224 36 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #E02424 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-teal-600{--tw-gradient-to: rgb(4 116 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #047481 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-10\%{--tw-gradient-via-position: 10%}.to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1A56DB var(--tw-gradient-to-position)}.to-cyan-700{--tw-gradient-to: #0e7490 var(--tw-gradient-to-position)}.to-green-700{--tw-gradient-to: #046C4E var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.to-lime-700{--tw-gradient-to: #4d7c0f var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.to-pink-700{--tw-gradient-to: #BF125D var(--tw-gradient-to-position)}.to-purple-500\/10{--tw-gradient-to: rgb(144 97 249 / .1) var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #7E3AF2 var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position)}.to-red-700{--tw-gradient-to: #C81E1E var(--tw-gradient-to-position)}.to-teal-700{--tw-gradient-to: #036672 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.to-100\%{--tw-gradient-to-position: 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-blue-600{fill:#1c64f2}.fill-current{fill:currentColor}.fill-gray-300{fill:#d1d5db}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-secondary{fill:var(--color-secondary)}.fill-white{fill:#fff}.fill-yellow-400{fill:#e3a008}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-80{padding-bottom:20rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-12{padding-top:3rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:PTSans,Roboto,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-200{--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(4 108 78 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.text-green-900{--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(81 69 205 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(66 56 157 / var(--tw-text-opacity))}.text-indigo-900{--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.text-light-text-panel{color:var(--color-light-text-panel)}.text-orange-200{--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 90 31 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(208 56 1 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.text-pink-600{--tw-text-opacity: 1;color:rgb(214 31 105 / var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity: 1;color:rgb(191 18 93 / var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity: 1;color:rgb(153 21 75 / var(--tw-text-opacity))}.text-pink-900{--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(108 43 217 / var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity: 1;color:rgb(85 33 181 / var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.text-red-100{--tw-text-opacity: 1;color:rgb(253 232 232 / var(--tw-text-opacity))}.text-red-200{--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.text-secondary{color:var(--color-secondary)}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity))}.text-teal-500{--tw-text-opacity: 1;color:rgb(6 148 162 / var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(142 75 16 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.text-opacity-95{--tw-text-opacity: .95}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/50{--tw-shadow-color: rgb(63 131 248 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-800\/80{--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color: rgb(6 182 212 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-800\/80{--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color: rgb(14 159 110 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-800\/80{--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color: rgb(132 204 22 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-800\/80{--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color: rgb(231 70 148 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-800\/80{--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(144 97 249 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-800\/80{--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color: rgb(240 82 82 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-800\/80{--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color: rgb(6 148 162 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-blue-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.ring-cyan-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.ring-gray-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.ring-green-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.ring-pink-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.ring-pink-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.ring-purple-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.ring-purple-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.ring-red-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.ring-red-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / .07)) drop-shadow(0 2px 2px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.scrollbar{scrollbar-width:auto;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar::-webkit-scrollbar{display:block;width:var(--scrollbar-width, 16px);height:var(--scrollbar-height, 16px)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar-track-bg-light{--scrollbar-track: var(--color-bg-light) !important}.scrollbar-track-bg-light-tone{--scrollbar-track: var(--color-bg-light-tone) !important}.scrollbar-track-blue-100{--scrollbar-track: #E1EFFE !important}.scrollbar-track-gray-200{--scrollbar-track: #E5E7EB !important}.scrollbar-thumb-bg-light-tone{--scrollbar-thumb: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone-panel{--scrollbar-thumb: var(--color-bg-light-tone-panel) !important}.scrollbar-thumb-blue-500{--scrollbar-thumb: #3F83F8 !important}.scrollbar-thumb-gray-400{--scrollbar-thumb: #9CA3AF !important}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.display-none{display:none}h1{margin-bottom:1.5rem;font-size:2.25rem;line-height:2.5rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}h1:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}@media (min-width: 768px){h1{font-size:3rem;line-height:1}}h2{margin-bottom:1rem;font-size:1.875rem;line-height:2.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}h2:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}h3{margin-bottom:.75rem;font-size:1.5rem;line-height:2rem;font-weight:500;--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}h3:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}h4{margin-bottom:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:500;--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}h4:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}h1,h2{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));padding-bottom:.5rem}h1:is(.dark *),h2:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}p{overflow-wrap:break-word;font-size:1rem;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}p:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}ul{margin-left:0;list-style-type:disc}li{margin-left:1.25rem;list-style-type:disc}ol{margin-left:1.25rem;list-style-type:decimal}:root{--color-primary: #4a90e2;--color-primary-light: #6ab7f1;--color-secondary: #8ab8e0;--color-accent: #3a7ca1;--color-light-text-panel: #ffffff;--color-dark-text-panel: #e0e0e0;--color-bg-light-panel: #f0faff;--color-bg-light: #ffffff;--color-bg-light-tone: #e0f0ff;--color-bg-light-code-block: #f5faff;--color-bg-light-tone-panel: #d0e0f0;--color-bg-light-discussion: #f8faff;--color-bg-light-discussion-odd: #f0faff;--color-bg-dark: #0a0a1a;--color-bg-dark-tone: #151521;--color-bg-dark-tone-panel: #1c1c2a;--color-bg-dark-code-block: #151521;--color-bg-dark-discussion: #0e0e1a;--color-bg-dark-discussion-odd: #0d0d1a}textarea,input,select{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}textarea:is(.dark *),input:is(.dark *),select:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.background-color{min-height:100vh;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #E1EFFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(225 239 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #CABFFD var(--tw-gradient-to-position)}.background-color:is(.dark *){--tw-gradient-from: #1E429F var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 66 159 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #4A1D96 var(--tw-gradient-to-position)}.toolbar-color{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.toolbar-color:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.panels-color{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.panels-color:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.unicolor-panels-color{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.unicolor-panels-color:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.message{position:relative;margin:.5rem;display:flex;width:100%;flex-grow:1;flex-direction:column;flex-wrap:wrap;overflow:visible;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));padding:1.25rem 1.25rem .75rem;font-size:1.125rem;line-height:1.75rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.message:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.message{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(35 56 118 / var(--tw-text-opacity))}.message:is(.dark *){background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #233876 var(--tw-gradient-from-position);--tw-gradient-to: rgb(35 56 118 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1E429F var(--tw-gradient-to-position);--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.message:hover{--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.message:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.message:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.message:nth-child(2n):is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.message:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.message:nth-child(odd):is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.message-header{margin-bottom:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.message-content{font-size:1.125rem;line-height:1.75rem;line-height:1.625}body{min-height:100vh;--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));font-size:1rem;line-height:1.5rem}body:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.discussion{margin-right:.5rem;font-size:.75rem;line-height:1rem}.discussion:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.discussion-hilighted{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));font-size:.75rem;line-height:1rem}.discussion-hilighted:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.bg-gradient-welcome{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #E1EFFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(225 239 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #CABFFD var(--tw-gradient-to-position)}.bg-gradient-welcome:is(.dark *){--tw-gradient-from: #1E429F var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 66 159 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #4A1D96 var(--tw-gradient-to-position)}.bg-gradient-progress{background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #C3DDFD var(--tw-gradient-from-position);--tw-gradient-to: rgb(195 221 253 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #A4CAFE var(--tw-gradient-to-position)}.bg-gradient-progress:is(.dark *){--tw-gradient-from: #1A56DB var(--tw-gradient-from-position);--tw-gradient-to: rgb(26 86 219 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.text-gradient-title{background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #1A56DB var(--tw-gradient-from-position);--tw-gradient-to: rgb(26 86 219 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position);-webkit-background-clip:text;background-clip:text;color:transparent}.text-gradient-title:is(.dark *){--tw-gradient-from: #A4CAFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(164 202 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.text-subtitle{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-subtitle:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.text-author{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-author:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.text-loading{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-loading:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.text-progress{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-progress:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.btn-primary{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-secondary{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.card{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:1.5rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.card:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.input{border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));padding:.5rem 1rem}.input:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.input:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.input:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.label{margin-bottom:.25rem;display:block;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.label:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.link{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.link:hover{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.link:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.link:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.navbar-container{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity));--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.navbar-container:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.game-menu{position:relative;display:flex;align-items:center;justify-content:center}.text-shadow-custom{text-shadow:1px 1px 0px #e0e0e0,-1px -1px 0px #e0e0e0,1px -1px 0px #e0e0e0,-1px 1px 0px #e0e0e0}.animated-progressbar-bg{position:relative;height:2.5rem;width:100%;overflow:hidden;border-radius:.125rem;background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #172554 var(--tw-gradient-from-position);--tw-gradient-to: rgb(23 37 84 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #233876 var(--tw-gradient-to-position);--tw-shadow: 0 0 15px rgba(245,158,11,.2);--tw-shadow-colored: 0 0 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.animated-progressbar-bg:is(.dark *){--tw-gradient-from: #000000 var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #172554 var(--tw-gradient-to-position)}.animated-progressbar-fg{position:absolute;top:0;left:0;height:100%;background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #76A9FA var(--tw-gradient-to-position);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.animated-progressbar-fg:is(.dark *){--tw-gradient-from: #76A9FA var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.menu-item{margin-bottom:.5rem;padding:.5rem 1rem;font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity));transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.menu-item:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.menu-item:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.menu-item:is(.dark *):hover{--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.menu-item.active-link{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:.375rem;border-top-right-radius:.375rem;--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity));font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity));transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);text-shadow:1px 1px 0px #e0e0e0,-1px -1px 0px #e0e0e0,1px -1px 0px #e0e0e0,-1px 1px 0px #e0e0e0}.menu-item.active-link:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.menu-item.active-link:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-text-opacity: 1;color:rgb(35 56 118 / var(--tw-text-opacity))}.menu-item.active-link:is(.dark *):hover{--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.menu-item.active-link{text-shadow:0 0 10px rgba(128,128,128,.5)}.menu-item.active-link:before{content:"";position:absolute;bottom:-5px;left:0;width:100%;height:5px;background:linear-gradient(to right,#4a90e2,#8ab8e0,#4a90e2);border-radius:10px;animation:shimmer 2s infinite}.dark .menu-item.active-link:before{background:linear-gradient(to right,#6ab7f1,#aaa,#6ab7f1)}@keyframes shimmer{0%{background-position:-100% 0}to{background-position:100% 0}}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-5px)}}.feather-emoji{display:inline-block;margin-left:5px;animation:bounce 2s infinite}.app-card{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.app-card:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.app-card:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.app-card:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}button{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}button:hover{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:#76A9FA #C3DDFD}.dark .scrollbar-thin{scrollbar-color:#1C64F2 #1E429F}.scrollbar-thin::-webkit-scrollbar{width:.5rem}.scrollbar-thin::-webkit-scrollbar-track{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.scrollbar-thin:is(.dark *)::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.scrollbar-thin::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.scrollbar-thin:is(.dark *)::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.scrollbar-thin::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.scrollbar-thin:is(.dark *)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.btn{display:flex;align-items:center;border-radius:.5rem;padding:.5rem 1rem;font-weight:600;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.btn-primary{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-primary:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.btn-primary:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.btn-primary:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.btn-secondary{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.btn-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.btn-secondary:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.btn-secondary:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.btn-secondary:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.btn-secondary:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.search-input{width:100%;border-bottom-width:2px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));background-color:transparent;padding:.5rem 1rem .5rem 2.5rem;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.search-input:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity));outline:2px solid transparent;outline-offset:2px}.search-input:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.search-input:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.scrollbar::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar{--scrollbar-track: #C3DDFD;--scrollbar-thumb: #76A9FA;scrollbar-width:thin;scrollbar-color:#76A9FA #C3DDFD}.dark .scrollbar{scrollbar-color:#1C64F2 #1E429F}.scrollbar::-webkit-scrollbar{width:.5rem}.scrollbar::-webkit-scrollbar-track{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.scrollbar:is(.dark *)::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.scrollbar:is(.dark *)::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.scrollbar::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.scrollbar:is(.dark *)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.scrollbar{--scrollbar-thumb-hover: #3F83F8}.scrollbar:is(.dark *){--scrollbar-track: #1A56DB;--scrollbar-thumb: #1C64F2;--scrollbar-thumb-hover: #3F83F8}.card-title{margin-bottom:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.card-title:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.card-content{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.card-content:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.card-footer{margin-top:1rem;display:flex;align-items:center;justify-content:space-between}.card-footer-button{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.card-footer-button:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.subcard{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity));padding:1rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.subcard:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.subcard-title{margin-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.subcard-title:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.subcard-content{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.subcard-content:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.subcard-footer{margin-top:1rem;display:flex;align-items:center;justify-content:space-between}.subcard-footer-button{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.subcard-footer-button:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.discussion-toolbox{display:flex;--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));align-items:center;gap:.5rem;border-top-left-radius:.375rem;border-bottom-left-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.5rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.group:hover .discussion-toolbox{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.discussion-toolbox:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.lollms-title-style{text-shadow:2px 2px 4px rgba(0,0,0,.2),2px 2px 0px white,-2px -2px 0px white,2px -2px 0px white,-2px 2px 0px white;background:linear-gradient(45deg,#f59e0b,#fbbf24);-webkit-background-clip:text;background-clip:text}.chat-bar{position:relative;display:flex;flex-grow:1;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;gap:.5rem;--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity));padding:.25rem;--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.chat-bar:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.chat-bar:is(.dark *){--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.chat-bar{height:50px;transition:all .3s ease}.chat-bar:hover{box-shadow:0 4px 6px -1px #00ff001a,0 2px 4px -1px #00ff000f}.svg-button{border-radius:9999px;padding:.5rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.svg-button:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity));--tw-ring-offset-width: 2px}.svg-button:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.svg-button:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.svg-button:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.svg-button:active{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.svg-button:active:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.nav-button{border-radius:.375rem;padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nav-button:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.nav-button:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.nav-button:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.nav-button-active{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.nav-button-active:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.nav-button-active:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.nav-button-active:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.btn-on{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.btn-on:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.btn-off{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.btn-off:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.interesting-facts{margin-top:1.5rem;margin-bottom:1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:.5rem;background-color:#fffc;padding:1rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.interesting-facts:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.interesting-facts:is(.dark *){background-color:#1f2937cc}.toolbar-button{cursor:pointer;border-style:none;background-color:transparent;padding:.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.toolbar-button:hover{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.context-menu{position:absolute;background-color:#fff;border:1px solid #e0e0e0;box-shadow:0 2px 10px #0000001a;border-radius:4px;padding:8px 0;min-width:150px;z-index:1000}.context-menu-item{padding:8px 16px;font-size:14px;color:#333;cursor:pointer;transition:background-color .2s ease}.context-menu-item:hover{background-color:#f5f5f5}.context-menu-separator{height:1px;background-color:#e0e0e0;margin:4px 0}.context-menu-item-disabled{color:#999;cursor:not-allowed}.context-menu-item-icon{margin-right:8px}.steps-container{margin-bottom:1rem;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.steps-header{display:flex;cursor:pointer;align-items:center;--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));padding:1rem}.steps-header:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.steps-title{margin:0;font-size:1rem;line-height:1.5rem;font-weight:600}.step-item{margin-bottom:.5rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));padding-left:1rem}.steps-container{margin-bottom:1rem;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.steps-container:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.steps-header{display:flex;cursor:pointer;align-items:center;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));padding:1rem}.steps-header:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.steps-icon{margin-right:1rem}.steps-summary{flex-grow:1}.steps-title{margin:0;font-size:1rem;line-height:1.5rem;font-weight:600;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.steps-title:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.steps-status{margin:0;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.steps-status:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.toggle-icon{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.toggle-icon:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.steps-content{padding:1rem}.steps-list{margin:0;list-style-type:none;padding:0}.step-item{margin-bottom:.5rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding-left:1rem}.step-item:last-child{margin-bottom:0}.step-item:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.step-container{margin-bottom:1rem;transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.step-wrapper{display:flex;align-items:flex-start;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.75rem}.step-wrapper:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.step-icon{margin-right:.75rem;height:1.5rem;width:1.5rem;flex-shrink:0}.icon-success{height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.icon-fail{height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.icon-spinner{height:1.5rem;width:1.5rem}@keyframes spin{to{transform:rotate(360deg)}}.icon-spinner{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity));border-top-color:transparent}.icon-spinner:is(.dark *){--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.step-content{flex-grow:1}.step-text{font-size:1rem;line-height:1.5rem;font-weight:500;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.step-text:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.step-description{margin-top:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.step-description:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.fade-enter-active,.fade-leave-active{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.fade-enter,.fade-leave-to{opacity:0}.status-icon{cursor:pointer;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.icon{height:1.5rem;width:1.5rem}.icon-success{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.icon-success:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.icon-fail{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.icon-fail:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.icon-text{font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.icon-text:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.last\:mb-0:last-child{margin-bottom:0}.even\:bg-bg-light-discussion-odd:nth-child(2n){background-color:var(--color-bg-light-discussion-odd)}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:block{display:block}.group\/item:hover .group-hover\/item\:scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group\/item:hover .group-hover\/item\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-secondary{border-color:var(--color-secondary)}.group:hover .group-hover\:bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.group:hover .group-hover\:bg-white\/50{background-color:#ffffff80}.group:hover .group-hover\:bg-opacity-0{--tw-bg-opacity: 0}.group:hover .group-hover\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.group:hover .group-hover\:to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.group:hover .group-hover\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.group\/item:hover .group-hover\/item\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.group:focus .group-focus\:ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.peer:checked~.peer-checked\:text-primary{color:var(--color-primary)}.hover\:z-10:hover{z-index:10}.hover\:z-20:hover{z-index:20}.hover\:h-8:hover{height:2rem}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-2:hover{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-x-100:hover{--tw-scale-x: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-2:hover{border-width:2px}.hover\:border-solid:hover{border-style:solid}.hover\:border-blue-300:hover{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-green-200:hover{--tw-border-opacity: 1;border-color:rgb(188 240 218 / var(--tw-border-opacity))}.hover\:border-primary:hover{border-color:var(--color-primary)}.hover\:border-primary-light:hover{border-color:var(--color-primary-light)}.hover\:border-secondary:hover{border-color:var(--color-secondary)}.hover\:bg-bg-light-tone:hover{background-color:var(--color-bg-light-tone)}.hover\:bg-bg-light-tone-panel:hover{background-color:var(--color-bg-light-tone-panel)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-400:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.hover\:bg-green-300:hover{--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}.hover\:bg-green-600:hover{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.hover\:bg-pink-800:hover{--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.hover\:bg-primary:hover{background-color:var(--color-primary)}.hover\:bg-primary-light:hover{background-color:var(--color-primary-light)}.hover\:bg-purple-800:hover{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.hover\:bg-red-300:hover{--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-r:hover{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.hover\:from-blue-50:hover{--tw-gradient-from: #EBF5FF var(--tw-gradient-from-position);--tw-gradient-to: rgb(235 245 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-blue-500\/20:hover{--tw-gradient-from: rgb(63 131 248 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-teal-200:hover{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-lime-200:hover{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.hover\:to-purple-50:hover{--tw-gradient-to: #F6F5FF var(--tw-gradient-to-position)}.hover\:to-purple-500\/20:hover{--tw-gradient-to: rgb(144 97 249 / .2) var(--tw-gradient-to-position)}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-green-300:hover{--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.hover\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.hover\:text-green-600:hover{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity: 1;color:rgb(88 80 236 / var(--tw-text-opacity))}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-purple-600:hover{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.hover\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.hover\:text-secondary:hover{color:var(--color-secondary)}.hover\:text-teal-600:hover{--tw-text-opacity: 1;color:rgb(4 116 129 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:text-yellow-600:hover{--tw-text-opacity: 1;color:rgb(159 88 10 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-none:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:scrollbar-thumb-primary{--scrollbar-thumb-hover: var(--color-primary) !important}.focus\:z-10:focus{z-index:10}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.focus\:border-secondary:focus{border-color:var(--color-secondary)}.focus\:border-transparent:focus{border-color:transparent}.focus\:text-blue-700:focus{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-4:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.focus\:ring-blue-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.focus\:ring-blue-500\/50:focus{--tw-ring-color: rgb(63 131 248 / .5)}.focus\:ring-blue-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(26 86 219 / var(--tw-ring-opacity))}.focus\:ring-cyan-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(165 243 252 / var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity))}.focus\:ring-secondary:focus{--tw-ring-color: var(--color-secondary)}.focus\:ring-teal-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.focus\:ring-yellow-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\:scale-75:active{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scrollbar-thumb-secondary{--scrollbar-thumb-active: var(--color-secondary) !important}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.dark\:border-bg-light:is(.dark *){border-color:var(--color-bg-light)}.dark\:border-blue-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.dark\:border-gray-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:border-gray-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.dark\:border-gray-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.dark\:border-green-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.dark\:border-pink-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}.dark\:border-pink-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(231 70 148 / var(--tw-border-opacity))}.dark\:border-purple-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}.dark\:border-purple-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(144 97 249 / var(--tw-border-opacity))}.dark\:border-red-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.dark\:border-transparent:is(.dark *){border-color:transparent}.dark\:border-yellow-300:is(.dark *){--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}.dark\:bg-bg-dark:is(.dark *){background-color:var(--color-bg-dark)}.dark\:bg-bg-dark-tone:is(.dark *){background-color:var(--color-bg-dark-tone)}.dark\:bg-bg-dark-tone-panel:is(.dark *){background-color:var(--color-bg-dark-tone-panel)}.dark\:bg-black:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.dark\:bg-blue-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.dark\:bg-blue-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.dark\:bg-blue-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.dark\:bg-blue-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.dark\:bg-blue-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.dark\:bg-gray-300:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.dark\:bg-gray-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.dark\:bg-gray-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:bg-gray-800\/30:is(.dark *){background-color:#1f29374d}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:bg-green-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.dark\:bg-green-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.dark\:bg-green-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.dark\:bg-green-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.dark\:bg-indigo-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.dark\:bg-indigo-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.dark\:bg-orange-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(180 52 3 / var(--tw-bg-opacity))}.dark\:bg-orange-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(138 44 13 / var(--tw-bg-opacity))}.dark\:bg-pink-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.dark\:bg-pink-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(214 31 105 / var(--tw-bg-opacity))}.dark\:bg-purple-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.dark\:bg-purple-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.dark\:bg-purple-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.dark\:bg-red-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.dark\:bg-red-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.dark\:bg-red-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.dark\:bg-red-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.dark\:bg-white:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.dark\:bg-yellow-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.dark\:bg-opacity-70:is(.dark *){--tw-bg-opacity: .7}.dark\:bg-opacity-80:is(.dark *){--tw-bg-opacity: .8}.dark\:from-bg-dark:is(.dark *){--tw-gradient-from: var(--color-bg-dark) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-blue-400\/20:is(.dark *){--tw-gradient-from: rgb(118 169 250 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-indigo-400:is(.dark *){--tw-gradient-from: #8DA2FB var(--tw-gradient-from-position);--tw-gradient-to: rgb(141 162 251 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:via-bg-dark:is(.dark *){--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-dark) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:to-purple-400:is(.dark *){--tw-gradient-to: #AC94FA var(--tw-gradient-to-position)}.dark\:to-purple-400\/20:is(.dark *){--tw-gradient-to: rgb(172 148 250 / .2) var(--tw-gradient-to-position)}.dark\:fill-gray-300:is(.dark *){fill:#d1d5db}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.dark\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.dark\:text-blue-800:is(.dark *){--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.dark\:text-dark-text-panel:is(.dark *){color:var(--color-dark-text-panel)}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.dark\:text-gray-800:is(.dark *){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.dark\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.dark\:text-green-500:is(.dark *){--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.dark\:text-green-800:is(.dark *){--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.dark\:text-green-900:is(.dark *){--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.dark\:text-indigo-500:is(.dark *){--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.dark\:text-indigo-900:is(.dark *){--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.dark\:text-orange-200:is(.dark *){--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.dark\:text-pink-400:is(.dark *){--tw-text-opacity: 1;color:rgb(241 126 184 / var(--tw-text-opacity))}.dark\:text-pink-500:is(.dark *){--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.dark\:text-pink-900:is(.dark *){--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.dark\:text-primary:is(.dark *){color:var(--color-primary)}.dark\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(172 148 250 / var(--tw-text-opacity))}.dark\:text-purple-500:is(.dark *){--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.dark\:text-purple-900:is(.dark *){--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.dark\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.dark\:text-red-500:is(.dark *){--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.dark\:text-red-800:is(.dark *){--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.dark\:text-red-900:is(.dark *){--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.dark\:text-slate-50:is(.dark *){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}.dark\:text-yellow-500:is(.dark *){--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.dark\:text-yellow-800:is(.dark *){--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.dark\:text-yellow-900:is(.dark *){--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:shadow-lg:is(.dark *){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:shadow-blue-800\/80:is(.dark *){--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-cyan-800\/80:is(.dark *){--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-green-800\/80:is(.dark *){--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-lime-800\/80:is(.dark *){--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-pink-800\/80:is(.dark *){--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-purple-800\/80:is(.dark *){--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-red-800\/80:is(.dark *){--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-teal-800\/80:is(.dark *){--tw-shadow-color: rgb(5 80 92 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:ring-gray-500:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark\:ring-white:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.dark\:ring-opacity-20:is(.dark *){--tw-ring-opacity: .2}.dark\:ring-offset-gray-700:is(.dark *){--tw-ring-offset-color: #374151}.dark\:ring-offset-gray-800:is(.dark *){--tw-ring-offset-color: #1F2937}.dark\:scrollbar-track-bg-dark:is(.dark *){--scrollbar-track: var(--color-bg-dark) !important}.dark\:scrollbar-track-bg-dark-tone:is(.dark *){--scrollbar-track: var(--color-bg-dark-tone) !important}.dark\:scrollbar-track-gray-700:is(.dark *){--scrollbar-track: #374151 !important}.dark\:scrollbar-track-gray-800:is(.dark *){--scrollbar-track: #1F2937 !important}.dark\:scrollbar-thumb-bg-dark-tone:is(.dark *){--scrollbar-thumb: var(--color-bg-dark-tone) !important}.dark\:scrollbar-thumb-bg-dark-tone-panel:is(.dark *){--scrollbar-thumb: var(--color-bg-dark-tone-panel) !important}.dark\:scrollbar-thumb-gray-500:is(.dark *){--scrollbar-thumb: #6B7280 !important}.dark\:scrollbar-thumb-gray-600:is(.dark *){--scrollbar-thumb: #4B5563 !important}.dark\:even\:bg-bg-dark-discussion-odd:nth-child(2n):is(.dark *){background-color:var(--color-bg-dark-discussion-odd)}.group:hover .dark\:group-hover\:bg-gray-800\/60:is(.dark *){background-color:#1f293799}.group:hover .dark\:group-hover\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:focus .dark\:group-focus\:ring-gray-800\/70:is(.dark *){--tw-ring-color: rgb(31 41 55 / .7)}.dark\:hover\:border-blue-600:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.dark\:hover\:border-gray-600:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:hover\:border-primary:hover:is(.dark *){border-color:var(--color-primary)}.dark\:hover\:bg-blue-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.dark\:hover\:bg-pink-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(231 70 148 / var(--tw-bg-opacity))}.dark\:hover\:bg-pink-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.dark\:hover\:bg-primary:hover:is(.dark *){background-color:var(--color-primary)}.dark\:hover\:bg-purple-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.dark\:hover\:bg-purple-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(119 29 29 / var(--tw-bg-opacity))}.dark\:hover\:bg-yellow-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 202 21 / var(--tw-bg-opacity))}.dark\:hover\:bg-yellow-400:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.hover\:dark\:bg-bg-dark-tone:is(.dark *):hover{background-color:var(--color-bg-dark-tone)}.hover\:dark\:bg-bg-dark-tone-panel:is(.dark *):hover{background-color:var(--color-bg-dark-tone-panel)}.dark\:hover\:from-blue-400\/30:hover:is(.dark *){--tw-gradient-from: rgb(118 169 250 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:hover\:from-blue-900\/30:hover:is(.dark *){--tw-gradient-from: rgb(35 56 118 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(35 56 118 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:hover\:to-purple-400\/30:hover:is(.dark *){--tw-gradient-to: rgb(172 148 250 / .3) var(--tw-gradient-to-position)}.dark\:hover\:to-purple-900\/30:hover:is(.dark *){--tw-gradient-to: rgb(74 29 150 / .3) var(--tw-gradient-to-position)}.dark\:hover\:text-blue-500:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:hover\:text-gray-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:hover\:text-gray-900:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.dark\:hover\:text-green-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.dark\:hover\:text-red-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:scrollbar-thumb-primary:is(.dark *){--scrollbar-thumb-hover: var(--color-primary) !important}.dark\:focus\:border-blue-500:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.dark\:focus\:border-secondary:focus:is(.dark *){border-color:var(--color-secondary)}.dark\:focus\:text-white:focus:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:focus\:ring-blue-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.dark\:focus\:ring-blue-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.dark\:focus\:ring-blue-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.dark\:focus\:ring-cyan-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-700:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.dark\:focus\:ring-green-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.dark\:focus\:ring-lime-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity))}.dark\:focus\:ring-pink-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.dark\:focus\:ring-pink-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.dark\:focus\:ring-purple-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.dark\:focus\:ring-purple-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-400:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.dark\:focus\:ring-secondary:focus:is(.dark *){--tw-ring-color: var(--color-secondary)}.dark\:focus\:ring-teal-700:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity))}.dark\:focus\:ring-teal-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}.dark\:focus\:ring-yellow-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity))}.dark\:focus\:ring-offset-gray-700:focus:is(.dark *){--tw-ring-offset-color: #374151}@media (min-width: 640px){.sm\:mb-0{margin-bottom:0}.sm\:mr-4{margin-right:1rem}.sm\:mt-0{margin-top:0}.sm\:h-10{height:2.5rem}.sm\:h-6{height:1.5rem}.sm\:h-64{height:16rem}.sm\:w-1\/4{width:25%}.sm\:w-10{width:2.5rem}.sm\:w-6{width:1.5rem}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-center{text-align:center}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.md\:inset-0{top:0;right:0;bottom:0;left:0}.md\:order-2{order:2}.md\:mr-6{margin-right:1.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-auto{height:auto}.md\:h-full{height:100%}.md\:w-1\/4{width:25%}.md\:w-48{width:12rem}.md\:w-auto{width:auto}.md\:max-w-xl{max-width:36rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.md\:border-0{border-width:0px}.md\:bg-transparent{background-color:transparent}.md\:p-0{padding:0}.md\:p-6{padding:1.5rem}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:font-medium{font-weight:500}.md\:text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.md\:dark\:hover\:bg-transparent:hover:is(.dark *){background-color:transparent}.md\:dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}}@media (min-width: 1280px){.xl\:h-80{height:20rem}.xl\:w-1\/6{width:16.666667%}}@media (min-width: 1536px){.\32xl\:h-96{height:24rem}} +*/.hljs-meta,.hljs-comment{color:#565f89}.hljs-tag,.hljs-doctag,.hljs-selector-id,.hljs-selector-class,.hljs-regexp,.hljs-template-tag,.hljs-selector-pseudo,.hljs-selector-attr,.hljs-variable.language_,.hljs-deletion{color:#f7768e}.hljs-variable,.hljs-template-variable,.hljs-number,.hljs-literal,.hljs-type,.hljs-params,.hljs-link{color:#ff9e64}.hljs-built_in,.hljs-attribute{color:#e0af68}.hljs-selector-tag{color:#2ac3de}.hljs-keyword,.hljs-title.function_,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-subst,.hljs-property{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-quote,.hljs-string,.hljs-symbol,.hljs-bullet,.hljs-addition{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-name,.hljs-keyword,.hljs-operator,.hljs-char.escape_,.hljs-attr{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.code-container{display:flex;margin:0}.line-numbers{flex-shrink:0;padding-right:5px;color:#999;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;margin:0}.code-content{flex-grow:1;margin:0;outline:none}.katex-display{display:inline-block;margin:0}.katex{display:inline-block;white-space:nowrap}.inline-latex{display:inline!important}.progress-bar-container{background-color:#f0f0f0;border-radius:4px;height:8px;overflow:hidden}.progress-bar{background-color:#3498db;height:100%;transition:width .3s ease}.custom-scrollbar[data-v-8a34bb65]{scrollbar-width:thin;scrollbar-color:rgba(156,163,175,.5) transparent}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar-thumb{background-color:#9ca3af80;border-radius:3px}.custom-scrollbar[data-v-8a34bb65]::-webkit-scrollbar-thumb:hover{background-color:#9ca3afb3}.toastItem-enter-active[data-v-46f379e5],.toastItem-leave-active[data-v-46f379e5]{transition:all .5s ease}.toastItem-enter-from[data-v-46f379e5],.toastItem-leave-to[data-v-46f379e5]{opacity:0;transform:translate(-30px)}.topbar-container[data-v-8d9a9d0d]{position:fixed;top:0;left:0;right:0;z-index:1000}.topbar[data-v-8d9a9d0d]{background-color:#ffffff1a;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);transition:transform .3s ease-in-out;display:flex;justify-content:center}.topbar-hidden[data-v-8d9a9d0d]{transform:translateY(-100%)}.topbar-content[data-v-8d9a9d0d]{display:flex;justify-content:space-between;align-items:center;max-width:1200px;width:100%}.pin-button[data-v-8d9a9d0d]{background-color:transparent;border:none;cursor:pointer;padding:5px;display:flex;align-items:center;justify-content:center}.pin-button svg[data-v-8d9a9d0d]{width:24px;height:24px;transition:transform .3s ease}.pin-button:hover svg[data-v-8d9a9d0d]{transform:scale(1.2)}.placeholder[data-v-8d9a9d0d]{height:10px}.topbar-container[data-v-8d9a9d0d]{position:relative;width:100%}.hover-zone[data-v-8d9a9d0d]{opacity:0}.error[data-v-8d9a9d0d]{color:red;margin-left:1rem}.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:1000}.hovered{transform:scale(1.05);transition:transform .2s ease-in-out}.active{transform:scale(1.1);transition:transform .2s ease-in-out}.dropdown-shadow[data-v-6c3ea3a5]{box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}:root.dark .dropdown-shadow[data-v-6c3ea3a5]{box-shadow:0 4px 6px -1px #ffffff1a,0 2px 4px -1px #ffffff0f}select{width:200px}body{background-color:#fafafa;font-family:sans-serif}.container{margin:4px auto;width:800px}.settings{position:fixed;top:0;right:0;width:500px;background-color:#fff;z-index:1000;overflow-y:auto;height:100%}.slider-container{margin-top:20px}.slider-value{display:inline-block;margin-left:10px;color:#6b7280;font-size:14px}.small-button{padding:.5rem .75rem;font-size:.875rem}.active-tab{font-weight:700}.help-view[data-v-8c1798f3]{min-height:100vh}.big-card[data-v-8c1798f3]{margin-left:auto;margin-right:auto;border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:2rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.big-card[data-v-8c1798f3]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.help-sections-container[data-v-8c1798f3]{max-height:70vh;overflow-y:auto;padding-right:1rem}.help-section[data-v-8c1798f3]{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.help-content[data-v-8c1798f3]{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.help-content[data-v-8c1798f3]:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar{width:12px}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar-thumb{background:#888;border-radius:10px;border:3px solid #f1f1f1}.help-sections-container[data-v-8c1798f3]::-webkit-scrollbar-thumb:hover{background:#555}.help-sections-container[data-v-8c1798f3]{scrollbar-width:thin;scrollbar-color:#888 #f1f1f1}.menu-container{position:relative;display:inline-block}.menu-button{background-color:#007bff;color:#fff;padding:10px;border:none;cursor:pointer;border-radius:4px}.menu-list{position:absolute;background-color:#fff;color:#000;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;padding:10px;max-width:500px;z-index:1000}.slide-enter-active,.slide-leave-active{transition:transform .2s}.slide-enter-to,.slide-leave-from{transform:translateY(-10px)}.menu-ul{list-style:none;padding:0;margin:0}.menu-li{cursor:pointer;display:flex;align-items:center;padding:5px}.menu-icon{width:20px;height:20px;margin-right:8px}.menu-command{min-width:200px;text-align:left}.fade-enter-active[data-v-f43216be],.fade-leave-active[data-v-f43216be]{transition:opacity .3s}.fade-enter[data-v-f43216be],.fade-leave-to[data-v-f43216be]{opacity:0}.heartbeat-text[data-v-d11575a1]{font-size:24px;animation:pulsate-d11575a1 1.5s infinite}@keyframes pulsate-d11575a1{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}to{transform:scale(1);opacity:1}}.list-move[data-v-d11575a1],.list-enter-active[data-v-d11575a1],.list-leave-active[data-v-d11575a1]{transition:all .5s ease}.list-enter-from[data-v-d11575a1]{transform:translatey(-30px)}.list-leave-to[data-v-d11575a1]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-d11575a1]{position:absolute}.bounce-enter-active[data-v-d11575a1]{animation:bounce-in-d11575a1 .5s}.bounce-leave-active[data-v-d11575a1]{animation:bounce-in-d11575a1 .5s reverse}@keyframes bounce-in-d11575a1{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-d11575a1]{background-color:#0ff}.hover[data-v-d11575a1]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-d11575a1]{font-weight:700}.control-buttons[data-v-2b3580ce]{position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;transform:translate(100%);transition:transform .3s}.group:hover .control-buttons[data-v-2b3580ce]{transform:translate(0)}.control-buttons-inner[data-v-2b3580ce]{display:flex;gap:10px;align-items:center;background-color:#fff;padding:8px;border-radius:0 0 0 8px;box-shadow:0 2px 8px #0000001a}.json-tree-view[data-v-40406ec6]{margin-left:16px}.json-item[data-v-40406ec6]{margin-bottom:4px}.json-key[data-v-40406ec6]{cursor:pointer;display:flex;align-items:center}.toggle-icon[data-v-40406ec6]{margin-right:4px;width:12px}.key[data-v-40406ec6]{font-weight:700;margin-right:4px}.value[data-v-40406ec6]{margin-left:4px}.string[data-v-40406ec6]{color:#0b7285}.number[data-v-40406ec6]{color:#d9480f}.boolean[data-v-40406ec6]{color:#5c940d}.null[data-v-40406ec6]{color:#868e96}.json-nested[data-v-40406ec6]{margin-left:16px;border-left:1px dashed #ccc;padding-left:8px}.json-viewer[data-v-83fc9727]{font-family:Monaco,Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace;font-size:14px;line-height:1.5;color:#333}.collapsible-section[data-v-83fc9727]{cursor:pointer;padding:8px;background-color:#f0f0f0;border-radius:4px;display:flex;align-items:center;transition:background-color .2s}.collapsible-section[data-v-83fc9727]:hover{background-color:#e0e0e0}.toggle-icon[data-v-83fc9727]{margin-right:8px;transition:transform .2s}.json-content[data-v-83fc9727]{margin-top:8px;padding-left:16px}.expand-button{margin-left:10px;margin-right:10px;background:none;border:none;padding:0;cursor:pointer}.htmljs{background:none}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.animate-fadeIn{animation:fadeIn .5s ease-out forwards}details[open] summary~*{animation:slideDown .3s ease-in-out}details summary::marker{display:none}details summary::-webkit-details-marker{display:none}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.bounce-enter-active[data-v-f44002af]{animation:bounce-in-f44002af .5s}.bounce-leave-active[data-v-f44002af]{animation:bounce-in-f44002af .5s reverse}@keyframes bounce-in-f44002af{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-track{background-color:#f1f1f1}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb{background-color:#888;border-radius:4px}.custom-scrollbar[data-v-1a32c141]::-webkit-scrollbar-thumb:hover{background-color:#555}.menu[data-v-1a32c141]{display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper[data-v-1a32c141]{position:relative;display:flex;flex-direction:column;align-items:center}.commands-menu-items-wrapper>#commands-menu-items[data-v-1a32c141]{top:calc(-100% - 2rem)}.personalities-hover-area[data-v-908c73f4]{position:relative;padding-top:10px}.custom-scrollbar[data-v-908c73f4]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-908c73f4]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-908c73f4]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-908c73f4]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}.list-move[data-v-908c73f4],.list-enter-active[data-v-908c73f4],.list-leave-active[data-v-908c73f4]{transition:all .5s ease}.list-enter-from[data-v-908c73f4]{transform:translatey(-30px)}.list-leave-to[data-v-908c73f4]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-908c73f4]{position:absolute}@keyframes rolling-ball-d9375d3e{0%{transform:translate(-50px) rotate(0)}25%{transform:translate(0) rotate(90deg)}50%{transform:translate(50px) rotate(180deg)}75%{transform:translate(0) rotate(270deg)}to{transform:translate(-50px) rotate(360deg)}}@keyframes bounce-d9375d3e{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}@keyframes fade-in-up-d9375d3e{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.animate-rolling-ball[data-v-d9375d3e]{animation:rolling-ball-d9375d3e 4s infinite ease-in-out,bounce-d9375d3e 1s infinite ease-in-out}.animate-fade-in-up[data-v-d9375d3e]{animation:fade-in-up-d9375d3e 1.5s ease-out}.floating-button-container[data-v-d9375d3e]{position:fixed;bottom:30px;right:30px;z-index:9999}.floating-button[data-v-d9375d3e]{position:fixed;bottom:30px;right:30px;width:100px;height:100px;border-radius:50%;background-color:#ff4500e6;display:flex;justify-content:center;align-items:center;box-shadow:0 0 30px #ff4500cc;animation:pulse-d9375d3e 1.5s infinite,glow-d9375d3e 2s infinite,wobble-d9375d3e 3s infinite;overflow:hidden;z-index:9999;transition:all .3s ease}.floating-button[data-v-d9375d3e]:hover{transform:scale(1.2) rotate(5deg);background-color:#ff4500}.tooltip[data-v-d9375d3e]{position:absolute;background-color:#000c;color:#fff;padding:8px 12px;border-radius:8px;font-size:16px;font-weight:700;white-space:nowrap;opacity:0;transition:opacity .3s ease,transform .3s ease;pointer-events:none;top:-50px;left:50%;transform:translate(-50%) scale(.9)}.floating-button:hover .tooltip[data-v-d9375d3e]{opacity:1;transform:translate(-50%) scale(1)}@keyframes pulse-d9375d3e{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}@keyframes glow-d9375d3e{0%{box-shadow:0 0 30px #ff4500cc}50%{box-shadow:0 0 60px #ff4500,0 0 90px #ff450099}to{box-shadow:0 0 30px #ff4500cc}}@keyframes wobble-d9375d3e{0%,to{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}.hidden[data-v-d9375d3e]{display:none}.popup-container[data-v-d504dfc9]{background-color:#fff;color:#333;border-radius:8px;box-shadow:0 4px 6px #0000001a;padding:24px;width:100%;height:100%;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center}.close-button[data-v-d504dfc9]{position:absolute;top:16px;right:16px;background-color:#3490dc;color:#fff;font-weight:700;padding:8px 16px;border-radius:8px;cursor:pointer;transition:background-color .3s ease}.close-button[data-v-d504dfc9]:hover{background-color:#2779bd}.iframe-content[data-v-d504dfc9]{width:100%;height:80%;border:none;margin-bottom:16px}.checkbox-container[data-v-d504dfc9]{display:flex;align-items:center;justify-content:center}.styled-checkbox[data-v-d504dfc9]{width:24px;height:24px;accent-color:#3490dc;cursor:pointer}.checkbox-label[data-v-d504dfc9]{margin-left:8px;font-size:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fade-enter-active[data-v-d504dfc9],.fade-leave-active[data-v-d504dfc9]{transition:opacity .5s}.fade-enter[data-v-d504dfc9],.fade-leave-to[data-v-d504dfc9]{opacity:0}.glow-effect[data-v-31178107]{box-shadow:0 0 5px 2px #00ffffb3;animation:glow-31178107 1.5s ease-in-out infinite alternate}@keyframes glow-31178107{0%{box-shadow:0 0 5px 2px #00ffffb3}to{box-shadow:0 0 20px 2px #00ffffb3}}.personalities-container[data-v-57566b64]{position:relative}.skills-lib-icon[data-v-57566b64]{position:absolute;top:-2px;right:-2px;z-index:10;font-size:5px;width:2px;height:2px}.skills-lib-icon i[data-v-57566b64]{width:2px;height:2px}@keyframes giggle-57566b64{0%,to{transform:translate(0) rotate(0) scale(1)}25%{transform:translate(-5px) rotate(-10deg) scale(1.05)}50%{transform:translate(5px) rotate(10deg) scale(.95)}75%{transform:translate(-5px) rotate(-10deg) scale(1.05)}}.animate-giggle[data-v-57566b64]{animation:giggle-57566b64 1.5s infinite ease-in-out}.custom-scrollbar[data-v-57566b64]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-57566b64]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-57566b64]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-57566b64]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}@keyframes custom-pulse-57566b64{0%,to{box-shadow:0 0 #3b82f680}50%{box-shadow:0 0 0 15px #3b82f600}}.animate-pulse[data-v-57566b64]{animation:custom-pulse-57566b64 2s infinite}.slide-right-enter-active[data-v-57566b64],.slide-right-leave-active[data-v-57566b64]{transition:transform .3s ease}.slide-right-enter[data-v-57566b64],.slide-right-leave-to[data-v-57566b64]{transform:translate(-100%)}.slide-left-enter-active[data-v-57566b64],.slide-left-leave-active[data-v-57566b64]{transition:transform .3s ease}.slide-left-enter[data-v-57566b64],.slide-left-leave-to[data-v-57566b64]{transform:translate(100%)}.fade-and-fly-enter-active[data-v-57566b64]{animation:fade-and-fly-enter-57566b64 .5s ease}.fade-and-fly-leave-active[data-v-57566b64]{animation:fade-and-fly-leave-57566b64 .5s ease}@keyframes fade-and-fly-enter-57566b64{0%{opacity:0;transform:translateY(20px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes fade-and-fly-leave-57566b64{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-20px) scale(1.2)}}.list-move[data-v-57566b64],.list-enter-active[data-v-57566b64],.list-leave-active[data-v-57566b64]{transition:all .5s ease}.list-enter-from[data-v-57566b64]{transform:translatey(-30px)}.list-leave-to[data-v-57566b64]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-57566b64]{position:absolute}@keyframes float-57566b64{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}.animate-float[data-v-57566b64]{animation:float-57566b64 linear infinite}@keyframes star-move-57566b64{0%{transform:translate(0) rotate(0)}50%{transform:translate(20px,20px) rotate(180deg)}to{transform:translate(0) rotate(360deg)}}.animate-star[data-v-57566b64]{animation:star-move-57566b64 linear infinite}@keyframes fall-57566b64{0%{transform:translateY(-20px) rotate(0);opacity:1}to{transform:translateY(calc(100vh + 20px)) rotate(360deg);opacity:0}}.animate-fall[data-v-57566b64]{animation:fall-57566b64 linear infinite}@keyframes glow-57566b64{0%,to{text-shadow:0 0 5px rgba(66,153,225,.5),0 0 10px rgba(66,153,225,.5)}50%{text-shadow:0 0 20px rgba(66,153,225,.8),0 0 30px rgba(66,153,225,.8)}}.animate-glow[data-v-57566b64]{animation:glow-57566b64 2s ease-in-out infinite}@media (prefers-color-scheme: dark){@keyframes glow-57566b64{0%,to{text-shadow:0 0 5px rgba(147,197,253,.5),0 0 10px rgba(147,197,253,.5)}50%{text-shadow:0 0 20px rgba(147,197,253,.8),0 0 30px rgba(147,197,253,.8)}0%,to{text-shadow:0 0 5px rgba(147,197,253,.5),0 0 10px rgba(147,197,253,.5)}50%{text-shadow:0 0 20px rgba(147,197,253,.8),0 0 30px rgba(147,197,253,.8)}}}@keyframes roll-57566b64{0%{transform:translate(-50%) rotate(0)}to{transform:translate(50%) rotate(360deg)}}.animate-roll[data-v-57566b64]{animation:roll-57566b64 4s linear infinite}.toolbar[data-v-57566b64]{position:relative;width:100%}.toolbar-container[data-v-57566b64]{display:flex;height:2.5rem;align-items:center}.toolbar-button[data-v-57566b64]{cursor:pointer;border-style:none;background-color:transparent;padding:.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.toolbar-button[data-v-57566b64]:hover{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.menu-container[data-v-57566b64]{position:relative}.expandable-menu[data-v-57566b64]{position:absolute;top:100%;left:.625rem;flex-direction:column;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.menu-container:hover .expandable-menu[data-v-57566b64],.menu-visible[data-v-57566b64]{display:flex}.menu-item[data-v-57566b64]{background:none;border:none;cursor:pointer;padding:8px;color:#333;transition:background-color .3s}.menu-item[data-v-57566b64]:hover{background-color:#f0f0f0}.dot[data-v-57566b64]{width:10px;height:10px;border-radius:50%}.dot-green[data-v-57566b64]{background-color:green}.dot-red[data-v-57566b64]{background-color:red}.animate-pulse[data-v-57566b64]{animation:pulse-57566b64 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse-57566b64{0%,to{opacity:1}50%{opacity:.7}}.logo-container[data-v-57566b64]{position:relative;width:48px;height:48px}.logo-image[data-v-57566b64]{width:100%;height:100%;border-radius:50%;-o-object-fit:cover;object-fit:cover}@keyframes bounce-57566b64{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:translateY(0);animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce[data-v-57566b64]{animation:bounce-57566b64 1s infinite}@keyframes roll-and-bounce-57566b64{0%,to{transform:translate(0) rotate(0)}45%{transform:translate(100px) rotate(360deg)}50%{transform:translate(90px) rotate(390deg)}55%{transform:translate(100px) rotate(360deg)}95%{transform:translate(0) rotate(0)}}@keyframes spin-57566b64{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.container{display:flex;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap}.floating-frame{margin:15px;float:left;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;z-index:5000;position:fixed;cursor:move;bottom:0;right:0}.handle{width:100%;height:20px;background:#ccc;cursor:move;text-align:center}.floating-frame img{width:100%;height:auto}.controls{margin-top:10px}#webglContainer{top:0;left:0}.floating-frame2{margin:15px;width:800px;height:auto;border:1px solid #000;border-radius:4px;overflow:hidden;min-height:200px;z-index:5000}:root{--baklava-control-color-primary: #e28b46;--baklava-control-color-error: #d00000;--baklava-control-color-background: #2c3748;--baklava-control-color-foreground: white;--baklava-control-color-hover: #455670;--baklava-control-color-active: #556986;--baklava-control-color-disabled-foreground: #666c75;--baklava-control-border-radius: 3px;--baklava-sidebar-color-background: #1b202c;--baklava-sidebar-color-foreground: white;--baklava-node-color-background: #1b202c;--baklava-node-color-foreground: white;--baklava-node-color-hover: #e28c4677;--baklava-node-color-selected: var(--baklava-control-color-primary);--baklava-node-color-resize-handle: var(--baklava-control-color-background);--baklava-node-title-color-background: #151a24;--baklava-node-title-color-foreground: white;--baklava-group-node-title-color-background: #215636;--baklava-group-node-title-color-foreground: white;--baklava-node-interface-port-tooltip-color-foreground: var(--baklava-control-color-primary);--baklava-node-interface-port-tooltip-color-background: var(--baklava-editor-background-pattern-black);--baklava-node-border-radius: 6px;--baklava-color-connection-default: #737f96;--baklava-color-connection-allowed: #48bc79;--baklava-color-connection-forbidden: #bc4848;--baklava-editor-background-pattern-default: #202b3c;--baklava-editor-background-pattern-line: #263140;--baklava-editor-background-pattern-black: #263140;--baklava-context-menu-background: #1b202c;--baklava-context-menu-shadow: 0 0 8px rgba(0, 0, 0, .65);--baklava-toolbar-background: #1b202caa;--baklava-toolbar-foreground: white;--baklava-node-palette-background: #1b202caa;--baklava-node-palette-foreground: white;--baklava-selectionbox-color-border: var(--baklava-node-color-background);--baklava-selectionbox-color-background: var(--baklava-node-color-hover);--baklava-visual-transition: .1s linear}.baklava-button{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);transition:background-color var(--baklava-visual-transition);border:none;padding:.45em .35em;border-radius:var(--baklava-control-border-radius);font-size:inherit;cursor:pointer;overflow-x:hidden}.baklava-button:hover{background-color:var(--baklava-control-color-hover)}.baklava-button:active{background-color:var(--baklava-control-color-primary)}.baklava-button.--block{width:100%}.baklava-checkbox{display:flex;padding:.35em 0;cursor:pointer;overflow-x:hidden;align-items:center}.baklava-checkbox .__checkmark-container{display:flex;background-color:var(--baklava-control-color-background);border-radius:var(--baklava-control-border-radius);transition:background-color var(--baklava-visual-transition);width:18px;height:18px}.baklava-checkbox:hover .__checkmark-container{background-color:var(--baklava-control-color-hover)}.baklava-checkbox:active .__checkmark-container{background-color:var(--baklava-control-color-active)}.baklava-checkbox .__checkmark{stroke-dasharray:15;stroke-dashoffset:15;stroke:var(--baklava-control-color-foreground);stroke-width:2px;fill:none;transition:stroke-dashoffset var(--baklava-visual-transition)}.baklava-checkbox.--checked .__checkmark{stroke-dashoffset:0}.baklava-checkbox.--checked .__checkmark-container{background-color:var(--baklava-control-color-primary)}.baklava-checkbox .__label{margin-left:.5rem}.baklava-context-menu{color:var(--baklava-control-color-foreground);position:absolute;display:inline-block;z-index:100;background-color:var(--baklava-context-menu-background);box-shadow:var(--baklava-context-menu-shadow);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);min-width:6rem;width:-moz-max-content;width:max-content}.baklava-context-menu>.item{display:flex;align-items:center;padding:.35em 1em;transition:background .05s linear;position:relative}.baklava-context-menu>.item>.__label{flex:1 1 auto}.baklava-context-menu>.item>.__submenu-icon{margin-left:.75rem}.baklava-context-menu>.item.--disabled{color:var(--baklava-control-color-hover)}.baklava-context-menu>.item:not(.--header):not(.--active):not(.--disabled):hover{background:var(--baklava-control-color-primary)}.baklava-context-menu>.item.--active{background:var(--baklava-control-color-primary)}.baklava-context-menu.--nested{left:100%;top:0}.baklava-context-menu.--flipped-x.--nested{left:unset;right:100%}.baklava-context-menu.--flipped-y.--nested{top:unset;bottom:0}.baklava-context-menu>.divider{margin:.35em 0;height:1px;background-color:var(--baklava-control-color-hover)}.baklava-icon{display:block;height:100%}.baklava-icon.--clickable{cursor:pointer;transition:color var(--baklava-visual-transition)}.baklava-icon.--clickable:hover{color:var(--baklava-control-color-primary)}.baklava-input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);border:none;border-radius:var(--baklava-control-border-radius);padding:.45em .75em;width:100%;transition:background-color var(--baklava-visual-transition);font-size:inherit;font:inherit}.baklava-input:hover{background-color:var(--baklava-control-color-hover)}.baklava-input:active{background-color:var(--baklava-control-color-active)}.baklava-input:focus-visible{outline:1px solid var(--baklava-control-color-primary)}.baklava-input[type=number]::-webkit-inner-spin-button,.baklava-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.baklava-input.--invalid{box-shadow:0 0 2px 2px var(--baklava-control-color-error)}.baklava-num-input{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);width:100%;display:grid;grid-template-columns:20px 1fr 20px}.baklava-num-input>.__button{display:flex;flex:0 0 auto;width:20px;justify-content:center;align-items:center;transition:background var(--baklava-visual-transition);cursor:pointer}.baklava-num-input>.__button:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__button:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__button.--dec{grid-area:1/1/span 1/span 1}.baklava-num-input>.__button.--dec>svg{transform:rotate(90deg)}.baklava-num-input>.__button.--inc{grid-area:1/3/span 1/span 1}.baklava-num-input>.__button.--inc>svg{transform:rotate(-90deg)}.baklava-num-input>.__button path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-num-input>.__content{grid-area:1/2/span 1/span 1;display:inline-flex;cursor:pointer;max-width:100%;min-width:0;align-items:center;transition:background-color var(--baklava-visual-transition)}.baklava-num-input>.__content:hover{background-color:var(--baklava-control-color-hover)}.baklava-num-input>.__content:active{background-color:var(--baklava-control-color-active)}.baklava-num-input>.__content>.__label,.baklava-num-input>.__content>.__value{margin:.35em 0;padding:0 .5em}.baklava-num-input>.__content>.__label{flex:1;min-width:0;overflow:hidden}.baklava-num-input>.__content>.__value{text-align:right}.baklava-num-input>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-select{width:100%;position:relative;color:var(--baklava-control-color-foreground)}.baklava-select.--open>.__selected{border-bottom-left-radius:0;border-bottom-right-radius:0}.baklava-select.--open>.__selected>.__icon{transform:rotate(180deg)}.baklava-select>.__selected{background-color:var(--baklava-control-color-background);padding:.35em .75em;border-radius:var(--baklava-control-border-radius);transition:background var(--baklava-visual-transition);min-height:1.7em;display:flex;align-items:center;cursor:pointer}.baklava-select>.__selected:hover{background:var(--baklava-control-color-hover)}.baklava-select>.__selected:active{background:var(--baklava-control-color-active)}.baklava-select>.__selected>.__text{flex:1 0 auto;flex-basis:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.baklava-select>.__selected>.__icon{flex:0 0 auto;display:flex;justify-content:center;align-items:center;transition:transform .25s ease;width:18px;height:18px}.baklava-select>.__selected>.__icon path{stroke:var(--baklava-control-color-foreground);fill:var(--baklava-control-color-foreground)}.baklava-select>.__dropdown{position:absolute;top:100%;left:0;right:0;z-index:10;background-color:var(--baklava-context-menu-background);filter:drop-shadow(0 0 4px black);border-radius:0 0 var(--baklava-control-border-radius) var(--baklava-control-border-radius);max-height:15em;overflow-y:scroll}.baklava-select>.__dropdown::-webkit-scrollbar{width:0px;background:transparent}.baklava-select>.__dropdown>.item{padding:.35em .35em .35em 1em;transition:background .05s linear}.baklava-select>.__dropdown>.item:not(.--header):not(.--active){cursor:pointer}.baklava-select>.__dropdown>.item:not(.--header):not(.--active):hover{background:var(--baklava-control-color-hover)}.baklava-select>.__dropdown>.item.--active{background:var(--baklava-control-color-primary)}.baklava-select>.__dropdown>.item.--header{color:var(--baklava-control-color-disabled-foreground);border-bottom:1px solid var(--baklava-control-color-disabled-foreground);padding:.5em .35em .5em 1em}.baklava-slider{background:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);border-radius:var(--baklava-control-border-radius);position:relative;cursor:pointer}.baklava-slider>.__content{display:flex;position:relative}.baklava-slider>.__content>.__label,.baklava-slider>.__content>.__value{flex:1 1 auto;margin:.35em 0;padding:0 .5em;text-overflow:ellipsis}.baklava-slider>.__content>.__value{text-align:right}.baklava-slider>.__content>input{background-color:var(--baklava-control-color-background);color:var(--baklava-control-color-foreground);caret-color:var(--baklava-control-color-primary);padding:.35em;width:100%}.baklava-slider>.__slider{position:absolute;top:0;bottom:0;left:0;background-color:var(--baklava-control-color-primary);border-radius:var(--baklava-control-border-radius)}.baklava-connection{stroke:var(--baklava-color-connection-default);stroke-width:2px;fill:none}.baklava-connection.--temporary{stroke-width:4px;stroke-dasharray:5 5;stroke-dashoffset:0;animation:dash 1s linear infinite;transform:translateY(-1px)}@keyframes dash{to{stroke-dashoffset:20}}.baklava-connection.--allowed{stroke:var(--baklava-color-connection-allowed)}.baklava-connection.--forbidden{stroke:var(--baklava-color-connection-forbidden)}.baklava-minimap{position:absolute;height:15%;width:15%;min-width:150px;max-width:90%;top:20px;right:20px;z-index:900}.baklava-editor{width:100%;height:100%;position:relative;overflow:hidden;outline:none!important;font-family:Lato,Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:15px;touch-action:none}.baklava-editor .background{background-color:var(--baklava-editor-background-pattern-default);background-image:linear-gradient(var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(90deg,var(--baklava-editor-background-pattern-black) 2px,transparent 2px),linear-gradient(var(--baklava-editor-background-pattern-line) 1px,transparent 1px),linear-gradient(90deg,var(--baklava-editor-background-pattern-line) 1px,transparent 1px);background-repeat:repeat;width:100%;height:100%;pointer-events:none!important}.baklava-editor .selection-box{position:absolute;border:1px solid var(--baklava-selectionbox-color-border);background-color:var(--baklava-selectionbox-color-background);pointer-events:none;opacity:.5}.baklava-editor.--start-selection-box{cursor:crosshair}.baklava-editor *:not(input):not(textarea){user-select:none;-moz-user-select:none;-webkit-user-select:none;touch-action:none}.baklava-editor .input-user-select{user-select:auto;-moz-user-select:auto;-webkit-user-select:auto}.baklava-editor *,.baklava-editor *:after,.baklava-editor *:before{box-sizing:border-box}.baklava-editor.--temporary-connection{cursor:crosshair}.baklava-editor .connections-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none!important}.baklava-editor .node-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.baklava-editor .node-container *{pointer-events:all}.baklava-ignore-mouse *{pointer-events:none!important}.baklava-ignore-mouse .__port{pointer-events:all!important}.baklava-node-interface{padding:.25em 0;position:relative}.baklava-node-interface .__port{position:absolute;width:10px;height:10px;background:#fff;border-radius:50%;top:calc(50% - 5px);cursor:crosshair}.baklava-node-interface .__port.--selected{outline:2px var(--baklava-color-connection-default) solid;outline-offset:4px}.baklava-node-interface.--input{text-align:left;padding-left:.5em}.baklava-node-interface.--input .__port{left:-1.1em}.baklava-node-interface.--output{text-align:right;padding-right:.5em}.baklava-node-interface.--output .__port{right:-1.1em}.baklava-node-interface .__tooltip{position:absolute;left:5px;top:15px;transform:translate(-50%);background:var(--baklava-node-interface-port-tooltip-color-background);color:var(--baklava-node-interface-port-tooltip-color-foreground);padding:.25em .5em;text-align:center;z-index:2}.baklava-node-palette{position:absolute;left:0;top:60px;width:250px;height:calc(100% - 60px);z-index:3;padding:2rem;overflow-y:auto;background:var(--baklava-node-palette-background);color:var(--baklava-node-palette-foreground)}.baklava-node-palette h1{margin-top:2rem}.baklava-node.--palette{position:unset;margin:1rem 0;cursor:grab}.baklava-node.--palette:first-child{margin-top:0}.baklava-node.--palette .__title{padding:.5rem;border-radius:var(--baklava-node-border-radius)}.baklava-dragged-node{position:absolute;width:calc(250px - 4rem);height:40px;z-index:4;pointer-events:none}.baklava-node{background:var(--baklava-node-color-background);color:var(--baklava-node-color-foreground);border:1px solid transparent;border-radius:var(--baklava-node-border-radius);position:absolute;box-shadow:0 0 4px #000c;transition:border-color var(--baklava-visual-transition),box-shadow var(--baklava-visual-transition);width:var(--width)}.baklava-node:hover{border-color:var(--baklava-node-color-hover)}.baklava-node:hover .__resize-handle:after{opacity:1}.baklava-node.--selected{z-index:5;border-color:var(--baklava-node-color-selected)}.baklava-node.--dragging{box-shadow:0 0 12px #000c}.baklava-node.--dragging>.__title{cursor:grabbing}.baklava-node>.__title{display:flex;background:var(--baklava-node-title-color-background);color:var(--baklava-node-title-color-foreground);padding:.4em .75em;border-radius:var(--baklava-node-border-radius) var(--baklava-node-border-radius) 0 0;cursor:grab}.baklava-node>.__title>*:first-child{flex-grow:1}.baklava-node>.__title>.__title-label{pointer-events:none}.baklava-node>.__title>.__menu{position:relative;cursor:initial}.baklava-node[data-node-type^=__baklava_]>.__title{background:var(--baklava-group-node-title-color-background);color:var(--baklava-group-node-title-color-foreground)}.baklava-node>.__content{padding:.75em}.baklava-node>.__content.--reverse-y{display:flex;flex-direction:column-reverse}.baklava-node>.__content>div>div{margin:.5em 0}.baklava-node.--two-column>.__content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;grid-template-areas:". ." ". ."}.baklava-node.--two-column>.__content>.__inputs{grid-row:1;grid-column:1}.baklava-node.--two-column>.__content>.__outputs{grid-row:1;grid-column:2}.baklava-node .__resize-handle{position:absolute;right:0;bottom:0;width:1rem;height:1rem;transform:translate(50%);cursor:ew-resize}.baklava-node .__resize-handle:after{content:"";position:absolute;bottom:0;left:-.5rem;width:1rem;height:1rem;opacity:0;border-bottom-right-radius:var(--baklava-node-border-radius);transition:opacity var(--baklava-visual-transition);background:linear-gradient(-45deg,transparent 10%,var(--baklava-node-color-resize-handle) 10%,var(--baklava-node-color-resize-handle) 15%,transparent 15%,transparent 30%,var(--baklava-node-color-resize-handle) 30%,var(--baklava-node-color-resize-handle) 35%,transparent 35%,transparent 50%,var(--baklava-node-color-resize-handle) 50%,var(--baklava-node-color-resize-handle) 55%,transparent 55%)}.baklava-sidebar{position:absolute;height:100%;width:25%;min-width:300px;max-width:90%;top:0;right:0;z-index:1000;background-color:var(--baklava-sidebar-color-background);color:var(--baklava-sidebar-color-foreground);box-shadow:none;overflow-x:hidden;padding:1em;transform:translate(100%);transition:transform .5s;display:flex;flex-direction:column}.baklava-sidebar.--open{transform:translate(0);box-shadow:0 0 15px #000}.baklava-sidebar .__resizer{position:absolute;left:0;top:0;height:100%;width:4px;cursor:col-resize}.baklava-sidebar .__header{display:flex;align-items:center}.baklava-sidebar .__header .__node-name{margin-left:.5rem}.baklava-sidebar .__close{font-size:2em;border:none;background:none;color:inherit;cursor:pointer}.baklava-sidebar .__interface{margin:.5em 0}.baklava-toolbar{position:absolute;left:0;top:0;width:100%;height:60px;z-index:3;padding:.5rem 2rem;background:var(--baklava-toolbar-background);color:var(--baklava-toolbar-foreground);display:flex;align-items:center}.baklava-toolbar-entry{margin-left:.5rem;margin-right:.5rem}.baklava-toolbar-button{color:var(--baklava-toolbar-foreground);background:none;border:none;transition:color var(--baklava-visual-transition)}.baklava-toolbar-button:not([disabled]){cursor:pointer}.baklava-toolbar-button:hover:not([disabled]){color:var(--baklava-control-color-primary)}.baklava-toolbar-button[disabled]{color:var(--baklava-control-color-disabled-foreground)}.slide-fade-enter-active,.slide-fade-leave-active{transition:all .1s ease-out}.slide-fade-enter-from,.slide-fade-leave-to{transform:translateY(5px);opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .1s ease-out!important}.fade-enter-from,.fade-leave-to{opacity:0}.loading-indicator[data-v-f8c39e0b]{display:flex;justify-content:center;align-items:center;height:100px;font-size:1.2em;color:#666}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:PTSans,Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.tooltip-arrow,.tooltip-arrow:before{position:absolute;width:8px;height:8px;background:inherit}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";visibility:visible;transform:rotate(45deg)}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:#e5e7eb}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{position:absolute;width:8px;height:8px;background:inherit}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;transform:rotate(45deg);position:absolute;width:9px;height:9px;background:inherit}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:#4b5563}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#e5e7eb}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:#4b5563}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:before{visibility:hidden}[role=tooltip].invisible>[data-popper-arrow]:after{visibility:hidden}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#1c64f2}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}select:not([size]){background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#1c64f2;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #1C64F2;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:.55em .55em;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-color:currentColor;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:.55em .55em;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:#1f2937;border:0;font-weight:500;font-size:.875rem;cursor:pointer;padding:.625rem 1rem .625rem 2rem;margin-inline-start:-1rem;margin-inline-end:1rem}input[type=file]::file-selector-button:hover{background:#374151}.dark input[type=file]::file-selector-button{color:#fff;background:#4b5563}.dark input[type=file]::file-selector-button:hover{background:#6b7280}input[type=range]::-webkit-slider-thumb{height:1.25rem;width:1.25rem;background:#1c64f2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-webkit-slider-thumb{background:#9ca3af}.dark input[type=range]:disabled::-webkit-slider-thumb{background:#6b7280}input[type=range]:focus::-webkit-slider-thumb{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1px;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}input[type=range]::-moz-range-thumb{height:1.25rem;width:1.25rem;background:#1c64f2;border-radius:9999px;border:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;cursor:pointer}input[type=range]:disabled::-moz-range-thumb{background:#9ca3af}.dark input[type=range]:disabled::-moz-range-thumb{background:#6b7280}input[type=range]::-moz-range-progress{background:#3f83f8}input[type=range]::-ms-fill-lower{background:#3f83f8}.toggle-bg:after{content:"";position:absolute;top:.125rem;left:.125rem;background:#fff;border-color:#d1d5db;border-width:1px;border-radius:9999px;height:1.25rem;width:1.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-duration:.15s;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}input:checked+.toggle-bg:after{transform:translate(100%);border-color:#fff}input:checked+.toggle-bg{background:#1c64f2;border-color:#1c64f2}*{scrollbar-color:initial;scrollbar-width:initial}body{min-height:100vh;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #e0eaff var(--tw-gradient-from-position);--tw-gradient-to: rgb(224 234 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #f0e6ff var(--tw-gradient-to-position)}body:is(.dark *){background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #0f2647 var(--tw-gradient-from-position);--tw-gradient-to: rgb(15 38 71 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1e1b4b var(--tw-gradient-to-position)}html{scroll-behavior:smooth}body{font-family:Roboto,sans-serif}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-0\.5{bottom:-.125rem}.-bottom-1{bottom:-.25rem}.-bottom-1\.5{bottom:-.375rem}.-bottom-2{bottom:-.5rem}.-bottom-4{bottom:-1rem}.-left-1\.5{left:-.375rem}.-right-0\.5{right:-.125rem}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-1\.5{top:-.375rem}.-top-2{top:-.5rem}.bottom-0{bottom:0}.bottom-16{bottom:4rem}.bottom-2{bottom:.5rem}.bottom-2\.5{bottom:.625rem}.bottom-20{bottom:5rem}.bottom-4{bottom:1rem}.bottom-5{bottom:1.25rem}.bottom-6{bottom:1.5rem}.bottom-\[60px\]{bottom:60px}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-20{left:5rem}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.right-2\.5{right:.625rem}.right-20{right:5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.top-full{top:100%}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.-m-1{margin:-.25rem}.-m-2{margin:-.5rem}.-m-4{margin:-1rem}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-4{margin:1rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.mx-0{margin-left:0;margin-right:0}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-8{margin-top:2rem;margin-bottom:2rem}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0px}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-4\/5{height:80%}.h-48{height:12rem}.h-5{height:1.25rem}.h-5\/6{height:83.333333%}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[200px\]{height:200px}.h-\[400px\]{height:400px}.h-auto{height:auto}.h-full{height:100%}.h-modal{height:calc(100% - 2rem)}.h-px{height:1px}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\[400px\]{max-height:400px}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[90vh\]{max-height:90vh}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-\[220px\]{min-height:220px}.min-h-\[500px\]{min-height:500px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-3\/5{width:60%}.w-36{width:9rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[15rem\]{width:15rem}.w-\[16rem\]{width:16rem}.w-\[300px\]{width:300px}.w-\[500px\]{width:500px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.min-w-96,.min-w-\[24rem\]{min-width:24rem}.min-w-\[300px\]{min-width:300px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[24rem\]{max-width:24rem}.max-w-\[300px\]{max-width:300px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.flex-grow-0{flex-grow:0}.grow{flex-grow:1}.origin-left{transform-origin:left}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-0{--tw-translate-y: -0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\/2{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-x-0{--tw-scale-x: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-none{transform:none}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1rem * var(--tw-space-x-reverse));margin-left:calc(-1rem * calc(1 - var(--tw-space-x-reverse)))}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-bg-dark{border-color:var(--color-bg-dark)}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(195 221 253 / var(--tw-border-opacity))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.border-blue-700{--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(5 122 85 / var(--tw-border-opacity))}.border-green-700{--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity))}.border-pink-600{--tw-border-opacity: 1;border-color:rgb(214 31 105 / var(--tw-border-opacity))}.border-pink-700{--tw-border-opacity: 1;border-color:rgb(191 18 93 / var(--tw-border-opacity))}.border-primary{border-color:var(--color-primary)}.border-primary-light{border-color:var(--color-primary-light)}.border-purple-600{--tw-border-opacity: 1;border-color:rgb(126 58 242 / var(--tw-border-opacity))}.border-purple-700{--tw-border-opacity: 1;border-color:rgb(108 43 217 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(224 36 36 / var(--tw-border-opacity))}.border-red-700{--tw-border-opacity: 1;border-color:rgb(200 30 30 / var(--tw-border-opacity))}.border-secondary{border-color:var(--color-secondary)}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(227 160 8 / var(--tw-border-opacity))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(194 120 3 / var(--tw-border-opacity))}.bg-accent{background-color:var(--color-accent)}.bg-bg-dark-tone-panel{background-color:var(--color-bg-dark-tone-panel)}.bg-bg-light{background-color:var(--color-bg-light)}.bg-bg-light-tone{background-color:var(--color-bg-light-tone)}.bg-bg-light-tone-panel{background-color:var(--color-bg-light-tone-panel)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(222 247 236 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity: 1;background-color:rgb(49 196 141 / var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(229 237 255 / var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(88 80 236 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(254 236 220 / var(--tw-bg-opacity))}.bg-pink-100{--tw-bg-opacity: 1;background-color:rgb(252 232 243 / var(--tw-bg-opacity))}.bg-pink-200{--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.bg-pink-700{--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--color-primary)}.bg-primary-light{background-color:var(--color-primary-light)}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(237 235 254 / var(--tw-bg-opacity))}.bg-purple-200{--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(249 128 128 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/30{background-color:#ffffff4d}.bg-white\/50{background-color:#ffffff80}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(253 246 178 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-70{--tw-bg-opacity: .7}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-bg-light{--tw-gradient-from: var(--color-bg-light) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500\/10{--tw-gradient-from: rgb(63 131 248 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #0E9F6E var(--tw-gradient-from-position);--tw-gradient-to: rgb(14 159 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-600{--tw-gradient-from: #5850EC var(--tw-gradient-from-position);--tw-gradient-to: rgb(88 80 236 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-lime-500{--tw-gradient-from: #84cc16 var(--tw-gradient-from-position);--tw-gradient-to: rgb(132 204 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #F05252 var(--tw-gradient-from-position);--tw-gradient-to: rgb(240 82 82 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-200{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-500{--tw-gradient-from: #0694A2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 148 162 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-5\%{--tw-gradient-from-position: 5%}.via-bg-light{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-light) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-600{--tw-gradient-to: rgb(28 100 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #1C64F2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-600{--tw-gradient-to: rgb(8 145 178 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #0891b2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-green-600{--tw-gradient-to: rgb(5 122 85 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #057A55 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-lime-600{--tw-gradient-to: rgb(101 163 13 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #65a30d var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-pink-600{--tw-gradient-to: rgb(214 31 105 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #D61F69 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-purple-600{--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #7E3AF2 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-red-600{--tw-gradient-to: rgb(224 36 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #E02424 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-teal-600{--tw-gradient-to: rgb(4 116 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #047481 var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-10\%{--tw-gradient-via-position: 10%}.to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.to-blue-700{--tw-gradient-to: #1A56DB var(--tw-gradient-to-position)}.to-cyan-700{--tw-gradient-to: #0e7490 var(--tw-gradient-to-position)}.to-green-700{--tw-gradient-to: #046C4E var(--tw-gradient-to-position)}.to-lime-200{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.to-lime-700{--tw-gradient-to: #4d7c0f var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.to-pink-700{--tw-gradient-to: #BF125D var(--tw-gradient-to-position)}.to-purple-500\/10{--tw-gradient-to: rgb(144 97 249 / .1) var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #7E3AF2 var(--tw-gradient-to-position)}.to-purple-700{--tw-gradient-to: #6C2BD9 var(--tw-gradient-to-position)}.to-red-700{--tw-gradient-to: #C81E1E var(--tw-gradient-to-position)}.to-teal-700{--tw-gradient-to: #036672 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.to-100\%{--tw-gradient-to-position: 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-blue-600{fill:#1c64f2}.fill-current{fill:currentColor}.fill-gray-300{fill:#d1d5db}.fill-gray-600{fill:#4b5563}.fill-green-500{fill:#0e9f6e}.fill-pink-600{fill:#d61f69}.fill-purple-600{fill:#7e3af2}.fill-red-600{fill:#e02424}.fill-secondary{fill:var(--color-secondary)}.fill-white{fill:#fff}.fill-yellow-400{fill:#e3a008}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-0{padding-bottom:0}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-80{padding-bottom:20rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-12{padding-top:3rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:PTSans,Roboto,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.font-thin{font-weight:100}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-6{line-height:1.5rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-100{--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-200{--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(4 108 78 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.text-green-900{--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(81 69 205 / var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(66 56 157 / var(--tw-text-opacity))}.text-indigo-900{--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.text-light-text-panel{color:var(--color-light-text-panel)}.text-orange-200{--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.text-orange-500{--tw-text-opacity: 1;color:rgb(255 90 31 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(208 56 1 / var(--tw-text-opacity))}.text-pink-500{--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.text-pink-600{--tw-text-opacity: 1;color:rgb(214 31 105 / var(--tw-text-opacity))}.text-pink-700{--tw-text-opacity: 1;color:rgb(191 18 93 / var(--tw-text-opacity))}.text-pink-800{--tw-text-opacity: 1;color:rgb(153 21 75 / var(--tw-text-opacity))}.text-pink-900{--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(108 43 217 / var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity: 1;color:rgb(85 33 181 / var(--tw-text-opacity))}.text-purple-900{--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.text-red-100{--tw-text-opacity: 1;color:rgb(253 232 232 / var(--tw-text-opacity))}.text-red-200{--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.text-red-800{--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.text-red-900{--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.text-secondary{color:var(--color-secondary)}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity))}.text-teal-500{--tw-text-opacity: 1;color:rgb(6 148 162 / var(--tw-text-opacity))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(227 160 8 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(142 75 16 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.text-yellow-900{--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.text-opacity-95{--tw-text-opacity: .95}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/50{--tw-shadow-color: rgb(63 131 248 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-800\/80{--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-500\/50{--tw-shadow-color: rgb(6 182 212 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-cyan-800\/80{--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/50{--tw-shadow-color: rgb(14 159 110 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-800\/80{--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-500\/50{--tw-shadow-color: rgb(132 204 22 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-lime-800\/80{--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-500\/50{--tw-shadow-color: rgb(231 70 148 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-pink-800\/80{--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/50{--tw-shadow-color: rgb(144 97 249 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-800\/80{--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-500\/50{--tw-shadow-color: rgb(240 82 82 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-red-800\/80{--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.shadow-teal-500\/50{--tw-shadow-color: rgb(6 148 162 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-blue-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.ring-cyan-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.ring-gray-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.ring-green-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.ring-pink-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.ring-pink-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.ring-purple-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.ring-purple-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.ring-red-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.ring-red-900{--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-md{--tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / .07)) drop-shadow(0 2px 2px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.scrollbar{scrollbar-width:auto;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar::-webkit-scrollbar{display:block;width:var(--scrollbar-width, 16px);height:var(--scrollbar-height, 16px)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar-track-bg-light{--scrollbar-track: var(--color-bg-light) !important}.scrollbar-track-bg-light-tone{--scrollbar-track: var(--color-bg-light-tone) !important}.scrollbar-track-blue-100{--scrollbar-track: #E1EFFE !important}.scrollbar-track-gray-200{--scrollbar-track: #E5E7EB !important}.scrollbar-thumb-bg-light-tone{--scrollbar-thumb: var(--color-bg-light-tone) !important}.scrollbar-thumb-bg-light-tone-panel{--scrollbar-thumb: var(--color-bg-light-tone-panel) !important}.scrollbar-thumb-blue-500{--scrollbar-thumb: #3F83F8 !important}.scrollbar-thumb-gray-400{--scrollbar-thumb: #9CA3AF !important}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.display-none{display:none}h1{margin-bottom:1.5rem;font-size:2.25rem;line-height:2.5rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}h1:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}@media (min-width: 768px){h1{font-size:3rem;line-height:1}}h2{margin-bottom:1rem;font-size:1.875rem;line-height:2.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}h2:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}h3{margin-bottom:.75rem;font-size:1.5rem;line-height:2rem;font-weight:500;--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}h3:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}h4{margin-bottom:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:500;--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}h4:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}h1,h2{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));padding-bottom:.5rem}h1:is(.dark *),h2:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}p{overflow-wrap:break-word;font-size:1rem;line-height:1.5rem;--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}p:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}ul{margin-left:0;list-style-type:disc}li{margin-left:1.25rem;list-style-type:disc}ol{margin-left:1.25rem;list-style-type:decimal}:root{--color-primary: #4a90e2;--color-primary-light: #6ab7f1;--color-secondary: #8ab8e0;--color-accent: #3a7ca1;--color-light-text-panel: #ffffff;--color-dark-text-panel: #e0e0e0;--color-bg-light-panel: #f0faff;--color-bg-light: #ffffff;--color-bg-light-tone: #e0f0ff;--color-bg-light-code-block: #f5faff;--color-bg-light-tone-panel: #d0e0f0;--color-bg-light-discussion: #f8faff;--color-bg-light-discussion-odd: #f0faff;--color-bg-dark: #0a0a1a;--color-bg-dark-tone: #151521;--color-bg-dark-tone-panel: #1c1c2a;--color-bg-dark-code-block: #151521;--color-bg-dark-discussion: #0e0e1a;--color-bg-dark-discussion-odd: #0d0d1a}textarea,input,select{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}textarea:is(.dark *),input:is(.dark *),select:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.background-color{min-height:100vh;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #E1EFFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(225 239 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #CABFFD var(--tw-gradient-to-position)}.background-color:is(.dark *){--tw-gradient-from: #1E429F var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 66 159 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #4A1D96 var(--tw-gradient-to-position)}.toolbar-color{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.toolbar-color:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.panels-color{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.panels-color:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.unicolor-panels-color{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.unicolor-panels-color:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.message{position:relative;margin:.5rem;display:flex;width:100%;flex-grow:1;flex-direction:column;flex-wrap:wrap;overflow:visible;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));padding:1.25rem 1.25rem .75rem;font-size:1.125rem;line-height:1.75rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.message:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.message{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(35 56 118 / var(--tw-text-opacity))}.message:is(.dark *){background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #233876 var(--tw-gradient-from-position);--tw-gradient-to: rgb(35 56 118 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1E429F var(--tw-gradient-to-position);--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.message:hover{--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.message:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.message:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity))}.message:nth-child(2n):is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.message:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.message:nth-child(odd):is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.message-header{margin-bottom:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.message-content{font-size:1.125rem;line-height:1.75rem;line-height:1.625}body{min-height:100vh;--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));font-size:1rem;line-height:1.5rem}body:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.discussion{margin-right:.5rem;font-size:.75rem;line-height:1rem}.discussion:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.discussion-hilighted{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));font-size:.75rem;line-height:1rem}.discussion-hilighted:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.bg-gradient-welcome{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #E1EFFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(225 239 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #CABFFD var(--tw-gradient-to-position)}.bg-gradient-welcome:is(.dark *){--tw-gradient-from: #1E429F var(--tw-gradient-from-position);--tw-gradient-to: rgb(30 66 159 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #4A1D96 var(--tw-gradient-to-position)}.bg-gradient-progress{background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #C3DDFD var(--tw-gradient-from-position);--tw-gradient-to: rgb(195 221 253 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #A4CAFE var(--tw-gradient-to-position)}.bg-gradient-progress:is(.dark *){--tw-gradient-from: #1A56DB var(--tw-gradient-from-position);--tw-gradient-to: rgb(26 86 219 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.text-gradient-title{background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #1A56DB var(--tw-gradient-from-position);--tw-gradient-to: rgb(26 86 219 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position);-webkit-background-clip:text;background-clip:text;color:transparent}.text-gradient-title:is(.dark *){--tw-gradient-from: #A4CAFE var(--tw-gradient-from-position);--tw-gradient-to: rgb(164 202 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.text-subtitle{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-subtitle:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.text-author{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.text-author:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.text-loading{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.text-loading:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.text-progress{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.text-progress:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.btn-primary{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-secondary{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.card{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:1.5rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.card:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.input{border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));padding:.5rem 1rem}.input:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.input:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.input:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.label{margin-bottom:.25rem;display:block;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.label:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.link{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.link:hover{--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.link:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.link:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.navbar-container{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity));--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.navbar-container:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.game-menu{position:relative;display:flex;align-items:center;justify-content:center}.text-shadow-custom{text-shadow:1px 1px 0px #e0e0e0,-1px -1px 0px #e0e0e0,1px -1px 0px #e0e0e0,-1px 1px 0px #e0e0e0}.animated-progressbar-bg{position:relative;height:2.5rem;width:100%;overflow:hidden;border-radius:.125rem;background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #172554 var(--tw-gradient-from-position);--tw-gradient-to: rgb(23 37 84 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #233876 var(--tw-gradient-to-position);--tw-shadow: 0 0 15px rgba(245,158,11,.2);--tw-shadow-colored: 0 0 15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.animated-progressbar-bg:is(.dark *){--tw-gradient-from: #000000 var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #172554 var(--tw-gradient-to-position)}.animated-progressbar-fg{position:absolute;top:0;left:0;height:100%;background-image:linear-gradient(to right,var(--tw-gradient-stops));--tw-gradient-from: #3F83F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #76A9FA var(--tw-gradient-to-position);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.animated-progressbar-fg:is(.dark *){--tw-gradient-from: #76A9FA var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.menu-item{margin-bottom:.5rem;padding:.5rem 1rem;font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity));transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.menu-item:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.menu-item:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.menu-item:is(.dark *):hover{--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.menu-item.active-link{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:.375rem;border-top-right-radius:.375rem;--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity));font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity));transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);text-shadow:1px 1px 0px #e0e0e0,-1px -1px 0px #e0e0e0,1px -1px 0px #e0e0e0,-1px 1px 0px #e0e0e0}.menu-item.active-link:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.menu-item.active-link:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-text-opacity: 1;color:rgb(35 56 118 / var(--tw-text-opacity))}.menu-item.active-link:is(.dark *):hover{--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.menu-item.active-link{text-shadow:0 0 10px rgba(128,128,128,.5)}.menu-item.active-link:before{content:"";position:absolute;bottom:-5px;left:0;width:100%;height:5px;background:linear-gradient(to right,#4a90e2,#8ab8e0,#4a90e2);border-radius:10px;animation:shimmer 2s infinite}.dark .menu-item.active-link:before{background:linear-gradient(to right,#6ab7f1,#aaa,#6ab7f1)}@keyframes shimmer{0%{background-position:-100% 0}to{background-position:100% 0}}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-5px)}}.feather-emoji{display:inline-block;margin-left:5px;animation:bounce 2s infinite}.app-card{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.app-card:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.app-card:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.app-card:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}button{transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}button:hover{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:#76A9FA #C3DDFD}.dark .scrollbar-thin{scrollbar-color:#1C64F2 #1E429F}.scrollbar-thin::-webkit-scrollbar{width:.5rem}.scrollbar-thin::-webkit-scrollbar-track{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.scrollbar-thin:is(.dark *)::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.scrollbar-thin::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.scrollbar-thin:is(.dark *)::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.scrollbar-thin::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.scrollbar-thin:is(.dark *)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.btn{display:flex;align-items:center;border-radius:.5rem;padding:.5rem 1rem;font-weight:600;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.btn-primary{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.btn-primary:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.btn-primary:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.btn-primary:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.btn-secondary{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.btn-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.btn-secondary:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.btn-secondary:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.btn-secondary:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.btn-secondary:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.search-input{width:100%;border-bottom-width:2px;--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity));background-color:transparent;padding:.5rem 1rem .5rem 2.5rem;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.search-input:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity));outline:2px solid transparent;outline-offset:2px}.search-input:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.search-input:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.scrollbar::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar::-webkit-scrollbar{display:block;width:8px;height:8px}.scrollbar{--scrollbar-track: #C3DDFD;--scrollbar-thumb: #76A9FA;scrollbar-width:thin;scrollbar-color:#76A9FA #C3DDFD}.dark .scrollbar{scrollbar-color:#1C64F2 #1E429F}.scrollbar::-webkit-scrollbar{width:.5rem}.scrollbar::-webkit-scrollbar-track{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.scrollbar:is(.dark *)::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.scrollbar:is(.dark *)::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.scrollbar::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.scrollbar:is(.dark *)::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.scrollbar{--scrollbar-thumb-hover: #3F83F8}.scrollbar:is(.dark *){--scrollbar-track: #1A56DB;--scrollbar-thumb: #1C64F2;--scrollbar-thumb-hover: #3F83F8}.card-title{margin-bottom:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.card-title:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.card-content{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.card-content:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.card-footer{margin-top:1rem;display:flex;align-items:center;justify-content:space-between}.card-footer-button{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.card-footer-button:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.subcard{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(235 245 255 / var(--tw-bg-opacity));padding:1rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.subcard:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.subcard-title{margin-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.subcard-title:is(.dark *){--tw-text-opacity: 1;color:rgb(225 239 254 / var(--tw-text-opacity))}.subcard-content{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.subcard-content:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}.subcard-footer{margin-top:1rem;display:flex;align-items:center;justify-content:space-between}.subcard-footer-button{border-radius:.25rem;--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity));padding:.5rem 1rem;font-weight:700;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.subcard-footer-button:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.discussion-toolbox{display:flex;--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));align-items:center;gap:.5rem;border-top-left-radius:.375rem;border-bottom-left-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.5rem;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.group:hover .discussion-toolbox{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.discussion-toolbox:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.lollms-title-style{text-shadow:2px 2px 4px rgba(0,0,0,.2),2px 2px 0px white,-2px -2px 0px white,2px -2px 0px white,-2px 2px 0px white;background:linear-gradient(45deg,#f59e0b,#fbbf24);-webkit-background-clip:text;background-clip:text}.chat-bar{position:relative;display:flex;flex-grow:1;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;gap:.5rem;--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity));padding:.25rem;--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.chat-bar:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.chat-bar:is(.dark *){--tw-border-opacity: 1;border-color:rgb(4 108 78 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.chat-bar{height:50px;transition:all .3s ease}.chat-bar:hover{box-shadow:0 4px 6px -1px #00ff001a,0 2px 4px -1px #00ff000f}.svg-button{border-radius:9999px;padding:.5rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.svg-button:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity));--tw-ring-offset-width: 2px}.svg-button:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.svg-button:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.svg-button:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.svg-button:active{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.svg-button:active:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.nav-button{border-radius:.375rem;padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.nav-button:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.nav-button:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.nav-button:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.nav-button-active{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.nav-button-active:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.nav-button-active:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.nav-button-active:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.btn-on{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.btn-on:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.btn-off{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.btn-off:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.interesting-facts{margin-top:1.5rem;margin-bottom:1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:.5rem;background-color:#fffc;padding:1rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.interesting-facts:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.interesting-facts:is(.dark *){background-color:#1f2937cc}.toolbar-button{cursor:pointer;border-style:none;background-color:transparent;padding:.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.toolbar-button:hover{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.context-menu{position:absolute;background-color:#fff;border:1px solid #e0e0e0;box-shadow:0 2px 10px #0000001a;border-radius:4px;padding:8px 0;min-width:150px;z-index:1000}.context-menu-item{padding:8px 16px;font-size:14px;color:#333;cursor:pointer;transition:background-color .2s ease}.context-menu-item:hover{background-color:#f5f5f5}.context-menu-separator{height:1px;background-color:#e0e0e0;margin:4px 0}.context-menu-item-disabled{color:#999;cursor:not-allowed}.context-menu-item-icon{margin-right:8px}.steps-container{margin-bottom:1rem;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.steps-header{display:flex;cursor:pointer;align-items:center;--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));padding:1rem}.steps-header:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.steps-title{margin:0;font-size:1rem;line-height:1.5rem;font-weight:600}.step-item{margin-bottom:.5rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));padding-left:1rem}.steps-container{margin-bottom:1rem;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.steps-container:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.steps-header{display:flex;cursor:pointer;align-items:center;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));padding:1rem}.steps-header:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.steps-icon{margin-right:1rem}.steps-summary{flex-grow:1}.steps-title{margin:0;font-size:1rem;line-height:1.5rem;font-weight:600;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.steps-title:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.steps-status{margin:0;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.steps-status:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.toggle-icon{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.toggle-icon:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.steps-content{padding:1rem}.steps-list{margin:0;list-style-type:none;padding:0}.step-item{margin-bottom:.5rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding-left:1rem}.step-item:last-child{margin-bottom:0}.step-item:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.step-container{margin-bottom:1rem;transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.step-wrapper{display:flex;align-items:flex-start;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.75rem}.step-wrapper:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.step-icon{margin-right:.75rem;height:1.5rem;width:1.5rem;flex-shrink:0}.icon-success{height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.icon-fail{height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.icon-spinner{height:1.5rem;width:1.5rem}@keyframes spin{to{transform:rotate(360deg)}}.icon-spinner{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity));border-top-color:transparent}.icon-spinner:is(.dark *){--tw-border-opacity: 1;border-color:rgb(118 169 250 / var(--tw-border-opacity))}.step-content{flex-grow:1}.step-text{font-size:1rem;line-height:1.5rem;font-weight:500;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.step-text:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.step-description{margin-top:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.step-description:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.fade-enter-active,.fade-leave-active{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.fade-enter,.fade-leave-to{opacity:0}.status-icon{cursor:pointer;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.icon{height:1.5rem;width:1.5rem}.icon-success{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.icon-success:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.icon-fail{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.icon-fail:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.icon-text{font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.icon-text:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.last\:mb-0:last-child{margin-bottom:0}.even\:bg-bg-light-discussion-odd:nth-child(2n){background-color:var(--color-bg-light-discussion-odd)}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:block{display:block}.group\/item:hover .group-hover\/item\:scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group\/item:hover .group-hover\/item\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:border-secondary{border-color:var(--color-secondary)}.group:hover .group-hover\:bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.group:hover .group-hover\:bg-white\/50{background-color:#ffffff80}.group:hover .group-hover\:bg-opacity-0{--tw-bg-opacity: 0}.group:hover .group-hover\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-green-400{--tw-gradient-from: #31C48D var(--tw-gradient-from-position);--tw-gradient-to: rgb(49 196 141 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-pink-500{--tw-gradient-from: #E74694 var(--tw-gradient-from-position);--tw-gradient-to: rgb(231 70 148 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-500{--tw-gradient-from: #9061F9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(144 97 249 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-purple-600{--tw-gradient-from: #7E3AF2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 58 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-red-200{--tw-gradient-from: #FBD5D5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 213 213 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:from-teal-300{--tw-gradient-from: #7EDCE2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(126 220 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.group:hover .group-hover\:via-red-300{--tw-gradient-to: rgb(248 180 180 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #F8B4B4 var(--tw-gradient-via-position), var(--tw-gradient-to)}.group:hover .group-hover\:to-blue-500{--tw-gradient-to: #3F83F8 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-blue-600{--tw-gradient-to: #1C64F2 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-lime-300{--tw-gradient-to: #bef264 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-orange-400{--tw-gradient-to: #FF8A4C var(--tw-gradient-to-position)}.group:hover .group-hover\:to-pink-500{--tw-gradient-to: #E74694 var(--tw-gradient-to-position)}.group:hover .group-hover\:to-yellow-200{--tw-gradient-to: #FCE96A var(--tw-gradient-to-position)}.group:hover .group-hover\:text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.group\/item:hover .group-hover\/item\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group:focus .group-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.group:focus .group-focus\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.group:focus .group-focus\:ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.peer:checked~.peer-checked\:text-primary{color:var(--color-primary)}.hover\:z-10:hover{z-index:10}.hover\:z-20:hover{z-index:20}.hover\:h-8:hover{height:2rem}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-2:hover{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-x-100:hover{--tw-scale-x: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-2:hover{border-width:2px}.hover\:border-solid:hover{border-style:solid}.hover\:border-blue-300:hover{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.hover\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.hover\:border-green-200:hover{--tw-border-opacity: 1;border-color:rgb(188 240 218 / var(--tw-border-opacity))}.hover\:border-primary:hover{border-color:var(--color-primary)}.hover\:border-primary-light:hover{border-color:var(--color-primary-light)}.hover\:border-secondary:hover{border-color:var(--color-secondary)}.hover\:bg-bg-light-tone:hover{background-color:var(--color-bg-light-tone)}.hover\:bg-bg-light-tone-panel:hover{background-color:var(--color-bg-light-tone-panel)}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(225 239 254 / var(--tw-bg-opacity))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.hover\:bg-blue-400:hover{--tw-bg-opacity: 1;background-color:rgb(118 169 250 / var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-400:hover{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.hover\:bg-green-300:hover{--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}.hover\:bg-green-600:hover{--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.hover\:bg-pink-800:hover{--tw-bg-opacity: 1;background-color:rgb(153 21 75 / var(--tw-bg-opacity))}.hover\:bg-primary:hover{background-color:var(--color-primary)}.hover\:bg-primary-light:hover{background-color:var(--color-primary-light)}.hover\:bg-purple-800:hover{--tw-bg-opacity: 1;background-color:rgb(85 33 181 / var(--tw-bg-opacity))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(253 232 232 / var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.hover\:bg-red-300:hover{--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.hover\:bg-red-800:hover{--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.hover\:bg-yellow-500:hover{--tw-bg-opacity: 1;background-color:rgb(194 120 3 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-bl:hover{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-br:hover{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.hover\:bg-gradient-to-l:hover{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.hover\:bg-gradient-to-r:hover{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.hover\:from-blue-50:hover{--tw-gradient-from: #EBF5FF var(--tw-gradient-from-position);--tw-gradient-to: rgb(235 245 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-blue-500\/20:hover{--tw-gradient-from: rgb(63 131 248 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(63 131 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-teal-200:hover{--tw-gradient-from: #AFECEF var(--tw-gradient-from-position);--tw-gradient-to: rgb(175 236 239 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-lime-200:hover{--tw-gradient-to: #d9f99d var(--tw-gradient-to-position)}.hover\:to-purple-50:hover{--tw-gradient-to: #F6F5FF var(--tw-gradient-to-position)}.hover\:to-purple-500\/20:hover{--tw-gradient-to: rgb(144 97 249 / .2) var(--tw-gradient-to-position)}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(28 100 242 / var(--tw-text-opacity))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\:text-green-300:hover{--tw-text-opacity: 1;color:rgb(132 225 188 / var(--tw-text-opacity))}.hover\:text-green-500:hover{--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.hover\:text-green-600:hover{--tw-text-opacity: 1;color:rgb(5 122 85 / var(--tw-text-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity: 1;color:rgb(88 80 236 / var(--tw-text-opacity))}.hover\:text-primary:hover{color:var(--color-primary)}.hover\:text-purple-600:hover{--tw-text-opacity: 1;color:rgb(126 58 242 / var(--tw-text-opacity))}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(224 36 36 / var(--tw-text-opacity))}.hover\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(200 30 30 / var(--tw-text-opacity))}.hover\:text-secondary:hover{color:var(--color-secondary)}.hover\:text-teal-600:hover{--tw-text-opacity: 1;color:rgb(4 116 129 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:text-yellow-600:hover{--tw-text-opacity: 1;color:rgb(159 88 10 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-none:hover{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:scrollbar-thumb-primary{--scrollbar-thumb-hover: var(--color-primary) !important}.focus\:z-10:focus{z-index:10}.focus\:border-blue-300:focus{--tw-border-opacity: 1;border-color:rgb(164 202 254 / var(--tw-border-opacity))}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.focus\:border-secondary:focus{border-color:var(--color-secondary)}.focus\:border-transparent:focus{border-color:transparent}.focus\:text-blue-700:focus{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-4:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(195 221 253 / var(--tw-ring-opacity))}.focus\:ring-blue-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.focus\:ring-blue-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(118 169 250 / var(--tw-ring-opacity))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.focus\:ring-blue-500\/50:focus{--tw-ring-color: rgb(63 131 248 / .5)}.focus\:ring-blue-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(26 86 219 / var(--tw-ring-opacity))}.focus\:ring-cyan-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(165 243 252 / var(--tw-ring-opacity))}.focus\:ring-cyan-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(103 232 249 / var(--tw-ring-opacity))}.focus\:ring-gray-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.focus\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(188 240 218 / var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(132 225 188 / var(--tw-ring-opacity))}.focus\:ring-green-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(49 196 141 / var(--tw-ring-opacity))}.focus\:ring-lime-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(217 249 157 / var(--tw-ring-opacity))}.focus\:ring-lime-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(190 242 100 / var(--tw-ring-opacity))}.focus\:ring-pink-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 209 232 / var(--tw-ring-opacity))}.focus\:ring-pink-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 217 / var(--tw-ring-opacity))}.focus\:ring-purple-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 215 254 / var(--tw-ring-opacity))}.focus\:ring-purple-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(202 191 253 / var(--tw-ring-opacity))}.focus\:ring-red-100:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(253 232 232 / var(--tw-ring-opacity))}.focus\:ring-red-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 180 180 / var(--tw-ring-opacity))}.focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(240 82 82 / var(--tw-ring-opacity))}.focus\:ring-secondary:focus{--tw-ring-color: var(--color-secondary)}.focus\:ring-teal-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(126 220 226 / var(--tw-ring-opacity))}.focus\:ring-yellow-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 202 21 / var(--tw-ring-opacity))}.focus\:ring-yellow-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(227 160 8 / var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\:scale-75:active{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-90:active{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scrollbar-thumb-secondary{--scrollbar-thumb-active: var(--color-secondary) !important}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.dark\:border-bg-light:is(.dark *){border-color:var(--color-bg-light)}.dark\:border-blue-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(26 86 219 / var(--tw-border-opacity))}.dark\:border-gray-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:border-gray-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity))}.dark\:border-gray-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity))}.dark\:border-green-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(14 159 110 / var(--tw-border-opacity))}.dark\:border-pink-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(241 126 184 / var(--tw-border-opacity))}.dark\:border-pink-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(231 70 148 / var(--tw-border-opacity))}.dark\:border-purple-400:is(.dark *){--tw-border-opacity: 1;border-color:rgb(172 148 250 / var(--tw-border-opacity))}.dark\:border-purple-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(144 97 249 / var(--tw-border-opacity))}.dark\:border-red-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(240 82 82 / var(--tw-border-opacity))}.dark\:border-transparent:is(.dark *){border-color:transparent}.dark\:border-yellow-300:is(.dark *){--tw-border-opacity: 1;border-color:rgb(250 202 21 / var(--tw-border-opacity))}.dark\:bg-bg-dark:is(.dark *){background-color:var(--color-bg-dark)}.dark\:bg-bg-dark-tone:is(.dark *){background-color:var(--color-bg-dark-tone)}.dark\:bg-bg-dark-tone-panel:is(.dark *){background-color:var(--color-bg-dark-tone-panel)}.dark\:bg-black:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.dark\:bg-blue-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(195 221 253 / var(--tw-bg-opacity))}.dark\:bg-blue-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.dark\:bg-blue-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.dark\:bg-blue-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.dark\:bg-blue-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 66 159 / var(--tw-bg-opacity))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.dark\:bg-gray-300:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.dark\:bg-gray-400:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.dark\:bg-gray-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:bg-gray-800\/30:is(.dark *){background-color:#1f29374d}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:bg-green-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(188 240 218 / var(--tw-bg-opacity))}.dark\:bg-green-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(14 159 110 / var(--tw-bg-opacity))}.dark\:bg-green-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.dark\:bg-green-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(3 84 63 / var(--tw-bg-opacity))}.dark\:bg-indigo-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(205 219 254 / var(--tw-bg-opacity))}.dark\:bg-indigo-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(104 117 245 / var(--tw-bg-opacity))}.dark\:bg-orange-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(180 52 3 / var(--tw-bg-opacity))}.dark\:bg-orange-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(138 44 13 / var(--tw-bg-opacity))}.dark\:bg-pink-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 209 232 / var(--tw-bg-opacity))}.dark\:bg-pink-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(214 31 105 / var(--tw-bg-opacity))}.dark\:bg-purple-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(220 215 254 / var(--tw-bg-opacity))}.dark\:bg-purple-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.dark\:bg-purple-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(126 58 242 / var(--tw-bg-opacity))}.dark\:bg-red-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(251 213 213 / var(--tw-bg-opacity))}.dark\:bg-red-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(240 82 82 / var(--tw-bg-opacity))}.dark\:bg-red-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.dark\:bg-red-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(155 28 28 / var(--tw-bg-opacity))}.dark\:bg-white:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.dark\:bg-yellow-200:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(252 233 106 / var(--tw-bg-opacity))}.dark\:bg-opacity-70:is(.dark *){--tw-bg-opacity: .7}.dark\:bg-opacity-80:is(.dark *){--tw-bg-opacity: .8}.dark\:from-bg-dark:is(.dark *){--tw-gradient-from: var(--color-bg-dark) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-blue-400\/20:is(.dark *){--tw-gradient-from: rgb(118 169 250 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-indigo-400:is(.dark *){--tw-gradient-from: #8DA2FB var(--tw-gradient-from-position);--tw-gradient-to: rgb(141 162 251 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:via-bg-dark:is(.dark *){--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--color-bg-dark) var(--tw-gradient-via-position), var(--tw-gradient-to)}.dark\:to-purple-400:is(.dark *){--tw-gradient-to: #AC94FA var(--tw-gradient-to-position)}.dark\:to-purple-400\/20:is(.dark *){--tw-gradient-to: rgb(172 148 250 / .2) var(--tw-gradient-to-position)}.dark\:fill-gray-300:is(.dark *){fill:#d1d5db}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(195 221 253 / var(--tw-text-opacity))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(118 169 250 / var(--tw-text-opacity))}.dark\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.dark\:text-blue-800:is(.dark *){--tw-text-opacity: 1;color:rgb(30 66 159 / var(--tw-text-opacity))}.dark\:text-dark-text-panel:is(.dark *){color:var(--color-dark-text-panel)}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.dark\:text-gray-800:is(.dark *){--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.dark\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(188 240 218 / var(--tw-text-opacity))}.dark\:text-green-500:is(.dark *){--tw-text-opacity: 1;color:rgb(14 159 110 / var(--tw-text-opacity))}.dark\:text-green-800:is(.dark *){--tw-text-opacity: 1;color:rgb(3 84 63 / var(--tw-text-opacity))}.dark\:text-green-900:is(.dark *){--tw-text-opacity: 1;color:rgb(1 71 55 / var(--tw-text-opacity))}.dark\:text-indigo-500:is(.dark *){--tw-text-opacity: 1;color:rgb(104 117 245 / var(--tw-text-opacity))}.dark\:text-indigo-900:is(.dark *){--tw-text-opacity: 1;color:rgb(54 47 120 / var(--tw-text-opacity))}.dark\:text-orange-200:is(.dark *){--tw-text-opacity: 1;color:rgb(252 217 189 / var(--tw-text-opacity))}.dark\:text-pink-400:is(.dark *){--tw-text-opacity: 1;color:rgb(241 126 184 / var(--tw-text-opacity))}.dark\:text-pink-500:is(.dark *){--tw-text-opacity: 1;color:rgb(231 70 148 / var(--tw-text-opacity))}.dark\:text-pink-900:is(.dark *){--tw-text-opacity: 1;color:rgb(117 26 61 / var(--tw-text-opacity))}.dark\:text-primary:is(.dark *){color:var(--color-primary)}.dark\:text-purple-400:is(.dark *){--tw-text-opacity: 1;color:rgb(172 148 250 / var(--tw-text-opacity))}.dark\:text-purple-500:is(.dark *){--tw-text-opacity: 1;color:rgb(144 97 249 / var(--tw-text-opacity))}.dark\:text-purple-900:is(.dark *){--tw-text-opacity: 1;color:rgb(74 29 150 / var(--tw-text-opacity))}.dark\:text-red-200:is(.dark *){--tw-text-opacity: 1;color:rgb(251 213 213 / var(--tw-text-opacity))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(248 180 180 / var(--tw-text-opacity))}.dark\:text-red-500:is(.dark *){--tw-text-opacity: 1;color:rgb(240 82 82 / var(--tw-text-opacity))}.dark\:text-red-800:is(.dark *){--tw-text-opacity: 1;color:rgb(155 28 28 / var(--tw-text-opacity))}.dark\:text-red-900:is(.dark *){--tw-text-opacity: 1;color:rgb(119 29 29 / var(--tw-text-opacity))}.dark\:text-slate-50:is(.dark *){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity: 1;color:rgb(250 202 21 / var(--tw-text-opacity))}.dark\:text-yellow-500:is(.dark *){--tw-text-opacity: 1;color:rgb(194 120 3 / var(--tw-text-opacity))}.dark\:text-yellow-800:is(.dark *){--tw-text-opacity: 1;color:rgb(114 59 19 / var(--tw-text-opacity))}.dark\:text-yellow-900:is(.dark *){--tw-text-opacity: 1;color:rgb(99 49 18 / var(--tw-text-opacity))}.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:shadow-lg:is(.dark *){--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:shadow-blue-800\/80:is(.dark *){--tw-shadow-color: rgb(30 66 159 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-cyan-800\/80:is(.dark *){--tw-shadow-color: rgb(21 94 117 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-green-800\/80:is(.dark *){--tw-shadow-color: rgb(3 84 63 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-lime-800\/80:is(.dark *){--tw-shadow-color: rgb(63 98 18 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-pink-800\/80:is(.dark *){--tw-shadow-color: rgb(153 21 75 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-purple-800\/80:is(.dark *){--tw-shadow-color: rgb(85 33 181 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-red-800\/80:is(.dark *){--tw-shadow-color: rgb(155 28 28 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:shadow-teal-800\/80:is(.dark *){--tw-shadow-color: rgb(5 80 92 / .8);--tw-shadow: var(--tw-shadow-colored)}.dark\:ring-gray-500:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark\:ring-white:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.dark\:ring-opacity-20:is(.dark *){--tw-ring-opacity: .2}.dark\:ring-offset-gray-700:is(.dark *){--tw-ring-offset-color: #374151}.dark\:ring-offset-gray-800:is(.dark *){--tw-ring-offset-color: #1F2937}.dark\:scrollbar-track-bg-dark:is(.dark *){--scrollbar-track: var(--color-bg-dark) !important}.dark\:scrollbar-track-bg-dark-tone:is(.dark *){--scrollbar-track: var(--color-bg-dark-tone) !important}.dark\:scrollbar-track-gray-700:is(.dark *){--scrollbar-track: #374151 !important}.dark\:scrollbar-track-gray-800:is(.dark *){--scrollbar-track: #1F2937 !important}.dark\:scrollbar-thumb-bg-dark-tone:is(.dark *){--scrollbar-thumb: var(--color-bg-dark-tone) !important}.dark\:scrollbar-thumb-bg-dark-tone-panel:is(.dark *){--scrollbar-thumb: var(--color-bg-dark-tone-panel) !important}.dark\:scrollbar-thumb-gray-500:is(.dark *){--scrollbar-thumb: #6B7280 !important}.dark\:scrollbar-thumb-gray-600:is(.dark *){--scrollbar-thumb: #4B5563 !important}.dark\:even\:bg-bg-dark-discussion-odd:nth-child(2n):is(.dark *){background-color:var(--color-bg-dark-discussion-odd)}.group:hover .dark\:group-hover\:bg-gray-800\/60:is(.dark *){background-color:#1f293799}.group:hover .dark\:group-hover\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:focus .dark\:group-focus\:ring-gray-800\/70:is(.dark *){--tw-ring-color: rgb(31 41 55 / .7)}.dark\:hover\:border-blue-600:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(28 100 242 / var(--tw-border-opacity))}.dark\:hover\:border-gray-600:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:hover\:border-primary:hover:is(.dark *){border-color:var(--color-primary)}.dark\:hover\:bg-blue-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(164 202 254 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(26 86 219 / var(--tw-bg-opacity))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(35 56 118 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(132 225 188 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(5 122 85 / var(--tw-bg-opacity))}.dark\:hover\:bg-green-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(4 108 78 / var(--tw-bg-opacity))}.dark\:hover\:bg-pink-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(231 70 148 / var(--tw-bg-opacity))}.dark\:hover\:bg-pink-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(191 18 93 / var(--tw-bg-opacity))}.dark\:hover\:bg-primary:hover:is(.dark *){background-color:var(--color-primary)}.dark\:hover\:bg-purple-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(144 97 249 / var(--tw-bg-opacity))}.dark\:hover\:bg-purple-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(108 43 217 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(248 180 180 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(224 36 36 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(200 30 30 / var(--tw-bg-opacity))}.dark\:hover\:bg-red-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(119 29 29 / var(--tw-bg-opacity))}.dark\:hover\:bg-yellow-300:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 202 21 / var(--tw-bg-opacity))}.dark\:hover\:bg-yellow-400:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(227 160 8 / var(--tw-bg-opacity))}.hover\:dark\:bg-bg-dark-tone:is(.dark *):hover{background-color:var(--color-bg-dark-tone)}.hover\:dark\:bg-bg-dark-tone-panel:is(.dark *):hover{background-color:var(--color-bg-dark-tone-panel)}.dark\:hover\:from-blue-400\/30:hover:is(.dark *){--tw-gradient-from: rgb(118 169 250 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(118 169 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:hover\:from-blue-900\/30:hover:is(.dark *){--tw-gradient-from: rgb(35 56 118 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(35 56 118 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:hover\:to-purple-400\/30:hover:is(.dark *){--tw-gradient-to: rgb(172 148 250 / .3) var(--tw-gradient-to-position)}.dark\:hover\:to-purple-900\/30:hover:is(.dark *){--tw-gradient-to: rgb(74 29 150 / .3) var(--tw-gradient-to-position)}.dark\:hover\:text-blue-500:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:hover\:text-gray-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:hover\:text-gray-900:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.dark\:hover\:text-green-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(49 196 141 / var(--tw-text-opacity))}.dark\:hover\:text-red-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(249 128 128 / var(--tw-text-opacity))}.dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:hover\:scrollbar-thumb-primary:is(.dark *){--scrollbar-thumb-hover: var(--color-primary) !important}.dark\:focus\:border-blue-500:focus:is(.dark *){--tw-border-opacity: 1;border-color:rgb(63 131 248 / var(--tw-border-opacity))}.dark\:focus\:border-secondary:focus:is(.dark *){border-color:var(--color-secondary)}.dark\:focus\:text-white:focus:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:focus\:ring-blue-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 131 248 / var(--tw-ring-opacity))}.dark\:focus\:ring-blue-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(28 100 242 / var(--tw-ring-opacity))}.dark\:focus\:ring-blue-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.dark\:focus\:ring-cyan-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(21 94 117 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-500:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(107 114 128 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-700:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity))}.dark\:focus\:ring-green-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 84 63 / var(--tw-ring-opacity))}.dark\:focus\:ring-lime-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(63 98 18 / var(--tw-ring-opacity))}.dark\:focus\:ring-pink-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(153 21 75 / var(--tw-ring-opacity))}.dark\:focus\:ring-pink-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(117 26 61 / var(--tw-ring-opacity))}.dark\:focus\:ring-purple-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(85 33 181 / var(--tw-ring-opacity))}.dark\:focus\:ring-purple-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(74 29 150 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-400:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(249 128 128 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(155 28 28 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(119 29 29 / var(--tw-ring-opacity))}.dark\:focus\:ring-secondary:focus:is(.dark *){--tw-ring-color: var(--color-secondary)}.dark\:focus\:ring-teal-700:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(3 102 114 / var(--tw-ring-opacity))}.dark\:focus\:ring-teal-800:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(5 80 92 / var(--tw-ring-opacity))}.dark\:focus\:ring-yellow-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(99 49 18 / var(--tw-ring-opacity))}.dark\:focus\:ring-offset-gray-700:focus:is(.dark *){--tw-ring-offset-color: #374151}@media (min-width: 640px){.sm\:mb-0{margin-bottom:0}.sm\:mr-4{margin-right:1rem}.sm\:mt-0{margin-top:0}.sm\:h-10{height:2.5rem}.sm\:h-6{height:1.5rem}.sm\:h-64{height:16rem}.sm\:w-1\/4{width:25%}.sm\:w-10{width:2.5rem}.sm\:w-6{width:1.5rem}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-center{text-align:center}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.md\:inset-0{top:0;right:0;bottom:0;left:0}.md\:order-2{order:2}.md\:mr-6{margin-right:1.5rem}.md\:mt-0{margin-top:0}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-auto{height:auto}.md\:h-full{height:100%}.md\:w-1\/4{width:25%}.md\:w-48{width:12rem}.md\:w-auto{width:auto}.md\:max-w-xl{max-width:36rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.md\:border-0{border-width:0px}.md\:bg-transparent{background-color:transparent}.md\:p-0{padding:0}.md\:p-6{padding:1.5rem}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:font-medium{font-weight:500}.md\:text-blue-700{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:hover\:bg-transparent:hover{background-color:transparent}.md\:hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(26 86 219 / var(--tw-text-opacity))}.md\:dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.md\:dark\:hover\:bg-transparent:hover:is(.dark *){background-color:transparent}.md\:dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}}@media (min-width: 1280px){.xl\:h-80{height:20rem}.xl\:w-1\/6{width:16.666667%}}@media (min-width: 1536px){.\32xl\:h-96{height:24rem}} diff --git a/web/dist/assets/index-CwgJHVV1.js b/web/dist/assets/index-EUOeEYd1.js similarity index 92% rename from web/dist/assets/index-CwgJHVV1.js rename to web/dist/assets/index-EUOeEYd1.js index 0c2f0305..1b44b535 100644 --- a/web/dist/assets/index-CwgJHVV1.js +++ b/web/dist/assets/index-EUOeEYd1.js @@ -223,25 +223,25 @@ The possibilities are endless, they are now yours to mold and customize as you s Verify that the personality is not already copied there.`,4,!1)}).catch(e=>{this.$store.state.toast.showToast(`Personality couldn't be copied to the custom personalities folder: `,4,!1),console.error(e)})},async remountPersonality(n){await this.unmountPersonality(n),await this.mountPersonality(n)},onPersonalityReinstall(n){console.log("on reinstall ",n),this.isLoading=!0,console.log("Personality path:",n.personality.path),te.post("/reinstall_personality",{client_id:this.$store.state.client_id,name:n.personality.path},{headers:this.posts_headers}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$store.state.toast.showToast("Personality reinstalled successfully!",4,!0):this.$store.state.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not reinstall personality `+e.message,4,!1),{status:!1}))},personalityImgPlacehodler(n){n.target.src=Gs},searchPersonality_func(){clearTimeout(this.searchPersonalityTimer),this.searchPersonality&&(this.searchPersonalityInProgress=!0,setTimeout(this.filterPersonalities,this.searchPersonalityTimerInterval))},searchModel_func(){this.filterModels()}},async mounted(){console.log("Getting voices"),this.getVoices(),console.log("Constructing"),this.load_everything(),this.getSeviceVoices();try{console.log("Loading input devices list");const n=await te.get("/get_snd_input_devices");this.snd_input_devices=n.data.device_names,this.snd_input_devices_indexes=n.data.device_indexes}catch{console.log("Couldin't list input devices")}try{console.log("Loading output devices list");const n=await te.get("/get_snd_output_devices");this.snd_output_devices=n.data.device_names,this.snd_output_devices_indexes=n.data.device_indexes}catch{console.log("Couldin't list output devices")}try{if(console.log("Getting comfyui models"),this.configFile.activate_lollms_tti_server&&this.configFile.active_tti_service=="comfyui"){const n=await te.get("/list_comfyui_models");n.data.status&&(this.comfyui_models=n.data.models)}}catch{console.log("Couldin't list output devices")}this.fetchElevenLabsVoices()},activated(){},computed:{full_template:{get(){return(this.configFile.start_header_id_template+this.configFile.system_message_template+this.configFile.end_header_id_template+" system message"+this.configFile.separator_template+this.configFile.start_user_header_id_template+"user name"+this.configFile.end_user_header_id_template+" User prompt"+this.configFile.separator_template+this.configFile.end_user_message_id_template+this.configFile.separator_template+this.configFile.start_ai_header_id_template+"ai personality"+this.configFile.end_ai_header_id_template+"ai response"+this.configFile.end_ai_message_id_template).replace(` -`,"
")}},rendered_models_zoo:{get(){return this.searchModel?this.show_only_installed_models?this.modelsFiltered.filter(n=>n.isInstalled===!0):this.modelsFiltered.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)):(console.log("this.models_zoo"),console.log(this.models_zoo),console.log(this.models_zoo_initialLoadCount),this.show_only_installed_models?this.models_zoo.filter(n=>n.isInstalled===!0):this.models_zoo.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)))}},imgBinding:{get(){if(!this.isMounted)return Wn;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(n=>n.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Wn}}},imgModel:{get(){try{let n=this.$store.state.modelsZoo.findIndex(e=>e.name==this.$store.state.selectedModel);return n>=0?(console.log(`model avatar : ${this.$store.state.modelsZoo[n].icon}`),this.$store.state.modelsZoo[n].icon):Wn}catch{console.log("error")}if(!this.isMounted)return Wn;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(n=>n.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Wn}}},isReady:{get(){return this.$store.state.ready}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(n){this.$store.state.config.audio_out_voice=n}},openaiWhisperModels(){return["whisper-1"]},whisperModels(){return["tiny.en","tiny","base.en","base","small.en","small","medium.en","medium","large-v1","large-v2","large-v3","large"]},audioLanguages(){return[{code:"en-US",name:"English (US)"},{code:"en-GB",name:"English (UK)"},{code:"es-ES",name:"Spanish (Spain)"},{code:"es-MX",name:"Spanish (Mexico)"},{code:"fr-FR",name:"French (France)"},{code:"fr-CA",name:"French (Canada)"},{code:"de-DE",name:"German (Germany)"},{code:"it-IT",name:"Italian (Italy)"},{code:"pt-BR",name:"Portuguese (Brazil)"},{code:"pt-PT",name:"Portuguese (Portugal)"},{code:"ru-RU",name:"Russian (Russia)"},{code:"zh-CN",name:"Chinese (China)"},{code:"ja-JP",name:"Japanese (Japan)"},{code:"ar-SA",name:"Arabic (Saudi Arabia)"},{code:"tr-TR",name:"Turkish (Turkey)"},{code:"ms-MY",name:"Malay (Malaysia)"},{code:"ko-KR",name:"Korean (South Korea)"},{code:"nl-NL",name:"Dutch (Netherlands)"},{code:"sv-SE",name:"Swedish (Sweden)"},{code:"da-DK",name:"Danish (Denmark)"},{code:"fi-FI",name:"Finnish (Finland)"},{code:"no-NO",name:"Norwegian (Norway)"},{code:"pl-PL",name:"Polish (Poland)"},{code:"el-GR",name:"Greek (Greece)"},{code:"hu-HU",name:"Hungarian (Hungary)"},{code:"cs-CZ",name:"Czech (Czech Republic)"},{code:"th-TH",name:"Thai (Thailand)"},{code:"hi-IN",name:"Hindi (India)"},{code:"he-IL",name:"Hebrew (Israel)"},{code:"id-ID",name:"Indonesian (Indonesia)"},{code:"vi-VN",name:"Vietnamese (Vietnam)"},{code:"uk-UA",name:"Ukrainian (Ukraine)"},{code:"ro-RO",name:"Romanian (Romania)"},{code:"bg-BG",name:"Bulgarian (Bulgaria)"},{code:"hr-HR",name:"Croatian (Croatia)"},{code:"sr-RS",name:"Serbian (Serbia)"},{code:"sk-SK",name:"Slovak (Slovakia)"},{code:"sl-SI",name:"Slovenian (Slovenia)"},{code:"et-EE",name:"Estonian (Estonia)"},{code:"lv-LV",name:"Latvian (Latvia)"},{code:"lt-LT",name:"Lithuanian (Lithuania)"},{code:"ka-GE",name:"Georgian (Georgia)"},{code:"hy-AM",name:"Armenian (Armenia)"},{code:"az-AZ",name:"Azerbaijani (Azerbaijan)"},{code:"kk-KZ",name:"Kazakh (Kazakhstan)"},{code:"uz-UZ",name:"Uzbek (Uzbekistan)"},{code:"kkj-CM",name:"Kako (Cameroon)"},{code:"my-MM",name:"Burmese (Myanmar)"},{code:"ne-NP",name:"Nepali (Nepal)"},{code:"si-LK",name:"Sinhala (Sri Lanka)"}]},configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},userName:{get(){return this.$store.state.config.user_name},set(n){this.$store.state.config.user_name=n}},user_avatar:{get(){return this.$store.state.config.user_avatar!=""?"/user_infos/"+this.$store.state.config.user_avatar:Gs},set(n){this.$store.state.config.user_avatar=n}},hardware_mode:{get(){return this.$store.state.config.hardware_mode},set(n){this.$store.state.config.hardware_mode=n}},auto_update:{get(){return this.$store.state.config.auto_update},set(n){this.$store.state.config.auto_update=n}},auto_speak:{get(){return this.$store.state.config.auto_speak},set(n){this.$store.state.config.auto_speak=n}},auto_read:{get(){return this.$store.state.config.auto_read},set(n){this.$store.state.config.auto_read=n}},xtts_current_language:{get(){return this.$store.state.config.xtts_current_language},set(n){console.log("Current xtts voice set to ",n),this.$store.state.config.xtts_current_language=n}},xtts_current_voice:{get(){return this.$store.state.config.xtts_current_voice===null||this.$store.state.config.xtts_current_voice===void 0?(console.log("current voice",this.$store.state.config.xtts_current_voice),"main_voice"):this.$store.state.config.xtts_current_voice},set(n){n=="main_voice"||n===void 0?(console.log("Current voice set to None"),this.$store.state.config.xtts_current_voice=null):(console.log("Current voice set to ",n),this.$store.state.config.xtts_current_voice=n)}},audio_pitch:{get(){return this.$store.state.config.audio_pitch},set(n){this.$store.state.config.audio_pitch=n}},audio_in_language:{get(){return this.$store.state.config.audio_in_language},set(n){this.$store.state.config.audio_in_language=n}},use_user_name_in_discussions:{get(){return this.$store.state.config.use_user_name_in_discussions},set(n){this.$store.state.config.use_user_name_in_discussions=n}},discussion_db_name:{get(){return this.$store.state.config.discussion_db_name},set(n){this.$store.state.config.discussion_db_name=n}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}},bindingsZoo:{get(){return this.$store.state.bindingsZoo},set(n){this.$store.commit("setbindingsZoo",n)}},modelsArr:{get(){return this.$store.state.modelsArr},set(n){this.$store.commit("setModelsArr",n)}},models:{get(){return this.models_zoo},set(n){this.$store.commit("setModelsZoo",n)}},installed_models:{get(){return this.models_zoo},set(n){this.$store.commit("setModelsZoo",n)}},diskUsage:{get(){return this.$store.state.diskUsage},set(n){this.$store.commit("setDiskUsage",n)}},ramUsage:{get(){return this.$store.state.ramUsage},set(n){this.$store.commit("setRamUsage",n)}},vramUsage:{get(){return this.$store.state.vramUsage},set(n){this.$store.commit("setVramUsage",n)}},disk_available_space(){return this.computedFileSize(this.diskUsage.available_space)},disk_binding_models_usage(){return console.log(`this.diskUsage : ${this.diskUsage}`),this.computedFileSize(this.diskUsage.binding_models_usage)},disk_percent_usage(){return this.diskUsage.percent_usage},disk_total_space(){return this.computedFileSize(this.diskUsage.total_space)},ram_available_space(){return this.computedFileSize(this.ramUsage.available_space)},ram_usage(){return this.computedFileSize(this.ramUsage.ram_usage)},ram_percent_usage(){return this.ramUsage.percent_usage},ram_total_space(){return this.computedFileSize(this.ramUsage.total_space)},model_name(){if(this.isMounted)return this.configFile.model_name},binding_name(){if(!this.isMounted)return null;const n=this.bindingsZoo.findIndex(e=>e.folder===this.configFile.binding_name);return n>-1?this.bindingsZoo[n].name:null},active_pesonality(){if(!this.isMounted)return null;const n=this.$store.state.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);return n>-1?this.$store.state.personalities[n].name:null},speed_computed(){return ii(this.addModel.speed)},total_size_computed(){return ii(this.addModel.total_size)},downloaded_size_computed(){return ii(this.addModel.downloaded_size)}},watch:{bec_collapsed(){Ue(()=>{Ge.replace()})},pc_collapsed(){Ue(()=>{Ge.replace()})},mc_collapsed(){Ue(()=>{Ge.replace()})},sc_collapsed(){Ue(()=>{Ge.replace()})},showConfirmation(){Ue(()=>{Ge.replace()})},mzl_collapsed(){Ue(()=>{Ge.replace()})},pzl_collapsed(){Ue(()=>{Ge.replace()})},ezl_collapsed(){Ue(()=>{Ge.replace()})},bzl_collapsed(){Ue(()=>{Ge.replace()})},all_collapsed(n){this.collapseAll(n),Ue(()=>{Ge.replace()})},settingsChanged(n){this.$store.state.settingsChanged=n,Ue(()=>{Ge.replace()})},isLoading(){Ue(()=>{Ge.replace()})},searchPersonality(n){n==""&&this.filterPersonalities()},mzdc_collapsed(){Ue(()=>{Ge.replace()})}},async beforeRouteLeave(n){await this.$router.isReady()}},urt={class:"container pt-12 flex flex-row shadow-lg p-10 pt-0 overflow-y-scroll w-full background-color scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},prt={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg panels-color shadow-lg"},frt={key:0,class:"flex gap-3 flex-1 items-center duration-75"},_rt={key:1,class:"flex gap-3 flex-1 items-center"},mrt={class:"flex gap-3 flex-1 items-center justify-end"},hrt={class:"flex gap-3 items-center"},grt={key:0,class:"flex gap-3 items-center"},brt={key:1,role:"status"},yrt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Ert={class:"flex flex-row p-3"},vrt={class:"text-base font-semibold cursor-pointer select-none items-center"},Srt={class:"flex gap-2 items-center"},Trt={key:0},xrt=["src"],Crt={class:"font-bold font-large text-lg"},wrt={key:1},Rrt={class:"flex gap-2 items-center"},Art=["src"],Mrt={class:"font-bold font-large text-lg"},Nrt={class:"font-bold font-large text-lg"},Irt={class:"font-bold font-large text-lg"},Ort={class:"mb-2"},krt={class:"flex flex-col mx-2"},Drt={class:"p-2"},Lrt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Prt={class:"mb-2"},Frt={class:"flex flex-col mx-2"},Urt={class:"p-2"},Brt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Grt={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Vrt=["src"],zrt={class:"flex flex-col mx-2"},Hrt={class:"p-2"},qrt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Yrt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},$rt={class:"flex flex-row p-3"},Wrt={class:"flex flex-col mb-2 px-3 pb-2"},Krt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},jrt={class:"flex flex-col space-y-4"},Qrt={class:"flex items-center"},Xrt={class:"flex items-center"},Zrt={class:"flex items-center"},Jrt={class:"flex items-start"},eot={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},tot={class:"flex flex-row p-3"},not={class:"flex flex-col mb-2 px-3 pb-2"},sot={class:"expand-to-fit bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},iot={for:"logo-upload"},rot=["src"],oot={style:{width:"10%"}},aot={class:"text-center items-center"},lot={class:"flex flex-row"},cot={style:{width:"100%"}},dot={class:"flex flex-row"},uot={class:"flex flex-row"},pot={class:"flex flex-row"},fot={class:"flex flex-row"},_ot={class:"flex flex-row"},mot={class:"flex flex-row"},hot={class:"flex flex-row"},got={class:"flex flex-row"},bot={class:"flex flex-row"},yot={class:"flex flex-row"},Eot={class:"flex flex-row"},vot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Sot=["innerHTML"],Tot={style:{width:"100%"}},xot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Cot={style:{width:"100%"}},wot={style:{width:"100%"}},Rot={style:{width:"100%"}},Aot={style:{width:"100%"}},Mot={for:"avatar-upload"},Not=["src"],Iot={style:{width:"10%"}},Oot={class:"flex flex-row"},kot={style:{width:"100%"}},Dot={style:{width:"100%"}},Lot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Pot={style:{width:"100%"}},Fot={style:{width:"100%"}},Uot={style:{width:"100%"}},Bot={style:{width:"100%"}},Got={style:{width:"100%"}},Vot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},zot={class:"flex flex-row"},Hot={style:{width:"100%"}},qot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Yot={class:"flex flex-row"},$ot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Wot={class:"flex flex-row"},Kot={class:"flex flex-row"},jot={class:"flex flex-row"},Qot={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Xot={class:"flex flex-row p-3"},Zot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Jot={style:{width:"100%"}},eat=["onUpdate:modelValue"],tat=["onClick"],nat=["onClick"],sat=["onClick"],iat=["disabled"],rat={key:0,value:"BAAI/bge-m3"},oat={key:1,value:"nvidia/NV-Embed-v2"},aat={key:2,value:"sentence-transformers/all-MiniLM-L6-v2"},lat={key:3,value:"sentence-transformers/all-MiniLM-L12-v2"},cat={key:4,value:"sentence-transformers/all-distilroberta-v1"},dat={key:5,value:"sentence-transformers/all-mpnet-base-v2"},uat={key:6,value:"text-embedding-ada-002"},pat={key:7,value:"text-embedding-babbage-001"},fat={key:8,value:"text-embedding-curie-001"},_at={key:9,value:"text-embedding-davinci-001"},mat={key:10,value:"bge-m3"},hat={key:11,value:"nomic-embed-text"},gat={key:12,value:"mxbai-embed-large"},bat={key:13,value:"mxbai-embed-large"},yat={key:14,value:"snowflake-arctic-embed"},Eat={key:15,value:"snowflake-arctic-embed"},vat={key:16,value:"all-minilm"},Sat={key:17,value:"bge-large"},Tat={key:18,disabled:""},xat={class:"flex flex-row"},Cat={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},wat={class:"flex flex-row"},Rat={class:"flex flex-row"},Aat={class:"flex flex-row"},Mat={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Nat={class:"flex flex-row p-3"},Iat={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Oat={class:"flex flex-row"},kat={class:"flex flex-row"},Dat={class:"flex flex-row"},Lat={class:"flex flex-row"},Pat={class:"flex flex-col"},Fat={class:"flex flex-col"},Uat={class:"flex flex-col"},Bat={class:"flex flex-col"},Gat={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Vat={class:"flex flex-row p-3"},zat={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Hat={style:{width:"100%"}},qat={style:{width:"100%"}},Yat={style:{width:"100%"}},$at={style:{width:"100%"}},Wat={style:{width:"100%"}},Kat={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},jat={class:"flex flex-row"},Qat={class:"flex flex-row"},Xat={class:"flex flex-row"},Zat={class:"flex flex-row"},Jat={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},elt={style:{width:"100%"}},tlt={style:{width:"100%"}},nlt={style:{width:"100%"}},slt={style:{width:"100%"}},ilt={style:{width:"100%"}},rlt={style:{width:"100%"}},olt={style:{width:"100%"}},alt={class:"flex flex-row"},llt={class:"flex flex-row"},clt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},dlt={style:{width:"100%"}},ult=["value"],plt={style:{width:"100%"}},flt=["value"],_lt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},mlt={style:{width:"100%"}},hlt={style:{width:"100%"}},glt={style:{width:"100%"}},blt={style:{width:"100%"}},ylt={style:{width:"100%"}},Elt={style:{width:"100%"}},vlt={style:{width:"100%"}},Slt={style:{width:"100%"}},Tlt={style:{width:"100%"}},xlt={style:{width:"100%"}},Clt={style:{width:"100%"}},wlt={style:{width:"100%"}},Rlt={style:{width:"100%"}},Alt={style:{width:"100%"}},Mlt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Nlt={class:"flex flex-row"},Ilt={class:"flex flex-row"},Olt=["value"],klt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Dlt={class:"flex flex-row"},Llt={class:"flex flex-row"},Plt=["value"],Flt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Ult={class:"flex flex-row"},Blt={class:"flex flex-row"},Glt=["value"],Vlt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},zlt={class:"flex flex-row"},Hlt=["value"],qlt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Ylt={class:"flex flex-row"},$lt=["value"],Wlt={class:"flex flex-row"},Klt=["value"],jlt={class:"flex flex-row"},Qlt={class:"flex flex-row"},Xlt={class:"flex flex-row"},Zlt={class:"flex flex-row"},Jlt={class:"flex flex-row"},ect={class:"flex flex-row"},tct={class:"flex flex-row"},nct={class:"flex flex-row"},sct={class:"flex flex-row"},ict={class:"flex flex-row"},rct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},oct={class:"flex flex-row"},act={class:"flex flex-row"},lct={class:"flex flex-row"},cct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},dct={class:"flex flex-row"},uct={class:"flex flex-row"},pct={class:"flex flex-row"},fct={class:"flex flex-row"},_ct={class:"flex flex-row"},mct=["value"],hct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},gct={class:"flex flex-row"},bct={class:"flex flex-row"},yct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Ect={class:"flex flex-row"},vct={class:"flex flex-row"},Sct={class:"flex flex-row"},Tct={class:"flex flex-row"},xct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Cct={class:"flex flex-row"},wct={class:"flex flex-row"},Rct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Act={class:"flex flex-row"},Mct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Nct={class:"flex flex-row"},Ict={class:"flex flex-row"},Oct={class:"flex flex-row"},kct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Dct={class:"flex flex-row"},Lct={class:"flex flex-row"},Pct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Fct={class:"flex flex-row"},Uct={class:"flex flex-row"},Bct=["value"],Gct={class:"flex flex-row"},Vct={class:"flex flex-row"},zct={class:"flex flex-row"},Hct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},qct={class:"flex flex-row"},Yct={class:"flex flex-row"},$ct={class:"flex flex-row"},Wct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Kct={class:"flex flex-row"},jct={class:"flex flex-row"},Qct={class:"flex flex-row"},Xct={class:"flex flex-col align-bottom"},Zct={class:"relative"},Jct={class:"absolute right-0"},edt={class:"flex flex-row"},tdt={class:"flex flex-row"},ndt={class:"flex flex-row"},sdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},idt={class:"flex flex-row"},rdt={class:"flex flex-row"},odt={class:"flex flex-row"},adt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},ldt={class:"flex flex-row"},cdt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},ddt={class:"flex flex-row"},udt={class:"flex flex-row"},pdt={class:"flex flex-row"},fdt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},_dt={class:"flex flex-row p-3"},mdt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},hdt={key:1,class:"mr-2"},gdt={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},bdt={class:"flex gap-1 items-center"},ydt=["src"],Edt={class:"font-bold font-large text-lg line-clamp-1"},vdt={key:0,class:"mb-2"},Sdt={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Tdt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},xdt={class:"flex flex-row p-3"},Cdt={class:"flex flex-row items-center"},wdt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Rdt={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Adt={key:2,class:"mr-2"},Mdt={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},Ndt={class:"flex gap-1 items-center"},Idt=["src"],Odt={class:"font-bold font-large text-lg line-clamp-1"},kdt={class:"mx-2 mb-4"},Ddt={class:"relative"},Ldt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Pdt={key:0},Fdt={key:1},Udt={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},Bdt={key:1,class:"mb-2"},Gdt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Vdt={class:"mb-2"},zdt={class:"p-2"},Hdt={class:"mb-3"},qdt={key:0},Ydt={class:"mb-3"},$dt={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},Wdt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},Kdt={class:"w-full p-2"},jdt={class:"flex justify-between mb-1"},Qdt={class:"text-sm font-medium text-blue-700 dark:text-white"},Xdt=["title"],Zdt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Jdt={class:"flex justify-between mb-1"},eut={class:"text-base font-medium text-blue-700 dark:text-white"},tut={class:"text-sm font-medium text-blue-700 dark:text-white"},nut={class:"flex flex-grow"},sut={class:"flex flex-row flex-grow gap-3"},iut={class:"p-2 text-center grow"},rut={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},out={class:"flex flex-row p-3 items-center"},aut={key:0,class:"mr-2"},lut={class:"mr-2 font-bold font-large text-lg line-clamp-1"},cut={key:1,class:"mr-2"},dut={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},uut={key:0,class:"flex -space-x-4 items-center"},put={class:"group items-center flex flex-row"},fut=["onClick"],_ut=["src","title"],mut=["onClick"],hut={class:"mx-2 mb-4"},gut={class:"relative"},but={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},yut={key:0},Eut={key:1},vut={key:0,class:"mx-2 mb-4"},Sut={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},Tut=["selected"],xut={key:0,class:"mb-2"},Cut={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},wut={class:"flex flex-col mb-2 p-3 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Rut={class:"flex flex-row"},Aut={class:"m-2"},Mut={class:"flex flex-row gap-2 items-center"},Nut={class:"m-2"},Iut={class:"m-2"},Out={class:"flex flex-col align-bottom"},kut={class:"relative"},Dut={class:"absolute right-0"},Lut={class:"m-2"},Put={class:"flex flex-col align-bottom"},Fut={class:"relative"},Uut={class:"absolute right-0"},But={class:"m-2"},Gut={class:"flex flex-col align-bottom"},Vut={class:"relative"},zut={class:"absolute right-0"},Hut={class:"m-2"},qut={class:"flex flex-col align-bottom"},Yut={class:"relative"},$ut={class:"absolute right-0"},Wut={class:"m-2"},Kut={class:"flex flex-col align-bottom"},jut={class:"relative"},Qut={class:"absolute right-0"},Xut={class:"m-2"},Zut={class:"flex flex-col align-bottom"},Jut={class:"relative"},ept={class:"absolute right-0"};function tpt(n,e,t,s,i,r){const o=Je("DictManager"),a=Je("Card"),c=Je("StringListManager"),d=Je("BindingEntry"),u=Je("RadioOptions"),_=Je("model-entry"),m=Je("personality-entry"),h=Je("AddModelDialog"),g=Je("ChoiceDialog");return T(),x(Le,null,[l("div",urt,[l("div",prt,[i.showConfirmation?(T(),x("div",frt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=$(f=>i.showConfirmation=!1,["stop"]))},e[451]||(e[451]=[l("i",{"data-feather":"x"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=$(f=>r.save_configuration(),["stop"]))},e[452]||(e[452]=[l("i",{"data-feather":"check"},null,-1)]))])):B("",!0),i.showConfirmation?B("",!0):(T(),x("div",_rt,[l("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=f=>r.reset_configuration())},e[453]||(e[453]=[l("i",{"data-feather":"refresh-ccw"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[3]||(e[3]=$(f=>i.all_collapsed=!i.all_collapsed,["stop"]))},e[454]||(e[454]=[l("i",{"data-feather":"list"},null,-1)]))])),l("div",mrt,[l("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[4]||(e[4]=f=>r.api_get_req("clear_uploads").then(b=>{b.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},e[455]||(e[455]=[l("i",{"data-feather":"trash-2"},null,-1)])),l("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=f=>r.api_post_req("restart_program").then(b=>{b.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},e[456]||(e[456]=[l("i",{"data-feather":"refresh-ccw"},null,-1)])),i.has_updates?(T(),x("button",{key:0,title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=f=>r.api_post_req("update_software").then(b=>{b.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},e[457]||(e[457]=[l("i",{"data-feather":"arrow-up-circle"},null,-1),l("i",{"data-feather":"alert-circle"},null,-1)]))):B("",!0),l("div",hrt,[i.settingsChanged?(T(),x("div",grt,[i.isLoading?B("",!0):(T(),x("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[7]||(e[7]=$(f=>r.applyConfiguration(),["stop"]))},e[458]||(e[458]=[l("div",{class:"flex flex-row"},[l("p",{class:"text-green-600 font-bold hover:text-green-300 ml-4 pl-4 mr-4 pr-4"},"Apply changes:"),l("i",{"data-feather":"check"})],-1)]))),i.isLoading?B("",!0):(T(),x("button",{key:1,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Cancel changes",type:"button",onClick:e[8]||(e[8]=$(f=>r.cancelConfiguration(),["stop"]))},e[459]||(e[459]=[l("div",{class:"flex flex-row"},[l("p",{class:"text-red-600 font-bold hover:text-red-300 ml-4 pl-4 mr-4 pr-4"},"Cancel changes:"),l("i",{"data-feather":"x"})],-1)])))])):B("",!0),i.isLoading?(T(),x("div",brt,[l("p",null,Y(i.loading_text),1),e[460]||(e[460]=l("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),e[461]||(e[461]=l("span",{class:"sr-only"},"Loading...",-1))])):B("",!0)])])]),l("div",{class:Pe(i.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[l("div",yrt,[l("div",Ert,[l("button",{onClick:e[9]||(e[9]=$(f=>i.sc_collapsed=!i.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[462]||(e[462]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.sc_collapsed]]),k(l("div",null,e[463]||(e[463]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.sc_collapsed]]),e[466]||(e[466]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),e[467]||(e[467]=l("div",{class:"mr-2"},"|",-1)),l("div",vrt,[l("div",Srt,[l("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(T(),x("div",Trt,[(T(!0),x(Le,null,We(r.vramUsage.gpus,f=>(T(),x("div",{class:"flex gap-2 items-center",key:f},[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,xrt),l("p",Crt,[l("div",null,Y(r.computedFileSize(f.used_vram))+" / "+Y(r.computedFileSize(f.total_vram))+" ("+Y(f.percentage)+"%) ",1)])]))),128))])):B("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(T(),x("div",wrt,[l("div",Rrt,[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Art),l("p",Mrt,[l("div",null,Y(r.vramUsage.gpus.length)+"x ",1)])])])):B("",!0)]),e[464]||(e[464]=l("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),l("p",Nrt,[l("div",null,Y(r.ram_usage)+" / "+Y(r.ram_total_space)+" ("+Y(r.ram_percent_usage)+"%)",1)]),e[465]||(e[465]=l("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),l("p",Irt,[l("div",null,Y(r.disk_binding_models_usage)+" / "+Y(r.disk_total_space)+" ("+Y(r.disk_percent_usage)+"%)",1)])])])])]),l("div",{class:Pe([{hidden:i.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",Ort,[e[470]||(e[470]=l("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[l("path",{fill:"currentColor",d:"M17 17H7V7h10m4 4V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9v2H7c-1.11 0-2 .89-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2m-6 2h-2v-2h2m2-2H9v6h6V9Z"})]),Ze(" CPU Ram usage: ")],-1)),l("div",krt,[l("div",null,[e[468]||(e[468]=l("b",null,"Avaliable ram: ",-1)),Ze(Y(r.ram_available_space),1)]),l("div",null,[e[469]||(e[469]=l("b",null,"Ram usage: ",-1)),Ze(" "+Y(r.ram_usage)+" / "+Y(r.ram_total_space)+" ("+Y(r.ram_percent_usage)+")% ",1)])]),l("div",Drt,[l("div",Lrt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Vt("width: "+r.ram_percent_usage+"%;")},null,4)])])]),l("div",Prt,[e[473]||(e[473]=l("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[l("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),Ze(" Disk usage: ")],-1)),l("div",Frt,[l("div",null,[e[471]||(e[471]=l("b",null,"Avaliable disk space: ",-1)),Ze(Y(r.disk_available_space),1)]),l("div",null,[e[472]||(e[472]=l("b",null,"Disk usage: ",-1)),Ze(" "+Y(r.disk_binding_models_usage)+" / "+Y(r.disk_total_space)+" ("+Y(r.disk_percent_usage)+"%)",1)])]),l("div",Urt,[l("div",Brt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Vt("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(T(!0),x(Le,null,We(r.vramUsage.gpus,f=>(T(),x("div",{class:"mb-2",key:f},[l("label",Grt,[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Vrt),e[474]||(e[474]=Ze(" GPU usage: "))]),l("div",zrt,[l("div",null,[e[475]||(e[475]=l("b",null,"Model: ",-1)),Ze(Y(f.gpu_model),1)]),l("div",null,[e[476]||(e[476]=l("b",null,"Avaliable vram: ",-1)),Ze(Y(this.computedFileSize(f.available_space)),1)]),l("div",null,[e[477]||(e[477]=l("b",null,"GPU usage: ",-1)),Ze(" "+Y(this.computedFileSize(f.used_vram))+" / "+Y(this.computedFileSize(f.total_vram))+" ("+Y(f.percentage)+"%)",1)])]),l("div",Hrt,[l("div",qrt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Vt("width: "+f.percentage+"%;")},null,4)])])]))),128))],2)]),l("div",Yrt,[l("div",$rt,[l("button",{onClick:e[10]||(e[10]=$(f=>i.smartrouterconf_collapsed=!i.smartrouterconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[478]||(e[478]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.smartrouterconf_collapsed]]),k(l("div",null,e[479]||(e[479]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.smartrouterconf_collapsed]]),e[480]||(e[480]=l("div",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Smart routing configurations",-1))])]),l("div",{class:Pe([{hidden:i.smartrouterconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",Wrt,[z(a,{title:"Smart Routing Settings",is_shrunk:!1,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("div",Krt,[l("div",jrt,[l("div",Qrt,[e[481]||(e[481]=l("label",{for:"use_smart_routing",class:"text-sm font-bold w-64"},"Use Smart Routing:",-1)),k(l("input",{type:"checkbox",id:"use_smart_routing","onUpdate:modelValue":e[11]||(e[11]=f=>r.configFile.use_smart_routing=f),onChange:e[12]||(e[12]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_smart_routing]])]),l("div",Xrt,[e[482]||(e[482]=l("label",{for:"restore_model_after_smart_routing",class:"text-sm font-bold w-64"},"Restore model after smart routing:",-1)),k(l("input",{type:"checkbox",id:"restore_model_after_smart_routing","onUpdate:modelValue":e[13]||(e[13]=f=>r.configFile.restore_model_after_smart_routing=f),onChange:e[14]||(e[14]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.restore_model_after_smart_routing]])]),l("div",Zrt,[e[483]||(e[483]=l("label",{for:"smart_routing_router_model",class:"text-sm font-bold w-64"},"Router Model:",-1)),k(l("input",{type:"text",id:"smart_routing_router_model","onUpdate:modelValue":e[15]||(e[15]=f=>r.configFile.smart_routing_router_model=f),onChange:e[16]||(e[16]=f=>i.settingsChanged=!0),class:"flex-grow mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.smart_routing_router_model]])]),l("div",Jrt,[e[484]||(e[484]=l("label",{for:"smart_routing_models_description",class:"text-sm font-bold w-64 mt-1"},"Models with description:",-1)),z(o,{modelValue:r.configFile.smart_routing_models_description,"onUpdate:modelValue":e[17]||(e[17]=f=>r.configFile.smart_routing_models_description=f),onChange:e[18]||(e[18]=f=>i.settingsChanged=!0),"key-name":"Model Path","value-name":"Model description",placeholder:"Enter model name",class:"flex-grow"},null,8,["modelValue"])])])])]),_:1})])],2)]),l("div",eot,[l("div",tot,[l("button",{onClick:e[19]||(e[19]=$(f=>i.mainconf_collapsed=!i.mainconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[485]||(e[485]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.mainconf_collapsed]]),k(l("div",null,e[486]||(e[486]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.mainconf_collapsed]]),e[487]||(e[487]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1))])]),l("div",{class:Pe([{hidden:i.mainconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",not,[z(a,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",sot,[l("tr",null,[e[489]||(e[489]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"app_custom_logo",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Application logo:")],-1)),l("td",null,[l("label",iot,[l("img",{src:r.configFile.app_custom_logo!=null&&r.configFile.app_custom_logo!=""?"/user_infos/"+r.configFile.app_custom_logo:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,rot)]),l("input",{type:"file",id:"logo-upload",style:{display:"none"},onChange:e[20]||(e[20]=(...f)=>r.uploadLogo&&r.uploadLogo(...f))},null,32)]),l("td",oot,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[21]||(e[21]=$(f=>r.resetLogo(),["stop"]))},e[488]||(e[488]=[l("i",{"data-feather":"x"},null,-1)]))])]),l("tr",null,[e[491]||(e[491]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),l("td",aot,[l("div",lot,[k(l("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[22]||(e[22]=f=>r.configFile.hardware_mode=f),onChange:e[23]||(e[23]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[490]||(e[490]=[l("option",{value:"cpu"},"CPU",-1),l("option",{value:"cpu-noavx"},"CPU (No AVX)",-1),l("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1),l("option",{value:"nvidia"},"NVIDIA",-1),l("option",{value:"amd-noavx"},"AMD (No AVX)",-1),l("option",{value:"amd"},"AMD",-1),l("option",{value:"apple-intel"},"Apple Intel",-1),l("option",{value:"apple-silicon"},"Apple Silicon",-1)]),544),[[Ot,r.configFile.hardware_mode]])])])]),l("tr",null,[e[492]||(e[492]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),l("td",cot,[k(l("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[24]||(e[24]=f=>r.configFile.discussion_db_name=f),onChange:e[25]||(e[25]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.discussion_db_name]])])]),l("tr",null,[e[493]||(e[493]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),l("td",null,[l("div",dot,[k(l("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[26]||(e[26]=f=>r.configFile.copy_to_clipboard_add_all_details=f),onChange:e[27]||(e[27]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.copy_to_clipboard_add_all_details]])])])]),l("tr",null,[e[494]||(e[494]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),l("td",null,[l("div",uot,[k(l("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[28]||(e[28]=f=>r.configFile.auto_show_browser=f),onChange:e[29]||(e[29]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_show_browser]])])])]),l("tr",null,[e[495]||(e[495]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),l("td",null,[l("div",pot,[k(l("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[30]||(e[30]=f=>r.configFile.debug=f),onChange:e[31]||(e[31]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug]])])])]),l("tr",null,[e[496]||(e[496]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate showing the full prompt in console (for debug):")],-1)),l("td",null,[l("div",fot,[k(l("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[32]||(e[32]=f=>r.configFile.debug_show_final_full_prompt=f),onChange:e[33]||(e[33]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug_show_final_full_prompt]])])])]),l("tr",null,[e[497]||(e[497]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show final full prompt in console:")],-1)),l("td",null,[l("div",_ot,[k(l("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[34]||(e[34]=f=>r.configFile.debug_show_final_full_prompt=f),onChange:e[35]||(e[35]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug_show_final_full_prompt]])])])]),l("tr",null,[e[498]||(e[498]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show chunks in console:")],-1)),l("td",null,[l("div",mot,[k(l("input",{type:"checkbox",id:"debug_show_chunks",required:"","onUpdate:modelValue":e[36]||(e[36]=f=>r.configFile.debug_show_chunks=f),onChange:e[37]||(e[37]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug_show_chunks]])])])]),l("tr",null,[e[499]||(e[499]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),l("td",null,[l("div",hot,[k(l("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[38]||(e[38]=f=>r.configFile.debug_log_file_path=f),onChange:e[39]||(e[39]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.debug_log_file_path]])])])]),l("tr",null,[e[500]||(e[500]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"show_news_panel",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show news panel:")],-1)),l("td",null,[l("div",got,[k(l("input",{type:"checkbox",id:"show_news_panel",required:"","onUpdate:modelValue":e[40]||(e[40]=f=>r.configFile.show_news_panel=f),onChange:e[41]||(e[41]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.show_news_panel]])])])]),l("tr",null,[e[501]||(e[501]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),l("td",null,[l("div",bot,[k(l("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[42]||(e[42]=f=>r.configFile.auto_save=f),onChange:e[43]||(e[43]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_save]])])])]),l("tr",null,[e[502]||(e[502]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),l("td",null,[l("div",yot,[k(l("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[44]||(e[44]=f=>r.configFile.auto_update=f),onChange:e[45]||(e[45]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_update]])])])]),l("tr",null,[e[503]||(e[503]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),l("td",null,[l("div",Eot,[k(l("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[46]||(e[46]=f=>r.configFile.auto_title=f),onChange:e[47]||(e[47]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_title]])])])])])]),_:1}),z(a,{title:"Model template",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",vot,[l("tr",null,[e[505]||(e[505]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),l("td",null,[l("select",{onChange:e[48]||(e[48]=(...f)=>r.handleTemplateSelection&&r.handleTemplateSelection(...f))},e[504]||(e[504]=[l("option",{value:"lollms"},"Lollms communication template",-1),l("option",{value:"lollms_simplified"},"Lollms simplified communication template",-1),l("option",{value:"bare"},"Bare, useful when in chat mode",-1),l("option",{value:"llama3"},"LLama3 communication template",-1),l("option",{value:"mistral"},"Mistral communication template",-1),l("option",{value:"deepseek"},"DeepSeek communication template",-1)]),32)])]),l("tr",null,[e[506]||(e[506]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"start_header_id_template",required:"","onUpdate:modelValue":e[49]||(e[49]=f=>r.configFile.start_header_id_template=f),onChange:e[50]||(e[50]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.start_header_id_template]])])]),l("tr",null,[e[507]||(e[507]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End header id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"end_header_id_template",required:"","onUpdate:modelValue":e[51]||(e[51]=f=>r.configFile.end_header_id_template=f),onChange:e[52]||(e[52]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.end_header_id_template]])])]),l("tr",null,[e[508]||(e[508]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start user header id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"start_user_header_id_template",required:"","onUpdate:modelValue":e[53]||(e[53]=f=>r.configFile.start_user_header_id_template=f),onChange:e[54]||(e[54]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.start_user_header_id_template]])])]),l("tr",null,[e[509]||(e[509]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user header id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"end_user_header_id_template",required:"","onUpdate:modelValue":e[55]||(e[55]=f=>r.configFile.end_user_header_id_template=f),onChange:e[56]||(e[56]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.end_user_header_id_template]])])]),l("tr",null,[e[510]||(e[510]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_user_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user message id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"end_user_message_id_template",required:"","onUpdate:modelValue":e[57]||(e[57]=f=>r.configFile.end_user_message_id_template=f),onChange:e[58]||(e[58]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.end_user_message_id_template]])])]),l("tr",null,[e[511]||(e[511]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start ai header id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"start_ai_header_id_template",required:"","onUpdate:modelValue":e[59]||(e[59]=f=>r.configFile.start_ai_header_id_template=f),onChange:e[60]||(e[60]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.start_ai_header_id_template]])])]),l("tr",null,[e[512]||(e[512]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai header id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"end_ai_header_id_template",required:"","onUpdate:modelValue":e[61]||(e[61]=f=>r.configFile.end_ai_header_id_template=f),onChange:e[62]||(e[62]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.end_ai_header_id_template]])])]),l("tr",null,[e[513]||(e[513]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_ai_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai message id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"end_ai_message_id_template",required:"","onUpdate:modelValue":e[63]||(e[63]=f=>r.configFile.end_ai_message_id_template=f),onChange:e[64]||(e[64]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.end_ai_message_id_template]])])]),l("tr",null,[e[514]||(e[514]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"separator_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Separator template:")],-1)),l("td",null,[k(l("textarea",{id:"separator_template",required:"","onUpdate:modelValue":e[65]||(e[65]=f=>r.configFile.separator_template=f),onChange:e[66]||(e[66]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.separator_template]])])]),l("tr",null,[e[515]||(e[515]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"system_message_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"System template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"system_message_template",required:"","onUpdate:modelValue":e[67]||(e[67]=f=>r.configFile.system_message_template=f),onChange:e[68]||(e[68]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.system_message_template]])])]),l("tr",null,[e[516]||(e[516]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"full_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Full template:")],-1)),l("td",null,[l("div",{innerHTML:r.full_template},null,8,Sot)])]),l("tr",null,[e[517]||(e[517]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_continue_message",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"useful for chat models and repote models but can be less useful for instruct ones"},"Use continue message:")],-1)),l("td",Tot,[k(l("input",{type:"checkbox",id:"use_continue_message",required:"","onUpdate:modelValue":e[69]||(e[69]=f=>r.configFile.use_continue_message=f),onChange:e[70]||(e[70]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_continue_message]])])])])]),_:1}),z(a,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",xot,[l("tr",null,[e[518]||(e[518]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),l("td",Cot,[k(l("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[71]||(e[71]=f=>r.configFile.user_name=f),onChange:e[72]||(e[72]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.user_name]])])]),l("tr",null,[e[519]||(e[519]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),l("td",wot,[k(l("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[73]||(e[73]=f=>r.configFile.user_description=f),onChange:e[74]||(e[74]=f=>i.settingsChanged=!0),class:"min-h-[500px] w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.user_description]])])]),l("tr",null,[e[520]||(e[520]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_user_informations_in_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),l("td",Rot,[k(l("input",{type:"checkbox",id:"use_user_informations_in_discussion",required:"","onUpdate:modelValue":e[75]||(e[75]=f=>r.configFile.use_user_informations_in_discussion=f),onChange:e[76]||(e[76]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_user_informations_in_discussion]])])]),l("tr",null,[e[521]||(e[521]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_model_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use model name in discussion:")],-1)),l("td",Aot,[k(l("input",{type:"checkbox",id:"use_model_name_in_discussions",required:"","onUpdate:modelValue":e[77]||(e[77]=f=>r.configFile.use_model_name_in_discussions=f),onChange:e[78]||(e[78]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_model_name_in_discussions]])])]),l("tr",null,[e[523]||(e[523]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_avatar",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),l("td",null,[l("label",Mot,[l("img",{src:r.configFile.user_avatar!=null&&r.configFile.user_avatar!=""?"/user_infos/"+r.configFile.user_avatar:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,Not)]),l("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[79]||(e[79]=(...f)=>r.uploadAvatar&&r.uploadAvatar(...f))},null,32)]),l("td",Iot,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[80]||(e[80]=$(f=>r.resetAvatar(),["stop"]))},e[522]||(e[522]=[l("i",{"data-feather":"x"},null,-1)]))])]),l("tr",null,[e[524]||(e[524]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),l("td",null,[l("div",Oot,[k(l("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[81]||(e[81]=f=>r.configFile.use_user_name_in_discussions=f),onChange:e[82]||(e[82]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_user_name_in_discussions]])])])]),l("tr",null,[e[525]||(e[525]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Maximum number of output tokens space (forces the model to have more space to speak):")],-1)),l("td",kot,[k(l("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[83]||(e[83]=f=>r.configFile.max_n_predict=f),onChange:e[84]||(e[84]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.max_n_predict]])])]),l("tr",null,[e[526]||(e[526]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),l("td",Dot,[k(l("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[85]||(e[85]=f=>r.configFile.max_n_predict=f),onChange:e[86]||(e[86]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.max_n_predict]])])])])]),_:1}),z(a,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Lot,[l("tr",null,[e[527]||(e[527]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),l("td",Pot,[k(l("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[87]||(e[87]=f=>r.configFile.turn_on_code_execution=f),onChange:e[88]||(e[88]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_code_execution]])])]),l("tr",null,[e[528]||(e[528]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation (very recommended for security reasons):")],-1)),l("td",Fot,[k(l("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[89]||(e[89]=f=>r.configFile.turn_on_code_validation=f),onChange:e[90]||(e[90]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_code_validation]])])]),l("tr",null,[e[529]||(e[529]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_setting_update_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on apply settings validation (very recommended for security reasons):")],-1)),l("td",Uot,[k(l("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[91]||(e[91]=f=>r.configFile.turn_on_setting_update_validation=f),onChange:e[92]||(e[92]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_setting_update_validation]])])]),l("tr",null,[e[530]||(e[530]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_open_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on open file/folder validation:")],-1)),l("td",Bot,[k(l("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[93]||(e[93]=f=>r.configFile.turn_on_open_file_validation=f),onChange:e[94]||(e[94]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_open_file_validation]])])]),l("tr",null,[e[531]||(e[531]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_send_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on send file validation:")],-1)),l("td",Got,[k(l("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[95]||(e[95]=f=>r.configFile.turn_on_send_file_validation=f),onChange:e[96]||(e[96]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_send_file_validation]])])])])]),_:1}),z(a,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Vot,[l("tr",null,[e[532]||(e[532]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Skills library:")],-1)),l("td",null,[l("div",zot,[k(l("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[97]||(e[97]=f=>r.configFile.activate_skills_lib=f),onChange:e[98]||(e[98]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_skills_lib]])])])]),l("tr",null,[e[533]||(e[533]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Skills library database name:")],-1)),l("td",Hot,[k(l("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[99]||(e[99]=f=>r.configFile.skills_lib_database_name=f),onChange:e[100]||(e[100]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.skills_lib_database_name]])])])])]),_:1}),z(a,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",qot,[l("tr",null,[e[534]||(e[534]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),l("td",null,[l("div",Yot,[k(l("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[101]||(e[101]=f=>r.configFile.pdf_latex_path=f),onChange:e[102]||(e[102]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.pdf_latex_path]])])])])])]),_:1}),z(a,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",$ot,[l("tr",null,[e[535]||(e[535]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),l("td",null,[l("div",Wot,[k(l("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[103]||(e[103]=f=>r.configFile.positive_boost=f),onChange:e[104]||(e[104]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.positive_boost]])])])]),l("tr",null,[e[536]||(e[536]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),l("td",null,[l("div",Kot,[k(l("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[105]||(e[105]=f=>r.configFile.negative_boost=f),onChange:e[106]||(e[106]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.negative_boost]])])])]),l("tr",null,[e[537]||(e[537]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),l("td",null,[l("div",jot,[k(l("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[107]||(e[107]=f=>r.configFile.fun_mode=f),onChange:e[108]||(e[108]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.fun_mode]])])])])])]),_:1})])],2)]),l("div",Qot,[l("div",Xot,[l("button",{onClick:e[109]||(e[109]=$(f=>i.data_conf_collapsed=!i.data_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[538]||(e[538]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.data_conf_collapsed]]),k(l("div",null,e[539]||(e[539]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.data_conf_collapsed]]),e[540]||(e[540]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1))])]),l("div",{class:Pe([{hidden:i.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[z(a,{title:"Data Sources",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Zot,[l("tr",null,[e[541]||(e[541]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_databases",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data Sources:")],-1)),l("td",Jot,[(T(!0),x(Le,null,We(r.configFile.rag_databases,(f,b)=>(T(),x("div",{key:b,class:"flex items-center mb-2"},[k(l("input",{type:"text","onUpdate:modelValue":y=>r.configFile.rag_databases[b]=y,onChange:e[110]||(e[110]=y=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,40,eat),[[ue,r.configFile.rag_databases[b]]]),l("button",{onClick:y=>r.vectorize_folder(b),class:"w-500 ml-2 px-2 py-1 bg-green-500 text-white hover:bg-green-300 rounded"},"(Re)Vectorize",8,tat),l("button",{onClick:y=>r.select_folder(b),class:"w-500 ml-2 px-2 py-1 bg-blue-500 text-white hover:bg-green-300 rounded"},"Select Folder",8,nat),l("button",{onClick:y=>r.removeDataSource(b),class:"ml-2 px-2 py-1 bg-red-500 text-white hover:bg-green-300 rounded"},"Remove",8,sat)]))),128)),l("button",{onClick:e[111]||(e[111]=(...f)=>r.addDataSource&&r.addDataSource(...f)),class:"mt-2 px-2 py-1 bg-blue-500 text-white rounded"},"Add Data Source")])]),l("tr",null,[e[543]||(e[543]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer:")],-1)),l("td",null,[k(l("select",{id:"rag_vectorizer",required:"","onUpdate:modelValue":e[112]||(e[112]=f=>r.configFile.rag_vectorizer=f),onChange:e[113]||(e[113]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[542]||(e[542]=[l("option",{value:"semantic"},"Semantic Vectorizer",-1),l("option",{value:"tfidf"},"TFIDF Vectorizer",-1),l("option",{value:"openai"},"OpenAI Vectorizer",-1),l("option",{value:"ollama"},"Ollama Vectorizer",-1)]),544),[[Ot,r.configFile.rag_vectorizer]])])]),l("tr",null,[e[544]||(e[544]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_vectorizer_execute_remote_code",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Allow executing remote code:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[114]||(e[114]=f=>r.configFile.rag_vectorizer_execute_remote_code=f),type:"checkbox",onChange:e[115]||(e[115]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_vectorizer_execute_remote_code]])])]),l("tr",null,[e[545]||(e[545]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_vectorizer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer model:")],-1)),l("td",null,[k(l("select",{id:"rag_vectorizer_model",required:"","onUpdate:modelValue":e[116]||(e[116]=f=>r.configFile.rag_vectorizer_model=f),onChange:e[117]||(e[117]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:r.configFile.rag_vectorizer==="tfidf"},[r.configFile.rag_vectorizer==="semantic"?(T(),x("option",rat,"BAAI/bge-m3")):B("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",oat,"nvidia/NV-Embed-v2")):B("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",aat,"sentence-transformers/all-MiniLM-L6-v2")):B("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",lat,"sentence-transformers/all-MiniLM-L12-v2")):B("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",cat,"sentence-transformers/all-distilroberta-v1")):B("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",dat,"sentence-transformers/all-mpnet-base-v2")):B("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",uat,"text-embedding-ada-002")):B("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",pat,"text-embedding-babbage-001")):B("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",fat,"text-embedding-curie-001")):B("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",_at,"text-embedding-davinci-001")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",mat,"bge-m3")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",hat,"nomic-embed-text")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",gat,"mxbai-embed-large")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",bat,"mxbai-embed-large")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",yat,"snowflake-arctic-embed")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",Eat,"snowflake-arctic-embed")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",vat,"all-minilm")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",Sat,"bge-large")):B("",!0),r.configFile.rag_vectorizer==="tfidf"?(T(),x("option",Tat,"No models available for TFIDF")):B("",!0)],40,iat),[[Ot,r.configFile.rag_vectorizer_model]]),k(l("input",{"onUpdate:modelValue":e[118]||(e[118]=f=>r.configFile.rag_vectorizer_model=f),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,512),[[ue,r.configFile.rag_vectorizer_model]])])]),l("tr",null,[e[546]||(e[546]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_service_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Rag service url:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[119]||(e[119]=f=>r.configFile.rag_service_url=f),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,512),[[ue,r.configFile.rag_service_url]])])]),l("tr",null,[e[547]||(e[547]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_vectorizer_openai_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key for open ai embedding method (if not provided I'll use OPENAI_API_KEY environment variable):")],-1)),l("td",null,[l("div",xat,[k(l("input",{type:"text",id:"rag_vectorizer_openai_key",required:"","onUpdate:modelValue":e[120]||(e[120]=f=>r.configFile.rag_vectorizer_openai_key=f),onChange:e[121]||(e[121]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_vectorizer_openai_key]])])])]),l("tr",null,[e[548]||(e[548]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG chunk size:")],-1)),l("td",null,[k(l("input",{id:"rag_chunk_size","onUpdate:modelValue":e[122]||(e[122]=f=>r.configFile.rag_chunk_size=f),onChange:e[123]||(e[123]=f=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.rag_chunk_size]]),k(l("input",{"onUpdate:modelValue":e[124]||(e[124]=f=>r.configFile.rag_chunk_size=f),type:"number",onChange:e[125]||(e[125]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_chunk_size]])])]),l("tr",null,[e[549]||(e[549]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_overlap",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG overlap size:")],-1)),l("td",null,[k(l("input",{id:"rag_overlap","onUpdate:modelValue":e[126]||(e[126]=f=>r.configFile.rag_overlap=f),onChange:e[127]||(e[127]=f=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.rag_overlap]]),k(l("input",{"onUpdate:modelValue":e[128]||(e[128]=f=>r.configFile.rag_overlap=f),type:"number",onChange:e[129]||(e[129]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_overlap]])])]),l("tr",null,[e[550]||(e[550]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_n_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG number of chunks:")],-1)),l("td",null,[k(l("input",{id:"rag_n_chunks","onUpdate:modelValue":e[130]||(e[130]=f=>r.configFile.rag_n_chunks=f),onChange:e[131]||(e[131]=f=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.rag_n_chunks]]),k(l("input",{"onUpdate:modelValue":e[132]||(e[132]=f=>r.configFile.rag_n_chunks=f),type:"number",onChange:e[133]||(e[133]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_n_chunks]])])]),l("tr",null,[e[551]||(e[551]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_clean_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Clean chunks:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[134]||(e[134]=f=>r.configFile.rag_clean_chunks=f),type:"checkbox",onChange:e[135]||(e[135]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_clean_chunks]])])]),l("tr",null,[e[552]||(e[552]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_follow_subfolders",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Follow subfolders:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[136]||(e[136]=f=>r.configFile.rag_follow_subfolders=f),type:"checkbox",onChange:e[137]||(e[137]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_follow_subfolders]])])]),l("tr",null,[e[553]||(e[553]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_check_new_files_at_startup",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Check for new files at startup:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[138]||(e[138]=f=>r.configFile.rag_check_new_files_at_startup=f),type:"checkbox",onChange:e[139]||(e[139]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_check_new_files_at_startup]])])]),l("tr",null,[e[554]||(e[554]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_preprocess_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Preprocess chunks:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[140]||(e[140]=f=>r.configFile.rag_preprocess_chunks=f),type:"checkbox",onChange:e[141]||(e[141]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_preprocess_chunks]])])]),l("tr",null,[e[555]||(e[555]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_activate_multi_hops",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate multi hops RAG:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[142]||(e[142]=f=>r.configFile.rag_activate_multi_hops=f),type:"checkbox",onChange:e[143]||(e[143]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_activate_multi_hops]])])]),l("tr",null,[e[556]||(e[556]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"contextual_summary",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use contextual summary instead of rag (consumes alot of tokens and may be very slow but efficient, useful for summary and global questions that RAG can't do):")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[144]||(e[144]=f=>r.configFile.contextual_summary=f),type:"checkbox",onChange:e[145]||(e[145]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.contextual_summary]])])]),l("tr",null,[e[557]||(e[557]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_deactivate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Useful for very big contexts and global tasks that require the whole document"},"Use all the document content (No split):")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[146]||(e[146]=f=>r.configFile.rag_deactivate=f),type:"checkbox",onChange:e[147]||(e[147]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_deactivate]])])])])]),_:1}),z(a,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Cat,[l("tr",null,[e[558]||(e[558]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reformulate prompt before querying database (advised):")],-1)),l("td",null,[l("div",wat,[k(l("input",{type:"checkbox",id:"rag_build_keys_words",required:"","onUpdate:modelValue":e[148]||(e[148]=f=>r.configFile.rag_build_keys_words=f),onChange:e[149]||(e[149]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_build_keys_words]])])])]),l("tr",null,[e[559]||(e[559]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_put_chunk_informations_into_context",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Put Chunk Information Into Context:")],-1)),l("td",null,[l("div",Rat,[k(l("input",{type:"checkbox",id:"rag_put_chunk_informations_into_context",required:"","onUpdate:modelValue":e[150]||(e[150]=f=>r.configFile.rag_put_chunk_informations_into_context=f),onChange:e[151]||(e[151]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_put_chunk_informations_into_context]])])])]),l("tr",null,[e[560]||(e[560]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save the new files to the database (The database wil always grow and continue to be the same over many sessions):")],-1)),l("td",null,[l("div",Aat,[k(l("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[152]||(e[152]=f=>r.configFile.data_vectorization_save_db=f),onChange:e[153]||(e[153]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_save_db]])])])])])]),_:1})],2)]),l("div",Mat,[l("div",Nat,[l("button",{onClick:e[154]||(e[154]=$(f=>i.internet_conf_collapsed=!i.internet_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[561]||(e[561]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.internet_conf_collapsed]]),k(l("div",null,e[562]||(e[562]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.internet_conf_collapsed]]),e[563]||(e[563]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Internet",-1))])]),l("div",{class:Pe([{hidden:i.internet_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[z(a,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Iat,[l("tr",null,[e[564]||(e[564]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate automatic internet search (for every prompt):")],-1)),l("td",null,[l("div",Oat,[k(l("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[155]||(e[155]=f=>r.configFile.activate_internet_search=f),onChange:e[156]||(e[156]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_internet_search]])])])]),l("tr",null,[e[565]||(e[565]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_internet_pages_judgement",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet pages judgement:")],-1)),l("td",null,[l("div",kat,[k(l("input",{type:"checkbox",id:"activate_internet_pages_judgement",required:"","onUpdate:modelValue":e[157]||(e[157]=f=>r.configFile.activate_internet_pages_judgement=f),onChange:e[158]||(e[158]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_internet_pages_judgement]])])])]),l("tr",null,[e[566]||(e[566]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),l("td",null,[l("div",Dat,[k(l("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[159]||(e[159]=f=>r.configFile.internet_quick_search=f),onChange:e[160]||(e[160]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.internet_quick_search]])])])]),l("tr",null,[e[567]||(e[567]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),l("td",null,[l("div",Lat,[k(l("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[161]||(e[161]=f=>r.configFile.internet_activate_search_decision=f),onChange:e[162]||(e[162]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.internet_activate_search_decision]])])])]),l("tr",null,[e[568]||(e[568]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),l("td",null,[l("div",Pat,[k(l("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[163]||(e[163]=f=>r.configFile.internet_vectorization_chunk_size=f),onChange:e[164]||(e[164]=f=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.internet_vectorization_chunk_size]]),k(l("input",{"onUpdate:modelValue":e[165]||(e[165]=f=>r.configFile.internet_vectorization_chunk_size=f),type:"number",onChange:e[166]||(e[166]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_vectorization_chunk_size]])])])]),l("tr",null,[e[569]||(e[569]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),l("td",null,[l("div",Fat,[k(l("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[167]||(e[167]=f=>r.configFile.internet_vectorization_overlap_size=f),onChange:e[168]||(e[168]=f=>i.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.internet_vectorization_overlap_size]]),k(l("input",{"onUpdate:modelValue":e[169]||(e[169]=f=>r.configFile.internet_vectorization_overlap_size=f),type:"number",onChange:e[170]||(e[170]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_vectorization_overlap_size]])])])]),l("tr",null,[e[570]||(e[570]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),l("td",null,[l("div",Uat,[k(l("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[171]||(e[171]=f=>r.configFile.internet_vectorization_nb_chunks=f),onChange:e[172]||(e[172]=f=>i.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.internet_vectorization_nb_chunks]]),k(l("input",{"onUpdate:modelValue":e[173]||(e[173]=f=>r.configFile.internet_vectorization_nb_chunks=f),type:"number",onChange:e[174]||(e[174]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_vectorization_nb_chunks]])])])]),l("tr",null,[e[571]||(e[571]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),l("td",null,[l("div",Bat,[k(l("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[175]||(e[175]=f=>r.configFile.internet_nb_search_pages=f),onChange:e[176]||(e[176]=f=>i.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.internet_nb_search_pages]]),k(l("input",{"onUpdate:modelValue":e[177]||(e[177]=f=>r.configFile.internet_nb_search_pages=f),type:"number",onChange:e[178]||(e[178]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_nb_search_pages]])])])])])]),_:1})],2)]),l("div",Gat,[l("div",Vat,[l("button",{onClick:e[179]||(e[179]=$(f=>i.servers_conf_collapsed=!i.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[572]||(e[572]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.servers_conf_collapsed]]),k(l("div",null,e[573]||(e[573]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.servers_conf_collapsed]]),e[574]||(e[574]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Services Zoo",-1))])]),l("div",{class:Pe([{hidden:i.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[z(a,{title:"Default services selection",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",zat,[l("tr",null,[e[576]||(e[576]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_tts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTS Service:")],-1)),l("td",Hat,[k(l("select",{id:"active_tts_service",required:"","onUpdate:modelValue":e[180]||(e[180]=f=>r.configFile.active_tts_service=f),onChange:e[181]||(e[181]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[575]||(e[575]=[l("option",{value:"None"},"None",-1),l("option",{value:"browser"},"Use Browser TTS (doesn't work in realtime mode)",-1),l("option",{value:"xtts"},"XTTS",-1),l("option",{value:"parler-tts"},"Parler-TTS",-1),l("option",{value:"openai_tts"},"Open AI TTS",-1),l("option",{value:"eleven_labs_tts"},"ElevenLabs TTS",-1),l("option",{value:"fish_tts"},"Fish TTS",-1)]),544),[[Ot,r.configFile.active_tts_service]])])]),l("tr",null,[e[578]||(e[578]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_stt_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Speach to Text engine"},"Active STT Service:")],-1)),l("td",qat,[k(l("select",{id:"active_stt_service",required:"","onUpdate:modelValue":e[182]||(e[182]=f=>r.configFile.active_stt_service=f),onChange:e[183]||(e[183]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[577]||(e[577]=[l("option",{value:"None"},"None",-1),l("option",{value:"whisper"},"Whisper",-1),l("option",{value:"openai_whisper"},"Open AI Whisper",-1)]),544),[[Ot,r.configFile.active_stt_service]])])]),e[585]||(e[585]=l("tr",null,null,-1)),l("tr",null,[e[580]||(e[580]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_tti_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to image engine"},"Active TTI Service:")],-1)),l("td",Yat,[k(l("select",{id:"active_tti_service",required:"","onUpdate:modelValue":e[184]||(e[184]=f=>r.configFile.active_tti_service=f),onChange:e[185]||(e[185]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[579]||(e[579]=[l("option",{value:"None"},"None",-1),l("option",{value:"diffusers"},"Diffusers",-1),l("option",{value:"diffusers_client"},"Diffusers Client",-1),l("option",{value:"autosd"},"AUTO1111's SD",-1),l("option",{value:"dall-e"},"Open AI DALL-E",-1),l("option",{value:"midjourney"},"Midjourney",-1),l("option",{value:"comfyui"},"Comfyui",-1),l("option",{value:"fooocus"},"Fooocus",-1)]),544),[[Ot,r.configFile.active_tti_service]])])]),l("tr",null,[e[582]||(e[582]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_ttm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to Music engine"},"Active TTM Service:")],-1)),l("td",$at,[k(l("select",{id:"active_ttm_service",required:"","onUpdate:modelValue":e[186]||(e[186]=f=>r.configFile.active_ttm_service=f),onChange:e[187]||(e[187]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[581]||(e[581]=[l("option",{value:"None"},"None",-1),l("option",{value:"musicgen"},"Music Gen",-1)]),544),[[Ot,r.configFile.active_ttm_service]])])]),l("tr",null,[e[584]||(e[584]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_ttv_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTV Service:")],-1)),l("td",Wat,[k(l("select",{id:"active_ttv_service",required:"","onUpdate:modelValue":e[188]||(e[188]=f=>r.configFile.active_ttv_service=f),onChange:e[189]||(e[189]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[583]||(e[583]=[l("option",{value:"None"},"None",-1),l("option",{value:"cog_video_x"},"Cog Video X",-1),l("option",{value:"diffusers"},"Diffusers",-1),l("option",{value:"lumalab"},"Lumalab",-1)]),544),[[Ot,r.configFile.active_ttv_service]])])])])]),_:1}),z(a,{title:"TTI settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Kat,[l("tr",null,[e[586]||(e[586]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use negative prompt:")],-1)),l("td",null,[l("div",jat,[k(l("input",{type:"checkbox",id:"use_negative_prompt",required:"","onUpdate:modelValue":e[190]||(e[190]=f=>r.configFile.use_negative_prompt=f),onChange:e[191]||(e[191]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_negative_prompt]])])])]),l("tr",null,[e[587]||(e[587]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_ai_generated_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use AI generated negative prompt:")],-1)),l("td",null,[l("div",Qat,[k(l("input",{type:"checkbox",id:"use_ai_generated_negative_prompt",required:"","onUpdate:modelValue":e[192]||(e[192]=f=>r.configFile.use_ai_generated_negative_prompt=f),onChange:e[193]||(e[193]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_ai_generated_negative_prompt]])])])]),l("tr",null,[e[588]||(e[588]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"negative_prompt_generation_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative prompt generation prompt:")],-1)),l("td",null,[l("div",Xat,[k(l("input",{type:"text",id:"negative_prompt_generation_prompt",required:"","onUpdate:modelValue":e[194]||(e[194]=f=>r.configFile.negative_prompt_generation_prompt=f),onChange:e[195]||(e[195]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.negative_prompt_generation_prompt]])])])]),l("tr",null,[e[589]||(e[589]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"default_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Default negative prompt:")],-1)),l("td",null,[l("div",Zat,[k(l("input",{type:"text",id:"default_negative_prompt",required:"","onUpdate:modelValue":e[196]||(e[196]=f=>r.configFile.default_negative_prompt=f),onChange:e[197]||(e[197]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.default_negative_prompt]])])])])])]),_:1}),z(a,{title:"Full Audio settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Jat,[l("tr",null,[e[590]||(e[590]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_listening_threshold",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Listening threshold"},"Listening threshold:")],-1)),l("td",elt,[k(l("input",{type:"number",step:"1",id:"stt_listening_threshold",required:"","onUpdate:modelValue":e[198]||(e[198]=f=>r.configFile.stt_listening_threshold=f),onChange:e[199]||(e[199]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_listening_threshold]])])]),l("tr",null,[e[591]||(e[591]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_silence_duration",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Scilence duration"},"Silence duration (s):")],-1)),l("td",tlt,[k(l("input",{type:"number",step:"1",id:"stt_silence_duration",required:"","onUpdate:modelValue":e[200]||(e[200]=f=>r.configFile.stt_silence_duration=f),onChange:e[201]||(e[201]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_silence_duration]])])]),l("tr",null,[e[592]||(e[592]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_sound_threshold_percentage",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"stt_sound_threshold_percentage"},"Minimum sound percentage in recorded segment:")],-1)),l("td",nlt,[k(l("input",{type:"number",step:"1",id:"stt_sound_threshold_percentage",required:"","onUpdate:modelValue":e[202]||(e[202]=f=>r.configFile.stt_sound_threshold_percentage=f),onChange:e[203]||(e[203]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_sound_threshold_percentage]])])]),l("tr",null,[e[593]||(e[593]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_gain",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"STT Gain"},"Volume amplification:")],-1)),l("td",slt,[k(l("input",{type:"number",step:"1",id:"stt_gain",required:"","onUpdate:modelValue":e[204]||(e[204]=f=>r.configFile.stt_gain=f),onChange:e[205]||(e[205]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_gain]])])]),l("tr",null,[e[594]||(e[594]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_rate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Audio Rate"},"audio rate:")],-1)),l("td",ilt,[k(l("input",{type:"number",step:"1",id:"stt_rate",required:"","onUpdate:modelValue":e[206]||(e[206]=f=>r.configFile.stt_rate=f),onChange:e[207]||(e[207]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_rate]])])]),l("tr",null,[e[595]||(e[595]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_channels",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"number of channels"},"number of channels:")],-1)),l("td",rlt,[k(l("input",{type:"number",step:"1",id:"stt_channels",required:"","onUpdate:modelValue":e[208]||(e[208]=f=>r.configFile.stt_channels=f),onChange:e[209]||(e[209]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_channels]])])]),l("tr",null,[e[596]||(e[596]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_buffer_size",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Buffer size"},"Buffer size:")],-1)),l("td",olt,[k(l("input",{type:"number",step:"1",id:"stt_buffer_size",required:"","onUpdate:modelValue":e[210]||(e[210]=f=>r.configFile.stt_buffer_size=f),onChange:e[211]||(e[211]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_buffer_size]])])]),l("tr",null,[e[597]||(e[597]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_activate_word_detection",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate word detection:")],-1)),l("td",null,[l("div",alt,[k(l("input",{type:"checkbox",id:"stt_activate_word_detection",required:"","onUpdate:modelValue":e[212]||(e[212]=f=>r.configFile.stt_activate_word_detection=f),onChange:e[213]||(e[213]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.stt_activate_word_detection]])])])]),l("tr",null,[e[598]||(e[598]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_word_detection_file",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Word detection wav file:")],-1)),l("td",null,[l("div",llt,[k(l("input",{type:"text",id:"stt_word_detection_file",required:"","onUpdate:modelValue":e[214]||(e[214]=f=>r.configFile.stt_word_detection_file=f),onChange:e[215]||(e[215]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_word_detection_file]])])])])])]),_:1}),z(a,{title:"Audio devices settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",clt,[l("tr",null,[e[599]||(e[599]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_input_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Input device:")],-1)),l("td",dlt,[k(l("select",{id:"stt_input_device",required:"","onUpdate:modelValue":e[216]||(e[216]=f=>r.configFile.stt_input_device=f),onChange:e[217]||(e[217]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(i.snd_input_devices,(f,b)=>(T(),x("option",{key:f,value:i.snd_input_devices_indexes[b]},Y(f),9,ult))),128))],544),[[Ot,r.configFile.stt_input_device]])])]),l("tr",null,[e[600]||(e[600]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"tts_output_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Output device:")],-1)),l("td",plt,[k(l("select",{id:"tts_output_device",required:"","onUpdate:modelValue":e[218]||(e[218]=f=>r.configFile.tts_output_device=f),onChange:e[219]||(e[219]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(i.snd_output_devices,(f,b)=>(T(),x("option",{key:f,value:i.snd_output_devices_indexes[b]},Y(f),9,flt))),128))],544),[[Ot,r.configFile.tts_output_device]])])])])]),_:1}),z(a,{title:"Lollms service",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",_lt,[l("tr",null,[e[601]||(e[601]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"host",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),l("td",mlt,[k(l("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[220]||(e[220]=f=>r.configFile.host=f),onChange:e[221]||(e[221]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.host]])])]),l("tr",null,[e[602]||(e[602]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"lollms_access_keys",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Access keys:")],-1)),l("td",hlt,[z(c,{modelValue:r.configFile.lollms_access_keys,"onUpdate:modelValue":e[222]||(e[222]=f=>r.configFile.lollms_access_keys=f),onChange:e[223]||(e[223]=f=>i.settingsChanged=!0),placeholder:"Enter access key"},null,8,["modelValue"])])]),l("tr",null,[e[603]||(e[603]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"port",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),l("td",glt,[k(l("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[224]||(e[224]=f=>r.configFile.port=f),onChange:e[225]||(e[225]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.port]])])]),l("tr",null,[e[604]||(e[604]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"headless_server_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode:")],-1)),l("td",blt,[k(l("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[226]||(e[226]=f=>r.configFile.headless_server_mode=f),onChange:e[227]||(e[227]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.headless_server_mode]])])]),l("tr",null,[e[605]||(e[605]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms server:")],-1)),l("td",ylt,[k(l("input",{type:"checkbox",id:"activate_lollms_server",required:"","onUpdate:modelValue":e[228]||(e[228]=f=>r.configFile.activate_lollms_server=f),onChange:e[229]||(e[229]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_server]])])]),l("tr",null,[e[606]||(e[606]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_rag_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms RAG server:")],-1)),l("td",Elt,[k(l("input",{type:"checkbox",id:"activate_lollms_rag_server",required:"","onUpdate:modelValue":e[230]||(e[230]=f=>r.configFile.activate_lollms_rag_server=f),onChange:e[231]||(e[231]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_rag_server]])])]),l("tr",null,[e[607]||(e[607]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_tts_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTS server:")],-1)),l("td",vlt,[k(l("input",{type:"checkbox",id:"activate_lollms_tts_server",required:"","onUpdate:modelValue":e[232]||(e[232]=f=>r.configFile.activate_lollms_tts_server=f),onChange:e[233]||(e[233]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_tts_server]])])]),l("tr",null,[e[608]||(e[608]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_stt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms STT server:")],-1)),l("td",Slt,[k(l("input",{type:"checkbox",id:"activate_lollms_stt_server",required:"","onUpdate:modelValue":e[234]||(e[234]=f=>r.configFile.activate_lollms_stt_server=f),onChange:e[235]||(e[235]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_stt_server]])])]),l("tr",null,[e[609]||(e[609]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_tti_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTI server:")],-1)),l("td",Tlt,[k(l("input",{type:"checkbox",id:"activate_lollms_tti_server",required:"","onUpdate:modelValue":e[236]||(e[236]=f=>r.configFile.activate_lollms_tti_server=f),onChange:e[237]||(e[237]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_tti_server]])])]),l("tr",null,[e[610]||(e[610]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_itt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms ITT server:")],-1)),l("td",xlt,[k(l("input",{type:"checkbox",id:"activate_lollms_itt_server",required:"","onUpdate:modelValue":e[238]||(e[238]=f=>r.configFile.activate_lollms_itt_server=f),onChange:e[239]||(e[239]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_itt_server]])])]),l("tr",null,[e[611]||(e[611]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_ttm_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTM server:")],-1)),l("td",Clt,[k(l("input",{type:"checkbox",id:"activate_lollms_ttm_server",required:"","onUpdate:modelValue":e[240]||(e[240]=f=>r.configFile.activate_lollms_ttm_server=f),onChange:e[241]||(e[241]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_ttm_server]])])]),l("tr",null,[e[612]||(e[612]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_ollama_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate ollama server emulator:")],-1)),l("td",wlt,[k(l("input",{type:"checkbox",id:"activate_ollama_emulator",required:"","onUpdate:modelValue":e[242]||(e[242]=f=>r.configFile.activate_ollama_emulator=f),onChange:e[243]||(e[243]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_ollama_emulator]])])]),l("tr",null,[e[613]||(e[613]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_openai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate openai server emulator:")],-1)),l("td",Rlt,[k(l("input",{type:"checkbox",id:"activate_openai_emulator",required:"","onUpdate:modelValue":e[244]||(e[244]=f=>r.configFile.activate_openai_emulator=f),onChange:e[245]||(e[245]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_openai_emulator]])])]),l("tr",null,[e[614]||(e[614]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_mistralai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate mistral ai server emulator:")],-1)),l("td",Alt,[k(l("input",{type:"checkbox",id:"activate_mistralai_emulator",required:"","onUpdate:modelValue":e[246]||(e[246]=f=>r.configFile.activate_mistralai_emulator=f),onChange:e[247]||(e[247]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_mistralai_emulator]])])])])]),_:1}),z(a,{title:"STT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[z(a,{title:"Browser Audio STT",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Mlt,[l("tr",null,[e[615]||(e[615]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),l("td",null,[l("div",Nlt,[k(l("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[248]||(e[248]=f=>r.configFile.activate_audio_infos=f),onChange:e[249]||(e[249]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_audio_infos]])])])]),l("tr",null,[e[616]||(e[616]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),l("td",null,[l("div",Ilt,[k(l("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[250]||(e[250]=f=>r.configFile.audio_auto_send_input=f),onChange:e[251]||(e[251]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.audio_auto_send_input]])])])]),l("tr",null,[e[617]||(e[617]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),l("td",null,[k(l("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[252]||(e[252]=f=>r.configFile.audio_silenceTimer=f),onChange:e[253]||(e[253]=f=>i.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.audio_silenceTimer]]),k(l("input",{"onUpdate:modelValue":e[254]||(e[254]=f=>r.configFile.audio_silenceTimer=f),onChange:e[255]||(e[255]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.audio_silenceTimer]])])]),l("tr",null,[e[618]||(e[618]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),l("td",null,[k(l("select",{id:"audio_in_language","onUpdate:modelValue":e[256]||(e[256]=f=>r.configFile.audio_in_language=f),onChange:e[257]||(e[257]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(r.audioLanguages,f=>(T(),x("option",{key:f.code,value:f.code},Y(f.name),9,Olt))),128))],544),[[Ot,r.configFile.audio_in_language]])])])])]),_:1}),z(a,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",klt,[l("tr",null,[e[619]||(e[619]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"whisper_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Whisper at startup:")],-1)),l("td",null,[l("div",Dlt,[k(l("input",{type:"checkbox",id:"whisper_activate",required:"","onUpdate:modelValue":e[258]||(e[258]=f=>r.configFile.whisper_activate=f),onChange:e[259]||(e[259]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.whisper_activate]])])])]),l("tr",null,[e[620]||(e[620]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}})],-1)),l("td",null,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[260]||(e[260]=(...f)=>r.reinstallWhisperService&&r.reinstallWhisperService(...f))},"install whisper")])]),l("tr",null,[e[621]||(e[621]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),l("td",null,[l("div",Llt,[k(l("select",{id:"whisper_model","onUpdate:modelValue":e[261]||(e[261]=f=>r.configFile.whisper_model=f),onChange:e[262]||(e[262]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(r.whisperModels,f=>(T(),x("option",{key:f,value:f},Y(f),9,Plt))),128))],544),[[Ot,r.configFile.whisper_model]])])])])])]),_:1}),z(a,{title:"Open AI Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Flt,[l("tr",null,[e[622]||(e[622]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_whisper_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai whisper key:")],-1)),l("td",null,[l("div",Ult,[k(l("input",{type:"text",id:"openai_whisper_key",required:"","onUpdate:modelValue":e[263]||(e[263]=f=>r.configFile.openai_whisper_key=f),onChange:e[264]||(e[264]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.openai_whisper_key]])])])]),l("tr",null,[e[623]||(e[623]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open Ai Whisper model:")],-1)),l("td",null,[l("div",Blt,[k(l("select",{id:"openai_whisper_model","onUpdate:modelValue":e[265]||(e[265]=f=>r.configFile.openai_whisper_model=f),onChange:e[266]||(e[266]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(r.openaiWhisperModels,f=>(T(),x("option",{key:f,value:f},Y(f),9,Glt))),128))],544),[[Ot,r.configFile.openai_whisper_model]])])])])])]),_:1})]),_:1}),z(a,{title:"TTS services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[z(a,{title:"Browser Audio TTS",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Vlt,[l("tr",null,[e[624]||(e[624]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),l("td",null,[l("div",zlt,[k(l("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[267]||(e[267]=f=>r.configFile.auto_speak=f),onChange:e[268]||(e[268]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_speak]])])])]),l("tr",null,[e[625]||(e[625]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),l("td",null,[k(l("input",{id:"audio_pitch","onUpdate:modelValue":e[269]||(e[269]=f=>r.configFile.audio_pitch=f),onChange:e[270]||(e[270]=f=>i.settingsChanged=!0),type:"range",min:"0",max:"10",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.audio_pitch]]),k(l("input",{"onUpdate:modelValue":e[271]||(e[271]=f=>r.configFile.audio_pitch=f),onChange:e[272]||(e[272]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.audio_pitch]])])]),l("tr",null,[e[626]||(e[626]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),l("td",null,[k(l("select",{id:"audio_out_voice","onUpdate:modelValue":e[273]||(e[273]=f=>r.configFile.audio_out_voice=f),onChange:e[274]||(e[274]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(i.audioVoices,f=>(T(),x("option",{key:f.name,value:f.name},Y(f.name),9,Hlt))),128))],544),[[Ot,r.configFile.audio_out_voice]])])])])]),_:1}),z(a,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",qlt,[l("tr",null,[e[627]||(e[627]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),l("td",null,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[275]||(e[275]=(...f)=>r.reinstallXTTSService&&r.reinstallXTTSService(...f))},"install xtts service")])]),l("tr",null,[e[628]||(e[628]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),l("td",null,[l("div",Ylt,[k(l("select",{"onUpdate:modelValue":e[276]||(e[276]=f=>r.xtts_current_language=f),onChange:e[277]||(e[277]=f=>i.settingsChanged=!0)},[(T(!0),x(Le,null,We(i.voice_languages,(f,b)=>(T(),x("option",{key:b,value:f},Y(b),9,$lt))),128))],544),[[Ot,r.xtts_current_language]])])])]),l("tr",null,[e[629]||(e[629]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),l("td",null,[l("div",Wlt,[k(l("select",{"onUpdate:modelValue":e[278]||(e[278]=f=>r.xtts_current_voice=f),onChange:e[279]||(e[279]=f=>i.settingsChanged=!0)},[(T(!0),x(Le,null,We(i.voices,f=>(T(),x("option",{key:f,value:f},Y(f),9,Klt))),128))],544),[[Ot,r.xtts_current_voice]])])])]),l("tr",null,[e[630]||(e[630]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_freq",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Frequency (controls the tone):")],-1)),l("td",null,[l("div",jlt,[k(l("input",{type:"number",id:"xtts_freq",required:"","onUpdate:modelValue":e[280]||(e[280]=f=>r.configFile.xtts_freq=f),onChange:e[281]||(e[281]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[ue,r.configFile.xtts_freq,void 0,{number:!0}]])])])]),l("tr",null,[e[631]||(e[631]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),l("td",null,[l("div",Qlt,[k(l("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[282]||(e[282]=f=>r.configFile.auto_read=f),onChange:e[283]||(e[283]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_read]])])])]),l("tr",null,[e[632]||(e[632]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_stream_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts stream chunk size:")],-1)),l("td",null,[l("div",Xlt,[k(l("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[284]||(e[284]=f=>r.configFile.xtts_stream_chunk_size=f),onChange:e[285]||(e[285]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.xtts_stream_chunk_size]])])])]),l("tr",null,[e[633]||(e[633]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_temperature",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Temperature:")],-1)),l("td",null,[l("div",Zlt,[k(l("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[286]||(e[286]=f=>r.configFile.xtts_temperature=f),onChange:e[287]||(e[287]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[ue,r.configFile.xtts_temperature,void 0,{number:!0}]])])])]),l("tr",null,[e[634]||(e[634]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_length_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Length Penalty:")],-1)),l("td",null,[l("div",Jlt,[k(l("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[288]||(e[288]=f=>r.configFile.xtts_length_penalty=f),onChange:e[289]||(e[289]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[ue,r.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),l("tr",null,[e[635]||(e[635]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_repetition_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Repetition Penalty:")],-1)),l("td",null,[l("div",ect,[k(l("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[290]||(e[290]=f=>r.configFile.xtts_repetition_penalty=f),onChange:e[291]||(e[291]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[ue,r.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),l("tr",null,[e[636]||(e[636]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_top_k",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top K:")],-1)),l("td",null,[l("div",tct,[k(l("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[292]||(e[292]=f=>r.configFile.xtts_top_k=f),onChange:e[293]||(e[293]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.xtts_top_k,void 0,{number:!0}]])])])]),l("tr",null,[e[637]||(e[637]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_top_p",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top P:")],-1)),l("td",null,[l("div",nct,[k(l("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[294]||(e[294]=f=>r.configFile.xtts_top_p=f),onChange:e[295]||(e[295]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.xtts_top_p,void 0,{number:!0}]])])])]),l("tr",null,[e[638]||(e[638]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_speed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Speed:")],-1)),l("td",null,[l("div",sct,[k(l("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[296]||(e[296]=f=>r.configFile.xtts_speed=f),onChange:e[297]||(e[297]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[ue,r.configFile.xtts_speed,void 0,{number:!0}]])])])]),l("tr",null,[e[639]||(e[639]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_text_splitting",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Text Splitting:")],-1)),l("td",null,[l("div",ict,[k(l("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[298]||(e[298]=f=>r.configFile.enable_text_splitting=f),onChange:e[299]||(e[299]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_text_splitting]])])])])])]),_:1}),z(a,{title:"Open AI TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",rct,[l("tr",null,[e[640]||(e[640]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key:")],-1)),l("td",null,[l("div",oct,[k(l("input",{type:"text",id:"openai_tts_key",required:"","onUpdate:modelValue":e[300]||(e[300]=f=>r.configFile.openai_tts_key=f),onChange:e[301]||(e[301]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.openai_tts_key]])])])]),l("tr",null,[e[642]||(e[642]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts model:")],-1)),l("td",null,[l("div",act,[k(l("select",{"onUpdate:modelValue":e[302]||(e[302]=f=>r.configFile.openai_tts_model=f),onChange:e[303]||(e[303]=f=>i.settingsChanged=!0)},e[641]||(e[641]=[l("option",null," tts-1 ",-1),l("option",null," tts-2 ",-1)]),544),[[Ot,r.configFile.openai_tts_model]])])])]),l("tr",null,[e[644]||(e[644]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts voice:")],-1)),l("td",null,[l("div",lct,[k(l("select",{"onUpdate:modelValue":e[304]||(e[304]=f=>r.configFile.openai_tts_voice=f),onChange:e[305]||(e[305]=f=>i.settingsChanged=!0)},e[643]||(e[643]=[l("option",null," alloy ",-1),l("option",null," echo ",-1),l("option",null," fable ",-1),l("option",null," nova ",-1),l("option",null," shimmer ",-1)]),544),[[Ot,r.configFile.openai_tts_voice]])])])])])]),_:1}),z(a,{title:"Eleven Labs TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",cct,[l("tr",null,[e[645]||(e[645]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs key:")],-1)),l("td",null,[l("div",dct,[k(l("input",{type:"text",id:"elevenlabs_tts_key",required:"","onUpdate:modelValue":e[306]||(e[306]=f=>r.configFile.elevenlabs_tts_key=f),onChange:e[307]||(e[307]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.elevenlabs_tts_key]])])])]),l("tr",null,[e[646]||(e[646]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_model_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs TTS model ID:")],-1)),l("td",null,[l("div",uct,[k(l("input",{type:"text",id:"elevenlabs_tts_model_id",required:"","onUpdate:modelValue":e[308]||(e[308]=f=>r.configFile.elevenlabs_tts_model_id=f),onChange:e[309]||(e[309]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.elevenlabs_tts_model_id]])])])]),l("tr",null,[e[647]||(e[647]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_stability",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Stability:")],-1)),l("td",null,[l("div",pct,[k(l("input",{type:"number",id:"elevenlabs_tts_voice_stability",required:"","onUpdate:modelValue":e[310]||(e[310]=f=>r.configFile.elevenlabs_tts_voice_stability=f),onChange:e[311]||(e[311]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[ue,r.configFile.elevenlabs_tts_voice_stability]])])])]),l("tr",null,[e[648]||(e[648]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Boost:")],-1)),l("td",null,[l("div",fct,[k(l("input",{type:"number",id:"elevenlabs_tts_voice_boost",required:"","onUpdate:modelValue":e[312]||(e[312]=f=>r.configFile.elevenlabs_tts_voice_boost=f),onChange:e[313]||(e[313]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[ue,r.configFile.elevenlabs_tts_voice_boost]])])])]),l("tr",null,[e[649]||(e[649]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice ID:")],-1)),l("td",null,[l("div",_ct,[k(l("select",{"onUpdate:modelValue":e[314]||(e[314]=f=>r.configFile.elevenlabs_tts_voice_id=f),onChange:e[315]||(e[315]=f=>i.settingsChanged=!0)},[(T(!0),x(Le,null,We(i.voices,f=>(T(),x("option",{key:f.voice_id,value:f.voice_id},Y(f.name),9,mct))),128))],544),[[Ot,r.configFile.elevenlabs_tts_voice_id]])])])])])]),_:1}),z(a,{title:"Fish TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",hct,[l("tr",null,[e[650]||(e[650]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"fish_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fish TTS key:")],-1)),l("td",null,[l("div",gct,[k(l("input",{type:"text",id:"fish_tts_key",required:"","onUpdate:modelValue":e[316]||(e[316]=f=>r.configFile.fish_tts_key=f),onChange:e[317]||(e[317]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.fish_tts_key]])])])]),l("tr",null,[e[651]||(e[651]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"fish_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fish TTS voice:")],-1)),l("td",null,[l("div",bct,[k(l("input",{type:"text",id:"fish_tts_voice",required:"","onUpdate:modelValue":e[318]||(e[318]=f=>r.configFile.fish_tts_voice=f),onChange:e[319]||(e[319]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.fish_tts_voice]])])])])])]),_:1})]),_:1}),z(a,{title:"TTI services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[z(a,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",yct,[l("tr",null,[e[653]||(e[653]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),l("td",null,[l("div",Ect,[k(l("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[320]||(e[320]=f=>r.configFile.enable_sd_service=f),onChange:e[321]||(e[321]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_sd_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[322]||(e[322]=f=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},e[652]||(e[652]=[l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),l("tr",null,[e[655]||(e[655]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),l("td",null,[l("div",vct,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[323]||(e[323]=(...f)=>r.reinstallSDService&&r.reinstallSDService(...f))},"install sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[324]||(e[324]=(...f)=>r.upgradeSDService&&r.upgradeSDService(...f))},"upgrade sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[325]||(e[325]=(...f)=>r.startSDService&&r.startSDService(...f))},"start sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[326]||(e[326]=(...f)=>r.showSD&&r.showSD(...f))},"show sd ui"),e[654]||(e[654]=l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/stable-diffusion-webui/blob/master/LICENSE.txt",target:"_blank"},"automatic1111's sd licence",-1))])]),l("td",null,[l("div",Sct,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[327]||(e[327]=(...f)=>r.reinstallSDService&&r.reinstallSDService(...f))},"install sd service")])])]),l("tr",null,[e[656]||(e[656]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),l("td",null,[l("div",Tct,[k(l("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[328]||(e[328]=f=>r.configFile.sd_base_url=f),onChange:e[329]||(e[329]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.sd_base_url]])])])])])]),_:1}),z(a,{title:"Diffusers service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",xct,[l("tr",null,[e[658]||(e[658]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_diffusers_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Diffusers service:")],-1)),l("td",null,[l("div",Cct,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[330]||(e[330]=(...f)=>r.reinstallDiffusersService&&r.reinstallDiffusersService(...f))},"install diffusers service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[331]||(e[331]=(...f)=>r.upgradeDiffusersService&&r.upgradeDiffusersService(...f))},"upgrade diffusers service"),e[657]||(e[657]=l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/huggingface/diffusers?tab=Apache-2.0-1-ov-file#readme",target:"_blank"},"Diffusers licence",-1))])])]),l("tr",null,[e[659]||(e[659]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"diffusers_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers model:")],-1)),l("td",null,[l("div",wct,[k(l("input",{type:"text",id:"diffusers_model",required:"","onUpdate:modelValue":e[332]||(e[332]=f=>r.configFile.diffusers_model=f),onChange:e[333]||(e[333]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.diffusers_model]])])]),e[660]||(e[660]=l("td",null,null,-1))])])]),_:1}),z(a,{title:"Diffusers client service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Rct,[l("tr",null,[e[661]||(e[661]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"diffusers_client_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers client base url:")],-1)),l("td",null,[l("div",Act,[k(l("input",{type:"text",id:"diffusers_client_base_url",required:"","onUpdate:modelValue":e[334]||(e[334]=f=>r.configFile.diffusers_client_base_url=f),onChange:e[335]||(e[335]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.diffusers_client_base_url]])])]),e[662]||(e[662]=l("td",null,null,-1))])])]),_:1}),z(a,{title:"Midjourney",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Mct,[l("tr",null,[e[663]||(e[663]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"midjourney key:")],-1)),l("td",null,[l("div",Nct,[k(l("input",{type:"text",id:"midjourney_key",required:"","onUpdate:modelValue":e[336]||(e[336]=f=>r.configFile.midjourney_key=f),onChange:e[337]||(e[337]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.midjourney_key]])])])]),l("tr",null,[e[664]||(e[664]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_timeout",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"request timeout(s):")],-1)),l("td",null,[l("div",Ict,[k(l("input",{type:"number",min:"10",max:"2048",id:"midjourney_timeout",required:"","onUpdate:modelValue":e[338]||(e[338]=f=>r.configFile.midjourney_timeout=f),onChange:e[339]||(e[339]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.midjourney_timeout]])])])]),l("tr",null,[e[665]||(e[665]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_retries",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"number of retries:")],-1)),l("td",null,[l("div",Oct,[k(l("input",{type:"number",min:"0",max:"2048",id:"midjourney_retries",required:"","onUpdate:modelValue":e[340]||(e[340]=f=>r.configFile.midjourney_retries=f),onChange:e[341]||(e[341]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.midjourney_retries]])])])])])]),_:1}),z(a,{title:"Dall-E",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",kct,[l("tr",null,[e[666]||(e[666]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"dall_e_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e key:")],-1)),l("td",null,[l("div",Dct,[k(l("input",{type:"text",id:"dall_e_key",required:"","onUpdate:modelValue":e[342]||(e[342]=f=>r.configFile.dall_e_key=f),onChange:e[343]||(e[343]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.dall_e_key]])])])]),l("tr",null,[e[668]||(e[668]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"dall_e_generation_engine",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e generation engine:")],-1)),l("td",null,[l("div",Lct,[k(l("select",{"onUpdate:modelValue":e[344]||(e[344]=f=>r.configFile.dall_e_generation_engine=f),onChange:e[345]||(e[345]=f=>i.settingsChanged=!0)},e[667]||(e[667]=[l("option",null," dall-e-2 ",-1),l("option",null," dall-e-3 ",-1)]),544),[[Ot,r.configFile.dall_e_generation_engine]])])])])])]),_:1}),z(a,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Pct,[l("tr",null,[e[670]||(e[670]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),l("td",null,[l("div",Fct,[k(l("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[346]||(e[346]=f=>r.configFile.enable_comfyui_service=f),onChange:e[347]||(e[347]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_comfyui_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[348]||(e[348]=f=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},e[669]||(e[669]=[l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),l("tr",null,[e[671]||(e[671]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Available models (only if local):")],-1)),l("td",null,[l("div",Uct,[k(l("select",{id:"comfyui_model",required:"","onUpdate:modelValue":e[349]||(e[349]=f=>r.configFile.comfyui_model=f),onChange:e[350]||(e[350]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(i.comfyui_models,(f,b)=>(T(),x("option",{key:f,value:f},Y(f),9,Bct))),128))],544),[[Ot,r.configFile.comfyui_model]])])])]),l("tr",null,[e[673]||(e[673]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui model:")],-1)),l("td",null,[l("div",Gct,[k(l("input",{type:"text",id:"comfyui_model",required:"","onUpdate:modelValue":e[351]||(e[351]=f=>r.configFile.comfyui_model=f),onChange:e[352]||(e[352]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.comfyui_model]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[353]||(e[353]=f=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},e[672]||(e[672]=[l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),l("tr",null,[e[675]||(e[675]=l("td",{style:{"min-width":"200px"}},null,-1)),l("td",null,[l("div",Vct,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[354]||(e[354]=(...f)=>r.reinstallComfyUIService&&r.reinstallComfyUIService(...f))},"install comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[355]||(e[355]=(...f)=>r.upgradeComfyUIService&&r.upgradeComfyUIService(...f))},"upgrade comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[356]||(e[356]=(...f)=>r.startComfyUIService&&r.startComfyUIService(...f))},"start comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[357]||(e[357]=(...f)=>r.showComfyui&&r.showComfyui(...f))},"show comfyui"),e[674]||(e[674]=l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/ComfyUI/blob/master/LICENSE",target:"_blank"},"comfyui licence",-1))])])]),l("tr",null,[e[676]||(e[676]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),l("td",null,[l("div",zct,[k(l("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[358]||(e[358]=f=>r.configFile.comfyui_base_url=f),onChange:e[359]||(e[359]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.comfyui_base_url]])])])])])]),_:1})]),_:1}),z(a,{title:"TTT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[z(a,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Hct,[l("tr",null,[e[678]||(e[678]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),l("td",null,[l("div",qct,[k(l("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[360]||(e[360]=f=>r.configFile.enable_ollama_service=f),onChange:e[361]||(e[361]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_ollama_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[362]||(e[362]=f=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding. +`,"
")}},rendered_models_zoo:{get(){return this.searchModel?this.show_only_installed_models?this.modelsFiltered.filter(n=>n.isInstalled===!0):this.modelsFiltered.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)):(console.log("this.models_zoo"),console.log(this.models_zoo),console.log(this.models_zoo_initialLoadCount),this.show_only_installed_models?this.models_zoo.filter(n=>n.isInstalled===!0):this.models_zoo.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)))}},imgBinding:{get(){if(!this.isMounted)return Wn;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(n=>n.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Wn}}},imgModel:{get(){try{let n=this.$store.state.modelsZoo.findIndex(e=>e.name==this.$store.state.selectedModel);return n>=0?(console.log(`model avatar : ${this.$store.state.modelsZoo[n].icon}`),this.$store.state.modelsZoo[n].icon):Wn}catch{console.log("error")}if(!this.isMounted)return Wn;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(n=>n.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return Wn}}},isReady:{get(){return this.$store.state.ready}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(n){this.$store.state.config.audio_out_voice=n}},openaiWhisperModels(){return["whisper-1"]},whisperModels(){return["tiny.en","tiny","base.en","base","small.en","small","medium.en","medium","large-v1","large-v2","large-v3","large"]},audioLanguages(){return[{code:"en-US",name:"English (US)"},{code:"en-GB",name:"English (UK)"},{code:"es-ES",name:"Spanish (Spain)"},{code:"es-MX",name:"Spanish (Mexico)"},{code:"fr-FR",name:"French (France)"},{code:"fr-CA",name:"French (Canada)"},{code:"de-DE",name:"German (Germany)"},{code:"it-IT",name:"Italian (Italy)"},{code:"pt-BR",name:"Portuguese (Brazil)"},{code:"pt-PT",name:"Portuguese (Portugal)"},{code:"ru-RU",name:"Russian (Russia)"},{code:"zh-CN",name:"Chinese (China)"},{code:"ja-JP",name:"Japanese (Japan)"},{code:"ar-SA",name:"Arabic (Saudi Arabia)"},{code:"tr-TR",name:"Turkish (Turkey)"},{code:"ms-MY",name:"Malay (Malaysia)"},{code:"ko-KR",name:"Korean (South Korea)"},{code:"nl-NL",name:"Dutch (Netherlands)"},{code:"sv-SE",name:"Swedish (Sweden)"},{code:"da-DK",name:"Danish (Denmark)"},{code:"fi-FI",name:"Finnish (Finland)"},{code:"no-NO",name:"Norwegian (Norway)"},{code:"pl-PL",name:"Polish (Poland)"},{code:"el-GR",name:"Greek (Greece)"},{code:"hu-HU",name:"Hungarian (Hungary)"},{code:"cs-CZ",name:"Czech (Czech Republic)"},{code:"th-TH",name:"Thai (Thailand)"},{code:"hi-IN",name:"Hindi (India)"},{code:"he-IL",name:"Hebrew (Israel)"},{code:"id-ID",name:"Indonesian (Indonesia)"},{code:"vi-VN",name:"Vietnamese (Vietnam)"},{code:"uk-UA",name:"Ukrainian (Ukraine)"},{code:"ro-RO",name:"Romanian (Romania)"},{code:"bg-BG",name:"Bulgarian (Bulgaria)"},{code:"hr-HR",name:"Croatian (Croatia)"},{code:"sr-RS",name:"Serbian (Serbia)"},{code:"sk-SK",name:"Slovak (Slovakia)"},{code:"sl-SI",name:"Slovenian (Slovenia)"},{code:"et-EE",name:"Estonian (Estonia)"},{code:"lv-LV",name:"Latvian (Latvia)"},{code:"lt-LT",name:"Lithuanian (Lithuania)"},{code:"ka-GE",name:"Georgian (Georgia)"},{code:"hy-AM",name:"Armenian (Armenia)"},{code:"az-AZ",name:"Azerbaijani (Azerbaijan)"},{code:"kk-KZ",name:"Kazakh (Kazakhstan)"},{code:"uz-UZ",name:"Uzbek (Uzbekistan)"},{code:"kkj-CM",name:"Kako (Cameroon)"},{code:"my-MM",name:"Burmese (Myanmar)"},{code:"ne-NP",name:"Nepali (Nepal)"},{code:"si-LK",name:"Sinhala (Sri Lanka)"}]},configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},userName:{get(){return this.$store.state.config.user_name},set(n){this.$store.state.config.user_name=n}},user_avatar:{get(){return this.$store.state.config.user_avatar!=""?"/user_infos/"+this.$store.state.config.user_avatar:Gs},set(n){this.$store.state.config.user_avatar=n}},hardware_mode:{get(){return this.$store.state.config.hardware_mode},set(n){this.$store.state.config.hardware_mode=n}},auto_update:{get(){return this.$store.state.config.auto_update},set(n){this.$store.state.config.auto_update=n}},auto_speak:{get(){return this.$store.state.config.auto_speak},set(n){this.$store.state.config.auto_speak=n}},auto_read:{get(){return this.$store.state.config.auto_read},set(n){this.$store.state.config.auto_read=n}},xtts_current_language:{get(){return this.$store.state.config.xtts_current_language},set(n){console.log("Current xtts voice set to ",n),this.$store.state.config.xtts_current_language=n}},xtts_current_voice:{get(){return this.$store.state.config.xtts_current_voice===null||this.$store.state.config.xtts_current_voice===void 0?(console.log("current voice",this.$store.state.config.xtts_current_voice),"main_voice"):this.$store.state.config.xtts_current_voice},set(n){n=="main_voice"||n===void 0?(console.log("Current voice set to None"),this.$store.state.config.xtts_current_voice=null):(console.log("Current voice set to ",n),this.$store.state.config.xtts_current_voice=n)}},audio_pitch:{get(){return this.$store.state.config.audio_pitch},set(n){this.$store.state.config.audio_pitch=n}},audio_in_language:{get(){return this.$store.state.config.audio_in_language},set(n){this.$store.state.config.audio_in_language=n}},use_user_name_in_discussions:{get(){return this.$store.state.config.use_user_name_in_discussions},set(n){this.$store.state.config.use_user_name_in_discussions=n}},discussion_db_name:{get(){return this.$store.state.config.discussion_db_name},set(n){this.$store.state.config.discussion_db_name=n}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}},bindingsZoo:{get(){return this.$store.state.bindingsZoo},set(n){this.$store.commit("setbindingsZoo",n)}},modelsArr:{get(){return this.$store.state.modelsArr},set(n){this.$store.commit("setModelsArr",n)}},models:{get(){return this.models_zoo},set(n){this.$store.commit("setModelsZoo",n)}},installed_models:{get(){return this.models_zoo},set(n){this.$store.commit("setModelsZoo",n)}},diskUsage:{get(){return this.$store.state.diskUsage},set(n){this.$store.commit("setDiskUsage",n)}},ramUsage:{get(){return this.$store.state.ramUsage},set(n){this.$store.commit("setRamUsage",n)}},vramUsage:{get(){return this.$store.state.vramUsage},set(n){this.$store.commit("setVramUsage",n)}},disk_available_space(){return this.computedFileSize(this.diskUsage.available_space)},disk_binding_models_usage(){return console.log(`this.diskUsage : ${this.diskUsage}`),this.computedFileSize(this.diskUsage.binding_models_usage)},disk_percent_usage(){return this.diskUsage.percent_usage},disk_total_space(){return this.computedFileSize(this.diskUsage.total_space)},ram_available_space(){return this.computedFileSize(this.ramUsage.available_space)},ram_usage(){return this.computedFileSize(this.ramUsage.ram_usage)},ram_percent_usage(){return this.ramUsage.percent_usage},ram_total_space(){return this.computedFileSize(this.ramUsage.total_space)},model_name(){if(this.isMounted)return this.configFile.model_name},binding_name(){if(!this.isMounted)return null;const n=this.bindingsZoo.findIndex(e=>e.folder===this.configFile.binding_name);return n>-1?this.bindingsZoo[n].name:null},active_pesonality(){if(!this.isMounted)return null;const n=this.$store.state.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);return n>-1?this.$store.state.personalities[n].name:null},speed_computed(){return ii(this.addModel.speed)},total_size_computed(){return ii(this.addModel.total_size)},downloaded_size_computed(){return ii(this.addModel.downloaded_size)}},watch:{bec_collapsed(){Ue(()=>{Ge.replace()})},pc_collapsed(){Ue(()=>{Ge.replace()})},mc_collapsed(){Ue(()=>{Ge.replace()})},sc_collapsed(){Ue(()=>{Ge.replace()})},showConfirmation(){Ue(()=>{Ge.replace()})},mzl_collapsed(){Ue(()=>{Ge.replace()})},pzl_collapsed(){Ue(()=>{Ge.replace()})},ezl_collapsed(){Ue(()=>{Ge.replace()})},bzl_collapsed(){Ue(()=>{Ge.replace()})},all_collapsed(n){this.collapseAll(n),Ue(()=>{Ge.replace()})},settingsChanged(n){this.$store.state.settingsChanged=n,Ue(()=>{Ge.replace()})},isLoading(){Ue(()=>{Ge.replace()})},searchPersonality(n){n==""&&this.filterPersonalities()},mzdc_collapsed(){Ue(()=>{Ge.replace()})}},async beforeRouteLeave(n){await this.$router.isReady()}},urt={class:"container pt-12 flex flex-row shadow-lg p-10 pt-0 overflow-y-scroll w-full background-color scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},prt={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg panels-color shadow-lg"},frt={key:0,class:"flex gap-3 flex-1 items-center duration-75"},_rt={key:1,class:"flex gap-3 flex-1 items-center"},mrt={class:"flex gap-3 flex-1 items-center justify-end"},hrt={class:"flex gap-3 items-center"},grt={key:0,class:"flex gap-3 items-center"},brt={key:1,role:"status"},yrt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Ert={class:"flex flex-row p-3"},vrt={class:"text-base font-semibold cursor-pointer select-none items-center"},Srt={class:"flex gap-2 items-center"},Trt={key:0},xrt=["src"],Crt={class:"font-bold font-large text-lg"},wrt={key:1},Rrt={class:"flex gap-2 items-center"},Art=["src"],Mrt={class:"font-bold font-large text-lg"},Nrt={class:"font-bold font-large text-lg"},Irt={class:"font-bold font-large text-lg"},Ort={class:"mb-2"},krt={class:"flex flex-col mx-2"},Drt={class:"p-2"},Lrt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Prt={class:"mb-2"},Frt={class:"flex flex-col mx-2"},Urt={class:"p-2"},Brt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Grt={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Vrt=["src"],zrt={class:"flex flex-col mx-2"},Hrt={class:"p-2"},qrt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Yrt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},$rt={class:"flex flex-row p-3"},Wrt={class:"flex flex-col mb-2 px-3 pb-2"},Krt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},jrt={class:"flex flex-col space-y-4"},Qrt={class:"flex items-center"},Xrt={class:"flex items-center"},Zrt={class:"flex items-center"},Jrt={class:"flex items-start"},eot={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},tot={class:"flex flex-row p-3"},not={class:"flex flex-col mb-2 px-3 pb-2"},sot={class:"expand-to-fit bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},iot={for:"logo-upload"},rot=["src"],oot={style:{width:"10%"}},aot={class:"text-center items-center"},lot={class:"flex flex-row"},cot={style:{width:"100%"}},dot={class:"flex flex-row"},uot={class:"flex flex-row"},pot={class:"flex flex-row"},fot={class:"flex flex-row"},_ot={class:"flex flex-row"},mot={class:"flex flex-row"},hot={class:"flex flex-row"},got={class:"flex flex-row"},bot={class:"flex flex-row"},yot={class:"flex flex-row"},Eot={class:"flex flex-row"},vot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Sot=["innerHTML"],Tot={style:{width:"100%"}},xot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Cot={style:{width:"100%"}},wot={style:{width:"100%"}},Rot={style:{width:"100%"}},Aot={style:{width:"100%"}},Mot={for:"avatar-upload"},Not=["src"],Iot={style:{width:"10%"}},Oot={class:"flex flex-row"},kot={style:{width:"100%"}},Dot={style:{width:"100%"}},Lot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Pot={style:{width:"100%"}},Fot={style:{width:"100%"}},Uot={style:{width:"100%"}},Bot={style:{width:"100%"}},Got={style:{width:"100%"}},Vot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},zot={class:"flex flex-row"},Hot={style:{width:"100%"}},qot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Yot={class:"flex flex-row"},$ot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Wot={class:"flex flex-row"},Kot={class:"flex flex-row"},jot={class:"flex flex-row"},Qot={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Xot={class:"flex flex-row p-3"},Zot={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Jot={style:{width:"100%"}},eat=["onUpdate:modelValue"],tat=["onClick"],nat=["onClick"],sat=["onClick"],iat=["disabled"],rat={key:0,value:"BAAI/bge-m3"},oat={key:1,value:"nvidia/NV-Embed-v2"},aat={key:2,value:"sentence-transformers/all-MiniLM-L6-v2"},lat={key:3,value:"sentence-transformers/all-MiniLM-L12-v2"},cat={key:4,value:"sentence-transformers/all-distilroberta-v1"},dat={key:5,value:"sentence-transformers/all-mpnet-base-v2"},uat={key:6,value:"text-embedding-ada-002"},pat={key:7,value:"text-embedding-babbage-001"},fat={key:8,value:"text-embedding-curie-001"},_at={key:9,value:"text-embedding-davinci-001"},mat={key:10,value:"bge-m3"},hat={key:11,value:"NV-Embed-v2"},gat={key:12,value:"nomic-embed-text"},bat={key:13,value:"mxbai-embed-large"},yat={key:14,value:"mxbai-embed-large"},Eat={key:15,value:"snowflake-arctic-embed"},vat={key:16,value:"snowflake-arctic-embed"},Sat={key:17,value:"all-minilm"},Tat={key:18,value:"bge-large"},xat={key:19,disabled:""},Cat={class:"flex flex-row"},wat={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Rat={class:"flex flex-row"},Aat={class:"flex flex-row"},Mat={class:"flex flex-row"},Nat={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Iat={class:"flex flex-row p-3"},Oat={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},kat={class:"flex flex-row"},Dat={class:"flex flex-row"},Lat={class:"flex flex-row"},Pat={class:"flex flex-row"},Fat={class:"flex flex-col"},Uat={class:"flex flex-col"},Bat={class:"flex flex-col"},Gat={class:"flex flex-col"},Vat={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},zat={class:"flex flex-row p-3"},Hat={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},qat={style:{width:"100%"}},Yat={style:{width:"100%"}},$at={style:{width:"100%"}},Wat={style:{width:"100%"}},Kat={style:{width:"100%"}},jat={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Qat={class:"flex flex-row"},Xat={class:"flex flex-row"},Zat={class:"flex flex-row"},Jat={class:"flex flex-row"},elt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},tlt={style:{width:"100%"}},nlt={style:{width:"100%"}},slt={style:{width:"100%"}},ilt={style:{width:"100%"}},rlt={style:{width:"100%"}},olt={style:{width:"100%"}},alt={style:{width:"100%"}},llt={class:"flex flex-row"},clt={class:"flex flex-row"},dlt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},ult={style:{width:"100%"}},plt=["value"],flt={style:{width:"100%"}},_lt=["value"],mlt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},hlt={style:{width:"100%"}},glt={style:{width:"100%"}},blt={style:{width:"100%"}},ylt={style:{width:"100%"}},Elt={style:{width:"100%"}},vlt={style:{width:"100%"}},Slt={style:{width:"100%"}},Tlt={style:{width:"100%"}},xlt={style:{width:"100%"}},Clt={style:{width:"100%"}},wlt={style:{width:"100%"}},Rlt={style:{width:"100%"}},Alt={style:{width:"100%"}},Mlt={style:{width:"100%"}},Nlt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Ilt={class:"flex flex-row"},Olt={class:"flex flex-row"},klt=["value"],Dlt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Llt={class:"flex flex-row"},Plt={class:"flex flex-row"},Flt=["value"],Ult={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Blt={class:"flex flex-row"},Glt={class:"flex flex-row"},Vlt=["value"],zlt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Hlt={class:"flex flex-row"},qlt=["value"],Ylt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},$lt={class:"flex flex-row"},Wlt=["value"],Klt={class:"flex flex-row"},jlt=["value"],Qlt={class:"flex flex-row"},Xlt={class:"flex flex-row"},Zlt={class:"flex flex-row"},Jlt={class:"flex flex-row"},ect={class:"flex flex-row"},tct={class:"flex flex-row"},nct={class:"flex flex-row"},sct={class:"flex flex-row"},ict={class:"flex flex-row"},rct={class:"flex flex-row"},oct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},act={class:"flex flex-row"},lct={class:"flex flex-row"},cct={class:"flex flex-row"},dct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},uct={class:"flex flex-row"},pct={class:"flex flex-row"},fct={class:"flex flex-row"},_ct={class:"flex flex-row"},mct={class:"flex flex-row"},hct=["value"],gct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},bct={class:"flex flex-row"},yct={class:"flex flex-row"},Ect={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},vct={class:"flex flex-row"},Sct={class:"flex flex-row"},Tct={class:"flex flex-row"},xct={class:"flex flex-row"},Cct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},wct={class:"flex flex-row"},Rct={class:"flex flex-row"},Act={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Mct={class:"flex flex-row"},Nct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Ict={class:"flex flex-row"},Oct={class:"flex flex-row"},kct={class:"flex flex-row"},Dct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Lct={class:"flex flex-row"},Pct={class:"flex flex-row"},Fct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Uct={class:"flex flex-row"},Bct={class:"flex flex-row"},Gct=["value"],Vct={class:"flex flex-row"},zct={class:"flex flex-row"},Hct={class:"flex flex-row"},qct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},Yct={class:"flex flex-row"},$ct={class:"flex flex-row"},Wct={class:"flex flex-row"},Kct={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},jct={class:"flex flex-row"},Qct={class:"flex flex-row"},Xct={class:"flex flex-row"},Zct={class:"flex flex-col align-bottom"},Jct={class:"relative"},edt={class:"absolute right-0"},tdt={class:"flex flex-row"},ndt={class:"flex flex-row"},sdt={class:"flex flex-row"},idt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},rdt={class:"flex flex-row"},odt={class:"flex flex-row"},adt={class:"flex flex-row"},ldt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},cdt={class:"flex flex-row"},ddt={class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},udt={class:"flex flex-row"},pdt={class:"flex flex-row"},fdt={class:"flex flex-row"},_dt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},mdt={class:"flex flex-row p-3"},hdt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},gdt={key:1,class:"mr-2"},bdt={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},ydt={class:"flex gap-1 items-center"},Edt=["src"],vdt={class:"font-bold font-large text-lg line-clamp-1"},Sdt={key:0,class:"mb-2"},Tdt={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},xdt={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Cdt={class:"flex flex-row p-3"},wdt={class:"flex flex-row items-center"},Rdt={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Adt={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Mdt={key:2,class:"mr-2"},Ndt={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},Idt={class:"flex gap-1 items-center"},Odt=["src"],kdt={class:"font-bold font-large text-lg line-clamp-1"},Ddt={class:"mx-2 mb-4"},Ldt={class:"relative"},Pdt={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Fdt={key:0},Udt={key:1},Bdt={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},Gdt={key:1,class:"mb-2"},Vdt={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},zdt={class:"mb-2"},Hdt={class:"p-2"},qdt={class:"mb-3"},Ydt={key:0},$dt={class:"mb-3"},Wdt={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},Kdt={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},jdt={class:"w-full p-2"},Qdt={class:"flex justify-between mb-1"},Xdt={class:"text-sm font-medium text-blue-700 dark:text-white"},Zdt=["title"],Jdt={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},eut={class:"flex justify-between mb-1"},tut={class:"text-base font-medium text-blue-700 dark:text-white"},nut={class:"text-sm font-medium text-blue-700 dark:text-white"},sut={class:"flex flex-grow"},iut={class:"flex flex-row flex-grow gap-3"},rut={class:"p-2 text-center grow"},out={class:"flex flex-col mb-2 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},aut={class:"flex flex-row p-3 items-center"},lut={key:0,class:"mr-2"},cut={class:"mr-2 font-bold font-large text-lg line-clamp-1"},dut={key:1,class:"mr-2"},uut={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},put={key:0,class:"flex -space-x-4 items-center"},fut={class:"group items-center flex flex-row"},_ut=["onClick"],mut=["src","title"],hut=["onClick"],gut={class:"mx-2 mb-4"},but={class:"relative"},yut={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Eut={key:0},vut={key:1},Sut={key:0,class:"mx-2 mb-4"},Tut={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},xut=["selected"],Cut={key:0,class:"mb-2"},wut={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Rut={class:"flex flex-col mb-2 p-3 rounded-lg panels-color hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},Aut={class:"flex flex-row"},Mut={class:"m-2"},Nut={class:"flex flex-row gap-2 items-center"},Iut={class:"m-2"},Out={class:"m-2"},kut={class:"flex flex-col align-bottom"},Dut={class:"relative"},Lut={class:"absolute right-0"},Put={class:"m-2"},Fut={class:"flex flex-col align-bottom"},Uut={class:"relative"},But={class:"absolute right-0"},Gut={class:"m-2"},Vut={class:"flex flex-col align-bottom"},zut={class:"relative"},Hut={class:"absolute right-0"},qut={class:"m-2"},Yut={class:"flex flex-col align-bottom"},$ut={class:"relative"},Wut={class:"absolute right-0"},Kut={class:"m-2"},jut={class:"flex flex-col align-bottom"},Qut={class:"relative"},Xut={class:"absolute right-0"},Zut={class:"m-2"},Jut={class:"flex flex-col align-bottom"},ept={class:"relative"},tpt={class:"absolute right-0"};function npt(n,e,t,s,i,r){const o=Je("DictManager"),a=Je("Card"),c=Je("StringListManager"),d=Je("BindingEntry"),u=Je("RadioOptions"),_=Je("model-entry"),m=Je("personality-entry"),h=Je("AddModelDialog"),g=Je("ChoiceDialog");return T(),x(Le,null,[l("div",urt,[l("div",prt,[i.showConfirmation?(T(),x("div",frt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=$(f=>i.showConfirmation=!1,["stop"]))},e[451]||(e[451]=[l("i",{"data-feather":"x"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=$(f=>r.save_configuration(),["stop"]))},e[452]||(e[452]=[l("i",{"data-feather":"check"},null,-1)]))])):B("",!0),i.showConfirmation?B("",!0):(T(),x("div",_rt,[l("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=f=>r.reset_configuration())},e[453]||(e[453]=[l("i",{"data-feather":"refresh-ccw"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[3]||(e[3]=$(f=>i.all_collapsed=!i.all_collapsed,["stop"]))},e[454]||(e[454]=[l("i",{"data-feather":"list"},null,-1)]))])),l("div",mrt,[l("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[4]||(e[4]=f=>r.api_get_req("clear_uploads").then(b=>{b.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},e[455]||(e[455]=[l("i",{"data-feather":"trash-2"},null,-1)])),l("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=f=>r.api_post_req("restart_program").then(b=>{b.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},e[456]||(e[456]=[l("i",{"data-feather":"refresh-ccw"},null,-1)])),i.has_updates?(T(),x("button",{key:0,title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=f=>r.api_post_req("update_software").then(b=>{b.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},e[457]||(e[457]=[l("i",{"data-feather":"arrow-up-circle"},null,-1),l("i",{"data-feather":"alert-circle"},null,-1)]))):B("",!0),l("div",hrt,[i.settingsChanged?(T(),x("div",grt,[i.isLoading?B("",!0):(T(),x("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[7]||(e[7]=$(f=>r.applyConfiguration(),["stop"]))},e[458]||(e[458]=[l("div",{class:"flex flex-row"},[l("p",{class:"text-green-600 font-bold hover:text-green-300 ml-4 pl-4 mr-4 pr-4"},"Apply changes:"),l("i",{"data-feather":"check"})],-1)]))),i.isLoading?B("",!0):(T(),x("button",{key:1,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Cancel changes",type:"button",onClick:e[8]||(e[8]=$(f=>r.cancelConfiguration(),["stop"]))},e[459]||(e[459]=[l("div",{class:"flex flex-row"},[l("p",{class:"text-red-600 font-bold hover:text-red-300 ml-4 pl-4 mr-4 pr-4"},"Cancel changes:"),l("i",{"data-feather":"x"})],-1)])))])):B("",!0),i.isLoading?(T(),x("div",brt,[l("p",null,Y(i.loading_text),1),e[460]||(e[460]=l("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),e[461]||(e[461]=l("span",{class:"sr-only"},"Loading...",-1))])):B("",!0)])])]),l("div",{class:Pe(i.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[l("div",yrt,[l("div",Ert,[l("button",{onClick:e[9]||(e[9]=$(f=>i.sc_collapsed=!i.sc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[462]||(e[462]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.sc_collapsed]]),k(l("div",null,e[463]||(e[463]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.sc_collapsed]]),e[466]||(e[466]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),e[467]||(e[467]=l("div",{class:"mr-2"},"|",-1)),l("div",vrt,[l("div",Srt,[l("div",null,[r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length==1?(T(),x("div",Trt,[(T(!0),x(Le,null,We(r.vramUsage.gpus,f=>(T(),x("div",{class:"flex gap-2 items-center",key:f},[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,xrt),l("p",Crt,[l("div",null,Y(r.computedFileSize(f.used_vram))+" / "+Y(r.computedFileSize(f.total_vram))+" ("+Y(f.percentage)+"%) ",1)])]))),128))])):B("",!0),r.vramUsage&&r.vramUsage.gpus&&r.vramUsage.gpus.length>1?(T(),x("div",wrt,[l("div",Rrt,[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Art),l("p",Mrt,[l("div",null,Y(r.vramUsage.gpus.length)+"x ",1)])])])):B("",!0)]),e[464]||(e[464]=l("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),l("p",Nrt,[l("div",null,Y(r.ram_usage)+" / "+Y(r.ram_total_space)+" ("+Y(r.ram_percent_usage)+"%)",1)]),e[465]||(e[465]=l("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),l("p",Irt,[l("div",null,Y(r.disk_binding_models_usage)+" / "+Y(r.disk_total_space)+" ("+Y(r.disk_percent_usage)+"%)",1)])])])])]),l("div",{class:Pe([{hidden:i.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",Ort,[e[470]||(e[470]=l("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[l("path",{fill:"currentColor",d:"M17 17H7V7h10m4 4V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9v2H7c-1.11 0-2 .89-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2m-6 2h-2v-2h2m2-2H9v6h6V9Z"})]),Ze(" CPU Ram usage: ")],-1)),l("div",krt,[l("div",null,[e[468]||(e[468]=l("b",null,"Avaliable ram: ",-1)),Ze(Y(r.ram_available_space),1)]),l("div",null,[e[469]||(e[469]=l("b",null,"Ram usage: ",-1)),Ze(" "+Y(r.ram_usage)+" / "+Y(r.ram_total_space)+" ("+Y(r.ram_percent_usage)+")% ",1)])]),l("div",Drt,[l("div",Lrt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Vt("width: "+r.ram_percent_usage+"%;")},null,4)])])]),l("div",Prt,[e[473]||(e[473]=l("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[l("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),Ze(" Disk usage: ")],-1)),l("div",Frt,[l("div",null,[e[471]||(e[471]=l("b",null,"Avaliable disk space: ",-1)),Ze(Y(r.disk_available_space),1)]),l("div",null,[e[472]||(e[472]=l("b",null,"Disk usage: ",-1)),Ze(" "+Y(r.disk_binding_models_usage)+" / "+Y(r.disk_total_space)+" ("+Y(r.disk_percent_usage)+"%)",1)])]),l("div",Urt,[l("div",Brt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Vt("width: "+r.disk_percent_usage+"%;")},null,4)])])]),(T(!0),x(Le,null,We(r.vramUsage.gpus,f=>(T(),x("div",{class:"mb-2",key:f},[l("label",Grt,[l("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Vrt),e[474]||(e[474]=Ze(" GPU usage: "))]),l("div",zrt,[l("div",null,[e[475]||(e[475]=l("b",null,"Model: ",-1)),Ze(Y(f.gpu_model),1)]),l("div",null,[e[476]||(e[476]=l("b",null,"Avaliable vram: ",-1)),Ze(Y(this.computedFileSize(f.available_space)),1)]),l("div",null,[e[477]||(e[477]=l("b",null,"GPU usage: ",-1)),Ze(" "+Y(this.computedFileSize(f.used_vram))+" / "+Y(this.computedFileSize(f.total_vram))+" ("+Y(f.percentage)+"%)",1)])]),l("div",Hrt,[l("div",qrt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Vt("width: "+f.percentage+"%;")},null,4)])])]))),128))],2)]),l("div",Yrt,[l("div",$rt,[l("button",{onClick:e[10]||(e[10]=$(f=>i.smartrouterconf_collapsed=!i.smartrouterconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[478]||(e[478]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.smartrouterconf_collapsed]]),k(l("div",null,e[479]||(e[479]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.smartrouterconf_collapsed]]),e[480]||(e[480]=l("div",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Smart routing configurations",-1))])]),l("div",{class:Pe([{hidden:i.smartrouterconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",Wrt,[z(a,{title:"Smart Routing Settings",is_shrunk:!1,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("div",Krt,[l("div",jrt,[l("div",Qrt,[e[481]||(e[481]=l("label",{for:"use_smart_routing",class:"text-sm font-bold w-64"},"Use Smart Routing:",-1)),k(l("input",{type:"checkbox",id:"use_smart_routing","onUpdate:modelValue":e[11]||(e[11]=f=>r.configFile.use_smart_routing=f),onChange:e[12]||(e[12]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_smart_routing]])]),l("div",Xrt,[e[482]||(e[482]=l("label",{for:"restore_model_after_smart_routing",class:"text-sm font-bold w-64"},"Restore model after smart routing:",-1)),k(l("input",{type:"checkbox",id:"restore_model_after_smart_routing","onUpdate:modelValue":e[13]||(e[13]=f=>r.configFile.restore_model_after_smart_routing=f),onChange:e[14]||(e[14]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.restore_model_after_smart_routing]])]),l("div",Zrt,[e[483]||(e[483]=l("label",{for:"smart_routing_router_model",class:"text-sm font-bold w-64"},"Router Model:",-1)),k(l("input",{type:"text",id:"smart_routing_router_model","onUpdate:modelValue":e[15]||(e[15]=f=>r.configFile.smart_routing_router_model=f),onChange:e[16]||(e[16]=f=>i.settingsChanged=!0),class:"flex-grow mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.smart_routing_router_model]])]),l("div",Jrt,[e[484]||(e[484]=l("label",{for:"smart_routing_models_description",class:"text-sm font-bold w-64 mt-1"},"Models with description:",-1)),z(o,{modelValue:r.configFile.smart_routing_models_description,"onUpdate:modelValue":e[17]||(e[17]=f=>r.configFile.smart_routing_models_description=f),onChange:e[18]||(e[18]=f=>i.settingsChanged=!0),"key-name":"Model Path","value-name":"Model description",placeholder:"Enter model name",class:"flex-grow"},null,8,["modelValue"])])])])]),_:1})])],2)]),l("div",eot,[l("div",tot,[l("button",{onClick:e[19]||(e[19]=$(f=>i.mainconf_collapsed=!i.mainconf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[485]||(e[485]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.mainconf_collapsed]]),k(l("div",null,e[486]||(e[486]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.mainconf_collapsed]]),e[487]||(e[487]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1))])]),l("div",{class:Pe([{hidden:i.mainconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",not,[z(a,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",sot,[l("tr",null,[e[489]||(e[489]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"app_custom_logo",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Application logo:")],-1)),l("td",null,[l("label",iot,[l("img",{src:r.configFile.app_custom_logo!=null&&r.configFile.app_custom_logo!=""?"/user_infos/"+r.configFile.app_custom_logo:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,rot)]),l("input",{type:"file",id:"logo-upload",style:{display:"none"},onChange:e[20]||(e[20]=(...f)=>r.uploadLogo&&r.uploadLogo(...f))},null,32)]),l("td",oot,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[21]||(e[21]=$(f=>r.resetLogo(),["stop"]))},e[488]||(e[488]=[l("i",{"data-feather":"x"},null,-1)]))])]),l("tr",null,[e[491]||(e[491]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"hardware_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Hardware mode:")],-1)),l("td",aot,[l("div",lot,[k(l("select",{id:"hardware_mode",required:"","onUpdate:modelValue":e[22]||(e[22]=f=>r.configFile.hardware_mode=f),onChange:e[23]||(e[23]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[490]||(e[490]=[l("option",{value:"cpu"},"CPU",-1),l("option",{value:"cpu-noavx"},"CPU (No AVX)",-1),l("option",{value:"nvidia-tensorcores"},"NVIDIA (Tensor Cores)",-1),l("option",{value:"nvidia"},"NVIDIA",-1),l("option",{value:"amd-noavx"},"AMD (No AVX)",-1),l("option",{value:"amd"},"AMD",-1),l("option",{value:"apple-intel"},"Apple Intel",-1),l("option",{value:"apple-silicon"},"Apple Silicon",-1)]),544),[[Ot,r.configFile.hardware_mode]])])])]),l("tr",null,[e[492]||(e[492]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Database path:")],-1)),l("td",cot,[k(l("input",{type:"text",id:"discussion_db_name",required:"","onUpdate:modelValue":e[24]||(e[24]=f=>r.configFile.discussion_db_name=f),onChange:e[25]||(e[25]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.discussion_db_name]])])]),l("tr",null,[e[493]||(e[493]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"copy_to_clipboard_add_all_details",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Add details to messages copied to clipboard:")],-1)),l("td",null,[l("div",dot,[k(l("input",{type:"checkbox",id:"copy_to_clipboard_add_all_details",required:"","onUpdate:modelValue":e[26]||(e[26]=f=>r.configFile.copy_to_clipboard_add_all_details=f),onChange:e[27]||(e[27]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.copy_to_clipboard_add_all_details]])])])]),l("tr",null,[e[494]||(e[494]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_show_browser",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto show browser:")],-1)),l("td",null,[l("div",uot,[k(l("input",{type:"checkbox",id:"auto_show_browser",required:"","onUpdate:modelValue":e[28]||(e[28]=f=>r.configFile.auto_show_browser=f),onChange:e[29]||(e[29]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_show_browser]])])])]),l("tr",null,[e[495]||(e[495]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_debug",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate debug mode:")],-1)),l("td",null,[l("div",pot,[k(l("input",{type:"checkbox",id:"activate_debug",required:"","onUpdate:modelValue":e[30]||(e[30]=f=>r.configFile.debug=f),onChange:e[31]||(e[31]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug]])])])]),l("tr",null,[e[496]||(e[496]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate showing the full prompt in console (for debug):")],-1)),l("td",null,[l("div",fot,[k(l("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[32]||(e[32]=f=>r.configFile.debug_show_final_full_prompt=f),onChange:e[33]||(e[33]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug_show_final_full_prompt]])])])]),l("tr",null,[e[497]||(e[497]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_final_full_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show final full prompt in console:")],-1)),l("td",null,[l("div",_ot,[k(l("input",{type:"checkbox",id:"debug_show_final_full_prompt",required:"","onUpdate:modelValue":e[34]||(e[34]=f=>r.configFile.debug_show_final_full_prompt=f),onChange:e[35]||(e[35]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug_show_final_full_prompt]])])])]),l("tr",null,[e[498]||(e[498]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_show_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show chunks in console:")],-1)),l("td",null,[l("div",mot,[k(l("input",{type:"checkbox",id:"debug_show_chunks",required:"","onUpdate:modelValue":e[36]||(e[36]=f=>r.configFile.debug_show_chunks=f),onChange:e[37]||(e[37]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.debug_show_chunks]])])])]),l("tr",null,[e[499]||(e[499]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"debug_log_file_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Debug file path:")],-1)),l("td",null,[l("div",hot,[k(l("input",{type:"text",id:"debug_log_file_path",required:"","onUpdate:modelValue":e[38]||(e[38]=f=>r.configFile.debug_log_file_path=f),onChange:e[39]||(e[39]=f=>i.settingsChanged=!0),class:"m-2 h-50 w-50 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.debug_log_file_path]])])])]),l("tr",null,[e[500]||(e[500]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"show_news_panel",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Show news panel:")],-1)),l("td",null,[l("div",got,[k(l("input",{type:"checkbox",id:"show_news_panel",required:"","onUpdate:modelValue":e[40]||(e[40]=f=>r.configFile.show_news_panel=f),onChange:e[41]||(e[41]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.show_news_panel]])])])]),l("tr",null,[e[501]||(e[501]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_save",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto save:")],-1)),l("td",null,[l("div",bot,[k(l("input",{type:"checkbox",id:"auto_save",required:"","onUpdate:modelValue":e[42]||(e[42]=f=>r.configFile.auto_save=f),onChange:e[43]||(e[43]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_save]])])])]),l("tr",null,[e[502]||(e[502]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto update:")],-1)),l("td",null,[l("div",yot,[k(l("input",{type:"checkbox",id:"auto_update",required:"","onUpdate:modelValue":e[44]||(e[44]=f=>r.configFile.auto_update=f),onChange:e[45]||(e[45]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_update]])])])]),l("tr",null,[e[503]||(e[503]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_update",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Auto title:")],-1)),l("td",null,[l("div",Eot,[k(l("input",{type:"checkbox",id:"auto_title",required:"","onUpdate:modelValue":e[46]||(e[46]=f=>r.configFile.auto_title=f),onChange:e[47]||(e[47]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_title]])])])])])]),_:1}),z(a,{title:"Model template",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",vot,[l("tr",null,[e[505]||(e[505]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),l("td",null,[l("select",{onChange:e[48]||(e[48]=(...f)=>r.handleTemplateSelection&&r.handleTemplateSelection(...f))},e[504]||(e[504]=[l("option",{value:"lollms"},"Lollms communication template",-1),l("option",{value:"lollms_simplified"},"Lollms simplified communication template",-1),l("option",{value:"bare"},"Bare, useful when in chat mode",-1),l("option",{value:"llama3"},"LLama3 communication template",-1),l("option",{value:"mistral"},"Mistral communication template",-1),l("option",{value:"deepseek"},"DeepSeek communication template",-1)]),32)])]),l("tr",null,[e[506]||(e[506]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start header id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"start_header_id_template",required:"","onUpdate:modelValue":e[49]||(e[49]=f=>r.configFile.start_header_id_template=f),onChange:e[50]||(e[50]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.start_header_id_template]])])]),l("tr",null,[e[507]||(e[507]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End header id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"end_header_id_template",required:"","onUpdate:modelValue":e[51]||(e[51]=f=>r.configFile.end_header_id_template=f),onChange:e[52]||(e[52]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.end_header_id_template]])])]),l("tr",null,[e[508]||(e[508]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start user header id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"start_user_header_id_template",required:"","onUpdate:modelValue":e[53]||(e[53]=f=>r.configFile.start_user_header_id_template=f),onChange:e[54]||(e[54]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.start_user_header_id_template]])])]),l("tr",null,[e[509]||(e[509]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_user_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user header id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"end_user_header_id_template",required:"","onUpdate:modelValue":e[55]||(e[55]=f=>r.configFile.end_user_header_id_template=f),onChange:e[56]||(e[56]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.end_user_header_id_template]])])]),l("tr",null,[e[510]||(e[510]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_user_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End user message id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"end_user_message_id_template",required:"","onUpdate:modelValue":e[57]||(e[57]=f=>r.configFile.end_user_message_id_template=f),onChange:e[58]||(e[58]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.end_user_message_id_template]])])]),l("tr",null,[e[511]||(e[511]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"start_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Start ai header id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"start_ai_header_id_template",required:"","onUpdate:modelValue":e[59]||(e[59]=f=>r.configFile.start_ai_header_id_template=f),onChange:e[60]||(e[60]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.start_ai_header_id_template]])])]),l("tr",null,[e[512]||(e[512]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_ai_header_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai header id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"end_ai_header_id_template",required:"","onUpdate:modelValue":e[61]||(e[61]=f=>r.configFile.end_ai_header_id_template=f),onChange:e[62]||(e[62]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.end_ai_header_id_template]])])]),l("tr",null,[e[513]||(e[513]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"end_ai_message_id_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"End ai message id template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"end_ai_message_id_template",required:"","onUpdate:modelValue":e[63]||(e[63]=f=>r.configFile.end_ai_message_id_template=f),onChange:e[64]||(e[64]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.end_ai_message_id_template]])])]),l("tr",null,[e[514]||(e[514]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"separator_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Separator template:")],-1)),l("td",null,[k(l("textarea",{id:"separator_template",required:"","onUpdate:modelValue":e[65]||(e[65]=f=>r.configFile.separator_template=f),onChange:e[66]||(e[66]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.separator_template]])])]),l("tr",null,[e[515]||(e[515]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"system_message_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"System template:")],-1)),l("td",null,[k(l("input",{type:"text",id:"system_message_template",required:"","onUpdate:modelValue":e[67]||(e[67]=f=>r.configFile.system_message_template=f),onChange:e[68]||(e[68]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.system_message_template]])])]),l("tr",null,[e[516]||(e[516]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"full_template",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Full template:")],-1)),l("td",null,[l("div",{innerHTML:r.full_template},null,8,Sot)])]),l("tr",null,[e[517]||(e[517]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_continue_message",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"useful for chat models and repote models but can be less useful for instruct ones"},"Use continue message:")],-1)),l("td",Tot,[k(l("input",{type:"checkbox",id:"use_continue_message",required:"","onUpdate:modelValue":e[69]||(e[69]=f=>r.configFile.use_continue_message=f),onChange:e[70]||(e[70]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_continue_message]])])])])]),_:1}),z(a,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",xot,[l("tr",null,[e[518]||(e[518]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User name:")],-1)),l("td",Cot,[k(l("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[71]||(e[71]=f=>r.configFile.user_name=f),onChange:e[72]||(e[72]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.user_name]])])]),l("tr",null,[e[519]||(e[519]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_description",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User description:")],-1)),l("td",wot,[k(l("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[73]||(e[73]=f=>r.configFile.user_description=f),onChange:e[74]||(e[74]=f=>i.settingsChanged=!0),class:"min-h-[500px] w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.user_description]])])]),l("tr",null,[e[520]||(e[520]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_user_informations_in_discussion",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use user description in discussion:")],-1)),l("td",Rot,[k(l("input",{type:"checkbox",id:"use_user_informations_in_discussion",required:"","onUpdate:modelValue":e[75]||(e[75]=f=>r.configFile.use_user_informations_in_discussion=f),onChange:e[76]||(e[76]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_user_informations_in_discussion]])])]),l("tr",null,[e[521]||(e[521]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_model_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use model name in discussion:")],-1)),l("td",Aot,[k(l("input",{type:"checkbox",id:"use_model_name_in_discussions",required:"","onUpdate:modelValue":e[77]||(e[77]=f=>r.configFile.use_model_name_in_discussions=f),onChange:e[78]||(e[78]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_model_name_in_discussions]])])]),l("tr",null,[e[523]||(e[523]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"user_avatar",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"User avatar:")],-1)),l("td",null,[l("label",Mot,[l("img",{src:r.configFile.user_avatar!=null&&r.configFile.user_avatar!=""?"/user_infos/"+r.configFile.user_avatar:i.storeLogo,class:"w-50 h-50 rounded-full",style:{"max-width":"50px","max-height":"50px",cursor:"pointer"}},null,8,Not)]),l("input",{type:"file",id:"avatar-upload",style:{display:"none"},onChange:e[79]||(e[79]=(...f)=>r.uploadAvatar&&r.uploadAvatar(...f))},null,32)]),l("td",Iot,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[80]||(e[80]=$(f=>r.resetAvatar(),["stop"]))},e[522]||(e[522]=[l("i",{"data-feather":"x"},null,-1)]))])]),l("tr",null,[e[524]||(e[524]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_user_name_in_discussions",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use User Name in discussions:")],-1)),l("td",null,[l("div",Oot,[k(l("input",{type:"checkbox",id:"use_user_name_in_discussions",required:"","onUpdate:modelValue":e[81]||(e[81]=f=>r.configFile.use_user_name_in_discussions=f),onChange:e[82]||(e[82]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_user_name_in_discussions]])])])]),l("tr",null,[e[525]||(e[525]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Maximum number of output tokens space (forces the model to have more space to speak):")],-1)),l("td",kot,[k(l("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[83]||(e[83]=f=>r.configFile.max_n_predict=f),onChange:e[84]||(e[84]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.max_n_predict]])])]),l("tr",null,[e[526]||(e[526]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"max_n_predict",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Minimum number of output tokens space (forces the model to have more space to speak):")],-1)),l("td",Dot,[k(l("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[85]||(e[85]=f=>r.configFile.max_n_predict=f),onChange:e[86]||(e[86]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.max_n_predict]])])])])]),_:1}),z(a,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Lot,[l("tr",null,[e[527]||(e[527]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_code_execution",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code execution:")],-1)),l("td",Pot,[k(l("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[87]||(e[87]=f=>r.configFile.turn_on_code_execution=f),onChange:e[88]||(e[88]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_code_execution]])])]),l("tr",null,[e[528]||(e[528]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_code_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on code validation (very recommended for security reasons):")],-1)),l("td",Fot,[k(l("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[89]||(e[89]=f=>r.configFile.turn_on_code_validation=f),onChange:e[90]||(e[90]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_code_validation]])])]),l("tr",null,[e[529]||(e[529]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_setting_update_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on apply settings validation (very recommended for security reasons):")],-1)),l("td",Uot,[k(l("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[91]||(e[91]=f=>r.configFile.turn_on_setting_update_validation=f),onChange:e[92]||(e[92]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_setting_update_validation]])])]),l("tr",null,[e[530]||(e[530]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_open_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on open file/folder validation:")],-1)),l("td",Bot,[k(l("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[93]||(e[93]=f=>r.configFile.turn_on_open_file_validation=f),onChange:e[94]||(e[94]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_open_file_validation]])])]),l("tr",null,[e[531]||(e[531]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"turn_on_send_file_validation",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"turn on send file validation:")],-1)),l("td",Got,[k(l("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[95]||(e[95]=f=>r.configFile.turn_on_send_file_validation=f),onChange:e[96]||(e[96]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.turn_on_send_file_validation]])])])])]),_:1}),z(a,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Vot,[l("tr",null,[e[532]||(e[532]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_skills_lib",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Skills library:")],-1)),l("td",null,[l("div",zot,[k(l("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[97]||(e[97]=f=>r.configFile.activate_skills_lib=f),onChange:e[98]||(e[98]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_skills_lib]])])])]),l("tr",null,[e[533]||(e[533]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"discussion_db_name",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Skills library database name:")],-1)),l("td",Hot,[k(l("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[99]||(e[99]=f=>r.configFile.skills_lib_database_name=f),onChange:e[100]||(e[100]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.skills_lib_database_name]])])])])]),_:1}),z(a,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",qot,[l("tr",null,[e[534]||(e[534]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"pdf_latex_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"PDF LaTeX path:")],-1)),l("td",null,[l("div",Yot,[k(l("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[101]||(e[101]=f=>r.configFile.pdf_latex_path=f),onChange:e[102]||(e[102]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.pdf_latex_path]])])])])])]),_:1}),z(a,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",$ot,[l("tr",null,[e[535]||(e[535]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"positive_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Positive Boost:")],-1)),l("td",null,[l("div",Wot,[k(l("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[103]||(e[103]=f=>r.configFile.positive_boost=f),onChange:e[104]||(e[104]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.positive_boost]])])])]),l("tr",null,[e[536]||(e[536]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"negative_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative Boost:")],-1)),l("td",null,[l("div",Kot,[k(l("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[105]||(e[105]=f=>r.configFile.negative_boost=f),onChange:e[106]||(e[106]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.negative_boost]])])])]),l("tr",null,[e[537]||(e[537]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"fun_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fun mode:")],-1)),l("td",null,[l("div",jot,[k(l("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[107]||(e[107]=f=>r.configFile.fun_mode=f),onChange:e[108]||(e[108]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.fun_mode]])])])])])]),_:1})])],2)]),l("div",Qot,[l("div",Xot,[l("button",{onClick:e[109]||(e[109]=$(f=>i.data_conf_collapsed=!i.data_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[538]||(e[538]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.data_conf_collapsed]]),k(l("div",null,e[539]||(e[539]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.data_conf_collapsed]]),e[540]||(e[540]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1))])]),l("div",{class:Pe([{hidden:i.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[z(a,{title:"Data Sources",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Zot,[l("tr",null,[e[541]||(e[541]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_databases",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Data Sources:")],-1)),l("td",Jot,[(T(!0),x(Le,null,We(r.configFile.rag_databases,(f,b)=>(T(),x("div",{key:b,class:"flex items-center mb-2"},[k(l("input",{type:"text","onUpdate:modelValue":y=>r.configFile.rag_databases[b]=y,onChange:e[110]||(e[110]=y=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,40,eat),[[ue,r.configFile.rag_databases[b]]]),l("button",{onClick:y=>r.vectorize_folder(b),class:"w-500 ml-2 px-2 py-1 bg-green-500 text-white hover:bg-green-300 rounded"},"(Re)Vectorize",8,tat),l("button",{onClick:y=>r.select_folder(b),class:"w-500 ml-2 px-2 py-1 bg-blue-500 text-white hover:bg-green-300 rounded"},"Select Folder",8,nat),l("button",{onClick:y=>r.removeDataSource(b),class:"ml-2 px-2 py-1 bg-red-500 text-white hover:bg-green-300 rounded"},"Remove",8,sat)]))),128)),l("button",{onClick:e[111]||(e[111]=(...f)=>r.addDataSource&&r.addDataSource(...f)),class:"mt-2 px-2 py-1 bg-blue-500 text-white rounded"},"Add Data Source")])]),l("tr",null,[e[543]||(e[543]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer:")],-1)),l("td",null,[k(l("select",{id:"rag_vectorizer",required:"","onUpdate:modelValue":e[112]||(e[112]=f=>r.configFile.rag_vectorizer=f),onChange:e[113]||(e[113]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[542]||(e[542]=[l("option",{value:"semantic"},"Semantic Vectorizer",-1),l("option",{value:"tfidf"},"TFIDF Vectorizer",-1),l("option",{value:"openai"},"OpenAI Vectorizer",-1),l("option",{value:"ollama"},"Ollama Vectorizer",-1)]),544),[[Ot,r.configFile.rag_vectorizer]])])]),l("tr",null,[e[544]||(e[544]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_vectorizer_execute_remote_code",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Allow executing remote code:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[114]||(e[114]=f=>r.configFile.rag_vectorizer_execute_remote_code=f),type:"checkbox",onChange:e[115]||(e[115]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_vectorizer_execute_remote_code]])])]),l("tr",null,[e[545]||(e[545]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_vectorizer_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG Vectorizer model:")],-1)),l("td",null,[k(l("select",{id:"rag_vectorizer_model",required:"","onUpdate:modelValue":e[116]||(e[116]=f=>r.configFile.rag_vectorizer_model=f),onChange:e[117]||(e[117]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:r.configFile.rag_vectorizer==="tfidf"},[r.configFile.rag_vectorizer==="semantic"?(T(),x("option",rat,"BAAI/bge-m3")):B("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",oat,"nvidia/NV-Embed-v2")):B("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",aat,"sentence-transformers/all-MiniLM-L6-v2")):B("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",lat,"sentence-transformers/all-MiniLM-L12-v2")):B("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",cat,"sentence-transformers/all-distilroberta-v1")):B("",!0),r.configFile.rag_vectorizer==="semantic"?(T(),x("option",dat,"sentence-transformers/all-mpnet-base-v2")):B("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",uat,"text-embedding-ada-002")):B("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",pat,"text-embedding-babbage-001")):B("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",fat,"text-embedding-curie-001")):B("",!0),r.configFile.rag_vectorizer==="openai"?(T(),x("option",_at,"text-embedding-davinci-001")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",mat,"bge-m3")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",hat,"nvidia/NV-Embed-v2")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",gat,"nomic-embed-text")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",bat,"mxbai-embed-large")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",yat,"mxbai-embed-large")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",Eat,"snowflake-arctic-embed")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",vat,"snowflake-arctic-embed")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",Sat,"all-minilm")):B("",!0),r.configFile.rag_vectorizer==="ollama"?(T(),x("option",Tat,"bge-large")):B("",!0),r.configFile.rag_vectorizer==="tfidf"?(T(),x("option",xat,"No models available for TFIDF")):B("",!0)],40,iat),[[Ot,r.configFile.rag_vectorizer_model]]),k(l("input",{"onUpdate:modelValue":e[118]||(e[118]=f=>r.configFile.rag_vectorizer_model=f),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,512),[[ue,r.configFile.rag_vectorizer_model]])])]),l("tr",null,[e[546]||(e[546]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_service_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Rag service url:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[119]||(e[119]=f=>r.configFile.rag_service_url=f),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,512),[[ue,r.configFile.rag_service_url]])])]),l("tr",null,[e[547]||(e[547]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_vectorizer_openai_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key for open ai embedding method (if not provided I'll use OPENAI_API_KEY environment variable):")],-1)),l("td",null,[l("div",Cat,[k(l("input",{type:"text",id:"rag_vectorizer_openai_key",required:"","onUpdate:modelValue":e[120]||(e[120]=f=>r.configFile.rag_vectorizer_openai_key=f),onChange:e[121]||(e[121]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_vectorizer_openai_key]])])])]),l("tr",null,[e[548]||(e[548]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG chunk size:")],-1)),l("td",null,[k(l("input",{id:"rag_chunk_size","onUpdate:modelValue":e[122]||(e[122]=f=>r.configFile.rag_chunk_size=f),onChange:e[123]||(e[123]=f=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.rag_chunk_size]]),k(l("input",{"onUpdate:modelValue":e[124]||(e[124]=f=>r.configFile.rag_chunk_size=f),type:"number",onChange:e[125]||(e[125]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_chunk_size]])])]),l("tr",null,[e[549]||(e[549]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_overlap",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG overlap size:")],-1)),l("td",null,[k(l("input",{id:"rag_overlap","onUpdate:modelValue":e[126]||(e[126]=f=>r.configFile.rag_overlap=f),onChange:e[127]||(e[127]=f=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.rag_overlap]]),k(l("input",{"onUpdate:modelValue":e[128]||(e[128]=f=>r.configFile.rag_overlap=f),type:"number",onChange:e[129]||(e[129]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_overlap]])])]),l("tr",null,[e[550]||(e[550]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_n_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"RAG number of chunks:")],-1)),l("td",null,[k(l("input",{id:"rag_n_chunks","onUpdate:modelValue":e[130]||(e[130]=f=>r.configFile.rag_n_chunks=f),onChange:e[131]||(e[131]=f=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.rag_n_chunks]]),k(l("input",{"onUpdate:modelValue":e[132]||(e[132]=f=>r.configFile.rag_n_chunks=f),type:"number",onChange:e[133]||(e[133]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.rag_n_chunks]])])]),l("tr",null,[e[551]||(e[551]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_clean_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Clean chunks:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[134]||(e[134]=f=>r.configFile.rag_clean_chunks=f),type:"checkbox",onChange:e[135]||(e[135]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_clean_chunks]])])]),l("tr",null,[e[552]||(e[552]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_follow_subfolders",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Follow subfolders:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[136]||(e[136]=f=>r.configFile.rag_follow_subfolders=f),type:"checkbox",onChange:e[137]||(e[137]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_follow_subfolders]])])]),l("tr",null,[e[553]||(e[553]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_check_new_files_at_startup",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Check for new files at startup:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[138]||(e[138]=f=>r.configFile.rag_check_new_files_at_startup=f),type:"checkbox",onChange:e[139]||(e[139]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_check_new_files_at_startup]])])]),l("tr",null,[e[554]||(e[554]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_preprocess_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Preprocess chunks:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[140]||(e[140]=f=>r.configFile.rag_preprocess_chunks=f),type:"checkbox",onChange:e[141]||(e[141]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_preprocess_chunks]])])]),l("tr",null,[e[555]||(e[555]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_activate_multi_hops",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate multi hops RAG:")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[142]||(e[142]=f=>r.configFile.rag_activate_multi_hops=f),type:"checkbox",onChange:e[143]||(e[143]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_activate_multi_hops]])])]),l("tr",null,[e[556]||(e[556]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"contextual_summary",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use contextual summary instead of rag (consumes alot of tokens and may be very slow but efficient, useful for summary and global questions that RAG can't do):")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[144]||(e[144]=f=>r.configFile.contextual_summary=f),type:"checkbox",onChange:e[145]||(e[145]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.contextual_summary]])])]),l("tr",null,[e[557]||(e[557]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_deactivate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Useful for very big contexts and global tasks that require the whole document"},"Use all the document content (No split):")],-1)),l("td",null,[k(l("input",{"onUpdate:modelValue":e[146]||(e[146]=f=>r.configFile.rag_deactivate=f),type:"checkbox",onChange:e[147]||(e[147]=f=>i.settingsChanged=!0),class:"w-5 mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_deactivate]])])])])]),_:1}),z(a,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",wat,[l("tr",null,[e[558]||(e[558]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_build_keys_words",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reformulate prompt before querying database (advised):")],-1)),l("td",null,[l("div",Rat,[k(l("input",{type:"checkbox",id:"rag_build_keys_words",required:"","onUpdate:modelValue":e[148]||(e[148]=f=>r.configFile.rag_build_keys_words=f),onChange:e[149]||(e[149]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_build_keys_words]])])])]),l("tr",null,[e[559]||(e[559]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"rag_put_chunk_informations_into_context",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Put Chunk Information Into Context:")],-1)),l("td",null,[l("div",Aat,[k(l("input",{type:"checkbox",id:"rag_put_chunk_informations_into_context",required:"","onUpdate:modelValue":e[150]||(e[150]=f=>r.configFile.rag_put_chunk_informations_into_context=f),onChange:e[151]||(e[151]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.rag_put_chunk_informations_into_context]])])])]),l("tr",null,[e[560]||(e[560]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"data_vectorization_save_db",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Save the new files to the database (The database wil always grow and continue to be the same over many sessions):")],-1)),l("td",null,[l("div",Mat,[k(l("input",{type:"checkbox",id:"data_vectorization_save_db",required:"","onUpdate:modelValue":e[152]||(e[152]=f=>r.configFile.data_vectorization_save_db=f),onChange:e[153]||(e[153]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.data_vectorization_save_db]])])])])])]),_:1})],2)]),l("div",Nat,[l("div",Iat,[l("button",{onClick:e[154]||(e[154]=$(f=>i.internet_conf_collapsed=!i.internet_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[561]||(e[561]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.internet_conf_collapsed]]),k(l("div",null,e[562]||(e[562]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.internet_conf_collapsed]]),e[563]||(e[563]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Internet",-1))])]),l("div",{class:Pe([{hidden:i.internet_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[z(a,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Oat,[l("tr",null,[e[564]||(e[564]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_internet_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate automatic internet search (for every prompt):")],-1)),l("td",null,[l("div",kat,[k(l("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[155]||(e[155]=f=>r.configFile.activate_internet_search=f),onChange:e[156]||(e[156]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_internet_search]])])])]),l("tr",null,[e[565]||(e[565]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_internet_pages_judgement",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate internet pages judgement:")],-1)),l("td",null,[l("div",Dat,[k(l("input",{type:"checkbox",id:"activate_internet_pages_judgement",required:"","onUpdate:modelValue":e[157]||(e[157]=f=>r.configFile.activate_internet_pages_judgement=f),onChange:e[158]||(e[158]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_internet_pages_judgement]])])])]),l("tr",null,[e[566]||(e[566]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_quick_search",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate quick search:")],-1)),l("td",null,[l("div",Lat,[k(l("input",{type:"checkbox",id:"internet_quick_search",required:"","onUpdate:modelValue":e[159]||(e[159]=f=>r.configFile.internet_quick_search=f),onChange:e[160]||(e[160]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.internet_quick_search]])])])]),l("tr",null,[e[567]||(e[567]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_activate_search_decision",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate search decision:")],-1)),l("td",null,[l("div",Pat,[k(l("input",{type:"checkbox",id:"internet_activate_search_decision",required:"","onUpdate:modelValue":e[161]||(e[161]=f=>r.configFile.internet_activate_search_decision=f),onChange:e[162]||(e[162]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.internet_activate_search_decision]])])])]),l("tr",null,[e[568]||(e[568]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization chunk size:")],-1)),l("td",null,[l("div",Fat,[k(l("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[163]||(e[163]=f=>r.configFile.internet_vectorization_chunk_size=f),onChange:e[164]||(e[164]=f=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.internet_vectorization_chunk_size]]),k(l("input",{"onUpdate:modelValue":e[165]||(e[165]=f=>r.configFile.internet_vectorization_chunk_size=f),type:"number",onChange:e[166]||(e[166]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_vectorization_chunk_size]])])])]),l("tr",null,[e[569]||(e[569]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization overlap size:")],-1)),l("td",null,[l("div",Uat,[k(l("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[167]||(e[167]=f=>r.configFile.internet_vectorization_overlap_size=f),onChange:e[168]||(e[168]=f=>i.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.internet_vectorization_overlap_size]]),k(l("input",{"onUpdate:modelValue":e[169]||(e[169]=f=>r.configFile.internet_vectorization_overlap_size=f),type:"number",onChange:e[170]||(e[170]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_vectorization_overlap_size]])])])]),l("tr",null,[e[570]||(e[570]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet vectorization number of chunks:")],-1)),l("td",null,[l("div",Bat,[k(l("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[171]||(e[171]=f=>r.configFile.internet_vectorization_nb_chunks=f),onChange:e[172]||(e[172]=f=>i.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.internet_vectorization_nb_chunks]]),k(l("input",{"onUpdate:modelValue":e[173]||(e[173]=f=>r.configFile.internet_vectorization_nb_chunks=f),type:"number",onChange:e[174]||(e[174]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_vectorization_nb_chunks]])])])]),l("tr",null,[e[571]||(e[571]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"internet_nb_search_pages",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Internet number of search pages:")],-1)),l("td",null,[l("div",Gat,[k(l("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[175]||(e[175]=f=>r.configFile.internet_nb_search_pages=f),onChange:e[176]||(e[176]=f=>i.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.internet_nb_search_pages]]),k(l("input",{"onUpdate:modelValue":e[177]||(e[177]=f=>r.configFile.internet_nb_search_pages=f),type:"number",onChange:e[178]||(e[178]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.internet_nb_search_pages]])])])])])]),_:1})],2)]),l("div",Vat,[l("div",zat,[l("button",{onClick:e[179]||(e[179]=$(f=>i.servers_conf_collapsed=!i.servers_conf_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[572]||(e[572]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.servers_conf_collapsed]]),k(l("div",null,e[573]||(e[573]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.servers_conf_collapsed]]),e[574]||(e[574]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Services Zoo",-1))])]),l("div",{class:Pe([{hidden:i.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[z(a,{title:"Default services selection",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Hat,[l("tr",null,[e[576]||(e[576]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_tts_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTS Service:")],-1)),l("td",qat,[k(l("select",{id:"active_tts_service",required:"","onUpdate:modelValue":e[180]||(e[180]=f=>r.configFile.active_tts_service=f),onChange:e[181]||(e[181]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[575]||(e[575]=[l("option",{value:"None"},"None",-1),l("option",{value:"browser"},"Use Browser TTS (doesn't work in realtime mode)",-1),l("option",{value:"xtts"},"XTTS",-1),l("option",{value:"parler-tts"},"Parler-TTS",-1),l("option",{value:"openai_tts"},"Open AI TTS",-1),l("option",{value:"eleven_labs_tts"},"ElevenLabs TTS",-1),l("option",{value:"fish_tts"},"Fish TTS",-1)]),544),[[Ot,r.configFile.active_tts_service]])])]),l("tr",null,[e[578]||(e[578]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_stt_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Speach to Text engine"},"Active STT Service:")],-1)),l("td",Yat,[k(l("select",{id:"active_stt_service",required:"","onUpdate:modelValue":e[182]||(e[182]=f=>r.configFile.active_stt_service=f),onChange:e[183]||(e[183]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[577]||(e[577]=[l("option",{value:"None"},"None",-1),l("option",{value:"whisper"},"Whisper",-1),l("option",{value:"openai_whisper"},"Open AI Whisper",-1)]),544),[[Ot,r.configFile.active_stt_service]])])]),e[585]||(e[585]=l("tr",null,null,-1)),l("tr",null,[e[580]||(e[580]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_tti_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to image engine"},"Active TTI Service:")],-1)),l("td",$at,[k(l("select",{id:"active_tti_service",required:"","onUpdate:modelValue":e[184]||(e[184]=f=>r.configFile.active_tti_service=f),onChange:e[185]||(e[185]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[579]||(e[579]=[l("option",{value:"None"},"None",-1),l("option",{value:"diffusers"},"Diffusers",-1),l("option",{value:"diffusers_client"},"Diffusers Client",-1),l("option",{value:"autosd"},"AUTO1111's SD",-1),l("option",{value:"dall-e"},"Open AI DALL-E",-1),l("option",{value:"midjourney"},"Midjourney",-1),l("option",{value:"comfyui"},"Comfyui",-1),l("option",{value:"fooocus"},"Fooocus",-1)]),544),[[Ot,r.configFile.active_tti_service]])])]),l("tr",null,[e[582]||(e[582]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_ttm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to Music engine"},"Active TTM Service:")],-1)),l("td",Wat,[k(l("select",{id:"active_ttm_service",required:"","onUpdate:modelValue":e[186]||(e[186]=f=>r.configFile.active_ttm_service=f),onChange:e[187]||(e[187]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[581]||(e[581]=[l("option",{value:"None"},"None",-1),l("option",{value:"musicgen"},"Music Gen",-1)]),544),[[Ot,r.configFile.active_ttm_service]])])]),l("tr",null,[e[584]||(e[584]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"active_ttv_service",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Default Text to speach engine"},"Active TTV Service:")],-1)),l("td",Kat,[k(l("select",{id:"active_ttv_service",required:"","onUpdate:modelValue":e[188]||(e[188]=f=>r.configFile.active_ttv_service=f),onChange:e[189]||(e[189]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},e[583]||(e[583]=[l("option",{value:"None"},"None",-1),l("option",{value:"cog_video_x"},"Cog Video X",-1),l("option",{value:"diffusers"},"Diffusers",-1),l("option",{value:"lumalab"},"Lumalab",-1)]),544),[[Ot,r.configFile.active_ttv_service]])])])])]),_:1}),z(a,{title:"TTI settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",jat,[l("tr",null,[e[586]||(e[586]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use negative prompt:")],-1)),l("td",null,[l("div",Qat,[k(l("input",{type:"checkbox",id:"use_negative_prompt",required:"","onUpdate:modelValue":e[190]||(e[190]=f=>r.configFile.use_negative_prompt=f),onChange:e[191]||(e[191]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_negative_prompt]])])])]),l("tr",null,[e[587]||(e[587]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"use_ai_generated_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Use AI generated negative prompt:")],-1)),l("td",null,[l("div",Xat,[k(l("input",{type:"checkbox",id:"use_ai_generated_negative_prompt",required:"","onUpdate:modelValue":e[192]||(e[192]=f=>r.configFile.use_ai_generated_negative_prompt=f),onChange:e[193]||(e[193]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.use_ai_generated_negative_prompt]])])])]),l("tr",null,[e[588]||(e[588]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"negative_prompt_generation_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Negative prompt generation prompt:")],-1)),l("td",null,[l("div",Zat,[k(l("input",{type:"text",id:"negative_prompt_generation_prompt",required:"","onUpdate:modelValue":e[194]||(e[194]=f=>r.configFile.negative_prompt_generation_prompt=f),onChange:e[195]||(e[195]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.negative_prompt_generation_prompt]])])])]),l("tr",null,[e[589]||(e[589]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"default_negative_prompt",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Default negative prompt:")],-1)),l("td",null,[l("div",Jat,[k(l("input",{type:"text",id:"default_negative_prompt",required:"","onUpdate:modelValue":e[196]||(e[196]=f=>r.configFile.default_negative_prompt=f),onChange:e[197]||(e[197]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.default_negative_prompt]])])])])])]),_:1}),z(a,{title:"Full Audio settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",elt,[l("tr",null,[e[590]||(e[590]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_listening_threshold",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Listening threshold"},"Listening threshold:")],-1)),l("td",tlt,[k(l("input",{type:"number",step:"1",id:"stt_listening_threshold",required:"","onUpdate:modelValue":e[198]||(e[198]=f=>r.configFile.stt_listening_threshold=f),onChange:e[199]||(e[199]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_listening_threshold]])])]),l("tr",null,[e[591]||(e[591]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_silence_duration",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Scilence duration"},"Silence duration (s):")],-1)),l("td",nlt,[k(l("input",{type:"number",step:"1",id:"stt_silence_duration",required:"","onUpdate:modelValue":e[200]||(e[200]=f=>r.configFile.stt_silence_duration=f),onChange:e[201]||(e[201]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_silence_duration]])])]),l("tr",null,[e[592]||(e[592]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_sound_threshold_percentage",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"stt_sound_threshold_percentage"},"Minimum sound percentage in recorded segment:")],-1)),l("td",slt,[k(l("input",{type:"number",step:"1",id:"stt_sound_threshold_percentage",required:"","onUpdate:modelValue":e[202]||(e[202]=f=>r.configFile.stt_sound_threshold_percentage=f),onChange:e[203]||(e[203]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_sound_threshold_percentage]])])]),l("tr",null,[e[593]||(e[593]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_gain",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"STT Gain"},"Volume amplification:")],-1)),l("td",ilt,[k(l("input",{type:"number",step:"1",id:"stt_gain",required:"","onUpdate:modelValue":e[204]||(e[204]=f=>r.configFile.stt_gain=f),onChange:e[205]||(e[205]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_gain]])])]),l("tr",null,[e[594]||(e[594]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_rate",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Audio Rate"},"audio rate:")],-1)),l("td",rlt,[k(l("input",{type:"number",step:"1",id:"stt_rate",required:"","onUpdate:modelValue":e[206]||(e[206]=f=>r.configFile.stt_rate=f),onChange:e[207]||(e[207]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_rate]])])]),l("tr",null,[e[595]||(e[595]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_channels",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"number of channels"},"number of channels:")],-1)),l("td",olt,[k(l("input",{type:"number",step:"1",id:"stt_channels",required:"","onUpdate:modelValue":e[208]||(e[208]=f=>r.configFile.stt_channels=f),onChange:e[209]||(e[209]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_channels]])])]),l("tr",null,[e[596]||(e[596]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_buffer_size",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Buffer size"},"Buffer size:")],-1)),l("td",alt,[k(l("input",{type:"number",step:"1",id:"stt_buffer_size",required:"","onUpdate:modelValue":e[210]||(e[210]=f=>r.configFile.stt_buffer_size=f),onChange:e[211]||(e[211]=f=>i.settingsChanged=!0),class:"w-full w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600 dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_buffer_size]])])]),l("tr",null,[e[597]||(e[597]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_activate_word_detection",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate word detection:")],-1)),l("td",null,[l("div",llt,[k(l("input",{type:"checkbox",id:"stt_activate_word_detection",required:"","onUpdate:modelValue":e[212]||(e[212]=f=>r.configFile.stt_activate_word_detection=f),onChange:e[213]||(e[213]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.stt_activate_word_detection]])])])]),l("tr",null,[e[598]||(e[598]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_word_detection_file",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Word detection wav file:")],-1)),l("td",null,[l("div",clt,[k(l("input",{type:"text",id:"stt_word_detection_file",required:"","onUpdate:modelValue":e[214]||(e[214]=f=>r.configFile.stt_word_detection_file=f),onChange:e[215]||(e[215]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.stt_word_detection_file]])])])])])]),_:1}),z(a,{title:"Audio devices settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",dlt,[l("tr",null,[e[599]||(e[599]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"stt_input_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Input device:")],-1)),l("td",ult,[k(l("select",{id:"stt_input_device",required:"","onUpdate:modelValue":e[216]||(e[216]=f=>r.configFile.stt_input_device=f),onChange:e[217]||(e[217]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(i.snd_input_devices,(f,b)=>(T(),x("option",{key:f,value:i.snd_input_devices_indexes[b]},Y(f),9,plt))),128))],544),[[Ot,r.configFile.stt_input_device]])])]),l("tr",null,[e[600]||(e[600]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"tts_output_device",class:"text-sm font-bold",style:{"margin-right":"1rem"},title:"Input device"},"Audio Output device:")],-1)),l("td",flt,[k(l("select",{id:"tts_output_device",required:"","onUpdate:modelValue":e[218]||(e[218]=f=>r.configFile.tts_output_device=f),onChange:e[219]||(e[219]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(i.snd_output_devices,(f,b)=>(T(),x("option",{key:f,value:i.snd_output_devices_indexes[b]},Y(f),9,_lt))),128))],544),[[Ot,r.configFile.tts_output_device]])])])])]),_:1}),z(a,{title:"Lollms service",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",mlt,[l("tr",null,[e[601]||(e[601]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"host",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Host:")],-1)),l("td",hlt,[k(l("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[220]||(e[220]=f=>r.configFile.host=f),onChange:e[221]||(e[221]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.host]])])]),l("tr",null,[e[602]||(e[602]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"lollms_access_keys",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Access keys:")],-1)),l("td",glt,[z(c,{modelValue:r.configFile.lollms_access_keys,"onUpdate:modelValue":e[222]||(e[222]=f=>r.configFile.lollms_access_keys=f),onChange:e[223]||(e[223]=f=>i.settingsChanged=!0),placeholder:"Enter access key"},null,8,["modelValue"])])]),l("tr",null,[e[603]||(e[603]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"port",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Port:")],-1)),l("td",blt,[k(l("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[224]||(e[224]=f=>r.configFile.port=f),onChange:e[225]||(e[225]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.port]])])]),l("tr",null,[e[604]||(e[604]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"headless_server_mode",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate headless server mode:")],-1)),l("td",ylt,[k(l("input",{type:"checkbox",id:"headless_server_mode",required:"","onUpdate:modelValue":e[226]||(e[226]=f=>r.configFile.headless_server_mode=f),onChange:e[227]||(e[227]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.headless_server_mode]])])]),l("tr",null,[e[605]||(e[605]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms server:")],-1)),l("td",Elt,[k(l("input",{type:"checkbox",id:"activate_lollms_server",required:"","onUpdate:modelValue":e[228]||(e[228]=f=>r.configFile.activate_lollms_server=f),onChange:e[229]||(e[229]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_server]])])]),l("tr",null,[e[606]||(e[606]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_rag_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms RAG server:")],-1)),l("td",vlt,[k(l("input",{type:"checkbox",id:"activate_lollms_rag_server",required:"","onUpdate:modelValue":e[230]||(e[230]=f=>r.configFile.activate_lollms_rag_server=f),onChange:e[231]||(e[231]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_rag_server]])])]),l("tr",null,[e[607]||(e[607]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_tts_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTS server:")],-1)),l("td",Slt,[k(l("input",{type:"checkbox",id:"activate_lollms_tts_server",required:"","onUpdate:modelValue":e[232]||(e[232]=f=>r.configFile.activate_lollms_tts_server=f),onChange:e[233]||(e[233]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_tts_server]])])]),l("tr",null,[e[608]||(e[608]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_stt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms STT server:")],-1)),l("td",Tlt,[k(l("input",{type:"checkbox",id:"activate_lollms_stt_server",required:"","onUpdate:modelValue":e[234]||(e[234]=f=>r.configFile.activate_lollms_stt_server=f),onChange:e[235]||(e[235]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_stt_server]])])]),l("tr",null,[e[609]||(e[609]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_tti_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTI server:")],-1)),l("td",xlt,[k(l("input",{type:"checkbox",id:"activate_lollms_tti_server",required:"","onUpdate:modelValue":e[236]||(e[236]=f=>r.configFile.activate_lollms_tti_server=f),onChange:e[237]||(e[237]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_tti_server]])])]),l("tr",null,[e[610]||(e[610]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_itt_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms ITT server:")],-1)),l("td",Clt,[k(l("input",{type:"checkbox",id:"activate_lollms_itt_server",required:"","onUpdate:modelValue":e[238]||(e[238]=f=>r.configFile.activate_lollms_itt_server=f),onChange:e[239]||(e[239]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_itt_server]])])]),l("tr",null,[e[611]||(e[611]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_lollms_ttm_server",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate lollms TTM server:")],-1)),l("td",wlt,[k(l("input",{type:"checkbox",id:"activate_lollms_ttm_server",required:"","onUpdate:modelValue":e[240]||(e[240]=f=>r.configFile.activate_lollms_ttm_server=f),onChange:e[241]||(e[241]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_lollms_ttm_server]])])]),l("tr",null,[e[612]||(e[612]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_ollama_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate ollama server emulator:")],-1)),l("td",Rlt,[k(l("input",{type:"checkbox",id:"activate_ollama_emulator",required:"","onUpdate:modelValue":e[242]||(e[242]=f=>r.configFile.activate_ollama_emulator=f),onChange:e[243]||(e[243]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_ollama_emulator]])])]),l("tr",null,[e[613]||(e[613]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_openai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate openai server emulator:")],-1)),l("td",Alt,[k(l("input",{type:"checkbox",id:"activate_openai_emulator",required:"","onUpdate:modelValue":e[244]||(e[244]=f=>r.configFile.activate_openai_emulator=f),onChange:e[245]||(e[245]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_openai_emulator]])])]),l("tr",null,[e[614]||(e[614]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_mistralai_emulator",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate mistral ai server emulator:")],-1)),l("td",Mlt,[k(l("input",{type:"checkbox",id:"activate_mistralai_emulator",required:"","onUpdate:modelValue":e[246]||(e[246]=f=>r.configFile.activate_mistralai_emulator=f),onChange:e[247]||(e[247]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_mistralai_emulator]])])])])]),_:1}),z(a,{title:"STT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[z(a,{title:"Browser Audio STT",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Nlt,[l("tr",null,[e[615]||(e[615]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"activate_audio_infos",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate audio infos:")],-1)),l("td",null,[l("div",Ilt,[k(l("input",{type:"checkbox",id:"activate_audio_infos",required:"","onUpdate:modelValue":e[248]||(e[248]=f=>r.configFile.activate_audio_infos=f),onChange:e[249]||(e[249]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.activate_audio_infos]])])])]),l("tr",null,[e[616]||(e[616]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_auto_send_input",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Send audio input automatically:")],-1)),l("td",null,[l("div",Olt,[k(l("input",{type:"checkbox",id:"audio_auto_send_input",required:"","onUpdate:modelValue":e[250]||(e[250]=f=>r.configFile.audio_auto_send_input=f),onChange:e[251]||(e[251]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.audio_auto_send_input]])])])]),l("tr",null,[e[617]||(e[617]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_silenceTimer",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio in silence timer (ms):")],-1)),l("td",null,[k(l("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[252]||(e[252]=f=>r.configFile.audio_silenceTimer=f),onChange:e[253]||(e[253]=f=>i.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.audio_silenceTimer]]),k(l("input",{"onUpdate:modelValue":e[254]||(e[254]=f=>r.configFile.audio_silenceTimer=f),onChange:e[255]||(e[255]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.audio_silenceTimer]])])]),l("tr",null,[e[618]||(e[618]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_in_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Input Audio Language:")],-1)),l("td",null,[k(l("select",{id:"audio_in_language","onUpdate:modelValue":e[256]||(e[256]=f=>r.configFile.audio_in_language=f),onChange:e[257]||(e[257]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(r.audioLanguages,f=>(T(),x("option",{key:f.code,value:f.code},Y(f.name),9,klt))),128))],544),[[Ot,r.configFile.audio_in_language]])])])])]),_:1}),z(a,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Dlt,[l("tr",null,[e[619]||(e[619]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"whisper_activate",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Activate Whisper at startup:")],-1)),l("td",null,[l("div",Llt,[k(l("input",{type:"checkbox",id:"whisper_activate",required:"","onUpdate:modelValue":e[258]||(e[258]=f=>r.configFile.whisper_activate=f),onChange:e[259]||(e[259]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.whisper_activate]])])])]),l("tr",null,[e[620]||(e[620]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}})],-1)),l("td",null,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[260]||(e[260]=(...f)=>r.reinstallWhisperService&&r.reinstallWhisperService(...f))},"install whisper")])]),l("tr",null,[e[621]||(e[621]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Whisper model:")],-1)),l("td",null,[l("div",Plt,[k(l("select",{id:"whisper_model","onUpdate:modelValue":e[261]||(e[261]=f=>r.configFile.whisper_model=f),onChange:e[262]||(e[262]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(r.whisperModels,f=>(T(),x("option",{key:f,value:f},Y(f),9,Flt))),128))],544),[[Ot,r.configFile.whisper_model]])])])])])]),_:1}),z(a,{title:"Open AI Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Ult,[l("tr",null,[e[622]||(e[622]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_whisper_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai whisper key:")],-1)),l("td",null,[l("div",Blt,[k(l("input",{type:"text",id:"openai_whisper_key",required:"","onUpdate:modelValue":e[263]||(e[263]=f=>r.configFile.openai_whisper_key=f),onChange:e[264]||(e[264]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.openai_whisper_key]])])])]),l("tr",null,[e[623]||(e[623]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open Ai Whisper model:")],-1)),l("td",null,[l("div",Glt,[k(l("select",{id:"openai_whisper_model","onUpdate:modelValue":e[265]||(e[265]=f=>r.configFile.openai_whisper_model=f),onChange:e[266]||(e[266]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(r.openaiWhisperModels,f=>(T(),x("option",{key:f,value:f},Y(f),9,Vlt))),128))],544),[[Ot,r.configFile.openai_whisper_model]])])])])])]),_:1})]),_:1}),z(a,{title:"TTS services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[z(a,{title:"Browser Audio TTS",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",zlt,[l("tr",null,[e[624]||(e[624]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),l("td",null,[l("div",Hlt,[k(l("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[267]||(e[267]=f=>r.configFile.auto_speak=f),onChange:e[268]||(e[268]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_speak]])])])]),l("tr",null,[e[625]||(e[625]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),l("td",null,[k(l("input",{id:"audio_pitch","onUpdate:modelValue":e[269]||(e[269]=f=>r.configFile.audio_pitch=f),onChange:e[270]||(e[270]=f=>i.settingsChanged=!0),type:"range",min:"0",max:"10",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.audio_pitch]]),k(l("input",{"onUpdate:modelValue":e[271]||(e[271]=f=>r.configFile.audio_pitch=f),onChange:e[272]||(e[272]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.audio_pitch]])])]),l("tr",null,[e[626]||(e[626]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),l("td",null,[k(l("select",{id:"audio_out_voice","onUpdate:modelValue":e[273]||(e[273]=f=>r.configFile.audio_out_voice=f),onChange:e[274]||(e[274]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(i.audioVoices,f=>(T(),x("option",{key:f.name,value:f.name},Y(f.name),9,qlt))),128))],544),[[Ot,r.configFile.audio_out_voice]])])])])]),_:1}),z(a,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Ylt,[l("tr",null,[e[627]||(e[627]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),l("td",null,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[275]||(e[275]=(...f)=>r.reinstallXTTSService&&r.reinstallXTTSService(...f))},"install xtts service")])]),l("tr",null,[e[628]||(e[628]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),l("td",null,[l("div",$lt,[k(l("select",{"onUpdate:modelValue":e[276]||(e[276]=f=>r.xtts_current_language=f),onChange:e[277]||(e[277]=f=>i.settingsChanged=!0)},[(T(!0),x(Le,null,We(i.voice_languages,(f,b)=>(T(),x("option",{key:b,value:f},Y(b),9,Wlt))),128))],544),[[Ot,r.xtts_current_language]])])])]),l("tr",null,[e[629]||(e[629]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),l("td",null,[l("div",Klt,[k(l("select",{"onUpdate:modelValue":e[278]||(e[278]=f=>r.xtts_current_voice=f),onChange:e[279]||(e[279]=f=>i.settingsChanged=!0)},[(T(!0),x(Le,null,We(i.voices,f=>(T(),x("option",{key:f,value:f},Y(f),9,jlt))),128))],544),[[Ot,r.xtts_current_voice]])])])]),l("tr",null,[e[630]||(e[630]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_freq",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Frequency (controls the tone):")],-1)),l("td",null,[l("div",Qlt,[k(l("input",{type:"number",id:"xtts_freq",required:"","onUpdate:modelValue":e[280]||(e[280]=f=>r.configFile.xtts_freq=f),onChange:e[281]||(e[281]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[ue,r.configFile.xtts_freq,void 0,{number:!0}]])])])]),l("tr",null,[e[631]||(e[631]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),l("td",null,[l("div",Xlt,[k(l("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[282]||(e[282]=f=>r.configFile.auto_read=f),onChange:e[283]||(e[283]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.auto_read]])])])]),l("tr",null,[e[632]||(e[632]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_stream_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts stream chunk size:")],-1)),l("td",null,[l("div",Zlt,[k(l("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[284]||(e[284]=f=>r.configFile.xtts_stream_chunk_size=f),onChange:e[285]||(e[285]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.xtts_stream_chunk_size]])])])]),l("tr",null,[e[633]||(e[633]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_temperature",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Temperature:")],-1)),l("td",null,[l("div",Jlt,[k(l("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[286]||(e[286]=f=>r.configFile.xtts_temperature=f),onChange:e[287]||(e[287]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[ue,r.configFile.xtts_temperature,void 0,{number:!0}]])])])]),l("tr",null,[e[634]||(e[634]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_length_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Length Penalty:")],-1)),l("td",null,[l("div",ect,[k(l("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[288]||(e[288]=f=>r.configFile.xtts_length_penalty=f),onChange:e[289]||(e[289]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[ue,r.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),l("tr",null,[e[635]||(e[635]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_repetition_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Repetition Penalty:")],-1)),l("td",null,[l("div",tct,[k(l("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[290]||(e[290]=f=>r.configFile.xtts_repetition_penalty=f),onChange:e[291]||(e[291]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[ue,r.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),l("tr",null,[e[636]||(e[636]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_top_k",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top K:")],-1)),l("td",null,[l("div",nct,[k(l("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[292]||(e[292]=f=>r.configFile.xtts_top_k=f),onChange:e[293]||(e[293]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.xtts_top_k,void 0,{number:!0}]])])])]),l("tr",null,[e[637]||(e[637]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_top_p",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top P:")],-1)),l("td",null,[l("div",sct,[k(l("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[294]||(e[294]=f=>r.configFile.xtts_top_p=f),onChange:e[295]||(e[295]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.xtts_top_p,void 0,{number:!0}]])])])]),l("tr",null,[e[638]||(e[638]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"xtts_speed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Speed:")],-1)),l("td",null,[l("div",ict,[k(l("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[296]||(e[296]=f=>r.configFile.xtts_speed=f),onChange:e[297]||(e[297]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[ue,r.configFile.xtts_speed,void 0,{number:!0}]])])])]),l("tr",null,[e[639]||(e[639]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_text_splitting",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Text Splitting:")],-1)),l("td",null,[l("div",rct,[k(l("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[298]||(e[298]=f=>r.configFile.enable_text_splitting=f),onChange:e[299]||(e[299]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_text_splitting]])])])])])]),_:1}),z(a,{title:"Open AI TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",oct,[l("tr",null,[e[640]||(e[640]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key:")],-1)),l("td",null,[l("div",act,[k(l("input",{type:"text",id:"openai_tts_key",required:"","onUpdate:modelValue":e[300]||(e[300]=f=>r.configFile.openai_tts_key=f),onChange:e[301]||(e[301]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.openai_tts_key]])])])]),l("tr",null,[e[642]||(e[642]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts model:")],-1)),l("td",null,[l("div",lct,[k(l("select",{"onUpdate:modelValue":e[302]||(e[302]=f=>r.configFile.openai_tts_model=f),onChange:e[303]||(e[303]=f=>i.settingsChanged=!0)},e[641]||(e[641]=[l("option",null," tts-1 ",-1),l("option",null," tts-2 ",-1)]),544),[[Ot,r.configFile.openai_tts_model]])])])]),l("tr",null,[e[644]||(e[644]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"openai_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts voice:")],-1)),l("td",null,[l("div",cct,[k(l("select",{"onUpdate:modelValue":e[304]||(e[304]=f=>r.configFile.openai_tts_voice=f),onChange:e[305]||(e[305]=f=>i.settingsChanged=!0)},e[643]||(e[643]=[l("option",null," alloy ",-1),l("option",null," echo ",-1),l("option",null," fable ",-1),l("option",null," nova ",-1),l("option",null," shimmer ",-1)]),544),[[Ot,r.configFile.openai_tts_voice]])])])])])]),_:1}),z(a,{title:"Eleven Labs TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",dct,[l("tr",null,[e[645]||(e[645]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs key:")],-1)),l("td",null,[l("div",uct,[k(l("input",{type:"text",id:"elevenlabs_tts_key",required:"","onUpdate:modelValue":e[306]||(e[306]=f=>r.configFile.elevenlabs_tts_key=f),onChange:e[307]||(e[307]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.elevenlabs_tts_key]])])])]),l("tr",null,[e[646]||(e[646]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_model_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs TTS model ID:")],-1)),l("td",null,[l("div",pct,[k(l("input",{type:"text",id:"elevenlabs_tts_model_id",required:"","onUpdate:modelValue":e[308]||(e[308]=f=>r.configFile.elevenlabs_tts_model_id=f),onChange:e[309]||(e[309]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.elevenlabs_tts_model_id]])])])]),l("tr",null,[e[647]||(e[647]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_stability",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Stability:")],-1)),l("td",null,[l("div",fct,[k(l("input",{type:"number",id:"elevenlabs_tts_voice_stability",required:"","onUpdate:modelValue":e[310]||(e[310]=f=>r.configFile.elevenlabs_tts_voice_stability=f),onChange:e[311]||(e[311]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[ue,r.configFile.elevenlabs_tts_voice_stability]])])])]),l("tr",null,[e[648]||(e[648]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Boost:")],-1)),l("td",null,[l("div",_ct,[k(l("input",{type:"number",id:"elevenlabs_tts_voice_boost",required:"","onUpdate:modelValue":e[312]||(e[312]=f=>r.configFile.elevenlabs_tts_voice_boost=f),onChange:e[313]||(e[313]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1",min:"0",max:"1"},null,544),[[ue,r.configFile.elevenlabs_tts_voice_boost]])])])]),l("tr",null,[e[649]||(e[649]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elevenlabs_tts_voice_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice ID:")],-1)),l("td",null,[l("div",mct,[k(l("select",{"onUpdate:modelValue":e[314]||(e[314]=f=>r.configFile.elevenlabs_tts_voice_id=f),onChange:e[315]||(e[315]=f=>i.settingsChanged=!0)},[(T(!0),x(Le,null,We(i.voices,f=>(T(),x("option",{key:f.voice_id,value:f.voice_id},Y(f.name),9,hct))),128))],544),[[Ot,r.configFile.elevenlabs_tts_voice_id]])])])])])]),_:1}),z(a,{title:"Fish TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",gct,[l("tr",null,[e[650]||(e[650]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"fish_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fish TTS key:")],-1)),l("td",null,[l("div",bct,[k(l("input",{type:"text",id:"fish_tts_key",required:"","onUpdate:modelValue":e[316]||(e[316]=f=>r.configFile.fish_tts_key=f),onChange:e[317]||(e[317]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.fish_tts_key]])])])]),l("tr",null,[e[651]||(e[651]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"fish_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fish TTS voice:")],-1)),l("td",null,[l("div",yct,[k(l("input",{type:"text",id:"fish_tts_voice",required:"","onUpdate:modelValue":e[318]||(e[318]=f=>r.configFile.fish_tts_voice=f),onChange:e[319]||(e[319]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.fish_tts_voice]])])])])])]),_:1})]),_:1}),z(a,{title:"TTI services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[z(a,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Ect,[l("tr",null,[e[653]||(e[653]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),l("td",null,[l("div",vct,[k(l("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[320]||(e[320]=f=>r.configFile.enable_sd_service=f),onChange:e[321]||(e[321]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_sd_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[322]||(e[322]=f=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},e[652]||(e[652]=[l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),l("tr",null,[e[655]||(e[655]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),l("td",null,[l("div",Sct,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[323]||(e[323]=(...f)=>r.reinstallSDService&&r.reinstallSDService(...f))},"install sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[324]||(e[324]=(...f)=>r.upgradeSDService&&r.upgradeSDService(...f))},"upgrade sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[325]||(e[325]=(...f)=>r.startSDService&&r.startSDService(...f))},"start sd service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[326]||(e[326]=(...f)=>r.showSD&&r.showSD(...f))},"show sd ui"),e[654]||(e[654]=l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/stable-diffusion-webui/blob/master/LICENSE.txt",target:"_blank"},"automatic1111's sd licence",-1))])]),l("td",null,[l("div",Tct,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[327]||(e[327]=(...f)=>r.reinstallSDService&&r.reinstallSDService(...f))},"install sd service")])])]),l("tr",null,[e[656]||(e[656]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),l("td",null,[l("div",xct,[k(l("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[328]||(e[328]=f=>r.configFile.sd_base_url=f),onChange:e[329]||(e[329]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.sd_base_url]])])])])])]),_:1}),z(a,{title:"Diffusers service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Cct,[l("tr",null,[e[658]||(e[658]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_diffusers_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Diffusers service:")],-1)),l("td",null,[l("div",wct,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[330]||(e[330]=(...f)=>r.reinstallDiffusersService&&r.reinstallDiffusersService(...f))},"install diffusers service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[331]||(e[331]=(...f)=>r.upgradeDiffusersService&&r.upgradeDiffusersService(...f))},"upgrade diffusers service"),e[657]||(e[657]=l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/huggingface/diffusers?tab=Apache-2.0-1-ov-file#readme",target:"_blank"},"Diffusers licence",-1))])])]),l("tr",null,[e[659]||(e[659]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"diffusers_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers model:")],-1)),l("td",null,[l("div",Rct,[k(l("input",{type:"text",id:"diffusers_model",required:"","onUpdate:modelValue":e[332]||(e[332]=f=>r.configFile.diffusers_model=f),onChange:e[333]||(e[333]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.diffusers_model]])])]),e[660]||(e[660]=l("td",null,null,-1))])])]),_:1}),z(a,{title:"Diffusers client service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Act,[l("tr",null,[e[661]||(e[661]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"diffusers_client_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers client base url:")],-1)),l("td",null,[l("div",Mct,[k(l("input",{type:"text",id:"diffusers_client_base_url",required:"","onUpdate:modelValue":e[334]||(e[334]=f=>r.configFile.diffusers_client_base_url=f),onChange:e[335]||(e[335]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.diffusers_client_base_url]])])]),e[662]||(e[662]=l("td",null,null,-1))])])]),_:1}),z(a,{title:"Midjourney",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Nct,[l("tr",null,[e[663]||(e[663]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"midjourney key:")],-1)),l("td",null,[l("div",Ict,[k(l("input",{type:"text",id:"midjourney_key",required:"","onUpdate:modelValue":e[336]||(e[336]=f=>r.configFile.midjourney_key=f),onChange:e[337]||(e[337]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.midjourney_key]])])])]),l("tr",null,[e[664]||(e[664]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_timeout",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"request timeout(s):")],-1)),l("td",null,[l("div",Oct,[k(l("input",{type:"number",min:"10",max:"2048",id:"midjourney_timeout",required:"","onUpdate:modelValue":e[338]||(e[338]=f=>r.configFile.midjourney_timeout=f),onChange:e[339]||(e[339]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.midjourney_timeout]])])])]),l("tr",null,[e[665]||(e[665]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"midjourney_retries",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"number of retries:")],-1)),l("td",null,[l("div",kct,[k(l("input",{type:"number",min:"0",max:"2048",id:"midjourney_retries",required:"","onUpdate:modelValue":e[340]||(e[340]=f=>r.configFile.midjourney_retries=f),onChange:e[341]||(e[341]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.midjourney_retries]])])])])])]),_:1}),z(a,{title:"Dall-E",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Dct,[l("tr",null,[e[666]||(e[666]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"dall_e_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e key:")],-1)),l("td",null,[l("div",Lct,[k(l("input",{type:"text",id:"dall_e_key",required:"","onUpdate:modelValue":e[342]||(e[342]=f=>r.configFile.dall_e_key=f),onChange:e[343]||(e[343]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.dall_e_key]])])])]),l("tr",null,[e[668]||(e[668]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"dall_e_generation_engine",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e generation engine:")],-1)),l("td",null,[l("div",Pct,[k(l("select",{"onUpdate:modelValue":e[344]||(e[344]=f=>r.configFile.dall_e_generation_engine=f),onChange:e[345]||(e[345]=f=>i.settingsChanged=!0)},e[667]||(e[667]=[l("option",null," dall-e-2 ",-1),l("option",null," dall-e-3 ",-1)]),544),[[Ot,r.configFile.dall_e_generation_engine]])])])])])]),_:1}),z(a,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Fct,[l("tr",null,[e[670]||(e[670]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),l("td",null,[l("div",Uct,[k(l("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[346]||(e[346]=f=>r.configFile.enable_comfyui_service=f),onChange:e[347]||(e[347]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_comfyui_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[348]||(e[348]=f=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},e[669]||(e[669]=[l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),l("tr",null,[e[671]||(e[671]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Available models (only if local):")],-1)),l("td",null,[l("div",Bct,[k(l("select",{id:"comfyui_model",required:"","onUpdate:modelValue":e[349]||(e[349]=f=>r.configFile.comfyui_model=f),onChange:e[350]||(e[350]=f=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(T(!0),x(Le,null,We(i.comfyui_models,(f,b)=>(T(),x("option",{key:f,value:f},Y(f),9,Gct))),128))],544),[[Ot,r.configFile.comfyui_model]])])])]),l("tr",null,[e[673]||(e[673]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui model:")],-1)),l("td",null,[l("div",Vct,[k(l("input",{type:"text",id:"comfyui_model",required:"","onUpdate:modelValue":e[351]||(e[351]=f=>r.configFile.comfyui_model=f),onChange:e[352]||(e[352]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.comfyui_model]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[353]||(e[353]=f=>this.$store.state.messageBox.showMessage("Activates Stable diffusion service. The service will be automatically loaded at startup alowing you to use the stable diffusion endpoint to generate images"))},e[672]||(e[672]=[l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),l("tr",null,[e[675]||(e[675]=l("td",{style:{"min-width":"200px"}},null,-1)),l("td",null,[l("div",zct,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[354]||(e[354]=(...f)=>r.reinstallComfyUIService&&r.reinstallComfyUIService(...f))},"install comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[355]||(e[355]=(...f)=>r.upgradeComfyUIService&&r.upgradeComfyUIService(...f))},"upgrade comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[356]||(e[356]=(...f)=>r.startComfyUIService&&r.startComfyUIService(...f))},"start comfyui service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[357]||(e[357]=(...f)=>r.showComfyui&&r.showComfyui(...f))},"show comfyui"),e[674]||(e[674]=l("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:"https://github.com/ParisNeo/ComfyUI/blob/master/LICENSE",target:"_blank"},"comfyui licence",-1))])])]),l("tr",null,[e[676]||(e[676]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),l("td",null,[l("div",Hct,[k(l("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[358]||(e[358]=f=>r.configFile.comfyui_base_url=f),onChange:e[359]||(e[359]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.comfyui_base_url]])])])])])]),_:1})]),_:1}),z(a,{title:"TTT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[z(a,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",qct,[l("tr",null,[e[678]||(e[678]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),l("td",null,[l("div",Yct,[k(l("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[360]||(e[360]=f=>r.configFile.enable_ollama_service=f),onChange:e[361]||(e[361]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_ollama_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[362]||(e[362]=f=>this.$store.state.messageBox.showMessage(`Activates ollama service. The service will be automatically loaded at startup alowing you to use the ollama binding. If you are using windows, this uses wsl which requires you to have it installed or at least activated. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},e[677]||(e[677]=[l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),l("tr",null,[e[679]||(e[679]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),l("td",null,[l("div",Yct,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[363]||(e[363]=(...f)=>r.reinstallOLLAMAService&&r.reinstallOLLAMAService(...f))},"install ollama service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[364]||(e[364]=(...f)=>r.startollamaService&&r.startollamaService(...f))},"start ollama service")])])]),l("tr",null,[e[680]||(e[680]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),l("td",null,[l("div",$ct,[k(l("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[365]||(e[365]=f=>r.configFile.ollama_base_url=f),onChange:e[366]||(e[366]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.ollama_base_url]])])])])])]),_:1}),z(a,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Wct,[l("tr",null,[e[682]||(e[682]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),l("td",null,[l("div",Kct,[k(l("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[367]||(e[367]=f=>r.configFile.enable_vllm_service=f),onChange:e[368]||(e[368]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_vllm_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[369]||(e[369]=f=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding. +Here is how you can do that`))},e[677]||(e[677]=[l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),l("tr",null,[e[679]||(e[679]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),l("td",null,[l("div",$ct,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[363]||(e[363]=(...f)=>r.reinstallOLLAMAService&&r.reinstallOLLAMAService(...f))},"install ollama service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[364]||(e[364]=(...f)=>r.startollamaService&&r.startollamaService(...f))},"start ollama service")])])]),l("tr",null,[e[680]||(e[680]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),l("td",null,[l("div",Wct,[k(l("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[365]||(e[365]=f=>r.configFile.ollama_base_url=f),onChange:e[366]||(e[366]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.ollama_base_url]])])])])])]),_:1}),z(a,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",Kct,[l("tr",null,[e[682]||(e[682]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),l("td",null,[l("div",jct,[k(l("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[367]||(e[367]=f=>r.configFile.enable_vllm_service=f),onChange:e[368]||(e[368]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_vllm_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[369]||(e[369]=f=>this.$store.state.messageBox.showMessage(`Activates vllm service. The service will be automatically loaded at startup alowing you to use the elf binding. If you are using windows, this uses wsl which requires you to have it installed or at least activated. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},e[681]||(e[681]=[l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),l("tr",null,[e[683]||(e[683]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),l("td",null,[l("div",jct,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[370]||(e[370]=(...f)=>r.reinstallvLLMService&&r.reinstallvLLMService(...f))},"install vLLM service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[371]||(e[371]=(...f)=>r.startvLLMService&&r.startvLLMService(...f))},"start vllm service")])])]),l("tr",null,[e[684]||(e[684]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),l("td",null,[l("div",Qct,[k(l("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[372]||(e[372]=f=>r.configFile.vllm_url=f),onChange:e[373]||(e[373]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_url]])])])]),l("tr",null,[e[686]||(e[686]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),l("td",null,[l("div",Xct,[l("div",Zct,[e[685]||(e[685]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),l("p",Jct,[k(l("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[374]||(e[374]=f=>r.configFile.vllm_gpu_memory_utilization=f),onChange:e[375]||(e[375]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.vllm_gpu_memory_utilization]])])]),k(l("input",{id:"vllm_gpu_memory_utilization",onChange:e[376]||(e[376]=f=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[377]||(e[377]=f=>r.configFile.vllm_gpu_memory_utilization=f),min:"0.10",max:"1",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.vllm_gpu_memory_utilization]])])])]),l("tr",null,[e[687]||(e[687]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),l("td",null,[l("div",edt,[k(l("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[378]||(e[378]=f=>r.configFile.vllm_max_num_seqs=f),onChange:e[379]||(e[379]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_max_num_seqs]])])])]),l("tr",null,[e[688]||(e[688]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),l("td",null,[l("div",tdt,[k(l("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[380]||(e[380]=f=>r.configFile.vllm_max_model_len=f),onChange:e[381]||(e[381]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_max_model_len]])])])]),l("tr",null,[e[689]||(e[689]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),l("td",null,[l("div",ndt,[k(l("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[382]||(e[382]=f=>r.configFile.vllm_model_path=f),onChange:e[383]||(e[383]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_model_path]])])])])])]),_:1}),z(a,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",sdt,[l("tr",null,[e[691]||(e[691]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),l("td",null,[l("div",idt,[k(l("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[384]||(e[384]=f=>r.configFile.enable_petals_service=f),onChange:e[385]||(e[385]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_petals_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[386]||(e[386]=f=>this.$store.state.messageBox.showMessage(`Activates Petals service. The service will be automatically loaded at startup alowing you to use the petals endpoint to generate text in a distributed network. +Here is how you can do that`))},e[681]||(e[681]=[l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),l("tr",null,[e[683]||(e[683]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),l("td",null,[l("div",Qct,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[370]||(e[370]=(...f)=>r.reinstallvLLMService&&r.reinstallvLLMService(...f))},"install vLLM service"),l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[371]||(e[371]=(...f)=>r.startvLLMService&&r.startvLLMService(...f))},"start vllm service")])])]),l("tr",null,[e[684]||(e[684]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),l("td",null,[l("div",Xct,[k(l("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[372]||(e[372]=f=>r.configFile.vllm_url=f),onChange:e[373]||(e[373]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_url]])])])]),l("tr",null,[e[686]||(e[686]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),l("td",null,[l("div",Zct,[l("div",Jct,[e[685]||(e[685]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),l("p",edt,[k(l("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[374]||(e[374]=f=>r.configFile.vllm_gpu_memory_utilization=f),onChange:e[375]||(e[375]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.vllm_gpu_memory_utilization]])])]),k(l("input",{id:"vllm_gpu_memory_utilization",onChange:e[376]||(e[376]=f=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[377]||(e[377]=f=>r.configFile.vllm_gpu_memory_utilization=f),min:"0.10",max:"1",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.vllm_gpu_memory_utilization]])])])]),l("tr",null,[e[687]||(e[687]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),l("td",null,[l("div",tdt,[k(l("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[378]||(e[378]=f=>r.configFile.vllm_max_num_seqs=f),onChange:e[379]||(e[379]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_max_num_seqs]])])])]),l("tr",null,[e[688]||(e[688]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),l("td",null,[l("div",ndt,[k(l("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[380]||(e[380]=f=>r.configFile.vllm_max_model_len=f),onChange:e[381]||(e[381]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_max_model_len]])])])]),l("tr",null,[e[689]||(e[689]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),l("td",null,[l("div",sdt,[k(l("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[382]||(e[382]=f=>r.configFile.vllm_model_path=f),onChange:e[383]||(e[383]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.vllm_model_path]])])])])])]),_:1}),z(a,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",idt,[l("tr",null,[e[691]||(e[691]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),l("td",null,[l("div",rdt,[k(l("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[384]||(e[384]=f=>r.configFile.enable_petals_service=f),onChange:e[385]||(e[385]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.enable_petals_service]])])]),l("td",null,[l("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[386]||(e[386]=f=>this.$store.state.messageBox.showMessage(`Activates Petals service. The service will be automatically loaded at startup alowing you to use the petals endpoint to generate text in a distributed network. If You are using windows, this will install wsl so you need to activate it. -Here is how you can do that`))},e[690]||(e[690]=[l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),l("tr",null,[e[692]||(e[692]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),l("td",null,[l("div",rdt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[387]||(e[387]=(...f)=>r.reinstallPetalsService&&r.reinstallPetalsService(...f))},"install petals service")])])]),l("tr",null,[e[693]||(e[693]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),l("td",null,[l("div",odt,[k(l("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[388]||(e[388]=f=>r.configFile.petals_base_url=f),onChange:e[389]||(e[389]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.petals_base_url]])])])])])]),_:1})]),_:1}),z(a,{title:"TTV settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",adt,[l("tr",null,[e[694]||(e[694]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"lumalabs_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Lumalabs key:")],-1)),l("td",null,[l("div",ldt,[k(l("input",{type:"text",id:"lumalabs_key",required:"","onUpdate:modelValue":e[390]||(e[390]=f=>r.configFile.lumalabs_key=f),onChange:e[391]||(e[391]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.lumalabs_key]])])])])])]),_:1}),z(a,{title:"Misc",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[z(a,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",cdt,[l("tr",null,[e[695]||(e[695]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),l("td",null,[l("div",ddt,[k(l("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[392]||(e[392]=f=>r.configFile.elastic_search_service=f),onChange:e[393]||(e[393]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.elastic_search_service]])])])]),l("tr",null,[e[696]||(e[696]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),l("td",null,[l("div",udt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[394]||(e[394]=(...f)=>r.reinstallElasticSearchService&&r.reinstallElasticSearchService(...f))},"install ElasticSearch service")])])]),l("tr",null,[e[697]||(e[697]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),l("td",null,[l("div",pdt,[k(l("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[395]||(e[395]=f=>r.configFile.elastic_search_url=f),onChange:e[396]||(e[396]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.elastic_search_url]])])])])])]),_:1})]),_:1})],2)]),l("div",fdt,[l("div",_dt,[l("button",{onClick:e[397]||(e[397]=$(f=>i.bzc_collapsed=!i.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[698]||(e[698]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.bzc_collapsed]]),k(l("div",null,e[699]||(e[699]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.bzc_collapsed]]),e[701]||(e[701]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),r.configFile.binding_name?B("",!0):(T(),x("div",mdt,e[700]||(e[700]=[l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),Ze(" No binding selected! ")]))),r.configFile.binding_name?(T(),x("div",hdt,"|")):B("",!0),r.configFile.binding_name?(T(),x("div",gdt,[l("div",bdt,[l("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,ydt),l("p",Edt,Y(r.binding_name),1)])])):B("",!0)])]),l("div",{class:Pe([{hidden:i.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[r.bindingsZoo&&r.bindingsZoo.length>0?(T(),x("div",vdt,[l("label",Sdt," Bindings: ("+Y(r.bindingsZoo.length)+") ",1),l("div",{class:Pe(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.bzl_collapsed?"":"max-h-96"])},[z(Oi,{name:"list"},{default:Ne(()=>[(T(!0),x(Le,null,We(r.bindingsZoo,(f,b)=>(T(),at(d,{ref_for:!0,ref:"bindingZoo",key:"index-"+b+"-"+f.folder,binding:f,"on-selected":r.onBindingSelected,"on-reinstall":r.onReinstallBinding,"on-unInstall":r.onUnInstallBinding,"on-install":r.onInstallBinding,"on-settings":r.onSettingsBinding,"on-reload-binding":r.onReloadBinding,selected:f.folder===r.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):B("",!0),i.bzl_collapsed?(T(),x("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[398]||(e[398]=f=>i.bzl_collapsed=!i.bzl_collapsed)},e[702]||(e[702]=[l("i",{"data-feather":"chevron-up"},null,-1)]))):(T(),x("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[399]||(e[399]=f=>i.bzl_collapsed=!i.bzl_collapsed)},e[703]||(e[703]=[l("i",{"data-feather":"chevron-down"},null,-1)])))],2)]),l("div",Tdt,[l("div",xdt,[l("button",{onClick:e[400]||(e[400]=$(f=>r.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[k(l("div",null,e[704]||(e[704]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.mzc_collapsed]]),k(l("div",null,e[705]||(e[705]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.mzc_collapsed]]),e[708]||(e[708]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),l("div",Cdt,[r.configFile.binding_name?B("",!0):(T(),x("div",wdt,e[706]||(e[706]=[l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),Ze(" Select binding first! ")]))),!r.configFile.model_name&&r.configFile.binding_name?(T(),x("div",Rdt,e[707]||(e[707]=[l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),Ze(" No model selected! ")]))):B("",!0),r.configFile.model_name?(T(),x("div",Adt,"|")):B("",!0),r.configFile.model_name?(T(),x("div",Mdt,[l("div",Ndt,[l("img",{src:r.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,Idt),l("p",Odt,Y(r.configFile.model_name),1)])])):B("",!0)])])]),l("div",{class:Pe([{hidden:i.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",kdt,[l("div",Ddt,[l("div",Ldt,[i.searchModelInProgress?(T(),x("div",Pdt,e[709]||(e[709]=[l("div",{role:"status"},[l("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),l("span",{class:"sr-only"},"Loading...")],-1)]))):B("",!0),i.searchModelInProgress?B("",!0):(T(),x("div",Fdt,e[710]||(e[710]=[l("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)])))]),k(l("input",{type:"search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search models...",required:"","onUpdate:modelValue":e[401]||(e[401]=f=>i.searchModel=f),onKeyup:e[402]||(e[402]=qn((...f)=>r.searchModel_func&&r.searchModel_func(...f),["enter"]))},null,544),[[ue,i.searchModel]]),i.searchModel?(T(),x("button",{key:0,onClick:e[403]||(e[403]=$(f=>i.searchModel="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):B("",!0)])]),l("div",null,[k(l("input",{"onUpdate:modelValue":e[404]||(e[404]=f=>i.show_only_installed_models=f),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[Ye,i.show_only_installed_models]]),e[711]||(e[711]=l("label",{for:"only_installed"},"Show only installed models",-1))]),l("div",null,[z(u,{radioOptions:i.sortOptions,onRadioSelected:r.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),e[719]||(e[719]=l("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",class:"mb-4 font-bold underline text-blue-500 pb-4"},"Hugging face Leaderboard",-1)),i.is_loading_zoo?(T(),x("div",Udt,e[712]||(e[712]=[l("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),l("p",{class:"heartbeat-text"},"Loading models Zoo",-1)]))):B("",!0),i.models_zoo&&i.models_zoo.length>0?(T(),x("div",Bdt,[l("label",Gdt," Models: ("+Y(i.models_zoo.length)+") ",1),l("div",{class:Pe(["overflow-y-auto p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",i.mzl_collapsed?"":"max-h-96"])},[z(Oi,{name:"list"},{default:Ne(()=>[(T(!0),x(Le,null,We(r.rendered_models_zoo,(f,b)=>(T(),at(_,{ref_for:!0,ref:"modelZoo",key:"index-"+b+"-"+f.name,model:f,"is-installed":f.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onModelSelected,selected:f.name===r.configFile.model_name,model_type:f.model_type,"on-copy":r.onCopy,"on-copy-link":r.onCopyLink,"on-cancel-install":r.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),l("button",{ref:"load_more_models",class:"relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",onClick:e[405]||(e[405]=(...f)=>r.load_more_models&&r.load_more_models(...f))},"Load more models",512)]),_:1})],2)])):B("",!0),i.mzl_collapsed?(T(),x("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[406]||(e[406]=(...f)=>r.open_mzl&&r.open_mzl(...f))},e[713]||(e[713]=[l("i",{"data-feather":"chevron-up"},null,-1)]))):(T(),x("button",{key:3,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[407]||(e[407]=(...f)=>r.open_mzl&&r.open_mzl(...f))},e[714]||(e[714]=[l("i",{"data-feather":"chevron-down"},null,-1)]))),l("div",Vdt,[l("div",zdt,[l("div",null,[l("div",Hdt,[e[715]||(e[715]=l("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),k(l("input",{type:"text","onUpdate:modelValue":e[408]||(e[408]=f=>i.reference_path=f),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter Path ...",required:""},null,512),[[ue,i.reference_path]])]),l("button",{type:"button",onClick:e[409]||(e[409]=$(f=>r.onCreateReference(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Add reference")]),i.modelDownlaodInProgress?B("",!0):(T(),x("div",qdt,[l("div",Ydt,[e[716]||(e[716]=l("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),k(l("input",{type:"text","onUpdate:modelValue":e[410]||(e[410]=f=>i.addModel.url=f),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter URL ...",required:""},null,512),[[ue,i.addModel.url]])]),l("button",{type:"button",onClick:e[411]||(e[411]=$(f=>r.onInstallAddModel(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Download")])),i.modelDownlaodInProgress?(T(),x("div",$dt,[e[718]||(e[718]=l("div",{role:"status",class:"justify-center"},null,-1)),l("div",Wdt,[l("div",Kdt,[l("div",jdt,[e[717]||(e[717]=Zr(' Downloading Loading...',1)),l("span",Qdt,Y(Math.floor(i.addModel.progress))+"%",1)]),l("div",{class:"mx-1 opacity-80 line-clamp-1",title:i.addModel.url},Y(i.addModel.url),9,Xdt),l("div",Zdt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Vt({width:i.addModel.progress+"%"})},null,4)]),l("div",Jdt,[l("span",eut,"Download speed: "+Y(r.speed_computed)+"/s",1),l("span",tut,Y(r.downloaded_size_computed)+"/"+Y(r.total_size_computed),1)])])]),l("div",nut,[l("div",sut,[l("div",iut,[l("button",{onClick:e[412]||(e[412]=$((...f)=>r.onCancelInstall&&r.onCancelInstall(...f),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])):B("",!0)])])],2)]),l("div",rut,[l("div",out,[l("button",{onClick:e[415]||(e[415]=$(f=>i.pzc_collapsed=!i.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[k(l("div",null,e[720]||(e[720]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.pzc_collapsed]]),k(l("div",null,e[721]||(e[721]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.pzc_collapsed]]),e[724]||(e[724]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),r.configFile.personalities?(T(),x("div",aut,"|")):B("",!0),l("div",lut,Y(r.active_pesonality),1),r.configFile.personalities?(T(),x("div",cut,"|")):B("",!0),r.configFile.personalities?(T(),x("div",dut,[r.mountedPersArr.length>0?(T(),x("div",uut,[(T(!0),x(Le,null,We(r.mountedPersArr,(f,b)=>(T(),x("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:b+"-"+f.name,ref_for:!0,ref:"mountedPersonalities"},[l("div",put,[l("button",{onClick:$(y=>r.onPersonalitySelected(f),["stop"])},[l("img",{src:i.bUrl+f.avatar,onError:e[413]||(e[413]=(...y)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...y)),class:Pe(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",r.configFile.active_personality_id==r.configFile.personalities.indexOf(f.full_path)?"border-secondary":"border-transparent z-0"]),title:f.name},null,42,_ut)],8,fut),l("button",{onClick:$(y=>r.unmountPersonality(f),["stop"])},e[722]||(e[722]=[l("span",{class:"hidden group-hover:block -top-2 -right-1 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[l("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)]),8,mut)])]))),128))])):B("",!0)])):B("",!0),l("button",{onClick:e[414]||(e[414]=$(f=>r.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},e[723]||(e[723]=[l("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]))])]),l("div",{class:Pe([{hidden:i.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",hut,[e[727]||(e[727]=l("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),l("div",gut,[l("div",but,[i.searchPersonalityInProgress?(T(),x("div",yut,e[725]||(e[725]=[l("div",{role:"status"},[l("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),l("span",{class:"sr-only"},"Loading...")],-1)]))):B("",!0),i.searchPersonalityInProgress?B("",!0):(T(),x("div",Eut,e[726]||(e[726]=[l("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)])))]),k(l("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search personality...",required:"","onUpdate:modelValue":e[416]||(e[416]=f=>i.searchPersonality=f),onKeyup:e[417]||(e[417]=$((...f)=>r.searchPersonality_func&&r.searchPersonality_func(...f),["stop"]))},null,544),[[ue,i.searchPersonality]]),i.searchPersonality?(T(),x("button",{key:0,onClick:e[418]||(e[418]=$(f=>i.searchPersonality="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):B("",!0)])]),i.searchPersonality?B("",!0):(T(),x("div",vut,[l("label",Sut," Personalities Category: ("+Y(i.persCatgArr.length)+") ",1),l("select",{id:"persCat",onChange:e[419]||(e[419]=f=>r.update_personality_category(f.target.value,r.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(T(!0),x(Le,null,We(i.persCatgArr,(f,b)=>(T(),x("option",{key:b,selected:f==this.configFile.personality_category},Y(f),9,Tut))),128))],32)])),l("div",null,[i.personalitiesFiltered.length>0?(T(),x("div",xut,[l("label",Cut,Y(i.searchPersonality?"Search results":"Personalities")+": ("+Y(i.personalitiesFiltered.length)+") ",1),l("div",{class:Pe(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.pzl_collapsed?"":"max-h-96"])},[z(Oi,{name:"bounce"},{default:Ne(()=>[(T(!0),x(Le,null,We(i.personalitiesFiltered,(f,b)=>(T(),at(m,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+b+"-"+f.name,personality:f,select_language:!0,full_path:f.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(y=>y===f.full_path||y===f.full_path+":"+f.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":r.onSettingsPersonality,"on-copy-personality-name":r.onCopyPersonalityName,"on-copy-to_custom":r.onCopyToCustom,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder"]))),128))]),_:1})],2)])):B("",!0)]),i.pzl_collapsed?(T(),x("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[420]||(e[420]=f=>i.pzl_collapsed=!i.pzl_collapsed)},e[728]||(e[728]=[l("i",{"data-feather":"chevron-up"},null,-1)]))):(T(),x("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[421]||(e[421]=f=>i.pzl_collapsed=!i.pzl_collapsed)},e[729]||(e[729]=[l("i",{"data-feather":"chevron-down"},null,-1)])))],2)]),l("div",wut,[l("div",Rut,[l("button",{onClick:e[422]||(e[422]=$(f=>i.mc_collapsed=!i.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[k(l("div",null,e[730]||(e[730]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.mc_collapsed]]),k(l("div",null,e[731]||(e[731]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.mc_collapsed]]),e[732]||(e[732]=l("p",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1))])]),l("div",{class:Pe([{hidden:i.mc_collapsed},"flex flex-col mb-2 p-2"])},[l("div",Aut,[l("div",Mut,[k(l("input",{id:"override-model-parameters",type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[423]||(e[423]=$(()=>{},["stop"])),"onUpdate:modelValue":e[424]||(e[424]=f=>r.configFile.override_personality_model_parameters=f),onChange:e[425]||(e[425]=f=>r.update_setting("override_personality_model_parameters",r.configFile.override_personality_model_parameters))},null,544),[[Ye,r.configFile.override_personality_model_parameters]]),e[733]||(e[733]=l("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1))])]),l("div",{class:Pe(r.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[l("div",Nut,[e[734]||(e[734]=l("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),k(l("input",{type:"text",id:"seed","onUpdate:modelValue":e[426]||(e[426]=f=>r.configFile.seed=f),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[ue,r.configFile.seed]])]),l("div",Iut,[l("div",Out,[l("div",kut,[e[735]||(e[735]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),l("p",Dut,[k(l("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[427]||(e[427]=f=>r.configFile.temperature=f),onChange:e[428]||(e[428]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.temperature]])])]),k(l("input",{id:"temperature",onChange:e[429]||(e[429]=f=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[430]||(e[430]=f=>r.configFile.temperature=f),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.temperature]])])]),l("div",Lut,[l("div",Put,[l("div",Fut,[e[736]||(e[736]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),l("p",Uut,[k(l("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[431]||(e[431]=f=>r.configFile.n_predict=f),onChange:e[432]||(e[432]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.n_predict]])])]),k(l("input",{id:"predict",type:"range",onChange:e[433]||(e[433]=f=>i.settingsChanged=!0),"onUpdate:modelValue":e[434]||(e[434]=f=>r.configFile.n_predict=f),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.n_predict]])])]),l("div",But,[l("div",Gut,[l("div",Vut,[e[737]||(e[737]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),l("p",zut,[k(l("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[435]||(e[435]=f=>r.configFile.top_k=f),onChange:e[436]||(e[436]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.top_k]])])]),k(l("input",{id:"top_k",type:"range",onChange:e[437]||(e[437]=f=>i.settingsChanged=!0),"onUpdate:modelValue":e[438]||(e[438]=f=>r.configFile.top_k=f),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.top_k]])])]),l("div",Hut,[l("div",qut,[l("div",Yut,[e[738]||(e[738]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),l("p",$ut,[k(l("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[439]||(e[439]=f=>r.configFile.top_p=f),onChange:e[440]||(e[440]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.top_p]])])]),k(l("input",{id:"top_p",type:"range","onUpdate:modelValue":e[441]||(e[441]=f=>r.configFile.top_p=f),min:"0",max:"1",step:"0.01",onChange:e[442]||(e[442]=f=>i.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.top_p]])])]),l("div",Wut,[l("div",Kut,[l("div",jut,[e[739]||(e[739]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),l("p",Qut,[k(l("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[443]||(e[443]=f=>r.configFile.repeat_penalty=f),onChange:e[444]||(e[444]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.repeat_penalty]])])]),k(l("input",{id:"repeat_penalty",onChange:e[445]||(e[445]=f=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[446]||(e[446]=f=>r.configFile.repeat_penalty=f),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.repeat_penalty]])])]),l("div",Xut,[l("div",Zut,[l("div",Jut,[e[740]||(e[740]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),l("p",ept,[k(l("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[447]||(e[447]=f=>r.configFile.repeat_last_n=f),onChange:e[448]||(e[448]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.repeat_last_n]])])]),k(l("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[449]||(e[449]=f=>r.configFile.repeat_last_n=f),min:"0",max:"100",step:"1",onChange:e[450]||(e[450]=f=>i.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.repeat_last_n]])])])],2)],2)])],2)]),z(h,{ref:"addmodeldialog"},null,512),z(g,{class:"z-20",show:i.variantSelectionDialogVisible,choices:i.variant_choices,onChoiceSelected:r.onVariantChoiceSelected,onCloseDialog:r.oncloseVariantChoiceDialog,onChoiceValidated:r.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const npt=st(drt,[["render",tpt],["__scopeId","data-v-cb1f211d"]]),spt={components:{ClipBoardTextInput:O0,Card:cp},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const n={model_name:this.selectedModel,dataset_file:this.selectedDataset,max_length:this.max_length,batch_size:this.batch_size,lr:this.lr,num_epochs:this.num_epochs,output_dir:this.selectedFolder};te.post("/start_training",n).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(n){var t;console.log("here");const e=(t=n.target.files[0])==null?void 0:t.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(n){const e=n.target.files;e.length>0&&(this.selectedDataset=e[0])}},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}}},watch:{model_name(n){console.log("watching model_name",n),this.$refs.clipboardInput.inputValue=n}}},ipt={key:0,class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},rpt={class:"mb-4"},opt=["value"],apt={class:"mb-4"},lpt={class:"mb-4"},cpt={class:"mb-4"},dpt={class:"mb-4"},upt={class:"mb-4"},ppt={class:"mb-4"},fpt={key:1};function _pt(n,e,t,s,i,r){const o=Je("Card"),a=Je("ClipBoardTextInput");return r.selectedModel!==null&&r.selectedModel.toLowerCase().includes("gptq")?(T(),x("div",ipt,[l("form",{onSubmit:e[2]||(e[2]=$((...c)=>r.submitForm&&r.submitForm(...c),["prevent"])),class:""},[z(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[z(o,{title:"Model",class:"",isHorizontal:!1},{default:Ne(()=>[l("div",rpt,[e[3]||(e[3]=l("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),k(l("select",{"onUpdate:modelValue":e[0]||(e[0]=c=>r.selectedModel=c),onChange:e[1]||(e[1]=(...c)=>n.setModel&&n.setModel(...c)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(T(!0),x(Le,null,We(r.models,c=>(T(),x("option",{key:c,value:c},Y(c),9,opt))),128))],544),[[Ot,r.selectedModel]])])]),_:1}),z(o,{title:"Data",isHorizontal:!1},{default:Ne(()=>[l("div",apt,[e[4]||(e[4]=l("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1)),z(a,{id:"model_path",inputType:"file",value:i.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),z(o,{title:"Training",isHorizontal:!1},{default:Ne(()=>[l("div",lpt,[e[5]||(e[5]=l("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1)),z(a,{id:"model_path",inputType:"integer",value:i.lr},null,8,["value"])]),l("div",cpt,[e[6]||(e[6]=l("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1)),z(a,{id:"model_path",inputType:"integer",value:i.num_epochs},null,8,["value"])]),l("div",dpt,[e[7]||(e[7]=l("label",{for:"max_length",class:"text-sm"},"Max Length:",-1)),z(a,{id:"model_path",inputType:"integer",value:i.max_length},null,8,["value"])]),l("div",upt,[e[8]||(e[8]=l("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1)),z(a,{id:"model_path",inputType:"integer",value:i.batch_size},null,8,["value"])])]),_:1}),z(o,{title:"Output",isHorizontal:!1},{default:Ne(()=>[l("div",ppt,[e[9]||(e[9]=l("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1)),z(a,{id:"model_path",inputType:"text",value:n.output_dir},null,8,["value"])])]),_:1})]),_:1}),z(o,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>e[10]||(e[10]=[l("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1)])),_:1})],32)])):(T(),x("div",fpt,[z(o,{title:"Info",class:"",isHorizontal:!1},{default:Ne(()=>e[11]||(e[11]=[Ze(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")])),_:1})]))}const mpt=st(spt,[["render",_pt]]),hpt={components:{ClipBoardTextInput:O0,Card:cp},data(){return{model_name:"jondurbin/airoboros-7b-gpt4",tokenizer_name:"jondurbin/airoboros-7b-gpt4",dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDatasetPath:""}},methods:{submitForm(){this.model_name,this.tokenizer_name,this.selectedDatasetPath,this.max_length,this.batch_size,this.lr,this.num_epochs,this.selectedFolder},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(n){var t;console.log("here");const e=(t=n.target.files[0])==null?void 0:t.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(n){const e=n.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},gpt={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},bpt={class:"mb-4"},ypt={class:"mb-4"};function Ept(n,e,t,s,i,r){const o=Je("ClipBoardTextInput"),a=Je("Card");return T(),x("div",gpt,[l("form",{onSubmit:e[0]||(e[0]=$((...c)=>r.submitForm&&r.submitForm(...c),["prevent"])),class:"max-w-md mx-auto"},[z(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[z(a,{title:"Model",class:"",isHorizontal:!1},{default:Ne(()=>[l("div",bpt,[e[1]||(e[1]=l("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),z(o,{id:"model_path",inputType:"text",value:i.model_name},null,8,["value"])]),l("div",ypt,[e[2]||(e[2]=l("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1)),z(o,{id:"model_path",inputType:"text",value:i.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),z(a,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>e[3]||(e[3]=[l("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1)])),_:1})],32)])}const vpt=st(hpt,[["render",Ept]]),Spt={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean,openfolder_enabled:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,openFolder:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(n){this.newTitle=n},checkedChangeEvent(n,e){this.$emit("checked",n,e)}},mounted(){this.newTitle=this.title,Ue(()=>{Ge.replace()})},watch:{showConfirmation(){Ue(()=>{Ge.replace()})},editTitleMode(n){this.showConfirmation=n,this.editTitle=n,n&&Ue(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(n){this.showConfirmation=n,n&&Ue(()=>{this.$refs.titleBox.focus()})},makeTitleMode(n){this.showConfirmation=n},checkBoxValue(n,e){this.checkBoxValue_local=n}}},Tpt=["id"],xpt={class:"flex flex-row items-center gap-2"},Cpt={key:0},wpt={class:"flex flex-row items-center w-full"},Rpt=["title"],Apt=["value"],Mpt={class:"absolute top-0 right-0 h-full flex items-center group"},Npt={class:"discussion-toolbox"},Ipt={key:0,class:"flex gap-2 items-center"},Opt={key:1,class:"flex gap-2 items-center"};function kpt(n,e,t,s,i,r){return T(),x("div",{class:Pe([t.selected?"discussion-hilighted":"discussion","m-1 py-2 flex flex-row sm:flex-row flex-wrap flex-shrink-0 items-center rounded-md duration-75 cursor-pointer relative w-[15rem]"]),id:"dis-"+t.id,onClick:e[13]||(e[13]=$(o=>r.selectEvent(),["stop"]))},[l("div",xpt,[t.isCheckbox?(T(),x("div",Cpt,[k(l("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[0]||(e[0]=$(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>i.checkBoxValue_local=o),onInput:e[2]||(e[2]=o=>r.checkedChangeEvent(o,t.id))},null,544),[[Ye,i.checkBoxValue_local]])])):B("",!0),t.selected?(T(),x("div",{key:1,class:Pe(["min-h-full w-2 rounded-xl self-stretch",t.loading?"animate-bounce bg-accent":"bg-secondary"])},null,2)):B("",!0),t.selected?B("",!0):(T(),x("div",{key:2,class:Pe(["w-2",t.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent":""])},null,2))]),l("div",wpt,[i.editTitle?B("",!0):(T(),x("p",{key:0,title:t.title,class:"line-clamp-1 w-full ml-1 -mx-5 text-xs"},Y(t.title?t.title==="untitled"?"New discussion":t.title:"New discussion"),9,Rpt)),i.editTitle?(T(),x("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:t.title,required:"",onKeydown:[e[3]||(e[3]=qn($(o=>r.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=qn($(o=>i.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>r.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=$(()=>{},["stop"]))},null,40,Apt)):B("",!0)]),l("div",Mpt,[l("div",Npt,[i.showConfirmation?(T(),x("div",Ipt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=$(o=>r.cancel(),["stop"]))},e[14]||(e[14]=[l("i",{"data-feather":"x"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=$(o=>i.editTitleMode?r.editTitleEvent():i.deleteMode?r.deleteEvent():r.makeTitleEvent(),["stop"]))},e[15]||(e[15]=[l("i",{"data-feather":"check"},null,-1)]))])):B("",!0),i.showConfirmation?B("",!0):(T(),x("div",Opt,[t.openfolder_enabled?(T(),x("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=$(o=>r.openFolderEvent(),["stop"]))},e[16]||(e[16]=[l("i",{"data-feather":"folder"},null,-1)]))):B("",!0),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=$(o=>i.makeTitleMode=!0,["stop"]))},e[17]||(e[17]=[l("i",{"data-feather":"type"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=$(o=>i.editTitleMode=!0,["stop"]))},e[18]||(e[18]=[l("i",{"data-feather":"edit-2"},null,-1)])),l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=$(o=>i.deleteMode=!0,["stop"]))},e[19]||(e[19]=[l("i",{"data-feather":"trash"},null,-1)]))]))])])],10,Tpt)}const X0=st(Spt,[["render",kpt],["__scopeId","data-v-2b3580ce"]]),Dpt={data(){return{show:!1,prompt:"",inputText:""}},methods:{showPanel(){this.show=!0},ok(){this.show=!1,this.$emit("ok",this.inputText)},cancel(){this.show=!1,this.inputText=""}},props:{promptText:{type:String,required:!0}},watch:{promptText(n){this.prompt=n}}},Lpt={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},Ppt={class:"bg-white p-8 rounded"},Fpt={class:"text-xl font-bold mb-4"};function Upt(n,e,t,s,i,r){return T(),x("div",null,[i.show?(T(),x("div",Lpt,[l("div",Ppt,[l("h2",Fpt,Y(t.promptText),1),k(l("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>i.inputText=o),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[ue,i.inputText]]),l("button",{onClick:e[1]||(e[1]=(...o)=>r.ok&&r.ok(...o)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),l("button",{onClick:e[2]||(e[2]=(...o)=>r.cancel&&r.cancel(...o)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):B("",!0)])}const Bpt=st(Dpt,[["render",Upt]]),Gpt={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:X0,MarkdownRenderer:rp},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){te.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(n=>{this.categories=n.data.categories}).catch(n=>{console.error("Error fetching categories:",n)})},fetchTitles(){console.log("Fetching categories"),te.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(n=>{this.titles=n.data.titles,console.log("titles recovered")}).catch(n=>{console.error("Error fetching titles:",n)})},fetchContent(n){console.log("loading skill",n),te.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:n}).then(e=>{const t=e.data.contents[0];this.id=t.id,this.content=t.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(n){console.log("Delete category")},editCategory(n){console.log("Edit category")},checkUncheckCategory(n){console.log("Unchecked category")},deleteSkill(n){console.log("Delete skill ",n),te.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:n}).then(()=>{this.fetchTitles()})},editTitle(n){te.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:n,title:n}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(n){console.log("Make title")},checkUncheckTitle(n){},searchSkills(){}}},Vpt={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},zpt={class:"w-[15rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},Hpt={classclass:"absolute flex flex-col no-scrollbar shadow-lg w-[15rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},qpt={class:"z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"};function Ypt(n,e,t,s,i,r){const o=Je("Discussion"),a=Je("MarkdownRenderer");return T(),x("div",{class:Pe([{hidden:!i.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[l("div",Vpt,[l("div",zpt,[k(l("input",{type:"search",id:"default-search",class:"block w-full h-8 px-8 text-sm border border-gray-300 rounded-md bg-bg-light focus:ring-1 focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary transition-all duration-200",placeholder:"Search discussions...",title:"Filter skills by title","onUpdate:modelValue":e[0]||(e[0]=c=>i.searchQuery=c),onKeyup:e[1]||(e[1]=qn((...c)=>r.searchSkills&&r.searchSkills(...c),["enter"]))},null,544),[[ue,i.searchQuery]]),l("div",Hpt,[e[3]||(e[3]=l("h2",{class:"text-xl font-bold m-4"},"Titles",-1)),i.titles.length>0?(T(),at(Oi,{key:0,name:"list"},{default:Ne(()=>[(T(!0),x(Le,null,We(i.titles,c=>(T(),at(o,{key:c.id,id:c.id,title:c.title,selected:r.fetchContent(c.id),loading:i.loading,isCheckbox:i.isCheckbox,checkBoxValue:!1,openfolder_enabled:!1,onSelect:d=>r.fetchContent(c.id),onDelete:d=>r.deleteSkill(c.id),onEditTitle:r.editTitle,onMakeTitle:r.makeTitle,onChecked:r.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):B("",!0)])]),l("div",qpt,[e[4]||(e[4]=l("h2",{class:"text-xl font-bold m-4"},"Content",-1)),z(a,{host:t.host,"markdown-text":i.content,message_id:i.id,discussion_id:i.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),l("button",{onClick:e[2]||(e[2]=(...c)=>r.closeComponent&&r.closeComponent(...c)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const uN=st(Gpt,[["render",Ypt]]),$pt={props:{htmlContent:{type:String,required:!0}}},Wpt=["innerHTML"];function Kpt(n,e,t,s,i,r){return T(),x("div",{class:"w-full h-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",innerHTML:t.htmlContent},null,8,Wpt)}const jpt=st($pt,[["render",Kpt]]),Qpt={name:"JsonTreeView",props:{data:{type:[Object,Array],required:!0},depth:{type:Number,default:0}},data(){return{collapsedKeys:new Set}},methods:{isObject(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)},isArray(n){return Array.isArray(n)},toggleCollapse(n){this.collapsedKeys.has(n)?this.collapsedKeys.delete(n):this.collapsedKeys.add(n)},isCollapsed(n){return this.collapsedKeys.has(n)},getValueType(n){return typeof n=="string"?"string":typeof n=="number"?"number":typeof n=="boolean"?"boolean":n===null?"null":""},formatValue(n){return typeof n=="string"?`"${n}"`:String(n)}}},Xpt={class:"json-tree-view"},Zpt=["onClick"],Jpt={key:0,class:"toggle-icon"},eft={class:"key"},tft={key:0,class:"json-nested"};function nft(n,e,t,s,i,r){const o=Je("json-tree-view",!0);return T(),x("div",Xpt,[(T(!0),x(Le,null,We(t.data,(a,c)=>(T(),x("div",{key:c,class:"json-item"},[l("div",{class:"json-key",onClick:d=>r.toggleCollapse(c)},[r.isObject(a)||r.isArray(a)?(T(),x("span",Jpt,[l("i",{class:Pe(r.isCollapsed(c)?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)])):B("",!0),l("span",eft,Y(c)+":",1),!r.isObject(a)&&!r.isArray(a)?(T(),x("span",{key:1,class:Pe(["value",r.getValueType(a)])},Y(r.formatValue(a)),3)):B("",!0)],8,Zpt),(r.isObject(a)||r.isArray(a))&&!r.isCollapsed(c)?(T(),x("div",tft,[z(o,{data:a,depth:t.depth+1},null,8,["data","depth"])])):B("",!0)]))),128))])}const sft=st(Qpt,[["render",nft],["__scopeId","data-v-40406ec6"]]),ift={components:{JsonTreeView:sft},props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Viewer"}},data(){return{collapsed:!0}},computed:{isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")},parsedJsonData(){if(typeof this.jsonData=="string")try{return JSON.parse(this.jsonData)}catch(n){return console.error("Error parsing JSON string:",n),{error:"Invalid JSON string"}}return this.jsonData}},methods:{toggleCollapsible(){this.collapsed=!this.collapsed}}},rft={key:0,class:"json-viewer"},oft={class:"toggle-icon"},aft={class:"json-content panels-color"};function lft(n,e,t,s,i,r){const o=Je("json-tree-view");return r.isContentPresent?(T(),x("div",rft,[l("div",{class:"collapsible-section",onClick:e[0]||(e[0]=(...a)=>r.toggleCollapsible&&r.toggleCollapsible(...a))},[l("span",oft,[l("i",{class:Pe(i.collapsed?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)]),Ze(" "+Y(t.jsonFormText),1)]),k(l("div",aft,[z(o,{data:r.parsedJsonData,depth:0},null,8,["data"])],512),[[_t,!i.collapsed]])])):B("",!0)}const cft=st(ift,[["render",lft],["__scopeId","data-v-83fc9727"]]),dft={props:{done:Boolean,text:String,status:Boolean,description:String}},uft={class:"step-wrapper"},pft={class:"step-icon"},fft={key:0,class:"icon-success",viewBox:"0 0 24 24"},_ft={key:1,class:"icon-fail",viewBox:"0 0 24 24"},mft={key:1,class:"icon-spinner"},hft={class:"step-content"},gft={class:"step-text"},bft={key:0,class:"step-description"};function yft(n,e,t,s,i,r){return T(),x("div",{class:Pe(["step-container",{"step-done":t.done}])},[l("div",uft,[l("div",pft,[t.done?(T(),x(Le,{key:0},[t.status?(T(),x("svg",fft,e[0]||(e[0]=[l("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},null,-1)]))):(T(),x("svg",_ft,e[1]||(e[1]=[l("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"},null,-1)])))],64)):(T(),x("div",mft))]),l("div",hft,[l("h3",gft,Y(t.text||"No text provided"),1),t.description?(T(),x("p",bft,Y(t.description),1)):B("",!0)])])],2)}const Eft=st(dft,[["render",yft]]),vft="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20480%20480'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20d='M240,0C107.664,0,0,107.664,0,240s107.664,240,240,240s240-107.664,240-240S372.336,0,240,0z%20M240,460%20c-121.309,0-220-98.691-220-220S118.691,20,240,20s220,98.691,220,220S361.309,460,240,460z'/%3e%3cpath%20d='M410,194.999h-27.058c-2.643-8.44-6-16.56-10.03-24.271l19.158-19.158c3.776-3.775,5.854-8.79,5.854-14.121%20c0-5.332-2.08-10.347-5.854-14.121l-35.399-35.399c-3.775-3.775-8.79-5.854-14.122-5.854c-5.331,0-10.346,2.079-14.121,5.854%20l-19.158,19.158c-7.711-4.03-15.832-7.386-24.271-10.03V70c0-11.028-8.972-20-20-20h-50c-11.028,0-20,8.972-20,20v27.058%20c-8.44,2.643-16.56,6-24.271,10.03L151.57,87.93c-3.775-3.776-8.79-5.854-14.121-5.854c-5.332,0-10.347,2.08-14.121,5.854%20l-35.399,35.399c-3.775,3.775-5.854,8.79-5.854,14.122c0,5.331,2.079,10.346,5.854,14.121l19.158,19.158%20c-4.03,7.711-7.386,15.832-10.03,24.271H70c-11.028,0-20,8.972-20,20v50c0,11.028,8.972,20,20,20h27.057%20c2.643,8.44,6,16.56,10.03,24.271L87.929,328.43c-3.776,3.775-5.854,8.79-5.854,14.121c0,5.332,2.08,10.347,5.854,14.121%20l35.399,35.399c3.775,3.775,8.79,5.854,14.122,5.854c5.331,0,10.346-2.079,14.121-5.854l19.158-19.158%20c7.711,4.03,15.832,7.386,24.271,10.03V410c0,11.028,8.972,20,20,20h50c11.028,0,20-8.972,20.001-20v-27.058%20c8.44-2.643,16.56-6,24.271-10.03l19.158,19.158c3.775,3.776,8.79,5.854,14.121,5.854c5.332,0,10.347-2.08,14.121-5.854%20l35.399-35.399c3.775-3.775,5.854-8.79,5.854-14.122c0-5.331-2.079-10.346-5.854-14.121l-19.158-19.158%20c4.03-7.711,7.386-15.832,10.03-24.271H410c11.028,0,20-8.972,20-20v-50C430,203.971,421.028,194.999,410,194.999z%20M410,264.998%20h-34.598c-4.562,0-8.544,3.086-9.684,7.503c-3.069,11.901-7.716,23.133-13.813,33.387c-2.337,3.931-1.71,8.948,1.524,12.182%20l24.5,24.457l-35.357,35.4l-24.5-24.5c-3.236-3.235-8.253-3.86-12.182-1.524c-10.254,6.097-21.487,10.745-33.387,13.813%20c-4.417,1.14-7.503,5.122-7.503,9.684V410h-50v-34.599c0-4.562-3.086-8.544-7.503-9.684%20c-11.901-3.069-23.133-7.716-33.387-13.813c-1.587-0.944-3.353-1.404-5.107-1.404c-2.586,0-5.147,1.002-7.073,2.931l-24.457,24.5%20l-35.4-35.357l24.5-24.5c3.234-3.235,3.861-8.251,1.524-12.182c-6.097-10.254-10.745-21.487-13.813-33.387%20c-1.14-4.417-5.122-7.503-9.684-7.503H70v-50h34.596c4.562,0,8.544-3.086,9.684-7.503c3.069-11.901,7.716-23.133,13.813-33.387%20c2.337-3.931,1.71-8.948-1.524-12.182l-24.5-24.457l35.357-35.4l24.5,24.5c3.236,3.235,8.253,3.861,12.182,1.524%20c10.254-6.097,21.487-10.745,33.387-13.813c4.417-1.14,7.503-5.122,7.503-9.684V70h50v34.596c0,4.562,3.086,8.544,7.503,9.684%20c11.901,3.069,23.133,7.716,33.387,13.813c3.929,2.337,8.947,1.709,12.182-1.524l24.457-24.5l35.4,35.357l-24.5,24.5%20c-3.234,3.235-3.861,8.251-1.524,12.182c6.097,10.254,10.745,21.487,13.813,33.387c1.14,4.417,5.122,7.503,9.684,7.503H410%20V264.998z'/%3e%3cpath%20d='M331.585,292.475l-40-35l-13.17,15.051L298.386,290H240c-27.57,0-50-22.43-50-50h-20c0,38.598,31.402,70,70,70h58.386%20l-19.971,17.475l13.17,15.051l40-35c2.17-1.898,3.415-4.642,3.415-7.525S333.755,294.373,331.585,292.475z'/%3e%3cpath%20d='M201.585,207.473L181.614,190H240c27.57,0,50,22.43,50,50h20c0-38.598-31.402-70-70-70h-58.386l19.971-17.475%20l-13.17-15.051l-40,35c-2.17,1.898-3.415,4.642-3.415,7.525s1.245,5.627,3.415,7.525l40,35L201.585,207.473z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3canimateTransform%20attributeName='transform'%20attributeType='XML'%20type='rotate'%20from='0%20240%20240'%20to='360%20240%20240'%20dur='10s'%20repeatCount='indefinite'%20/%3e%3c/svg%3e",Sft="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2050%2050'%3e%3cpath%20d='M25%200C11.6%200%200%2011.6%200%2025s11.6%2025%2025%2025%2025-11.6%2025-25S40.4%200%2025%200zm0%2048C12.8%2048%202%2039.2%202%2025S12.8%202%2025%202s24%2010.8%2024%2024-10.8%2024-24%2024zm-4-33l-8%208%2018%2018%2030-30-8-8-22%2022L22%2016'%20fill='green'/%3e%3c/svg%3e",Tft="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'%20fill='none'/%3e%3cpath%20d='M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012%2019%206.41z'%20fill='red'/%3e%3c/svg%3e",pN="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20version='1.1'%20width='256'%20height='256'%20viewBox='0%200%20256%20256'%20xml:space='preserve'%3e%3cdefs%3e%3c/defs%3e%3cg%20style='stroke:%20white;%20stroke-width:%202px;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20none;%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='translate(1.4065934065934016%201.4065934065934016)%20scale(2.81%202.81)'%20%3e%3cpath%20d='M%2089.999%203.075%20C%2090%203.02%2090%202.967%2089.999%202.912%20c%20-0.004%20-0.134%20-0.017%20-0.266%20-0.038%20-0.398%20c%20-0.007%20-0.041%20-0.009%20-0.081%20-0.018%20-0.122%20c%20-0.034%20-0.165%20-0.082%20-0.327%20-0.144%20-0.484%20c%20-0.018%20-0.046%20-0.041%20-0.089%20-0.061%20-0.134%20c%20-0.053%20-0.119%20-0.113%20-0.234%20-0.182%20-0.346%20C%2089.528%201.382%2089.5%201.336%2089.469%201.29%20c%20-0.102%20-0.147%20-0.212%20-0.288%20-0.341%20-0.417%20c%20-0.13%20-0.13%20-0.273%20-0.241%20-0.421%20-0.344%20c%20-0.042%20-0.029%20-0.085%20-0.056%20-0.129%20-0.082%20c%20-0.118%20-0.073%20-0.239%20-0.136%20-0.364%20-0.191%20c%20-0.039%20-0.017%20-0.076%20-0.037%20-0.116%20-0.053%20c%20-0.161%20-0.063%20-0.327%20-0.113%20-0.497%20-0.147%20c%20-0.031%20-0.006%20-0.063%20-0.008%20-0.094%20-0.014%20c%20-0.142%20-0.024%20-0.285%20-0.038%20-0.429%20-0.041%20C%2087.03%200%2086.983%200%2086.936%200.001%20c%20-0.141%200.003%20-0.282%200.017%20-0.423%200.041%20c%20-0.035%200.006%20-0.069%200.008%20-0.104%200.015%20c%20-0.154%200.031%20-0.306%200.073%20-0.456%200.129%20L%201.946%2031.709%20c%20-1.124%200.422%20-1.888%201.473%20-1.943%202.673%20c%20-0.054%201.199%200.612%202.316%201.693%202.838%20l%2034.455%2016.628%20l%2016.627%2034.455%20C%2053.281%2089.344%2054.334%2090%2055.481%2090%20c%200.046%200%200.091%20-0.001%200.137%20-0.003%20c%201.199%20-0.055%202.251%20-0.819%202.673%20-1.943%20L%2089.815%204.048%20c%200.056%20-0.149%200.097%20-0.3%200.128%20-0.453%20c%200.008%20-0.041%200.011%20-0.081%200.017%20-0.122%20C%2089.982%203.341%2089.995%203.208%2089.999%203.075%20z%20M%2075.086%2010.672%20L%2037.785%2047.973%20L%2010.619%2034.864%20L%2075.086%2010.672%20z%20M%2055.136%2079.381%20L%2042.027%2052.216%20l%2037.302%20-37.302%20L%2055.136%2079.381%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3ccircle%20cx='75'%20cy='75'%20r='15'%20fill='%23008000'/%3e%3cpath%20d='M75,60%20A15,15%200%200,1%2090,75%20A15,15%200%200,1%2075,90%20A15,15%200%200,1%2060,75%20A15,15%200%200,1%2075,60%20Z'%20stroke='%23FFFFFF'%20stroke-width='2'%20fill='none'/%3e%3cpath%20d='M81,75%20A6,6%200%200,1%2075,81%20A6,6%200%200,1%2069,75%20A6,6%200%200,1%2075,69%20A6,6%200%200,1%2081,75%20Z'%20fill='%23FFFFFF'/%3e%3c/g%3e%3c/svg%3e",xft="/",Cft={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:rp,Step:Eft,RenderHTMLJS:jpt,JsonViewer:cft,DynamicUIRenderer:dN,ToolbarButton:k0,DropdownMenu:ZM},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{ui_componentKey:0,isSynthesizingVoice:!1,cpp_block:UM,html5_block:BM,LaTeX_block:GM,json_block:FM,javascript_block:PM,process_svg:vft,ok_svg:Sft,failed_svg:Tft,loading_svg:zM,sendGlobe:pN,code_block:DM,python_block:LM,bash_block:VM,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),Ue(()=>{Ge.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let n of this.message.metadata)Object.prototype.hasOwnProperty.call(n,"audio_url")&&n.audio_url!=null&&(this.audio_url=n.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{toggleExpanded(){this.expanded=!this.expanded},computeTimeDiff(n,e){let t=e.getTime()-n.getTime();const s=Math.floor(t/(1e3*60*60));t-=s*(1e3*60*60);const i=Math.floor(t/(1e3*60));t-=i*(1e3*60);const r=Math.floor(t/1e3);return t-=r*1e3,[s,i,r]},insertTab(n){const e=n.target,t=e.selectionStart,s=e.selectionEnd,i=n.shiftKey;if(t===s)if(i){if(e.value.substring(t-4,t)==" "){const r=e.value.substring(0,t-4),o=e.value.substring(s),a=r+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t-4})}}else{const r=e.value.substring(0,t),o=e.value.substring(s),a=r+" "+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t+4})}else{const o=e.value.substring(t,s).split(` +Here is how you can do that`))},e[690]||(e[690]=[l("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),l("tr",null,[e[692]||(e[692]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),l("td",null,[l("div",odt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[387]||(e[387]=(...f)=>r.reinstallPetalsService&&r.reinstallPetalsService(...f))},"install petals service")])])]),l("tr",null,[e[693]||(e[693]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),l("td",null,[l("div",adt,[k(l("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[388]||(e[388]=f=>r.configFile.petals_base_url=f),onChange:e[389]||(e[389]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.petals_base_url]])])])])])]),_:1})]),_:1}),z(a,{title:"TTV settings",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",ldt,[l("tr",null,[e[694]||(e[694]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"lumalabs_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Lumalabs key:")],-1)),l("td",null,[l("div",cdt,[k(l("input",{type:"text",id:"lumalabs_key",required:"","onUpdate:modelValue":e[390]||(e[390]=f=>r.configFile.lumalabs_key=f),onChange:e[391]||(e[391]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.lumalabs_key]])])])])])]),_:1}),z(a,{title:"Misc",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[z(a,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:Ne(()=>[l("table",ddt,[l("tr",null,[e[695]||(e[695]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),l("td",null,[l("div",udt,[k(l("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[392]||(e[392]=f=>r.configFile.elastic_search_service=f),onChange:e[393]||(e[393]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Ye,r.configFile.elastic_search_service]])])])]),l("tr",null,[e[696]||(e[696]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),l("td",null,[l("div",pdt,[l("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[394]||(e[394]=(...f)=>r.reinstallElasticSearchService&&r.reinstallElasticSearchService(...f))},"install ElasticSearch service")])])]),l("tr",null,[e[697]||(e[697]=l("td",{style:{"min-width":"200px"}},[l("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),l("td",null,[l("div",fdt,[k(l("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[395]||(e[395]=f=>r.configFile.elastic_search_url=f),onChange:e[396]||(e[396]=f=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ue,r.configFile.elastic_search_url]])])])])])]),_:1})]),_:1})],2)]),l("div",_dt,[l("div",mdt,[l("button",{onClick:e[397]||(e[397]=$(f=>i.bzc_collapsed=!i.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[k(l("div",null,e[698]||(e[698]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.bzc_collapsed]]),k(l("div",null,e[699]||(e[699]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.bzc_collapsed]]),e[701]||(e[701]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),r.configFile.binding_name?B("",!0):(T(),x("div",hdt,e[700]||(e[700]=[l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),Ze(" No binding selected! ")]))),r.configFile.binding_name?(T(),x("div",gdt,"|")):B("",!0),r.configFile.binding_name?(T(),x("div",bdt,[l("div",ydt,[l("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,Edt),l("p",vdt,Y(r.binding_name),1)])])):B("",!0)])]),l("div",{class:Pe([{hidden:i.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[r.bindingsZoo&&r.bindingsZoo.length>0?(T(),x("div",Sdt,[l("label",Tdt," Bindings: ("+Y(r.bindingsZoo.length)+") ",1),l("div",{class:Pe(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.bzl_collapsed?"":"max-h-96"])},[z(Oi,{name:"list"},{default:Ne(()=>[(T(!0),x(Le,null,We(r.bindingsZoo,(f,b)=>(T(),at(d,{ref_for:!0,ref:"bindingZoo",key:"index-"+b+"-"+f.folder,binding:f,"on-selected":r.onBindingSelected,"on-reinstall":r.onReinstallBinding,"on-unInstall":r.onUnInstallBinding,"on-install":r.onInstallBinding,"on-settings":r.onSettingsBinding,"on-reload-binding":r.onReloadBinding,selected:f.folder===r.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):B("",!0),i.bzl_collapsed?(T(),x("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[398]||(e[398]=f=>i.bzl_collapsed=!i.bzl_collapsed)},e[702]||(e[702]=[l("i",{"data-feather":"chevron-up"},null,-1)]))):(T(),x("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[399]||(e[399]=f=>i.bzl_collapsed=!i.bzl_collapsed)},e[703]||(e[703]=[l("i",{"data-feather":"chevron-down"},null,-1)])))],2)]),l("div",xdt,[l("div",Cdt,[l("button",{onClick:e[400]||(e[400]=$(f=>r.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[k(l("div",null,e[704]||(e[704]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.mzc_collapsed]]),k(l("div",null,e[705]||(e[705]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.mzc_collapsed]]),e[708]||(e[708]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),l("div",wdt,[r.configFile.binding_name?B("",!0):(T(),x("div",Rdt,e[706]||(e[706]=[l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),Ze(" Select binding first! ")]))),!r.configFile.model_name&&r.configFile.binding_name?(T(),x("div",Adt,e[707]||(e[707]=[l("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),Ze(" No model selected! ")]))):B("",!0),r.configFile.model_name?(T(),x("div",Mdt,"|")):B("",!0),r.configFile.model_name?(T(),x("div",Ndt,[l("div",Idt,[l("img",{src:r.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,Odt),l("p",kdt,Y(r.configFile.model_name),1)])])):B("",!0)])])]),l("div",{class:Pe([{hidden:i.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",Ddt,[l("div",Ldt,[l("div",Pdt,[i.searchModelInProgress?(T(),x("div",Fdt,e[709]||(e[709]=[l("div",{role:"status"},[l("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),l("span",{class:"sr-only"},"Loading...")],-1)]))):B("",!0),i.searchModelInProgress?B("",!0):(T(),x("div",Udt,e[710]||(e[710]=[l("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)])))]),k(l("input",{type:"search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search models...",required:"","onUpdate:modelValue":e[401]||(e[401]=f=>i.searchModel=f),onKeyup:e[402]||(e[402]=qn((...f)=>r.searchModel_func&&r.searchModel_func(...f),["enter"]))},null,544),[[ue,i.searchModel]]),i.searchModel?(T(),x("button",{key:0,onClick:e[403]||(e[403]=$(f=>i.searchModel="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):B("",!0)])]),l("div",null,[k(l("input",{"onUpdate:modelValue":e[404]||(e[404]=f=>i.show_only_installed_models=f),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[Ye,i.show_only_installed_models]]),e[711]||(e[711]=l("label",{for:"only_installed"},"Show only installed models",-1))]),l("div",null,[z(u,{radioOptions:i.sortOptions,onRadioSelected:r.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),e[719]||(e[719]=l("a",{href:"https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard",target:"_blank",class:"mb-4 font-bold underline text-blue-500 pb-4"},"Hugging face Leaderboard",-1)),i.is_loading_zoo?(T(),x("div",Bdt,e[712]||(e[712]=[l("svg",{"aria-hidden":"true",class:"text-center w-full display: flex;align-items: center; h-20 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),l("p",{class:"heartbeat-text"},"Loading models Zoo",-1)]))):B("",!0),i.models_zoo&&i.models_zoo.length>0?(T(),x("div",Gdt,[l("label",Vdt," Models: ("+Y(i.models_zoo.length)+") ",1),l("div",{class:Pe(["overflow-y-auto p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",i.mzl_collapsed?"":"max-h-96"])},[z(Oi,{name:"list"},{default:Ne(()=>[(T(!0),x(Le,null,We(r.rendered_models_zoo,(f,b)=>(T(),at(_,{ref_for:!0,ref:"modelZoo",key:"index-"+b+"-"+f.name,model:f,"is-installed":f.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onModelSelected,selected:f.name===r.configFile.model_name,model_type:f.model_type,"on-copy":r.onCopy,"on-copy-link":r.onCopyLink,"on-cancel-install":r.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),l("button",{ref:"load_more_models",class:"relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",onClick:e[405]||(e[405]=(...f)=>r.load_more_models&&r.load_more_models(...f))},"Load more models",512)]),_:1})],2)])):B("",!0),i.mzl_collapsed?(T(),x("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[406]||(e[406]=(...f)=>r.open_mzl&&r.open_mzl(...f))},e[713]||(e[713]=[l("i",{"data-feather":"chevron-up"},null,-1)]))):(T(),x("button",{key:3,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[407]||(e[407]=(...f)=>r.open_mzl&&r.open_mzl(...f))},e[714]||(e[714]=[l("i",{"data-feather":"chevron-down"},null,-1)]))),l("div",zdt,[l("div",Hdt,[l("div",null,[l("div",qdt,[e[715]||(e[715]=l("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),k(l("input",{type:"text","onUpdate:modelValue":e[408]||(e[408]=f=>i.reference_path=f),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter Path ...",required:""},null,512),[[ue,i.reference_path]])]),l("button",{type:"button",onClick:e[409]||(e[409]=$(f=>r.onCreateReference(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Add reference")]),i.modelDownlaodInProgress?B("",!0):(T(),x("div",Ydt,[l("div",$dt,[e[716]||(e[716]=l("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),k(l("input",{type:"text","onUpdate:modelValue":e[410]||(e[410]=f=>i.addModel.url=f),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter URL ...",required:""},null,512),[[ue,i.addModel.url]])]),l("button",{type:"button",onClick:e[411]||(e[411]=$(f=>r.onInstallAddModel(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Download")])),i.modelDownlaodInProgress?(T(),x("div",Wdt,[e[718]||(e[718]=l("div",{role:"status",class:"justify-center"},null,-1)),l("div",Kdt,[l("div",jdt,[l("div",Qdt,[e[717]||(e[717]=Zr(' Downloading Loading...',1)),l("span",Xdt,Y(Math.floor(i.addModel.progress))+"%",1)]),l("div",{class:"mx-1 opacity-80 line-clamp-1",title:i.addModel.url},Y(i.addModel.url),9,Zdt),l("div",Jdt,[l("div",{class:"bg-blue-600 h-2.5 rounded-full",style:Vt({width:i.addModel.progress+"%"})},null,4)]),l("div",eut,[l("span",tut,"Download speed: "+Y(r.speed_computed)+"/s",1),l("span",nut,Y(r.downloaded_size_computed)+"/"+Y(r.total_size_computed),1)])])]),l("div",sut,[l("div",iut,[l("div",rut,[l("button",{onClick:e[412]||(e[412]=$((...f)=>r.onCancelInstall&&r.onCancelInstall(...f),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])):B("",!0)])])],2)]),l("div",out,[l("div",aut,[l("button",{onClick:e[415]||(e[415]=$(f=>i.pzc_collapsed=!i.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[k(l("div",null,e[720]||(e[720]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.pzc_collapsed]]),k(l("div",null,e[721]||(e[721]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.pzc_collapsed]]),e[724]||(e[724]=l("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),r.configFile.personalities?(T(),x("div",lut,"|")):B("",!0),l("div",cut,Y(r.active_pesonality),1),r.configFile.personalities?(T(),x("div",dut,"|")):B("",!0),r.configFile.personalities?(T(),x("div",uut,[r.mountedPersArr.length>0?(T(),x("div",put,[(T(!0),x(Le,null,We(r.mountedPersArr,(f,b)=>(T(),x("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:b+"-"+f.name,ref_for:!0,ref:"mountedPersonalities"},[l("div",fut,[l("button",{onClick:$(y=>r.onPersonalitySelected(f),["stop"])},[l("img",{src:i.bUrl+f.avatar,onError:e[413]||(e[413]=(...y)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...y)),class:Pe(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",r.configFile.active_personality_id==r.configFile.personalities.indexOf(f.full_path)?"border-secondary":"border-transparent z-0"]),title:f.name},null,42,mut)],8,_ut),l("button",{onClick:$(y=>r.unmountPersonality(f),["stop"])},e[722]||(e[722]=[l("span",{class:"hidden group-hover:block -top-2 -right-1 absolute active:scale-90 bg-bg-light dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount personality"},[l("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1)]),8,hut)])]))),128))])):B("",!0)])):B("",!0),l("button",{onClick:e[414]||(e[414]=$(f=>r.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},e[723]||(e[723]=[l("svg",{"aria-hidden":"true",class:"w-4 h-4 text-red-600 hover:text-red-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]))])]),l("div",{class:Pe([{hidden:i.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[l("div",gut,[e[727]||(e[727]=l("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),l("div",but,[l("div",yut,[i.searchPersonalityInProgress?(T(),x("div",Eut,e[725]||(e[725]=[l("div",{role:"status"},[l("svg",{"aria-hidden":"true",class:"inline w-4 h-4 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),l("span",{class:"sr-only"},"Loading...")],-1)]))):B("",!0),i.searchPersonalityInProgress?B("",!0):(T(),x("div",vut,e[726]||(e[726]=[l("svg",{"aria-hidden":"true",class:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)])))]),k(l("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search personality...",required:"","onUpdate:modelValue":e[416]||(e[416]=f=>i.searchPersonality=f),onKeyup:e[417]||(e[417]=$((...f)=>r.searchPersonality_func&&r.searchPersonality_func(...f),["stop"]))},null,544),[[ue,i.searchPersonality]]),i.searchPersonality?(T(),x("button",{key:0,onClick:e[418]||(e[418]=$(f=>i.searchPersonality="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):B("",!0)])]),i.searchPersonality?B("",!0):(T(),x("div",Sut,[l("label",Tut," Personalities Category: ("+Y(i.persCatgArr.length)+") ",1),l("select",{id:"persCat",onChange:e[419]||(e[419]=f=>r.update_personality_category(f.target.value,r.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(T(!0),x(Le,null,We(i.persCatgArr,(f,b)=>(T(),x("option",{key:b,selected:f==this.configFile.personality_category},Y(f),9,xut))),128))],32)])),l("div",null,[i.personalitiesFiltered.length>0?(T(),x("div",Cut,[l("label",wut,Y(i.searchPersonality?"Search results":"Personalities")+": ("+Y(i.personalitiesFiltered.length)+") ",1),l("div",{class:Pe(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",i.pzl_collapsed?"":"max-h-96"])},[z(Oi,{name:"bounce"},{default:Ne(()=>[(T(!0),x(Le,null,We(i.personalitiesFiltered,(f,b)=>(T(),at(m,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+b+"-"+f.name,personality:f,select_language:!0,full_path:f.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(y=>y===f.full_path||y===f.full_path+":"+f.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":r.onSettingsPersonality,"on-copy-personality-name":r.onCopyPersonalityName,"on-copy-to_custom":r.onCopyToCustom,"on-open-folder":r.handleOpenFolder},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder"]))),128))]),_:1})],2)])):B("",!0)]),i.pzl_collapsed?(T(),x("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[420]||(e[420]=f=>i.pzl_collapsed=!i.pzl_collapsed)},e[728]||(e[728]=[l("i",{"data-feather":"chevron-up"},null,-1)]))):(T(),x("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[421]||(e[421]=f=>i.pzl_collapsed=!i.pzl_collapsed)},e[729]||(e[729]=[l("i",{"data-feather":"chevron-down"},null,-1)])))],2)]),l("div",Rut,[l("div",Aut,[l("button",{onClick:e[422]||(e[422]=$(f=>i.mc_collapsed=!i.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[k(l("div",null,e[730]||(e[730]=[l("i",{"data-feather":"chevron-right"},null,-1)]),512),[[_t,i.mc_collapsed]]),k(l("div",null,e[731]||(e[731]=[l("i",{"data-feather":"chevron-down"},null,-1)]),512),[[_t,!i.mc_collapsed]]),e[732]||(e[732]=l("p",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1))])]),l("div",{class:Pe([{hidden:i.mc_collapsed},"flex flex-col mb-2 p-2"])},[l("div",Mut,[l("div",Nut,[k(l("input",{id:"override-model-parameters",type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[423]||(e[423]=$(()=>{},["stop"])),"onUpdate:modelValue":e[424]||(e[424]=f=>r.configFile.override_personality_model_parameters=f),onChange:e[425]||(e[425]=f=>r.update_setting("override_personality_model_parameters",r.configFile.override_personality_model_parameters))},null,544),[[Ye,r.configFile.override_personality_model_parameters]]),e[733]||(e[733]=l("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1))])]),l("div",{class:Pe(r.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[l("div",Iut,[e[734]||(e[734]=l("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),k(l("input",{type:"text",id:"seed","onUpdate:modelValue":e[426]||(e[426]=f=>r.configFile.seed=f),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[ue,r.configFile.seed]])]),l("div",Out,[l("div",kut,[l("div",Dut,[e[735]||(e[735]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),l("p",Lut,[k(l("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[427]||(e[427]=f=>r.configFile.temperature=f),onChange:e[428]||(e[428]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.temperature]])])]),k(l("input",{id:"temperature",onChange:e[429]||(e[429]=f=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[430]||(e[430]=f=>r.configFile.temperature=f),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.temperature]])])]),l("div",Put,[l("div",Fut,[l("div",Uut,[e[736]||(e[736]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),l("p",But,[k(l("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[431]||(e[431]=f=>r.configFile.n_predict=f),onChange:e[432]||(e[432]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.n_predict]])])]),k(l("input",{id:"predict",type:"range",onChange:e[433]||(e[433]=f=>i.settingsChanged=!0),"onUpdate:modelValue":e[434]||(e[434]=f=>r.configFile.n_predict=f),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.n_predict]])])]),l("div",Gut,[l("div",Vut,[l("div",zut,[e[737]||(e[737]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),l("p",Hut,[k(l("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[435]||(e[435]=f=>r.configFile.top_k=f),onChange:e[436]||(e[436]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.top_k]])])]),k(l("input",{id:"top_k",type:"range",onChange:e[437]||(e[437]=f=>i.settingsChanged=!0),"onUpdate:modelValue":e[438]||(e[438]=f=>r.configFile.top_k=f),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.top_k]])])]),l("div",qut,[l("div",Yut,[l("div",$ut,[e[738]||(e[738]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),l("p",Wut,[k(l("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[439]||(e[439]=f=>r.configFile.top_p=f),onChange:e[440]||(e[440]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.top_p]])])]),k(l("input",{id:"top_p",type:"range","onUpdate:modelValue":e[441]||(e[441]=f=>r.configFile.top_p=f),min:"0",max:"1",step:"0.01",onChange:e[442]||(e[442]=f=>i.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.top_p]])])]),l("div",Kut,[l("div",jut,[l("div",Qut,[e[739]||(e[739]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),l("p",Xut,[k(l("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[443]||(e[443]=f=>r.configFile.repeat_penalty=f),onChange:e[444]||(e[444]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.repeat_penalty]])])]),k(l("input",{id:"repeat_penalty",onChange:e[445]||(e[445]=f=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[446]||(e[446]=f=>r.configFile.repeat_penalty=f),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.repeat_penalty]])])]),l("div",Zut,[l("div",Jut,[l("div",ept,[e[740]||(e[740]=l("p",{class:"absolute left-0 mt-6"},[l("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),l("p",tpt,[k(l("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[447]||(e[447]=f=>r.configFile.repeat_last_n=f),onChange:e[448]||(e[448]=f=>i.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.repeat_last_n]])])]),k(l("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[449]||(e[449]=f=>r.configFile.repeat_last_n=f),min:"0",max:"100",step:"1",onChange:e[450]||(e[450]=f=>i.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[ue,r.configFile.repeat_last_n]])])])],2)],2)])],2)]),z(h,{ref:"addmodeldialog"},null,512),z(g,{class:"z-20",show:i.variantSelectionDialogVisible,choices:i.variant_choices,onChoiceSelected:r.onVariantChoiceSelected,onCloseDialog:r.oncloseVariantChoiceDialog,onChoiceValidated:r.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const spt=st(drt,[["render",npt],["__scopeId","data-v-d11575a1"]]),ipt={components:{ClipBoardTextInput:O0,Card:cp},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const n={model_name:this.selectedModel,dataset_file:this.selectedDataset,max_length:this.max_length,batch_size:this.batch_size,lr:this.lr,num_epochs:this.num_epochs,output_dir:this.selectedFolder};te.post("/start_training",n).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(n){var t;console.log("here");const e=(t=n.target.files[0])==null?void 0:t.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(n){const e=n.target.files;e.length>0&&(this.selectedDataset=e[0])}},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}}},watch:{model_name(n){console.log("watching model_name",n),this.$refs.clipboardInput.inputValue=n}}},rpt={key:0,class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},opt={class:"mb-4"},apt=["value"],lpt={class:"mb-4"},cpt={class:"mb-4"},dpt={class:"mb-4"},upt={class:"mb-4"},ppt={class:"mb-4"},fpt={class:"mb-4"},_pt={key:1};function mpt(n,e,t,s,i,r){const o=Je("Card"),a=Je("ClipBoardTextInput");return r.selectedModel!==null&&r.selectedModel.toLowerCase().includes("gptq")?(T(),x("div",rpt,[l("form",{onSubmit:e[2]||(e[2]=$((...c)=>r.submitForm&&r.submitForm(...c),["prevent"])),class:""},[z(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[z(o,{title:"Model",class:"",isHorizontal:!1},{default:Ne(()=>[l("div",opt,[e[3]||(e[3]=l("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),k(l("select",{"onUpdate:modelValue":e[0]||(e[0]=c=>r.selectedModel=c),onChange:e[1]||(e[1]=(...c)=>n.setModel&&n.setModel(...c)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(T(!0),x(Le,null,We(r.models,c=>(T(),x("option",{key:c,value:c},Y(c),9,apt))),128))],544),[[Ot,r.selectedModel]])])]),_:1}),z(o,{title:"Data",isHorizontal:!1},{default:Ne(()=>[l("div",lpt,[e[4]||(e[4]=l("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1)),z(a,{id:"model_path",inputType:"file",value:i.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),z(o,{title:"Training",isHorizontal:!1},{default:Ne(()=>[l("div",cpt,[e[5]||(e[5]=l("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1)),z(a,{id:"model_path",inputType:"integer",value:i.lr},null,8,["value"])]),l("div",dpt,[e[6]||(e[6]=l("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1)),z(a,{id:"model_path",inputType:"integer",value:i.num_epochs},null,8,["value"])]),l("div",upt,[e[7]||(e[7]=l("label",{for:"max_length",class:"text-sm"},"Max Length:",-1)),z(a,{id:"model_path",inputType:"integer",value:i.max_length},null,8,["value"])]),l("div",ppt,[e[8]||(e[8]=l("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1)),z(a,{id:"model_path",inputType:"integer",value:i.batch_size},null,8,["value"])])]),_:1}),z(o,{title:"Output",isHorizontal:!1},{default:Ne(()=>[l("div",fpt,[e[9]||(e[9]=l("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1)),z(a,{id:"model_path",inputType:"text",value:n.output_dir},null,8,["value"])])]),_:1})]),_:1}),z(o,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>e[10]||(e[10]=[l("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1)])),_:1})],32)])):(T(),x("div",_pt,[z(o,{title:"Info",class:"",isHorizontal:!1},{default:Ne(()=>e[11]||(e[11]=[Ze(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")])),_:1})]))}const hpt=st(ipt,[["render",mpt]]),gpt={components:{ClipBoardTextInput:O0,Card:cp},data(){return{model_name:"jondurbin/airoboros-7b-gpt4",tokenizer_name:"jondurbin/airoboros-7b-gpt4",dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDatasetPath:""}},methods:{submitForm(){this.model_name,this.tokenizer_name,this.selectedDatasetPath,this.max_length,this.batch_size,this.lr,this.num_epochs,this.selectedFolder},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(n){var t;console.log("here");const e=(t=n.target.files[0])==null?void 0:t.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(n){const e=n.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},bpt={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},ypt={class:"mb-4"},Ept={class:"mb-4"};function vpt(n,e,t,s,i,r){const o=Je("ClipBoardTextInput"),a=Je("Card");return T(),x("div",bpt,[l("form",{onSubmit:e[0]||(e[0]=$((...c)=>r.submitForm&&r.submitForm(...c),["prevent"])),class:"max-w-md mx-auto"},[z(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>[z(a,{title:"Model",class:"",isHorizontal:!1},{default:Ne(()=>[l("div",ypt,[e[1]||(e[1]=l("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),z(o,{id:"model_path",inputType:"text",value:i.model_name},null,8,["value"])]),l("div",Ept,[e[2]||(e[2]=l("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1)),z(o,{id:"model_path",inputType:"text",value:i.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),z(a,{disableHoverAnimation:!0,disableFocus:!0},{default:Ne(()=>e[3]||(e[3]=[l("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1)])),_:1})],32)])}const Spt=st(gpt,[["render",vpt]]),Tpt={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean,openfolder_enabled:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,openFolder:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(n){this.newTitle=n},checkedChangeEvent(n,e){this.$emit("checked",n,e)}},mounted(){this.newTitle=this.title,Ue(()=>{Ge.replace()})},watch:{showConfirmation(){Ue(()=>{Ge.replace()})},editTitleMode(n){this.showConfirmation=n,this.editTitle=n,n&&Ue(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(n){this.showConfirmation=n,n&&Ue(()=>{this.$refs.titleBox.focus()})},makeTitleMode(n){this.showConfirmation=n},checkBoxValue(n,e){this.checkBoxValue_local=n}}},xpt=["id"],Cpt={class:"flex flex-row items-center gap-2"},wpt={key:0},Rpt={class:"flex flex-row items-center w-full"},Apt=["title"],Mpt=["value"],Npt={class:"absolute top-0 right-0 h-full flex items-center group"},Ipt={class:"discussion-toolbox"},Opt={key:0,class:"flex gap-2 items-center"},kpt={key:1,class:"flex gap-2 items-center"};function Dpt(n,e,t,s,i,r){return T(),x("div",{class:Pe([t.selected?"discussion-hilighted":"discussion","m-1 py-2 flex flex-row sm:flex-row flex-wrap flex-shrink-0 items-center rounded-md duration-75 cursor-pointer relative w-[15rem]"]),id:"dis-"+t.id,onClick:e[13]||(e[13]=$(o=>r.selectEvent(),["stop"]))},[l("div",Cpt,[t.isCheckbox?(T(),x("div",wpt,[k(l("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[0]||(e[0]=$(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>i.checkBoxValue_local=o),onInput:e[2]||(e[2]=o=>r.checkedChangeEvent(o,t.id))},null,544),[[Ye,i.checkBoxValue_local]])])):B("",!0),t.selected?(T(),x("div",{key:1,class:Pe(["min-h-full w-2 rounded-xl self-stretch",t.loading?"animate-bounce bg-accent":"bg-secondary"])},null,2)):B("",!0),t.selected?B("",!0):(T(),x("div",{key:2,class:Pe(["w-2",t.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent":""])},null,2))]),l("div",Rpt,[i.editTitle?B("",!0):(T(),x("p",{key:0,title:t.title,class:"line-clamp-1 w-full ml-1 -mx-5 text-xs"},Y(t.title?t.title==="untitled"?"New discussion":t.title:"New discussion"),9,Apt)),i.editTitle?(T(),x("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:t.title,required:"",onKeydown:[e[3]||(e[3]=qn($(o=>r.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=qn($(o=>i.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>r.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=$(()=>{},["stop"]))},null,40,Mpt)):B("",!0)]),l("div",Npt,[l("div",Ipt,[i.showConfirmation?(T(),x("div",Opt,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=$(o=>r.cancel(),["stop"]))},e[14]||(e[14]=[l("i",{"data-feather":"x"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=$(o=>i.editTitleMode?r.editTitleEvent():i.deleteMode?r.deleteEvent():r.makeTitleEvent(),["stop"]))},e[15]||(e[15]=[l("i",{"data-feather":"check"},null,-1)]))])):B("",!0),i.showConfirmation?B("",!0):(T(),x("div",kpt,[t.openfolder_enabled?(T(),x("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=$(o=>r.openFolderEvent(),["stop"]))},e[16]||(e[16]=[l("i",{"data-feather":"folder"},null,-1)]))):B("",!0),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=$(o=>i.makeTitleMode=!0,["stop"]))},e[17]||(e[17]=[l("i",{"data-feather":"type"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=$(o=>i.editTitleMode=!0,["stop"]))},e[18]||(e[18]=[l("i",{"data-feather":"edit-2"},null,-1)])),l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=$(o=>i.deleteMode=!0,["stop"]))},e[19]||(e[19]=[l("i",{"data-feather":"trash"},null,-1)]))]))])])],10,xpt)}const X0=st(Tpt,[["render",Dpt],["__scopeId","data-v-2b3580ce"]]),Lpt={data(){return{show:!1,prompt:"",inputText:""}},methods:{showPanel(){this.show=!0},ok(){this.show=!1,this.$emit("ok",this.inputText)},cancel(){this.show=!1,this.inputText=""}},props:{promptText:{type:String,required:!0}},watch:{promptText(n){this.prompt=n}}},Ppt={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},Fpt={class:"bg-white p-8 rounded"},Upt={class:"text-xl font-bold mb-4"};function Bpt(n,e,t,s,i,r){return T(),x("div",null,[i.show?(T(),x("div",Ppt,[l("div",Fpt,[l("h2",Upt,Y(t.promptText),1),k(l("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>i.inputText=o),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[ue,i.inputText]]),l("button",{onClick:e[1]||(e[1]=(...o)=>r.ok&&r.ok(...o)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),l("button",{onClick:e[2]||(e[2]=(...o)=>r.cancel&&r.cancel(...o)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):B("",!0)])}const Gpt=st(Lpt,[["render",Bpt]]),Vpt={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:X0,MarkdownRenderer:rp},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){te.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(n=>{this.categories=n.data.categories}).catch(n=>{console.error("Error fetching categories:",n)})},fetchTitles(){console.log("Fetching categories"),te.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(n=>{this.titles=n.data.titles,console.log("titles recovered")}).catch(n=>{console.error("Error fetching titles:",n)})},fetchContent(n){console.log("loading skill",n),te.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:n}).then(e=>{const t=e.data.contents[0];this.id=t.id,this.content=t.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(n){console.log("Delete category")},editCategory(n){console.log("Edit category")},checkUncheckCategory(n){console.log("Unchecked category")},deleteSkill(n){console.log("Delete skill ",n),te.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:n}).then(()=>{this.fetchTitles()})},editTitle(n){te.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:n,title:n}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(n){console.log("Make title")},checkUncheckTitle(n){},searchSkills(){}}},zpt={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},Hpt={class:"w-[15rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},qpt={classclass:"absolute flex flex-col no-scrollbar shadow-lg w-[15rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},Ypt={class:"z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"};function $pt(n,e,t,s,i,r){const o=Je("Discussion"),a=Je("MarkdownRenderer");return T(),x("div",{class:Pe([{hidden:!i.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[l("div",zpt,[l("div",Hpt,[k(l("input",{type:"search",id:"default-search",class:"block w-full h-8 px-8 text-sm border border-gray-300 rounded-md bg-bg-light focus:ring-1 focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary transition-all duration-200",placeholder:"Search discussions...",title:"Filter skills by title","onUpdate:modelValue":e[0]||(e[0]=c=>i.searchQuery=c),onKeyup:e[1]||(e[1]=qn((...c)=>r.searchSkills&&r.searchSkills(...c),["enter"]))},null,544),[[ue,i.searchQuery]]),l("div",qpt,[e[3]||(e[3]=l("h2",{class:"text-xl font-bold m-4"},"Titles",-1)),i.titles.length>0?(T(),at(Oi,{key:0,name:"list"},{default:Ne(()=>[(T(!0),x(Le,null,We(i.titles,c=>(T(),at(o,{key:c.id,id:c.id,title:c.title,selected:r.fetchContent(c.id),loading:i.loading,isCheckbox:i.isCheckbox,checkBoxValue:!1,openfolder_enabled:!1,onSelect:d=>r.fetchContent(c.id),onDelete:d=>r.deleteSkill(c.id),onEditTitle:r.editTitle,onMakeTitle:r.makeTitle,onChecked:r.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):B("",!0)])]),l("div",Ypt,[e[4]||(e[4]=l("h2",{class:"text-xl font-bold m-4"},"Content",-1)),z(a,{host:t.host,"markdown-text":i.content,message_id:i.id,discussion_id:i.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),l("button",{onClick:e[2]||(e[2]=(...c)=>r.closeComponent&&r.closeComponent(...c)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const uN=st(Vpt,[["render",$pt]]),Wpt={props:{htmlContent:{type:String,required:!0}}},Kpt=["innerHTML"];function jpt(n,e,t,s,i,r){return T(),x("div",{class:"w-full h-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",innerHTML:t.htmlContent},null,8,Kpt)}const Qpt=st(Wpt,[["render",jpt]]),Xpt={name:"JsonTreeView",props:{data:{type:[Object,Array],required:!0},depth:{type:Number,default:0}},data(){return{collapsedKeys:new Set}},methods:{isObject(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)},isArray(n){return Array.isArray(n)},toggleCollapse(n){this.collapsedKeys.has(n)?this.collapsedKeys.delete(n):this.collapsedKeys.add(n)},isCollapsed(n){return this.collapsedKeys.has(n)},getValueType(n){return typeof n=="string"?"string":typeof n=="number"?"number":typeof n=="boolean"?"boolean":n===null?"null":""},formatValue(n){return typeof n=="string"?`"${n}"`:String(n)}}},Zpt={class:"json-tree-view"},Jpt=["onClick"],eft={key:0,class:"toggle-icon"},tft={class:"key"},nft={key:0,class:"json-nested"};function sft(n,e,t,s,i,r){const o=Je("json-tree-view",!0);return T(),x("div",Zpt,[(T(!0),x(Le,null,We(t.data,(a,c)=>(T(),x("div",{key:c,class:"json-item"},[l("div",{class:"json-key",onClick:d=>r.toggleCollapse(c)},[r.isObject(a)||r.isArray(a)?(T(),x("span",eft,[l("i",{class:Pe(r.isCollapsed(c)?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)])):B("",!0),l("span",tft,Y(c)+":",1),!r.isObject(a)&&!r.isArray(a)?(T(),x("span",{key:1,class:Pe(["value",r.getValueType(a)])},Y(r.formatValue(a)),3)):B("",!0)],8,Jpt),(r.isObject(a)||r.isArray(a))&&!r.isCollapsed(c)?(T(),x("div",nft,[z(o,{data:a,depth:t.depth+1},null,8,["data","depth"])])):B("",!0)]))),128))])}const ift=st(Xpt,[["render",sft],["__scopeId","data-v-40406ec6"]]),rft={components:{JsonTreeView:ift},props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Viewer"}},data(){return{collapsed:!0}},computed:{isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")},parsedJsonData(){if(typeof this.jsonData=="string")try{return JSON.parse(this.jsonData)}catch(n){return console.error("Error parsing JSON string:",n),{error:"Invalid JSON string"}}return this.jsonData}},methods:{toggleCollapsible(){this.collapsed=!this.collapsed}}},oft={key:0,class:"json-viewer"},aft={class:"toggle-icon"},lft={class:"json-content panels-color"};function cft(n,e,t,s,i,r){const o=Je("json-tree-view");return r.isContentPresent?(T(),x("div",oft,[l("div",{class:"collapsible-section",onClick:e[0]||(e[0]=(...a)=>r.toggleCollapsible&&r.toggleCollapsible(...a))},[l("span",aft,[l("i",{class:Pe(i.collapsed?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)]),Ze(" "+Y(t.jsonFormText),1)]),k(l("div",lft,[z(o,{data:r.parsedJsonData,depth:0},null,8,["data"])],512),[[_t,!i.collapsed]])])):B("",!0)}const dft=st(rft,[["render",cft],["__scopeId","data-v-83fc9727"]]),uft={props:{done:Boolean,text:String,status:Boolean,description:String}},pft={class:"step-wrapper"},fft={class:"step-icon"},_ft={key:0,class:"icon-success",viewBox:"0 0 24 24"},mft={key:1,class:"icon-fail",viewBox:"0 0 24 24"},hft={key:1,class:"icon-spinner"},gft={class:"step-content"},bft={class:"step-text"},yft={key:0,class:"step-description"};function Eft(n,e,t,s,i,r){return T(),x("div",{class:Pe(["step-container",{"step-done":t.done}])},[l("div",pft,[l("div",fft,[t.done?(T(),x(Le,{key:0},[t.status?(T(),x("svg",_ft,e[0]||(e[0]=[l("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},null,-1)]))):(T(),x("svg",mft,e[1]||(e[1]=[l("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"},null,-1)])))],64)):(T(),x("div",hft))]),l("div",gft,[l("h3",bft,Y(t.text||"No text provided"),1),t.description?(T(),x("p",yft,Y(t.description),1)):B("",!0)])])],2)}const vft=st(uft,[["render",Eft]]),Sft="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20480%20480'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20d='M240,0C107.664,0,0,107.664,0,240s107.664,240,240,240s240-107.664,240-240S372.336,0,240,0z%20M240,460%20c-121.309,0-220-98.691-220-220S118.691,20,240,20s220,98.691,220,220S361.309,460,240,460z'/%3e%3cpath%20d='M410,194.999h-27.058c-2.643-8.44-6-16.56-10.03-24.271l19.158-19.158c3.776-3.775,5.854-8.79,5.854-14.121%20c0-5.332-2.08-10.347-5.854-14.121l-35.399-35.399c-3.775-3.775-8.79-5.854-14.122-5.854c-5.331,0-10.346,2.079-14.121,5.854%20l-19.158,19.158c-7.711-4.03-15.832-7.386-24.271-10.03V70c0-11.028-8.972-20-20-20h-50c-11.028,0-20,8.972-20,20v27.058%20c-8.44,2.643-16.56,6-24.271,10.03L151.57,87.93c-3.775-3.776-8.79-5.854-14.121-5.854c-5.332,0-10.347,2.08-14.121,5.854%20l-35.399,35.399c-3.775,3.775-5.854,8.79-5.854,14.122c0,5.331,2.079,10.346,5.854,14.121l19.158,19.158%20c-4.03,7.711-7.386,15.832-10.03,24.271H70c-11.028,0-20,8.972-20,20v50c0,11.028,8.972,20,20,20h27.057%20c2.643,8.44,6,16.56,10.03,24.271L87.929,328.43c-3.776,3.775-5.854,8.79-5.854,14.121c0,5.332,2.08,10.347,5.854,14.121%20l35.399,35.399c3.775,3.775,8.79,5.854,14.122,5.854c5.331,0,10.346-2.079,14.121-5.854l19.158-19.158%20c7.711,4.03,15.832,7.386,24.271,10.03V410c0,11.028,8.972,20,20,20h50c11.028,0,20-8.972,20.001-20v-27.058%20c8.44-2.643,16.56-6,24.271-10.03l19.158,19.158c3.775,3.776,8.79,5.854,14.121,5.854c5.332,0,10.347-2.08,14.121-5.854%20l35.399-35.399c3.775-3.775,5.854-8.79,5.854-14.122c0-5.331-2.079-10.346-5.854-14.121l-19.158-19.158%20c4.03-7.711,7.386-15.832,10.03-24.271H410c11.028,0,20-8.972,20-20v-50C430,203.971,421.028,194.999,410,194.999z%20M410,264.998%20h-34.598c-4.562,0-8.544,3.086-9.684,7.503c-3.069,11.901-7.716,23.133-13.813,33.387c-2.337,3.931-1.71,8.948,1.524,12.182%20l24.5,24.457l-35.357,35.4l-24.5-24.5c-3.236-3.235-8.253-3.86-12.182-1.524c-10.254,6.097-21.487,10.745-33.387,13.813%20c-4.417,1.14-7.503,5.122-7.503,9.684V410h-50v-34.599c0-4.562-3.086-8.544-7.503-9.684%20c-11.901-3.069-23.133-7.716-33.387-13.813c-1.587-0.944-3.353-1.404-5.107-1.404c-2.586,0-5.147,1.002-7.073,2.931l-24.457,24.5%20l-35.4-35.357l24.5-24.5c3.234-3.235,3.861-8.251,1.524-12.182c-6.097-10.254-10.745-21.487-13.813-33.387%20c-1.14-4.417-5.122-7.503-9.684-7.503H70v-50h34.596c4.562,0,8.544-3.086,9.684-7.503c3.069-11.901,7.716-23.133,13.813-33.387%20c2.337-3.931,1.71-8.948-1.524-12.182l-24.5-24.457l35.357-35.4l24.5,24.5c3.236,3.235,8.253,3.861,12.182,1.524%20c10.254-6.097,21.487-10.745,33.387-13.813c4.417-1.14,7.503-5.122,7.503-9.684V70h50v34.596c0,4.562,3.086,8.544,7.503,9.684%20c11.901,3.069,23.133,7.716,33.387,13.813c3.929,2.337,8.947,1.709,12.182-1.524l24.457-24.5l35.4,35.357l-24.5,24.5%20c-3.234,3.235-3.861,8.251-1.524,12.182c6.097,10.254,10.745,21.487,13.813,33.387c1.14,4.417,5.122,7.503,9.684,7.503H410%20V264.998z'/%3e%3cpath%20d='M331.585,292.475l-40-35l-13.17,15.051L298.386,290H240c-27.57,0-50-22.43-50-50h-20c0,38.598,31.402,70,70,70h58.386%20l-19.971,17.475l13.17,15.051l40-35c2.17-1.898,3.415-4.642,3.415-7.525S333.755,294.373,331.585,292.475z'/%3e%3cpath%20d='M201.585,207.473L181.614,190H240c27.57,0,50,22.43,50,50h20c0-38.598-31.402-70-70-70h-58.386l19.971-17.475%20l-13.17-15.051l-40,35c-2.17,1.898-3.415,4.642-3.415,7.525s1.245,5.627,3.415,7.525l40,35L201.585,207.473z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3canimateTransform%20attributeName='transform'%20attributeType='XML'%20type='rotate'%20from='0%20240%20240'%20to='360%20240%20240'%20dur='10s'%20repeatCount='indefinite'%20/%3e%3c/svg%3e",Tft="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2050%2050'%3e%3cpath%20d='M25%200C11.6%200%200%2011.6%200%2025s11.6%2025%2025%2025%2025-11.6%2025-25S40.4%200%2025%200zm0%2048C12.8%2048%202%2039.2%202%2025S12.8%202%2025%202s24%2010.8%2024%2024-10.8%2024-24%2024zm-4-33l-8%208%2018%2018%2030-30-8-8-22%2022L22%2016'%20fill='green'/%3e%3c/svg%3e",xft="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'%20fill='none'/%3e%3cpath%20d='M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012%2019%206.41z'%20fill='red'/%3e%3c/svg%3e",pN="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20version='1.1'%20width='256'%20height='256'%20viewBox='0%200%20256%20256'%20xml:space='preserve'%3e%3cdefs%3e%3c/defs%3e%3cg%20style='stroke:%20white;%20stroke-width:%202px;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20none;%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='translate(1.4065934065934016%201.4065934065934016)%20scale(2.81%202.81)'%20%3e%3cpath%20d='M%2089.999%203.075%20C%2090%203.02%2090%202.967%2089.999%202.912%20c%20-0.004%20-0.134%20-0.017%20-0.266%20-0.038%20-0.398%20c%20-0.007%20-0.041%20-0.009%20-0.081%20-0.018%20-0.122%20c%20-0.034%20-0.165%20-0.082%20-0.327%20-0.144%20-0.484%20c%20-0.018%20-0.046%20-0.041%20-0.089%20-0.061%20-0.134%20c%20-0.053%20-0.119%20-0.113%20-0.234%20-0.182%20-0.346%20C%2089.528%201.382%2089.5%201.336%2089.469%201.29%20c%20-0.102%20-0.147%20-0.212%20-0.288%20-0.341%20-0.417%20c%20-0.13%20-0.13%20-0.273%20-0.241%20-0.421%20-0.344%20c%20-0.042%20-0.029%20-0.085%20-0.056%20-0.129%20-0.082%20c%20-0.118%20-0.073%20-0.239%20-0.136%20-0.364%20-0.191%20c%20-0.039%20-0.017%20-0.076%20-0.037%20-0.116%20-0.053%20c%20-0.161%20-0.063%20-0.327%20-0.113%20-0.497%20-0.147%20c%20-0.031%20-0.006%20-0.063%20-0.008%20-0.094%20-0.014%20c%20-0.142%20-0.024%20-0.285%20-0.038%20-0.429%20-0.041%20C%2087.03%200%2086.983%200%2086.936%200.001%20c%20-0.141%200.003%20-0.282%200.017%20-0.423%200.041%20c%20-0.035%200.006%20-0.069%200.008%20-0.104%200.015%20c%20-0.154%200.031%20-0.306%200.073%20-0.456%200.129%20L%201.946%2031.709%20c%20-1.124%200.422%20-1.888%201.473%20-1.943%202.673%20c%20-0.054%201.199%200.612%202.316%201.693%202.838%20l%2034.455%2016.628%20l%2016.627%2034.455%20C%2053.281%2089.344%2054.334%2090%2055.481%2090%20c%200.046%200%200.091%20-0.001%200.137%20-0.003%20c%201.199%20-0.055%202.251%20-0.819%202.673%20-1.943%20L%2089.815%204.048%20c%200.056%20-0.149%200.097%20-0.3%200.128%20-0.453%20c%200.008%20-0.041%200.011%20-0.081%200.017%20-0.122%20C%2089.982%203.341%2089.995%203.208%2089.999%203.075%20z%20M%2075.086%2010.672%20L%2037.785%2047.973%20L%2010.619%2034.864%20L%2075.086%2010.672%20z%20M%2055.136%2079.381%20L%2042.027%2052.216%20l%2037.302%20-37.302%20L%2055.136%2079.381%20z'%20style='stroke:%20none;%20stroke-width:%201;%20stroke-dasharray:%20none;%20stroke-linecap:%20butt;%20stroke-linejoin:%20miter;%20stroke-miterlimit:%2010;%20fill:%20rgb(0,0,0);%20fill-rule:%20nonzero;%20opacity:%201;'%20transform='%20matrix(1%200%200%201%200%200)%20'%20stroke-linecap='round'%20/%3e%3ccircle%20cx='75'%20cy='75'%20r='15'%20fill='%23008000'/%3e%3cpath%20d='M75,60%20A15,15%200%200,1%2090,75%20A15,15%200%200,1%2075,90%20A15,15%200%200,1%2060,75%20A15,15%200%200,1%2075,60%20Z'%20stroke='%23FFFFFF'%20stroke-width='2'%20fill='none'/%3e%3cpath%20d='M81,75%20A6,6%200%200,1%2075,81%20A6,6%200%200,1%2069,75%20A6,6%200%200,1%2075,69%20A6,6%200%200,1%2081,75%20Z'%20fill='%23FFFFFF'/%3e%3c/g%3e%3c/svg%3e",Cft="/",wft={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:rp,Step:vft,RenderHTMLJS:Qpt,JsonViewer:dft,DynamicUIRenderer:dN,ToolbarButton:k0,DropdownMenu:ZM},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{ui_componentKey:0,isSynthesizingVoice:!1,cpp_block:UM,html5_block:BM,LaTeX_block:GM,json_block:FM,javascript_block:PM,process_svg:Sft,ok_svg:Tft,failed_svg:xft,loading_svg:zM,sendGlobe:pN,code_block:DM,python_block:LM,bash_block:VM,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),Ue(()=>{Ge.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let n of this.message.metadata)Object.prototype.hasOwnProperty.call(n,"audio_url")&&n.audio_url!=null&&(this.audio_url=n.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{toggleExpanded(){this.expanded=!this.expanded},computeTimeDiff(n,e){let t=e.getTime()-n.getTime();const s=Math.floor(t/(1e3*60*60));t-=s*(1e3*60*60);const i=Math.floor(t/(1e3*60));t-=i*(1e3*60);const r=Math.floor(t/1e3);return t-=r*1e3,[s,i,r]},insertTab(n){const e=n.target,t=e.selectionStart,s=e.selectionEnd,i=n.shiftKey;if(t===s)if(i){if(e.value.substring(t-4,t)==" "){const r=e.value.substring(0,t-4),o=e.value.substring(s),a=r+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t-4})}}else{const r=e.value.substring(0,t),o=e.value.substring(s),a=r+" "+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t+4})}else{const o=e.value.substring(t,s).split(` `).map(u=>u.trim()===""?u:i?u.startsWith(" ")?u.substring(4):u:" "+u),a=e.value.substring(0,t),c=e.value.substring(s),d=a+o.join(` `)+c;this.message.content=d,this.$nextTick(()=>{e.selectionStart=t,e.selectionEnd=s+o.length*4})}n.preventDefault()},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},read(){this.isSynthesizingVoice?(this.isSynthesizingVoice=!1,this.$refs.audio_player.pause()):(this.isSynthesizingVoice=!0,te.post("./text2wav",{text:this.message.content}).then(n=>{this.isSynthesizingVoice=!1;let e=n.data.url;console.log(e),this.audio_url=e,this.message.metadata||(this.message.metadata=[]);let t=!1;for(let s of this.message.metadata)Object.prototype.hasOwnProperty.call(s,"audio_url")&&(s.audio_url=this.audio_url,t=!0);t||this.message.metadata.push({audio_url:this.audio_url}),this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url)}).catch(n=>{this.$store.state.toast.showToast(`Error: ${n}`,4,!1),this.isSynthesizingVoice=!1}))},async speak(){if(this.$store.state.config.active_tts_service!="browser"&&this.$store.state.config.active_tts_service!="None")this.isSpeaking?(this.isSpeaking=!0,te.post("./stop",{text:this.message.content}).then(n=>{this.isSpeaking=!1}).catch(n=>{this.$store.state.toast.showToast(`Error: ${n}`,4,!1),this.isSpeaking=!1})):(this.isSpeaking=!0,te.post("./text2Audio",{client_id:this.$store.state.client_id,text:this.message.content}).then(n=>{this.isSpeaking=!1}).catch(n=>{this.$store.state.toast.showToast(`Error: ${n}`,4,!1),this.isSpeaking=!1}));else{if(this.msg){this.speechSynthesis.cancel(),this.msg=null,this.isSpeaking=!1;return}let n=0;console.log("voice on"),this.isSpeaking=!0;const e=200;this.message.content,this.msg=new SpeechSynthesisUtterance,this.msg.pitch=this.$store.state.config.audio_pitch,this.voices.length>0&&(this.msg.voice=this.voices.filter(i=>i.name===this.$store.state.config.audio_out_voice)[0]);const t=i=>{let r=this.message.content.substring(i,i+e);const o=[".","!","?",` `];let a=-1;return o.forEach(c=>{const d=r.lastIndexOf(c);d>a&&(a=d)}),a==-1&&(a=r.length),console.log(a),a+i+1},s=()=>{if(this.message.status_message=="Done"||this.message.content.includes(".")||this.message.content.includes("?")||this.message.content.includes("!")){const i=t(n),r=this.message.content.substring(n,i);this.msg.text=r,n=i+1,this.msg.onend=o=>{n{s()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",i))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{s()},1)};console.log("Speaking chunk"),s()}},toggleModel(){this.expanded=!this.expanded},addBlock(n){let e=this.$refs.mdTextarea.selectionStart,t=this.$refs.mdTextarea.selectionEnd;e==t?speechSynthesis==0||this.message.content[e-1]==` `?(this.message.content=this.message.content.slice(0,e)+"```"+n+"\n\n```\n"+this.message.content.slice(e),e=e+4+n.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+n+"\n\n```\n"+this.message.content.slice(e),e=e+3+n.length):speechSynthesis==0||this.message.content[e-1]==` `?(this.message.content=this.message.content.slice(0,e)+"```"+n+` `+this.message.content.slice(e,t)+"\n```\n"+this.message.content.slice(t),e=e+4+n.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+n+` -`+this.message.content.slice(e,t)+"\n```\n"+this.message.content.slice(t),p=p+3+n.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},copyContentToClipboard(){this.$emit("copy",this)},deleteMsg(){this.$emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this.$emit("rankUp",this.message.id)},rankDown(){this.$emit("rankDown",this.message.id)},updateMessage(){this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url),this.editMsgMode=!1},resendMessage(n){this.$emit("resendMessage",this.message.id,this.message.content,n)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?xft+this.avatar:(console.log("No avatar found"),Gs)},defaultImg(n){n.target.src=Gs},parseDate(n){let e=new Date(Date.parse(n)),s=Math.floor((new Date-e)/1e3);return s<=1?"just now":s<20?s+" seconds ago":s<40?"half a minute ago":s<60?"less than a minute ago":s<=90?"one minute ago":s<=3540?Math.round(s/60)+" minutes ago":s<=5400?"1 hour ago":s<=86400?Math.round(s/3600)+" hours ago":s<=129600?"1 day ago":s<604800?Math.round(s/86400)+" days ago":s<=777600?"1 week ago":n},prettyDate(n){let e=new Date((n||"").replace(/-/g,"/").replace(/[TZ]/g," ")),t=(new Date().getTime()-e.getTime())/1e3,s=Math.floor(t/86400);if(!(isNaN(s)||s<0||s>=31))return s==0&&(t<60&&"just now"||t<120&&"1 minute ago"||t<3600&&Math.floor(t/60)+" minutes ago"||t<7200&&"1 hour ago"||t<86400&&Math.floor(t/3600)+" hours ago")||s==1&&"Yesterday"||s<7&&s+" days ago"||s<31&&Math.ceil(s/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(n){n&&(this.$refs.audio_player.src=n)},"message.content":function(n){this.$store.state.config.auto_speak&&(this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode||this.isSpeaking||this.checkForFullSentence())},"message.ui":function(n){console.log("ui changed to",n),this.ui_componentKey++},showConfirmation(){Ue(()=>{Ge.replace()})},deleteMsgMode(){Ue(()=>{Ge.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(n){this.message.open=n,this.editMsgMode_=n,Ue(()=>{Ge.replace()})}},isTalking:{get(){return this.isSpeaking}},created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const n=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===n.getTime()||!n.getTime()||!e.getTime())return;let[s,i,r]=this.computeTimeDiff(n,e);function o(c){return c<10&&(c="0"+c),c}return o(s)+"h:"+o(i)+"m:"+o(r)+"s"},warmup_duration(){const n=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.started_generating_at));if(console.log("Computing the warmup duration, ",n," -> ",e),e.getTime()===n.getTime())return 0;if(!n.getTime()||!e.getTime())return;let s,i,r;[s,i,r]=this.computeTimeDiff(n,e);function o(c){return c<10&&(c="0"+c),c}return o(s)+"h:"+o(i)+"m:"+o(r)+"s"},generation_rate(){const n=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),t=this.message.nb_tokens;if(e.getTime()===n.getTime()||!t||!n.getTime()||!e.getTime())return;let i=e.getTime()-n.getTime();const r=Math.floor(i/1e3),o=t/r;return Math.round(o)+" t/s"}}},wft={class:"relative message w-full group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent flex flex-col flex-grow flex-wrap overflow-visible p-4 pb-2"},Rft={class:"flex flex-row gap-2"},Aft={class:"flex-shrink-0"},Mft={class:"group/avatar"},Nft=["src","data-popover-target"],Ift={class:"flex flex-col w-full flex-grow-0"},Oft={class:"flex flex-row flex-grow items-start"},kft={class:"flex flex-col mb-2"},Dft={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},Lft=["title"],Pft={class:"overflow-x-auto w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary space-y-2"},Fft={key:1},Uft=["src"],Bft={class:"message-details"},Gft={key:0,class:"steps-container"},Vft={class:"steps-icon"},zft={class:"steps-summary"},Hft={class:"steps-status"},qft={class:"toggle-icon"},Yft={key:0,class:"steps-content"},$ft={class:"steps-list"},Wft={class:"flex flex-col items-start w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},Kft={class:"flex-row justify-end mx-2"},jft={class:"invisible group-hover:visible flex flex-row"},Qft={key:0},Xft={key:1},Zft={key:2},Jft={key:3},e_t={key:4,class:"flex items-center duration-75"},t_t={class:"flex flex-row items-center"},n_t={class:"flex flex-row items-center"},s_t={key:6,class:"flex flex-row items-center"},i_t=["src"],r_t={class:"text-sm text-gray-400 mt-2"},o_t={class:"flex flex-row items-center gap-2"},a_t={key:0},l_t={class:"font-thin"},c_t={key:1},d_t={class:"font-thin"},u_t={key:2},p_t={class:"font-thin"},f_t={key:3},__t=["title"],m_t={key:4},h_t=["title"],g_t={key:5},b_t=["title"],y_t={key:6},E_t=["title"];function v_t(n,e,t,s,i,r){var f;const o=Je("MarkdownRenderer"),a=Je("JsonViewer"),c=Je("DynamicUIRenderer"),d=Je("StatusIcon"),u=Je("Step"),_=Je("RenderHTMLJS"),m=Je("ToolbarButton"),h=Je("DropdownSubmenu"),g=Je("DropdownMenu");return T(),x("div",wft,[l("div",Rft,[l("div",Aft,[l("div",Mft,[l("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=b=>r.defaultImg(b)),"data-popover-target":"avatar"+t.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,Nft)])]),l("div",Ift,[l("div",Oft,[l("div",kft,[l("div",Dft,Y(t.message.sender),1),t.message.created_at?(T(),x("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+r.created_at_parsed},Y(r.created_at),9,Lft)):B("",!0)]),e[46]||(e[46]=l("div",{class:"flex-grow"},null,-1))]),l("div",Pft,[r.editMsgMode?B("",!0):(T(),at(o,{key:0,ref:"mdRender",host:t.host,"markdown-text":t.message.content,message_id:t.message.id,discussion_id:t.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),l("div",null,[t.message.open?k((T(),x("textarea",{key:0,ref:"mdTextarea",onKeydown:e[1]||(e[1]=qn($((...b)=>r.insertTab&&r.insertTab(...b),["prevent"]),["tab"])),class:"block min-h-[500px] p-2.5 w-full text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",rows:4,placeholder:"Enter message here...","onUpdate:modelValue":e[2]||(e[2]=b=>t.message.content=b)}," ",544)),[[ue,t.message.content]]):B("",!0)]),t.message.metadata!==null?(T(),x("div",Fft,[(T(!0),x(Le,null,We(((f=t.message.metadata)==null?void 0:f.filter(b=>b!=null&&b.hasOwnProperty("title")&&b.hasOwnProperty("content")))||[],(b,y)=>(T(),x("div",{key:"json-"+t.message.id+"-"+y,class:"json font-bold"},[(T(),at(a,{jsonFormText:b.title,jsonData:b.content,key:"msgjson-"+t.message.id},null,8,["jsonFormText","jsonData"]))]))),128))])):B("",!0),t.message.ui?(T(),at(c,{ref:"ui",class:"w-full",ui:t.message.ui,key:"msgui-"+t.message.id},null,8,["ui"])):B("",!0),i.audio_url!=null?(T(),x("audio",{controls:"",key:i.audio_url},[l("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,Uft),e[47]||(e[47]=Ze(" Your browser does not support the audio element. "))])):B("",!0),l("div",Bft,[t.message.steps.length>0?(T(),x("div",Gft,[l("div",{class:"steps-header",onClick:e[3]||(e[3]=(...b)=>r.toggleExpanded&&r.toggleExpanded(...b))},[l("div",Vft,[z(d,{status:t.message.status_message,icon:!0},null,8,["status"])]),l("div",zft,[e[48]||(e[48]=l("h3",{class:"steps-title"},"Processing Info",-1)),l("p",Hft,Y(t.message.status_message),1)]),l("span",qft,Y(i.expanded?"▲":"▼"),1)]),z(Bs,{name:"fade"},{default:Ne(()=>[i.expanded?(T(),x("div",Yft,[l("ul",$ft,[(T(!0),x(Le,null,We(t.message.steps,(b,y)=>(T(),x("li",{key:`step-${t.message.id}-${y}`,class:"step-item"},[z(u,{done:b.done,text:b.text,status:b.status,description:b.description},null,8,["done","text","status","description"])]))),128))])])):B("",!0)]),_:1})])):B("",!0),l("div",Wft,[(T(!0),x(Le,null,We(t.message.html_js_s,(b,y)=>(T(),x("div",{key:`htmljs-${t.message.id}-${y}`,class:"font-bold animate-fadeIn",style:Vt({animationDelay:`${y*200}ms`})},[z(_,{htmlContent:b},null,8,["htmlContent"])],4))),128))])])]),l("div",Kft,[l("div",jft,[r.editMsgMode?(T(),x("div",Qft,[z(m,{onClick:e[4]||(e[4]=$(b=>r.editMsgMode=!1,["stop"])),title:"Cancel edit",icon:"x"}),z(m,{onClick:$(r.updateMessage,["stop"]),title:"Update message",icon:"check"},null,8,["onClick"]),z(g,{title:"Add Block"},{default:Ne(()=>[z(h,{title:"Programming Languages",icon:"code"},{default:Ne(()=>[z(m,{onClick:e[5]||(e[5]=$(b=>r.addBlock("python"),["stop"])),title:"Python",icon:"python"}),z(m,{onClick:e[6]||(e[6]=$(b=>r.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),z(m,{onClick:e[7]||(e[7]=$(b=>r.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),z(m,{onClick:e[8]||(e[8]=$(b=>r.addBlock("java"),["stop"])),title:"Java",icon:"java"}),z(m,{onClick:e[9]||(e[9]=$(b=>r.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),z(m,{onClick:e[10]||(e[10]=$(b=>r.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),z(m,{onClick:e[11]||(e[11]=$(b=>r.addBlock("go"),["stop"])),title:"Go",icon:"go"}),z(m,{onClick:e[12]||(e[12]=$(b=>r.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),z(m,{onClick:e[13]||(e[13]=$(b=>r.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),z(m,{onClick:e[14]||(e[14]=$(b=>r.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),z(m,{onClick:e[15]||(e[15]=$(b=>r.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),z(h,{title:"Web Technologies",icon:"web"},{default:Ne(()=>[z(m,{onClick:e[16]||(e[16]=$(b=>r.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),z(m,{onClick:e[17]||(e[17]=$(b=>r.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),z(m,{onClick:e[18]||(e[18]=$(b=>r.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),z(m,{onClick:e[19]||(e[19]=$(b=>r.addBlock("react"),["stop"])),title:"React",icon:"react"}),z(m,{onClick:e[20]||(e[20]=$(b=>r.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),z(h,{title:"Markup and Data",icon:"file-code"},{default:Ne(()=>[z(m,{onClick:e[21]||(e[21]=$(b=>r.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),z(m,{onClick:e[22]||(e[22]=$(b=>r.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),z(m,{onClick:e[23]||(e[23]=$(b=>r.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),z(m,{onClick:e[24]||(e[24]=$(b=>r.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),z(m,{onClick:e[25]||(e[25]=$(b=>r.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),z(h,{title:"Scripting and Shell",icon:"terminal"},{default:Ne(()=>[z(m,{onClick:e[26]||(e[26]=$(b=>r.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),z(m,{onClick:e[27]||(e[27]=$(b=>r.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),z(m,{onClick:e[28]||(e[28]=$(b=>r.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),z(h,{title:"Diagramming",icon:"sitemap"},{default:Ne(()=>[z(m,{onClick:e[29]||(e[29]=$(b=>r.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),z(m,{onClick:e[30]||(e[30]=$(b=>r.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),z(m,{onClick:e[31]||(e[31]=$(b=>r.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),z(h,{title:"Database",icon:"database"},{default:Ne(()=>[z(m,{onClick:e[32]||(e[32]=$(b=>r.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),z(m,{onClick:e[33]||(e[33]=$(b=>r.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),z(m,{onClick:e[34]||(e[34]=$(b=>r.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1})])):(T(),x("div",Xft,[z(m,{onClick:e[35]||(e[35]=$(b=>r.editMsgMode=!0,["stop"])),title:"Edit message",icon:"edit"})])),z(m,{onClick:r.copyContentToClipboard,title:"Copy message to clipboard",icon:"copy"},null,8,["onClick"]),!r.editMsgMode&&t.message.sender!==n.$store.state.mountedPers.name?(T(),x("div",Zft,[z(m,{onClick:e[36]||(e[36]=$(b=>r.resendMessage("full_context"),["stop"])),title:"Resend message with full context",icon:"send"}),z(m,{onClick:e[37]||(e[37]=$(b=>r.resendMessage("full_context_with_internet"),["stop"])),title:"Resend message with internet search",icon:"globe"}),z(m,{onClick:e[38]||(e[38]=$(b=>r.resendMessage("simple_question"),["stop"])),title:"Resend message without context",icon:"sendSimple"})])):B("",!0),!r.editMsgMode&&t.message.sender===n.$store.state.mountedPers.name?(T(),x("div",Jft,[z(m,{onClick:r.continueMessage,title:"Continue message",icon:"fastForward"},null,8,["onClick"])])):B("",!0),i.deleteMsgMode?(T(),x("div",e_t,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Cancel removal",type:"button",onClick:e[39]||(e[39]=$(b=>i.deleteMsgMode=!1,["stop"]))},e[49]||(e[49]=[l("i",{"data-feather":"x"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Confirm removal",type:"button",onClick:e[40]||(e[40]=$(b=>r.deleteMsg(),["stop"]))},e[50]||(e[50]=[l("i",{"data-feather":"check"},null,-1)]))])):B("",!0),!r.editMsgMode&&!i.deleteMsgMode?(T(),x("div",{key:5,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Remove message",onClick:e[41]||(e[41]=b=>i.deleteMsgMode=!0)},e[51]||(e[51]=[l("i",{"data-feather":"trash"},null,-1)]))):B("",!0),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[42]||(e[42]=$(b=>r.rankUp(),["stop"]))},e[52]||(e[52]=[l("i",{"data-feather":"thumbs-up"},null,-1)])),l("div",t_t,[l("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[43]||(e[43]=$(b=>r.rankDown(),["stop"]))},e[53]||(e[53]=[l("i",{"data-feather":"thumbs-down"},null,-1)])),t.message.rank!=0?(T(),x("div",{key:0,class:Pe(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",t.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},Y(t.message.rank),3)):B("",!0)]),l("div",n_t,[this.$store.state.config.active_tts_service!="None"?(T(),x("div",{key:0,class:Pe(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":r.isTalking}]),title:"speak",onClick:e[44]||(e[44]=$(b=>r.speak(),["stop"]))},e[54]||(e[54]=[l("i",{"data-feather":"volume-2"},null,-1)]),2)):B("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(T(),x("div",s_t,[i.isSynthesizingVoice?(T(),x("img",{key:1,src:i.loading_svg},null,8,i_t)):(T(),x("div",{key:0,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"generate_audio",onClick:e[45]||(e[45]=$(b=>r.read(),["stop"]))},e[55]||(e[55]=[l("i",{"data-feather":"voicemail"},null,-1)])))])):B("",!0)])]),l("div",r_t,[l("div",o_t,[t.message.binding?(T(),x("p",a_t,[e[56]||(e[56]=Ze("Binding: ")),l("span",l_t,Y(t.message.binding),1)])):B("",!0),t.message.model?(T(),x("p",c_t,[e[57]||(e[57]=Ze("Model: ")),l("span",d_t,Y(t.message.model),1)])):B("",!0),t.message.seed?(T(),x("p",u_t,[e[58]||(e[58]=Ze("Seed: ")),l("span",p_t,Y(t.message.seed),1)])):B("",!0),t.message.nb_tokens?(T(),x("p",f_t,[e[59]||(e[59]=Ze("Number of tokens: ")),l("span",{class:"font-thin",title:"Number of Tokens: "+t.message.nb_tokens},Y(t.message.nb_tokens),9,__t)])):B("",!0),r.warmup_duration?(T(),x("p",m_t,[e[60]||(e[60]=Ze("Warmup duration: ")),l("span",{class:"font-thin",title:"Warmup duration: "+r.warmup_duration},Y(r.warmup_duration),9,h_t)])):B("",!0),r.time_spent?(T(),x("p",g_t,[e[61]||(e[61]=Ze("Generation duration: ")),l("span",{class:"font-thin",title:"Finished generating: "+r.time_spent},Y(r.time_spent),9,b_t)])):B("",!0),r.generation_rate?(T(),x("p",y_t,[e[62]||(e[62]=Ze("Rate: ")),l("span",{class:"font-thin",title:"Generation rate: "+r.generation_rate},Y(r.generation_rate),9,E_t)])):B("",!0)])])])])])}const fN=st(Cft,[["render",v_t]]);te.defaults.baseURL="/";const S_t={components:{InteractiveMenu:K0},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){this.commands=this.commandsList,console.log("Commands",this.commands),document.addEventListener("click",this.handleClickOutside),Ue(()=>{Ge.replace()})},methods:{isHTML(n){const t=new DOMParser().parseFromString(n,"text/html");return Array.from(t.body.childNodes).some(s=>s.nodeType===Node.ELEMENT_NODE)},selectFile(n,e){const t=document.createElement("input");t.type="file",t.accept=n,t.onchange=s=>{this.selectedFile=s.target.files[0],console.log("File selected"),e()},t.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const t={filename:this.selectedFile.name,fileData:e.result};qe.on("file_received",s=>{s.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file -`+s.error,4,!1),this.loading=!1,qe.off("file_received")}),qe.emit("send_file",t)},e.readAsDataURL(this.selectedFile)},async constructor(){Ue(()=>{Ge.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(n){this.showMenu=!this.showMenu,n.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(n.hasOwnProperty("file_types")?n.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(n.value)},handleClickOutside(n){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(n.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},T_t={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"};function x_t(n,e,t,s,i,r){const o=Je("InteractiveMenu");return i.loading?(T(),x("div",T_t,e[0]||(e[0]=[l("div",{role:"status"},[l("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),l("span",{class:"sr-only"},"Loading...")],-1)]))):(T(),at(o,{key:1,commands:t.commandsList,execute_cmd:r.execute_cmd},null,8,["commands","execute_cmd"]))}const C_t=st(S_t,[["render",x_t],["__scopeId","data-v-1a32c141"]]),w_t="data:image/svg+xml,%3csvg%20aria-hidden='true'%20class='w-6%20h-6%20animate-spin%20fill-secondary'%20viewBox='0%200%20100%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M100%2050.5908C100%2078.2051%2077.6142%20100.591%2050%20100.591C22.3858%20100.591%200%2078.2051%200%2050.5908C0%2022.9766%2022.3858%200.59082%2050%200.59082C77.6142%200.59082%20100%2022.9766%20100%2050.5908ZM9.08144%2050.5908C9.08144%2073.1895%2027.4013%2091.5094%2050%2091.5094C72.5987%2091.5094%2090.9186%2073.1895%2090.9186%2050.5908C90.9186%2027.9921%2072.5987%209.67226%2050%209.67226C27.4013%209.67226%209.08144%2027.9921%209.08144%2050.5908Z'%20fill='currentColor'%20/%3e%3cpath%20d='M93.9676%2039.0409C96.393%2038.4038%2097.8624%2035.9116%2097.0079%2033.5539C95.2932%2028.8227%2092.871%2024.3692%2089.8167%2020.348C85.8452%2015.1192%2080.8826%2010.7238%2075.2124%207.41289C69.5422%204.10194%2063.2754%201.94025%2056.7698%201.05124C51.7666%200.367541%2046.6976%200.446843%2041.7345%201.27873C39.2613%201.69328%2037.813%204.19778%2038.4501%206.62326C39.0873%209.04874%2041.5694%2010.4717%2044.0505%2010.1071C47.8511%209.54855%2051.7191%209.52689%2055.5402%2010.0491C60.8642%2010.7766%2065.9928%2012.5457%2070.6331%2015.2552C75.2735%2017.9648%2079.3347%2021.5619%2082.5849%2025.841C84.9175%2028.9121%2086.7997%2032.2913%2088.1811%2035.8758C89.083%2038.2158%2091.5421%2039.6781%2093.9676%2039.0409Z'%20fill='currentFill'%20/%3e%3c/svg%3e",R_t="/",A_t={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{PersonalitiesCommands:C_t,ChatBarButton:lp},setup(){},data(){return{isSendMenuVisible:!1,is_rt:!1,bindingHoveredIndex:null,modelHoveredIndex:null,personalityHoveredIndex:null,loader_v0:w_t,sendGlobe:pN,bUrl:R_t,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isListeningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{leftPanelCollapsed(){return this.$store.state.leftPanelCollapsed},rightPanelCollapsed(){return this.$store.state.rightPanelCollapsed},isCompactMode(){return this.$store.state.view_mode==="compact"},isDataSourceNamesValid(){return console.log("dataSourceNames:",this.dataSourceNames),console.log("Type of dataSourceNames:",typeof this.dataSourceNames),Array.isArray(this.dataSourceNames)&&this.dataSourceNames.length>0},dataSourceNames(){console.log("dataSourceNames",this.$store.state.config.rag_databases);const n=this.$store.state.config.rag_databases.map(e=>{console.log("entry",e);const t=e.split("::");console.log("extracted",t[0]);const i=e.endsWith("mounted")?"feather:check":"";return console.log("icon decision",i),{name:t[0],value:t[0]||"default_value",icon:i,help:"mounts the database"}});return console.log("formatted data sources",n),n}},methods:{showSendMenu(){clearTimeout(this.hideSendMenuTimeout),this.isSendMenuVisible=!0},hideSendMenu(){this.hideSendMenuTimeout=setTimeout(()=>{this.isSendMenuVisible=!1},300)},toggleLeftPanel(){console.log(this.leftPanelCollapsed),this.$store.commit("setLeftPanelCollapsed",!this.leftPanelCollapsed)},async toggleRightPanel(){console.log(this.rightPanelCollapsed),this.$store.commit("setRightPanelCollapsed",!this.rightPanelCollapsed),this.rightPanelCollapsed&&(this.$store.commit("setleftPanelCollapsed",!0),this.$nextTick(()=>{this.extractHtml()})),console.log(this.rightPanelCollapsed)},handlePaste(n){const e=(n.clipboardData||n.originalEvent.clipboardData).items;let t=[];for(let s of e)if(s.type.indexOf("image")!==-1){const i=s.getAsFile(),o=`image_${Date.now()+"_"+Math.random().toString(36).substr(2,9)}.png`;console.log("newFileName",o);const a=new File([i],o,{type:i.type});this.addFiles([a])}else if(s.kind==="file"){const i=s.getAsFile();t.push(i)}t.length>0&&this.addFiles(t)},emitloaded(){this.$emit("loaded")},download_files(){te.get("/download_files")},remove_file(n){te.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:n}).then(e=>{console.log(e)})},clear_files(){te.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(n=>{console.log(n),n.data.state?(this.$store.state.toast.showToast("File removed successfully",4,!0),this.filesList.length=0,this.isFileSentList.length=0,this.totalSize=0):this.$store.state.toast.showToast("Files couldn't be removed",4,!1)})},send_file(n,e){console.log("Send file triggered");const t=new FileReader,s=24*1024;let i=0,r=0;t.onloadend=()=>{if(t.error){console.error("Error reading file:",t.error);return}const a=t.result,c=i+a.byteLength>=n.size;qe.emit("send_file_chunk",{filename:n.name,chunk:a,offset:i,isLastChunk:c,chunkIndex:r}),i+=a.byteLength,r++,c?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.$store.state.toast.showToast("File uploaded successfully",4,!0),e()):o()};function o(){const a=n.slice(i,i+s);t.readAsArrayBuffer(a)}console.log("Uploading file"),o()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage",this.message),this.message=""},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},updateRT(){console.log("Updating rt status"),this.is_rt?this.stopRTCom():this.startRTCom()},startRTCom(){this.is_rt=!0,console.log("is_rt:",this.is_rt),qe.emit("start_bidirectional_audio_stream"),Ue(()=>{Ge.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),qe.emit("stop_bidirectional_audio_stream"),Ue(()=>{Ge.replace()})},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isListeningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=n=>{let e="";for(let t=n.resultIndex;t{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=n=>{console.error("Speech recognition error:",n.error),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},computedFileSize(n){return Ue(()=>{Ge.replace()}),ii(n)},removeItem(n){console.log("Removing ",n.name),te.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:n.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=n)}),console.log(this.filesList)},sendMessageEvent(n,e="no_internet"){this.$emit("messageSentEvent",n,e)},sendCMDEvent(n){this.$emit("sendCMDEvent",n)},async mountDB(n){await te.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,database_name:n}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const n=document.createElement("input");n.type="file",n.style.display="none",n.multiple=!0,document.body.appendChild(n),n.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(n.files),document.body.removeChild(n)}),n.click()},takePicture(){qe.emit("take_picture"),qe.on("picture_taken",()=>{te.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(n=>{this.filesList=n.data.files,this.isFileSentList=n.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(n){this.loading||n.which===13&&(n.preventDefault(),n.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},submitWithInternetSearch(){this.message&&(this.sendMessageEvent(this.message,"internet"),this.message="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(n){console.log("Adding files");const e=[...n];let t=0;const s=()=>{if(t>=e.length){console.log(`Files_list: ${this.filesList}`);return}const i=e[t];this.filesList.push(i),this.isFileSentList.push(!1),this.send_file(i,()=>{t++,s()})};s()}},watch:{installedModels:{immediate:!0,handler(n){this.$nextTick(()=>{this.installedModels=n})}},model_name:{immediate:!0,handler(n){this.$nextTick(()=>{this.model_name=n})}},showfilesList(){Ue(()=>{Ge.replace()})},loading(n,e){Ue(()=>{Ge.replace()})},filesList:{handler(n,e){let t=0;if(n.length>0)for(let s=0;s{Ge.replace()}),console.log("Chatbar mounted"),qe.on("rtcom_status_changed",n=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",n.status),console.log("active_tts_service: ",this.$store.state.config.active_tts_service),console.log("is_rt_on: ",this.$store.state.is_rt_on)}),this.$store.dispatch("fetchisRTOn")},activated(){Ue(()=>{Ge.replace()})}},M_t={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},N_t={key:0,class:"items-center gap-2 panels-color shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},I_t={class:"flex"},O_t=["title"],k_t={key:0},D_t={class:"flex flex-col max-h-64"},L_t=["title"],P_t={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium items-center gap-2 rounded-lg border bg-gray-100 p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-700 hover:bg-primary dark:hover:bg-primary"},F_t={key:0,filesList:"",role:"status"},U_t={class:"flex flex-row items-center"},B_t={class:"whitespace-nowrap"},G_t=["onClick"],V_t={key:1,class:"flex mx-1 w-500"},z_t={class:"whitespace-nowrap flex flex-row gap-2"},H_t={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end panels-color"},q_t={role:"status"},Y_t=["src"],$_t={class:"flex w-fit relative grow w-full"},W_t={class:"chat-bar",tabindex:"0"},K_t={key:0,title:"Waiting for reply"},j_t=["src"],Q_t={class:"w-fit"},X_t={class:"w-fit"},Z_t={class:"relative grow m-0 p-0"},J_t={class:"m-0 p-0"},emt={class:"flex items-center space-x-3"},tmt={class:"relative inline-block"},nmt={class:"p-4 m-0 flex flex-col gap-4 max-h-96 overflow-y-auto custom-scrollbar"},smt={class:"flex flex-col gap-2"};function imt(n,e,t,s,i,r){const o=Je("ChatBarButton"),a=Je("PersonalitiesCommands");return T(),x("div",M_t,[i.filesList.length>0?(T(),x("div",N_t,[l("div",I_t,[l("button",{class:"mx-1 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:i.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[0]||(e[0]=$(c=>i.showfilesList=!i.showfilesList,["stop"]))},e[11]||(e[11]=[l("i",{"data-feather":"list"},null,-1)]),8,O_t)]),i.filesList.length>0&&i.showfilesList==!0?(T(),x("div",k_t,[l("div",D_t,[z(Oi,{name:"list",tag:"div",class:"flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},{default:Ne(()=>[(T(!0),x(Le,null,We(i.filesList,(c,d)=>(T(),x("div",{key:d+"-"+c.name},[l("div",{class:"m-1",title:c.name},[l("div",P_t,[i.isFileSentList[d]?B("",!0):(T(),x("div",F_t,e[12]||(e[12]=[l("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),l("span",{class:"sr-only"},"Loading...",-1)]))),e[14]||(e[14]=l("div",null,[l("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),l("div",{class:Pe(["line-clamp-1 w-3/5",i.isFileSentList[d]?"text-green-500":"text-red-200"])},Y(c.name),3),e[15]||(e[15]=l("div",{class:"grow"},null,-1)),l("div",U_t,[l("p",B_t,Y(r.computedFileSize(c.size)),1),l("button",{type:"button",title:"Remove item",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:u=>r.removeItem(c)},e[13]||(e[13]=[l("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)]),8,G_t)])])],8,L_t)]))),128))]),_:1})])])):B("",!0),i.filesList.length>0?(T(),x("div",V_t,[l("div",z_t,[e[16]||(e[16]=l("p",{class:"font-bold"}," Total size: ",-1)),Ze(" "+Y(i.totalSize)+" ("+Y(i.filesList.length)+") ",1)]),e[19]||(e[19]=l("div",{class:"grow"},null,-1)),l("button",{type:"button",title:"Clear all",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[1]||(e[1]=(...c)=>r.clear_files&&r.clear_files(...c))},e[17]||(e[17]=[l("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)])),l("button",{type:"button",title:"Download database",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[2]||(e[2]=(...c)=>r.download_files&&r.download_files(...c))},e[18]||(e[18]=[l("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)]))])):B("",!0)])):B("",!0),i.selecting_model||i.selecting_binding?(T(),x("div",H_t,[l("div",q_t,[l("img",{src:i.loader_v0,class:"w-50 h-50"},null,8,Y_t),e[20]||(e[20]=l("span",{class:"sr-only"},"Selecting model...",-1))])])):B("",!0),l("div",$_t,[l("div",W_t,[t.loading?(T(),x("div",K_t,[l("img",{src:i.loader_v0},null,8,j_t),e[21]||(e[21]=l("div",{role:"status"},[l("span",{class:"sr-only"},"Loading...")],-1))])):B("",!0),z(o,{onClick:r.toggleLeftPanel,class:Pe({"text-red-500":r.leftPanelCollapsed}),title:"Toggle View Mode"},{default:Ne(()=>[k(l("div",null,e[22]||(e[22]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[l("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[_t,r.leftPanelCollapsed]]),k(l("div",null,e[23]||(e[23]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[l("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[_t,!r.leftPanelCollapsed]])]),_:1},8,["onClick","class"]),l("div",Q_t,[this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(T(),at(a,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:r.sendCMDEvent,"on-show-toast-message":t.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):B("",!0)]),l("div",X_t,[r.isDataSourceNamesValid?(T(),at(a,{key:0,icon:"feather:book",commandsList:r.dataSourceNames,sendCommand:r.mountDB,"on-show-toast-message":t.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):B("",!0)]),l("div",Z_t,[l("form",J_t,[k(l("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[3]||(e[3]=c=>i.message=c),onPaste:e[4]||(e[4]=(...c)=>r.handlePaste&&r.handlePaste(...c)),onKeydown:e[5]||(e[5]=qn($(c=>r.submitOnEnter(c),["exact"]),["enter"])),class:"w-full p-2 text-sm text-gray-900 dark:text-white bg-gray-100 dark:bg-gray-700 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",placeholder:"Send message..."},null,544),[[ue,i.message]])])]),l("div",emt,[t.loading?(T(),at(o,{key:0,onClick:r.stopGenerating,class:"bg-red-500 dark:bg-red-600 hover:bg-red-600 dark:hover:bg-red-700"},{icon:Ne(()=>e[24]||(e[24]=[l("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),l("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])),default:Ne(()=>[e[25]||(e[25]=l("span",null,"Stop",-1))]),_:1},8,["onClick"])):(T(),at(o,{key:1,onClick:r.submit,title:"Send"},{icon:Ne(()=>e[26]||(e[26]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})],-1)])),_:1},8,["onClick"])),z(o,{onClick:r.submitWithInternetSearch,title:"Send with internet search"},{icon:Ne(()=>e[27]||(e[27]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})],-1)])),_:1},8,["onClick"]),z(o,{onClick:r.startSpeechRecognition,class:Pe({"text-red-500":i.isListeningToVoice}),title:"Voice input"},{icon:Ne(()=>e[28]||(e[28]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})],-1)])),_:1},8,["onClick","class"]),n.$store.state.config.active_tts_service!="None"&&n.$store.state.config.active_tts_service!=null&&this.$store.state.config.active_stt_service!="None"&&this.$store.state.config.active_stt_service!=null?(T(),at(o,{key:2,onClick:r.updateRT,class:Pe(i.is_rt?"bg-red-500 dark:bg-red-600":"bg-green-500 dark:bg-green-600"),title:"Real-time audio mode"},{icon:Ne(()=>e[29]||(e[29]=[Ze(" 🌟 ")])),_:1},8,["onClick","class"])):B("",!0),t.loading?B("",!0):(T(),x("div",{key:3,class:"relative",onMouseleave:e[9]||(e[9]=(...c)=>r.hideSendMenu&&r.hideSendMenu(...c))},[l("div",tmt,[k(l("div",{onMouseenter:e[6]||(e[6]=(...c)=>r.showSendMenu&&r.showSendMenu(...c)),class:"absolute m-0 p-0 z-10 bottom-full left-1/2 transform -translate-x-1/2 w-25 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[l("div",nmt,[l("div",smt,[z(o,{onClick:r.add_file,title:"Send file"},{icon:Ne(()=>e[30]||(e[30]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)])),_:1},8,["onClick"]),z(o,{onClick:r.takePicture,title:"Take picture"},{icon:Ne(()=>e[31]||(e[31]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})],-1)])),_:1},8,["onClick"]),z(o,{onClick:r.addWebLink,title:"Add web link"},{icon:Ne(()=>e[32]||(e[32]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})],-1)])),_:1},8,["onClick"])])])],544),[[_t,i.isSendMenuVisible]]),l("div",{onMouseenter:e[8]||(e[8]=(...c)=>r.showSendMenu&&r.showSendMenu(...c))},[l("button",{onClick:e[7]||(e[7]=$((...c)=>n.toggleSendMenu&&n.toggleSendMenu(...c),["prevent"])),class:"chat-bar-button"},e[33]||(e[33]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)]))],32)])],32)),z(o,{onClick:r.makeAnEmptyUserMessage,title:"New user message"},{icon:Ne(()=>e[34]||(e[34]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})],-1)])),_:1},8,["onClick"]),z(o,{onClick:r.makeAnEmptyAIMessage,title:"New AI message",class:"text-red-400 dark:text-red-300"},{icon:Ne(()=>e[35]||(e[35]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})],-1)])),_:1},8,["onClick"]),z(o,{onClick:r.toggleRightPanel,class:Pe({"text-red-500":!r.rightPanelCollapsed}),title:"Toggle right Panel"},{default:Ne(()=>[k(l("div",null,e[36]||(e[36]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[l("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[_t,r.rightPanelCollapsed]]),k(l("div",null,e[37]||(e[37]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[l("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[_t,!r.rightPanelCollapsed]])]),_:1},8,["onClick","class"])]),l("input",{type:"file",ref:"fileDialog",onChange:e[10]||(e[10]=(...c)=>r.addFiles&&r.addFiles(...c)),multiple:"",style:{display:"none"}},null,544)]),e[38]||(e[38]=l("div",{class:"ml-auto gap-2"},null,-1))])])}const _N=st(A_t,[["render",imt],["__scopeId","data-v-908c73f4"]]),rmt={name:"WelcomeComponent",data(){return{videoUrl:"",videoType:"",latestNews:"",error:"",showVideoButton:!1,lastVideoUrl:""}},computed:{getImageForVideoType(){switch(this.videoType.toLowerCase()){case"podcast":return"/podcast.png";case"music":return"/music.png";case"movie":return"/movie.png";case"tutorial":return"/tutorial.png";default:return"/play_video.png"}},logoSrc(){return this.$store.state.config&&this.$store.state.config.app_custom_logo?`/user_infos/${this.$store.state.config.app_custom_logo}`:Gs}},methods:{async fetchLatestNews(){try{const n=await te.get("/get_news");this.latestNews=n.data}catch(n){console.error("Failed to fetch latest news:",n),this.error="Unable to fetch the latest news. Please try again later."}},async fetchVideoUrl(){try{const n=await te.get("/get_last_video_url");this.videoUrl=n.data.url,this.videoType=n.data.type,this.checkVideoUpdate()}catch(n){console.error("Failed to fetch video information:",n),this.error="Unable to fetch the latest video information. Please try again later."}},async handleClick(){await te.post("/set_last_viewed_video_url",{client_id:this.$store.state.client_id,last_viewed_video_url:this.videoUrl}),this.showVideoButton=!1},async checkVideoUpdate(){const e=(await te.get("/get_last_viewed_video_url")).data;console.log("storedVideoUrl"),console.log(e),this.videoUrl!==e&&(this.showVideoButton=!0)}},mounted(){this.fetchLatestNews(),this.fetchVideoUrl()}},omt={class:"flex flex-col items-center justify-center w-full h-full min-h-screen p-8"},amt={class:"text-center max-w-4xl"},lmt={class:"flex items-center justify-center gap-8 mb-12"},cmt={class:"relative w-24 h-24"},dmt=["src"],umt={class:"flex flex-col items-start"},pmt={class:"text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-indigo-600 to-purple-600 dark:from-indigo-400 dark:to-purple-400"},fmt={class:"space-y-8 animate-fade-in-up"},_mt={class:"text-4xl font-semibold"},mmt={class:"text-xl max-w-3xl mx-auto"},hmt={key:0,class:"mt-12 p-6 rounded-lg shadow-md animate-fade-in-up overflow-y-scroll scrollbar-thin"},gmt=["innerHTML"],bmt={key:1,class:"mt-6 text-red-500"},ymt={key:0,class:"floating-button-container"},Emt=["href"],vmt=["src","alt"];function Smt(n,e,t,s,i,r){return T(),x("div",omt,[l("div",amt,[l("div",lmt,[l("div",cmt,[l("img",{src:r.logoSrc,alt:"LoLLMS Logo",class:"w-24 h-24 rounded-full absolute animate-rolling-ball"},null,8,dmt)]),l("div",umt,[l("h1",pmt,Y(n.$store.state.theme_vars.lollms_title),1),e[1]||(e[1]=l("p",{class:"text-2xl italic mt-2"}," Lord of Large Language And Multimodal Systems ",-1))])]),l("div",fmt,[l("h2",_mt,Y(n.$store.state.theme_vars.lollms_welcome_short_message),1),l("p",mmt,Y(n.$store.state.theme_vars.lollms_welcome_message),1)]),i.latestNews?(T(),x("div",hmt,[e[2]||(e[2]=l("h3",null,"Latest LoLLMS News",-1)),l("p",{innerHTML:i.latestNews},null,8,gmt)])):B("",!0),i.error?(T(),x("div",bmt,Y(i.error),1)):B("",!0)]),i.showVideoButton?(T(),x("div",ymt,[l("a",{href:i.videoUrl,target:"_blank",class:"floating-button",onClick:e[0]||(e[0]=(...o)=>r.handleClick&&r.handleClick(...o))},[e[3]||(e[3]=l("span",{class:"tooltip"},"New ParisNeo Video!",-1)),l("img",{src:r.getImageForVideoType,alt:"New "+i.videoType,class:"w-full h-full object-cover"},null,8,vmt)],8,Emt)])):B("",!0)])}const mN=st(rmt,[["render",Smt],["__scopeId","data-v-d9375d3e"]]);var Tmt=function(){function n(e,t){t===void 0&&(t=[]),this._eventType=e,this._eventFunctions=t}return n.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(t){typeof window<"u"&&window.addEventListener(e._eventType,t)})},n}(),ou=function(){return ou=Object.assign||function(n){for(var e,t=1,s=arguments.length;t{const e=n.data;console.log("Done"),e.status?(this.currentPersonConfig=e.config,this.showPersonalityEditor=!0):console.error(e.error)}).catch(n=>{console.error(n)})}}},wmt={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},Rmt={class:"relative w-full max-h-full bg-bg-light dark:bg-bg-dark"},Amt={class:"w-full h-full relative items-center gap-2 rounded-lg border bg-bg-light dark:bg-bg-dark p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-900"},Mmt={class:"justify-center text-center items-center w-full bg-bg-light dark:bg-bg-dark"},Nmt={class:"w-full flex flex-row mt-4 text-center justify-center"},Imt={class:"w-full max-h-full container bg-bg-light dark:bg-bg-dark"},Omt={class:"mb-4 w-full"},kmt={class:"w-full bg-bg-light dark:bg-bg-dark"};function Dmt(n,e,t,s,i,r){return i.show?(T(),x("div",wmt,[l("div",Rmt,[l("div",Amt,[l("button",{type:"button",onClick:e[0]||(e[0]=o=>r.hide()),class:"absolute top-1 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},e[17]||(e[17]=[l("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),l("span",{class:"sr-only"},"Close modal",-1)])),l("div",Mmt,[l("div",Nmt,[l("button",{type:"submit",onClick:e[1]||(e[1]=$((...o)=>r.submitForm&&r.submitForm(...o),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Commit AI to Server "),l("button",{onClick:e[2]||(e[2]=$(o=>r.hide(),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Close ")]),l("div",Imt,[l("form",Omt,[l("table",kmt,[l("tr",null,[e[18]||(e[18]=l("td",null,[l("label",{for:"personalityConditioning"},"Personality Conditioning:")],-1)),l("td",null,[k(l("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"personalityConditioning","onUpdate:modelValue":e[3]||(e[3]=o=>t.config.personality_conditioning=o)},null,512),[[ue,t.config.personality_conditioning]])])]),l("tr",null,[e[19]||(e[19]=l("td",null,[l("label",{for:"userMessagePrefix"},"User Message Prefix:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"userMessagePrefix","onUpdate:modelValue":e[4]||(e[4]=o=>t.config.user_message_prefix=o)},null,512),[[ue,t.config.user_message_prefix]])])]),l("tr",null,[e[20]||(e[20]=l("td",null,[l("label",{for:"aiMessagePrefix"},"AI Message Prefix:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"aiMessagePrefix","onUpdate:modelValue":e[5]||(e[5]=o=>t.config.ai_message_prefix=o)},null,512),[[ue,t.config.ai_message_prefix]])])]),l("tr",null,[e[21]||(e[21]=l("td",null,[l("label",{for:"linkText"},"Link Text:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"linkText","onUpdate:modelValue":e[6]||(e[6]=o=>t.config.link_text=o)},null,512),[[ue,t.config.link_text]])])]),l("tr",null,[e[22]||(e[22]=l("td",null,[l("label",{for:"welcomeMessage"},"Welcome Message:")],-1)),l("td",null,[k(l("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"welcomeMessage","onUpdate:modelValue":e[7]||(e[7]=o=>t.config.welcome_message=o)},null,512),[[ue,t.config.welcome_message]])])]),l("tr",null,[e[23]||(e[23]=l("td",null,[l("label",{for:"modelTemperature"},"Model Temperature:")],-1)),l("td",null,[k(l("input",{type:"number",id:"modelTemperature","onUpdate:modelValue":e[8]||(e[8]=o=>t.config.model_temperature=o)},null,512),[[ue,t.config.model_temperature]])])]),l("tr",null,[e[24]||(e[24]=l("td",null,[l("label",{for:"modelTopK"},"Model Top K:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopK","onUpdate:modelValue":e[9]||(e[9]=o=>t.config.model_top_k=o)},null,512),[[ue,t.config.model_top_k]])])]),l("tr",null,[e[25]||(e[25]=l("td",null,[l("label",{for:"modelTopP"},"Model Top P:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopP","onUpdate:modelValue":e[10]||(e[10]=o=>t.config.model_top_p=o)},null,512),[[ue,t.config.model_top_p]])])]),l("tr",null,[e[26]||(e[26]=l("td",null,[l("label",{for:"modelRepeatPenalty"},"Model Repeat Penalty:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatPenalty","onUpdate:modelValue":e[11]||(e[11]=o=>t.config.model_repeat_penalty=o)},null,512),[[ue,t.config.model_repeat_penalty]])])]),l("tr",null,[e[27]||(e[27]=l("td",null,[l("label",{for:"modelRepeatLastN"},"Model Repeat Last N:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatLastN","onUpdate:modelValue":e[12]||(e[12]=o=>t.config.model_repeat_last_n=o)},null,512),[[ue,t.config.model_repeat_last_n]])])]),l("tr",null,[e[28]||(e[28]=l("td",null,[l("label",{for:"recommendedBinding"},"Recommended Binding:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedBinding","onUpdate:modelValue":e[13]||(e[13]=o=>t.config.recommended_binding=o)},null,512),[[ue,t.config.recommended_binding]])])]),l("tr",null,[e[29]||(e[29]=l("td",null,[l("label",{for:"recommendedModel"},"Recommended Model:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedModel","onUpdate:modelValue":e[14]||(e[14]=o=>t.config.recommended_model=o)},null,512),[[ue,t.config.recommended_model]])])]),l("tr",null,[e[30]||(e[30]=l("td",null,[l("label",{class:"dark:bg-black dark:text-primary w-full",for:"dependencies"},"Dependencies:")],-1)),l("td",null,[k(l("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"dependencies","onUpdate:modelValue":e[15]||(e[15]=o=>t.config.dependencies=o)},null,512),[[ue,t.config.dependencies]])])]),l("tr",null,[e[31]||(e[31]=l("td",null,[l("label",{for:"antiPrompts"},"Anti Prompts:")],-1)),l("td",null,[k(l("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"antiPrompts","onUpdate:modelValue":e[16]||(e[16]=o=>t.config.anti_prompts=o)},null,512),[[ue,t.config.anti_prompts]])])])])])])])])])])):B("",!0)}const RN=st(Cmt,[["render",Dmt]]),Lmt={data(){return{showPopup:!1,webpageUrl:"https://lollms.com/"}},methods:{show(){this.showPopup=!0},hide(){this.showPopup=!1},save_configuration(){te.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config}).then(n=>{this.isLoading=!1,n.data.status?(this.$store.state.toast.showToast("Configuration changed successfully.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1)})}}},Pmt={key:0,class:"fixed inset-0 flex items-center justify-center z-50"},Fmt={class:"popup-container"},Umt=["src"],Bmt={class:"checkbox-container"};function Gmt(n,e,t,s,i,r){return T(),at(Bs,{name:"fade"},{default:Ne(()=>[i.showPopup?(T(),x("div",Pmt,[l("div",Fmt,[l("button",{onClick:e[0]||(e[0]=(...o)=>r.hide&&r.hide(...o)),class:"close-button"}," X "),l("iframe",{src:i.webpageUrl,class:"iframe-content"},null,8,Umt),l("div",Bmt,[k(l("input",{type:"checkbox",id:"startup",class:"styled-checkbox","onUpdate:modelValue":e[1]||(e[1]=o=>this.$store.state.config.show_news_panel=o),onChange:e[2]||(e[2]=(...o)=>r.save_configuration&&r.save_configuration(...o))},null,544),[[Ye,this.$store.state.config.show_news_panel]]),e[3]||(e[3]=l("label",{for:"startup",class:"checkbox-label"},"Show at startup",-1))])])])):B("",!0)]),_:1})}const AN=st(Lmt,[["render",Gmt],["__scopeId","data-v-d504dfc9"]]),Vmt="/assets/fastapi-BQj-rjUJ.png",zmt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20127.14%2096.36'%3e%3cg%20id='图层_2'%20data-name='图层%202'%3e%3cg%20id='Discord_Logos'%20data-name='Discord%20Logos'%3e%3cg%20id='Discord_Logo_-_Large_-_White'%20data-name='Discord%20Logo%20-%20Large%20-%20White'%3e%3cpath%20d='M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Hmt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%3e%3ccircle%20cx='25'%20cy='25'%20r='20'%20fill='none'%20stroke='black'%20stroke-width='3'%3e%3c/circle%3e%3cline%20x1='25'%20y1='30'%20x2='25'%20y2='15'%20style='stroke:black;stroke-width:3'%3e%3c/line%3e%3ccircle%20cx='25'%20cy='35'%20r='3'%20fill='black'%3e%3c/circle%3e%3c/svg%3e",qmt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%3e%3ccircle%20cx='25'%20cy='25'%20r='20'%20fill='none'%20stroke='black'%20stroke-width='3'%3e%3c/circle%3e%3cline%20x1='25'%20y1='30'%20x2='25'%20y2='15'%20style='stroke:black;stroke-width:3'%3e%3canimate%20attributeName='y1'%20values='30;25;30'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3canimate%20attributeName='y2'%20values='15;20;15'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3c/line%3e%3ccircle%20cx='25'%20cy='35'%20r='3'%20fill='black'%3e%3canimate%20attributeName='cy'%20values='35;30;35'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3c/circle%3e%3c/svg%3e",Ymt="data:image/svg+xml,%3c?xml%20version='1.0'%20?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20width='800px'%20height='800px'%20viewBox='0%200%2064%2064'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20data-name='Layer%205'%20id='Layer_5'%3e%3cpath%20d='M47,33H17a1,1,0,0,0-1,1c0,9.93,7.18,18,16,18s16-8.07,16-18A1,1,0,0,0,47,33ZM18,35H46a18,18,0,0,1-.67,4H18.71A18,18,0,0,1,18,35ZM26.7,48.8a6.42,6.42,0,0,1,10.6,0,12.3,12.3,0,0,1-10.6,0Zm12.34-1A8.81,8.81,0,0,0,32,44a8.81,8.81,0,0,0-7,3.81A15.56,15.56,0,0,1,19.43,41H44.57A15.56,15.56,0,0,1,39,47.81ZM36,22a1.1,1.1,0,0,1,0-.18,1.17,1.17,0,0,1,.06-.2s0-.05,0-.07a.28.28,0,0,1,.07-.09.71.71,0,0,1,.28-.28s.06-.06.09-.07l10-5a1,1,0,1,1,.9,1.78L39.24,22l8.21,4.11a1,1,0,0,1,.44,1.34A1,1,0,0,1,47,28a.93.93,0,0,1-.45-.11l-10-5h0a1.18,1.18,0,0,1-.28-.22l0-.06a.65.65,0,0,1-.1-.15s0-.05,0-.07a1.17,1.17,0,0,1-.06-.2A1.1,1.1,0,0,1,36,22ZM16.55,26.11,24.76,22l-8.21-4.11a1,1,0,1,1,.9-1.78l10,5s.06.05.09.07a.71.71,0,0,1,.28.28.28.28,0,0,1,.07.09s0,.05,0,.07a1.17,1.17,0,0,1,.06.2.82.82,0,0,1,0,.36,1.17,1.17,0,0,1-.06.2s0,.05,0,.07a.65.65,0,0,1-.1.15.21.21,0,0,0,0,.06,1.18,1.18,0,0,1-.28.22h0l-10,5A.93.93,0,0,1,17,28a1,1,0,0,1-.89-.55A1,1,0,0,1,16.55,26.11ZM60.66,36.45A29.69,29.69,0,0,0,61,32,29,29,0,0,0,3,32a29.69,29.69,0,0,0,.34,4.45,4.65,4.65,0,0,0,2.39,7.82,29,29,0,0,0,52.54,0,4.65,4.65,0,0,0,2.39-7.82ZM4.78,41.58a2.91,2.91,0,0,1-.24-.27A2.62,2.62,0,0,1,4,39.71a.61.61,0,0,1,0-.14,2.58,2.58,0,0,1,.77-1.73,4.38,4.38,0,0,1,.74-.55C7,36.38,10,34.9,12.69,33.67c-1.52,3.3-3.42,7.17-4.17,7.91a2.59,2.59,0,0,1-1.47.72A2.66,2.66,0,0,1,4.78,41.58ZM32,59A27,27,0,0,1,7.92,44.18a4.56,4.56,0,0,0,2-1.18c1.48-1.49,5-9.36,5.66-10.92a1,1,0,0,0-1.32-1.32c-.78.34-3.14,1.39-5.49,2.53-1.29.63-2.58,1.29-3.6,1.88A25.58,25.58,0,0,1,5,32a27,27,0,0,1,54,0,25.58,25.58,0,0,1-.19,3.17c-2.88-1.66-7.88-3.88-9.09-4.41a1,1,0,0,0-1.32,1.32c.69,1.56,4.18,9.43,5.66,10.92a4.56,4.56,0,0,0,2,1.18A27,27,0,0,1,32,59ZM59.46,41.31a2.91,2.91,0,0,1-.24.27A2.66,2.66,0,0,1,57,42.3a2.59,2.59,0,0,1-1.47-.72c-.75-.74-2.65-4.61-4.17-7.91,1.65.76,3.44,1.61,4.91,2.37.91.47,1.7.9,2.26,1.25a4.38,4.38,0,0,1,.74.55A2.58,2.58,0,0,1,60,39.57a.61.61,0,0,1,0,.14A2.62,2.62,0,0,1,59.46,41.31Z'/%3e%3c/g%3e%3c/svg%3e",$mt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512.001%20512.001'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cpath%20d='M256.001,0C114.841,0,0,114.841,0,256.001s114.841,256.001,256.001,256.001S512.001,397.16,512.001,256.001%20S397.16,0,256.001,0z%20M256.001,493.701c-131.069,0-237.702-106.631-237.702-237.7S124.932,18.299,256.001,18.299%20s237.702,106.632,237.702,237.702S387.068,493.701,256.001,493.701z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M371.284,296.658H138.275c-5.054,0-9.15,4.097-9.15,9.15s4.095,9.15,9.15,9.15h233.008c5.054,0,9.15-4.097,9.15-9.15%20C380.433,300.754,376.337,296.658,371.284,296.658z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M297.481,330.816h-85.403c-5.054,0-9.15,4.097-9.15,9.15s4.095,9.15,9.15,9.15h85.403c5.054,0,9.15-4.097,9.15-9.15%20S302.534,330.816,297.481,330.816z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M146.725,192.982c-18.666,0-33.852,15.186-33.852,33.852c0,18.666,15.186,33.852,33.852,33.852%20c18.666,0,33.852-15.186,33.852-33.852C180.577,208.168,165.391,192.982,146.725,192.982z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M365.275,192.982c-18.666,0-33.852,15.186-33.852,33.852c0,18.666,15.186,33.852,33.852,33.852%20s33.852-15.186,33.852-33.852C399.128,208.168,383.942,192.982,365.275,192.982z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cg%3e%3ccircle%20cx='155.969'%20cy='219.735'%20r='9.15'/%3e%3ccircle%20cx='374.338'%20cy='219.735'%20r='9.15'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Wmt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20299.92%20299.92'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20d='M293.4,65.2H6.52C2.914,65.2,0,68.114,0,71.72v117.36c0,3.606,2.914,6.52,6.52,6.52h6.52v32.6%20c0,3.606,2.914,6.52,6.52,6.52h260.8c3.606,0,6.52-2.914,6.52-6.52v-32.6h6.52c3.606,0,6.52-2.914,6.52-6.52V71.72%20C299.92,68.114,297.006,65.2,293.4,65.2z%20M273.84,221.68h-19.56H228.2h-26.08h-26.08h-26.08h-26.08H97.8H71.72H45.64H26.08V195.6%20h19.56h26.08H97.8h26.08h26.08h26.08h26.08h26.08h26.08h19.56V221.68z%20M286.88,182.56h-6.52H19.56h-6.52V78.24h273.84V182.56z'/%3e%3cpath%20d='M32.6,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H32.6c-3.606,0-6.52,2.914-6.52,6.52%20V163C26.08,166.606,28.994,169.52,32.6,169.52z%20M39.12,104.32H65.2v52.16H39.12V104.32z'/%3e%3cpath%20d='M97.8,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H97.8c-3.606,0-6.52,2.914-6.52,6.52%20V163C91.28,166.606,94.194,169.52,97.8,169.52z%20M104.32,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M163,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H163c-3.606,0-6.52,2.914-6.52,6.52%20V163C156.48,166.606,159.394,169.52,163,169.52z%20M169.52,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M228.2,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H228.2%20c-3.606,0-6.52,2.914-6.52,6.52V163C221.68,166.606,224.594,169.52,228.2,169.52z%20M234.72,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M52.16,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C49.246,221.68,52.16,218.766,52.16,215.16z'/%3e%3cpath%20d='M78.24,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C75.326,221.68,78.24,218.766,78.24,215.16z'/%3e%3cpath%20d='M104.32,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C101.406,221.68,104.32,218.766,104.32,215.16z'/%3e%3cpath%20d='M130.4,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C127.486,221.68,130.4,218.766,130.4,215.16z'/%3e%3cpath%20d='M156.48,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52s-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20S156.48,218.766,156.48,215.16z'/%3e%3cpath%20d='M182.56,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C179.646,221.68,182.56,218.766,182.56,215.16z'/%3e%3cpath%20d='M208.64,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C205.726,221.68,208.64,218.766,208.64,215.16z'/%3e%3cpath%20d='M234.72,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C231.806,221.68,234.72,218.766,234.72,215.16z'/%3e%3cpath%20d='M260.8,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C257.886,221.68,260.8,218.766,260.8,215.16z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Kmt="data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='40'%20stroke='green'%20stroke-width='4'%20fill='green'%20/%3e%3cpath%20stroke='white'%20stroke-width='4'%20d='M40%2050%20l10%2010%2020%20-20'%20fill='none'%20/%3e%3c/svg%3e",jmt="data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='40'%20stroke='red'%20stroke-width='4'%20fill='red'%20/%3e%3cline%20x1='35'%20y1='35'%20x2='65'%20y2='65'%20stroke='white'%20stroke-width='4'%20/%3e%3cline%20x1='65'%20y1='35'%20x2='35'%20y2='65'%20stroke='white'%20stroke-width='4'%20/%3e%3c/svg%3e",Qmt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20fill='%23000000'%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='800px'%20height='800px'%20viewBox='0%200%20461.759%20461.759'%20xml:space='preserve'%3e%3cg%3e%3cpath%20d='M0,301.058h147.916v147.919H0V301.058z%20M194.432,448.977H342.35V301.058H194.432V448.977z%20M2.802,257.347h147.916V109.434%20H2.802V257.347z%20M325.476,92.219l-51.603-79.437l-79.441,51.601l51.604,79.437L325.476,92.219z%20M219.337,213.733l71.045,62.663%20l62.66-71.039l-71.044-62.669L219.337,213.733z%20M412.107,57.967l-80.668,49.656l49.652,80.666l80.668-49.65L412.107,57.967z'/%3e%3c/g%3e%3c/svg%3e",Xmt="/assets/robot-CQPaMbxU.svg",Zmt="/";te.defaults.baseURL="/";const Jmt={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:w0,UniversalForm:yM},data(){return{bUrl:Zmt,isMounted:!1,show:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},mountedPers:{get(){return console.log("asked for:",this.$store.state.mountedPers),this.$store.state.mountedPers},set(n){this.$store.commit("setMountedPers",n)}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}}},methods:{async handleOnTalk(){const n=this.mountedPers;console.log("pers:",n),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await te.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const t=this.$store.state.config.personalities.findIndex(i=>i===n.full_path),s={client_id:this.$store.state.client_id,id:t};e=await te.post("/select_personality",s),console.log("Generating message from ",e.data.status),qe.emit("generate_msg_from",{id:-1})}},async remount_personality(){const n=this.mountedPers;if(console.log("Remounting personality ",n),!n)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:n.category,folder:n.folder,language:n.language};console.log("after");const t=await te.post("/remount_personality",e);if(console.log("Remounting personality executed:",t),t)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),t.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(n){try{te.get("/get_active_personality_settings").then(e=>{e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this.$refs.universalForm.showForm(e.data,"Personality settings - "+n.name,"Save changes","Cancel").then(t=>{try{te.post("/set_active_personality_settings",t).then(s=>{s&&s.data?(console.log("personality set with new settings",s.data),this.$store.state.toast.showToast("Personality settings updated successfully!",4,!0)):this.$store.state.toast.showToast(`Did not get Personality settings responses. +`+this.message.content.slice(e,t)+"\n```\n"+this.message.content.slice(t),p=p+3+n.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},copyContentToClipboard(){this.$emit("copy",this)},deleteMsg(){this.$emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this.$emit("rankUp",this.message.id)},rankDown(){this.$emit("rankDown",this.message.id)},updateMessage(){this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url),this.editMsgMode=!1},resendMessage(n){this.$emit("resendMessage",this.message.id,this.message.content,n)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?Cft+this.avatar:(console.log("No avatar found"),Gs)},defaultImg(n){n.target.src=Gs},parseDate(n){let e=new Date(Date.parse(n)),s=Math.floor((new Date-e)/1e3);return s<=1?"just now":s<20?s+" seconds ago":s<40?"half a minute ago":s<60?"less than a minute ago":s<=90?"one minute ago":s<=3540?Math.round(s/60)+" minutes ago":s<=5400?"1 hour ago":s<=86400?Math.round(s/3600)+" hours ago":s<=129600?"1 day ago":s<604800?Math.round(s/86400)+" days ago":s<=777600?"1 week ago":n},prettyDate(n){let e=new Date((n||"").replace(/-/g,"/").replace(/[TZ]/g," ")),t=(new Date().getTime()-e.getTime())/1e3,s=Math.floor(t/86400);if(!(isNaN(s)||s<0||s>=31))return s==0&&(t<60&&"just now"||t<120&&"1 minute ago"||t<3600&&Math.floor(t/60)+" minutes ago"||t<7200&&"1 hour ago"||t<86400&&Math.floor(t/3600)+" hours ago")||s==1&&"Yesterday"||s<7&&s+" days ago"||s<31&&Math.ceil(s/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(n){n&&(this.$refs.audio_player.src=n)},"message.content":function(n){this.$store.state.config.auto_speak&&(this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode||this.isSpeaking||this.checkForFullSentence())},"message.ui":function(n){console.log("ui changed to",n),this.ui_componentKey++},showConfirmation(){Ue(()=>{Ge.replace()})},deleteMsgMode(){Ue(()=>{Ge.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(n){this.message.open=n,this.editMsgMode_=n,Ue(()=>{Ge.replace()})}},isTalking:{get(){return this.isSpeaking}},created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const n=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===n.getTime()||!n.getTime()||!e.getTime())return;let[s,i,r]=this.computeTimeDiff(n,e);function o(c){return c<10&&(c="0"+c),c}return o(s)+"h:"+o(i)+"m:"+o(r)+"s"},warmup_duration(){const n=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.started_generating_at));if(console.log("Computing the warmup duration, ",n," -> ",e),e.getTime()===n.getTime())return 0;if(!n.getTime()||!e.getTime())return;let s,i,r;[s,i,r]=this.computeTimeDiff(n,e);function o(c){return c<10&&(c="0"+c),c}return o(s)+"h:"+o(i)+"m:"+o(r)+"s"},generation_rate(){const n=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),t=this.message.nb_tokens;if(e.getTime()===n.getTime()||!t||!n.getTime()||!e.getTime())return;let i=e.getTime()-n.getTime();const r=Math.floor(i/1e3),o=t/r;return Math.round(o)+" t/s"}}},Rft={class:"relative message w-full group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent flex flex-col flex-grow flex-wrap overflow-visible p-4 pb-2"},Aft={class:"flex flex-row gap-2"},Mft={class:"flex-shrink-0"},Nft={class:"group/avatar"},Ift=["src","data-popover-target"],Oft={class:"flex flex-col w-full flex-grow-0"},kft={class:"flex flex-row flex-grow items-start"},Dft={class:"flex flex-col mb-2"},Lft={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},Pft=["title"],Fft={class:"overflow-x-auto w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary space-y-2"},Uft={key:1},Bft=["src"],Gft={class:"message-details"},Vft={key:0,class:"steps-container"},zft={class:"steps-icon"},Hft={class:"steps-summary"},qft={class:"steps-status"},Yft={class:"toggle-icon"},$ft={key:0,class:"steps-content"},Wft={class:"steps-list"},Kft={class:"flex flex-col items-start w-full overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},jft={class:"flex-row justify-end mx-2"},Qft={class:"invisible group-hover:visible flex flex-row"},Xft={key:0},Zft={key:1},Jft={key:2},e_t={key:3},t_t={key:4,class:"flex items-center duration-75"},n_t={class:"flex flex-row items-center"},s_t={class:"flex flex-row items-center"},i_t={key:6,class:"flex flex-row items-center"},r_t=["src"],o_t={class:"text-sm text-gray-400 mt-2"},a_t={class:"flex flex-row items-center gap-2"},l_t={key:0},c_t={class:"font-thin"},d_t={key:1},u_t={class:"font-thin"},p_t={key:2},f_t={class:"font-thin"},__t={key:3},m_t=["title"],h_t={key:4},g_t=["title"],b_t={key:5},y_t=["title"],E_t={key:6},v_t=["title"];function S_t(n,e,t,s,i,r){var f;const o=Je("MarkdownRenderer"),a=Je("JsonViewer"),c=Je("DynamicUIRenderer"),d=Je("StatusIcon"),u=Je("Step"),_=Je("RenderHTMLJS"),m=Je("ToolbarButton"),h=Je("DropdownSubmenu"),g=Je("DropdownMenu");return T(),x("div",Rft,[l("div",Aft,[l("div",Mft,[l("div",Nft,[l("img",{src:r.getImgUrl(),onError:e[0]||(e[0]=b=>r.defaultImg(b)),"data-popover-target":"avatar"+t.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,Ift)])]),l("div",Oft,[l("div",kft,[l("div",Dft,[l("div",Lft,Y(t.message.sender),1),t.message.created_at?(T(),x("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+r.created_at_parsed},Y(r.created_at),9,Pft)):B("",!0)]),e[46]||(e[46]=l("div",{class:"flex-grow"},null,-1))]),l("div",Fft,[r.editMsgMode?B("",!0):(T(),at(o,{key:0,ref:"mdRender",host:t.host,"markdown-text":t.message.content,message_id:t.message.id,discussion_id:t.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),l("div",null,[t.message.open?k((T(),x("textarea",{key:0,ref:"mdTextarea",onKeydown:e[1]||(e[1]=qn($((...b)=>r.insertTab&&r.insertTab(...b),["prevent"]),["tab"])),class:"block min-h-[500px] p-2.5 w-full text-gray-900 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",rows:4,placeholder:"Enter message here...","onUpdate:modelValue":e[2]||(e[2]=b=>t.message.content=b)}," ",544)),[[ue,t.message.content]]):B("",!0)]),t.message.metadata!==null?(T(),x("div",Uft,[(T(!0),x(Le,null,We(((f=t.message.metadata)==null?void 0:f.filter(b=>b!=null&&b.hasOwnProperty("title")&&b.hasOwnProperty("content")))||[],(b,y)=>(T(),x("div",{key:"json-"+t.message.id+"-"+y,class:"json font-bold"},[(T(),at(a,{jsonFormText:b.title,jsonData:b.content,key:"msgjson-"+t.message.id},null,8,["jsonFormText","jsonData"]))]))),128))])):B("",!0),t.message.ui?(T(),at(c,{ref:"ui",class:"w-full",ui:t.message.ui,key:"msgui-"+t.message.id},null,8,["ui"])):B("",!0),i.audio_url!=null?(T(),x("audio",{controls:"",key:i.audio_url},[l("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,Bft),e[47]||(e[47]=Ze(" Your browser does not support the audio element. "))])):B("",!0),l("div",Gft,[t.message.steps.length>0?(T(),x("div",Vft,[l("div",{class:"steps-header",onClick:e[3]||(e[3]=(...b)=>r.toggleExpanded&&r.toggleExpanded(...b))},[l("div",zft,[z(d,{status:t.message.status_message,icon:!0},null,8,["status"])]),l("div",Hft,[e[48]||(e[48]=l("h3",{class:"steps-title"},"Processing Info",-1)),l("p",qft,Y(t.message.status_message),1)]),l("span",Yft,Y(i.expanded?"▲":"▼"),1)]),z(Bs,{name:"fade"},{default:Ne(()=>[i.expanded?(T(),x("div",$ft,[l("ul",Wft,[(T(!0),x(Le,null,We(t.message.steps,(b,y)=>(T(),x("li",{key:`step-${t.message.id}-${y}`,class:"step-item"},[z(u,{done:b.done,text:b.text,status:b.status,description:b.description},null,8,["done","text","status","description"])]))),128))])])):B("",!0)]),_:1})])):B("",!0),l("div",Kft,[(T(!0),x(Le,null,We(t.message.html_js_s,(b,y)=>(T(),x("div",{key:`htmljs-${t.message.id}-${y}`,class:"font-bold animate-fadeIn",style:Vt({animationDelay:`${y*200}ms`})},[z(_,{htmlContent:b},null,8,["htmlContent"])],4))),128))])])]),l("div",jft,[l("div",Qft,[r.editMsgMode?(T(),x("div",Xft,[z(m,{onClick:e[4]||(e[4]=$(b=>r.editMsgMode=!1,["stop"])),title:"Cancel edit",icon:"x"}),z(m,{onClick:$(r.updateMessage,["stop"]),title:"Update message",icon:"check"},null,8,["onClick"]),z(g,{title:"Add Block"},{default:Ne(()=>[z(h,{title:"Programming Languages",icon:"code"},{default:Ne(()=>[z(m,{onClick:e[5]||(e[5]=$(b=>r.addBlock("python"),["stop"])),title:"Python",icon:"python"}),z(m,{onClick:e[6]||(e[6]=$(b=>r.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),z(m,{onClick:e[7]||(e[7]=$(b=>r.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),z(m,{onClick:e[8]||(e[8]=$(b=>r.addBlock("java"),["stop"])),title:"Java",icon:"java"}),z(m,{onClick:e[9]||(e[9]=$(b=>r.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),z(m,{onClick:e[10]||(e[10]=$(b=>r.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),z(m,{onClick:e[11]||(e[11]=$(b=>r.addBlock("go"),["stop"])),title:"Go",icon:"go"}),z(m,{onClick:e[12]||(e[12]=$(b=>r.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),z(m,{onClick:e[13]||(e[13]=$(b=>r.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),z(m,{onClick:e[14]||(e[14]=$(b=>r.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),z(m,{onClick:e[15]||(e[15]=$(b=>r.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),z(h,{title:"Web Technologies",icon:"web"},{default:Ne(()=>[z(m,{onClick:e[16]||(e[16]=$(b=>r.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),z(m,{onClick:e[17]||(e[17]=$(b=>r.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),z(m,{onClick:e[18]||(e[18]=$(b=>r.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),z(m,{onClick:e[19]||(e[19]=$(b=>r.addBlock("react"),["stop"])),title:"React",icon:"react"}),z(m,{onClick:e[20]||(e[20]=$(b=>r.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),z(h,{title:"Markup and Data",icon:"file-code"},{default:Ne(()=>[z(m,{onClick:e[21]||(e[21]=$(b=>r.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),z(m,{onClick:e[22]||(e[22]=$(b=>r.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),z(m,{onClick:e[23]||(e[23]=$(b=>r.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),z(m,{onClick:e[24]||(e[24]=$(b=>r.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),z(m,{onClick:e[25]||(e[25]=$(b=>r.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),z(h,{title:"Scripting and Shell",icon:"terminal"},{default:Ne(()=>[z(m,{onClick:e[26]||(e[26]=$(b=>r.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),z(m,{onClick:e[27]||(e[27]=$(b=>r.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),z(m,{onClick:e[28]||(e[28]=$(b=>r.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),z(h,{title:"Diagramming",icon:"sitemap"},{default:Ne(()=>[z(m,{onClick:e[29]||(e[29]=$(b=>r.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),z(m,{onClick:e[30]||(e[30]=$(b=>r.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),z(m,{onClick:e[31]||(e[31]=$(b=>r.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),z(h,{title:"Database",icon:"database"},{default:Ne(()=>[z(m,{onClick:e[32]||(e[32]=$(b=>r.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),z(m,{onClick:e[33]||(e[33]=$(b=>r.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),z(m,{onClick:e[34]||(e[34]=$(b=>r.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1})])):(T(),x("div",Zft,[z(m,{onClick:e[35]||(e[35]=$(b=>r.editMsgMode=!0,["stop"])),title:"Edit message",icon:"edit"})])),z(m,{onClick:r.copyContentToClipboard,title:"Copy message to clipboard",icon:"copy"},null,8,["onClick"]),!r.editMsgMode&&t.message.sender!==n.$store.state.mountedPers.name?(T(),x("div",Jft,[z(m,{onClick:e[36]||(e[36]=$(b=>r.resendMessage("full_context"),["stop"])),title:"Resend message with full context",icon:"send"}),z(m,{onClick:e[37]||(e[37]=$(b=>r.resendMessage("full_context_with_internet"),["stop"])),title:"Resend message with internet search",icon:"globe"}),z(m,{onClick:e[38]||(e[38]=$(b=>r.resendMessage("simple_question"),["stop"])),title:"Resend message without context",icon:"sendSimple"})])):B("",!0),!r.editMsgMode&&t.message.sender===n.$store.state.mountedPers.name?(T(),x("div",e_t,[z(m,{onClick:r.continueMessage,title:"Continue message",icon:"fastForward"},null,8,["onClick"])])):B("",!0),i.deleteMsgMode?(T(),x("div",t_t,[l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Cancel removal",type:"button",onClick:e[39]||(e[39]=$(b=>i.deleteMsgMode=!1,["stop"]))},e[49]||(e[49]=[l("i",{"data-feather":"x"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Confirm removal",type:"button",onClick:e[40]||(e[40]=$(b=>r.deleteMsg(),["stop"]))},e[50]||(e[50]=[l("i",{"data-feather":"check"},null,-1)]))])):B("",!0),!r.editMsgMode&&!i.deleteMsgMode?(T(),x("div",{key:5,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Remove message",onClick:e[41]||(e[41]=b=>i.deleteMsgMode=!0)},e[51]||(e[51]=[l("i",{"data-feather":"trash"},null,-1)]))):B("",!0),l("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[42]||(e[42]=$(b=>r.rankUp(),["stop"]))},e[52]||(e[52]=[l("i",{"data-feather":"thumbs-up"},null,-1)])),l("div",n_t,[l("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[43]||(e[43]=$(b=>r.rankDown(),["stop"]))},e[53]||(e[53]=[l("i",{"data-feather":"thumbs-down"},null,-1)])),t.message.rank!=0?(T(),x("div",{key:0,class:Pe(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",t.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},Y(t.message.rank),3)):B("",!0)]),l("div",s_t,[this.$store.state.config.active_tts_service!="None"?(T(),x("div",{key:0,class:Pe(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":r.isTalking}]),title:"speak",onClick:e[44]||(e[44]=$(b=>r.speak(),["stop"]))},e[54]||(e[54]=[l("i",{"data-feather":"volume-2"},null,-1)]),2)):B("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(T(),x("div",i_t,[i.isSynthesizingVoice?(T(),x("img",{key:1,src:i.loading_svg},null,8,r_t)):(T(),x("div",{key:0,class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"generate_audio",onClick:e[45]||(e[45]=$(b=>r.read(),["stop"]))},e[55]||(e[55]=[l("i",{"data-feather":"voicemail"},null,-1)])))])):B("",!0)])]),l("div",o_t,[l("div",a_t,[t.message.binding?(T(),x("p",l_t,[e[56]||(e[56]=Ze("Binding: ")),l("span",c_t,Y(t.message.binding),1)])):B("",!0),t.message.model?(T(),x("p",d_t,[e[57]||(e[57]=Ze("Model: ")),l("span",u_t,Y(t.message.model),1)])):B("",!0),t.message.seed?(T(),x("p",p_t,[e[58]||(e[58]=Ze("Seed: ")),l("span",f_t,Y(t.message.seed),1)])):B("",!0),t.message.nb_tokens?(T(),x("p",__t,[e[59]||(e[59]=Ze("Number of tokens: ")),l("span",{class:"font-thin",title:"Number of Tokens: "+t.message.nb_tokens},Y(t.message.nb_tokens),9,m_t)])):B("",!0),r.warmup_duration?(T(),x("p",h_t,[e[60]||(e[60]=Ze("Warmup duration: ")),l("span",{class:"font-thin",title:"Warmup duration: "+r.warmup_duration},Y(r.warmup_duration),9,g_t)])):B("",!0),r.time_spent?(T(),x("p",b_t,[e[61]||(e[61]=Ze("Generation duration: ")),l("span",{class:"font-thin",title:"Finished generating: "+r.time_spent},Y(r.time_spent),9,y_t)])):B("",!0),r.generation_rate?(T(),x("p",E_t,[e[62]||(e[62]=Ze("Rate: ")),l("span",{class:"font-thin",title:"Generation rate: "+r.generation_rate},Y(r.generation_rate),9,v_t)])):B("",!0)])])])])])}const fN=st(wft,[["render",S_t]]);te.defaults.baseURL="/";const T_t={components:{InteractiveMenu:K0},props:{commandsList:{type:Array,required:!0},sendCommand:Function,onShowToastMessage:Function},data(){return{loading:!1,selectedFile:null,showMenu:!1,showHelpText:!1,helpText:"",commands:[]}},async mounted(){this.commands=this.commandsList,console.log("Commands",this.commands),document.addEventListener("click",this.handleClickOutside),Ue(()=>{Ge.replace()})},methods:{isHTML(n){const t=new DOMParser().parseFromString(n,"text/html");return Array.from(t.body.childNodes).some(s=>s.nodeType===Node.ELEMENT_NODE)},selectFile(n,e){const t=document.createElement("input");t.type="file",t.accept=n,t.onchange=s=>{this.selectedFile=s.target.files[0],console.log("File selected"),e()},t.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const t={filename:this.selectedFile.name,fileData:e.result};qe.on("file_received",s=>{s.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file +`+s.error,4,!1),this.loading=!1,qe.off("file_received")}),qe.emit("send_file",t)},e.readAsDataURL(this.selectedFile)},async constructor(){Ue(()=>{Ge.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(n){this.showMenu=!this.showMenu,n.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(n.hasOwnProperty("file_types")?n.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(n.value)},handleClickOutside(n){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(n.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},x_t={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"};function C_t(n,e,t,s,i,r){const o=Je("InteractiveMenu");return i.loading?(T(),x("div",x_t,e[0]||(e[0]=[l("div",{role:"status"},[l("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),l("span",{class:"sr-only"},"Loading...")],-1)]))):(T(),at(o,{key:1,commands:t.commandsList,execute_cmd:r.execute_cmd},null,8,["commands","execute_cmd"]))}const w_t=st(T_t,[["render",C_t],["__scopeId","data-v-1a32c141"]]),R_t="data:image/svg+xml,%3csvg%20aria-hidden='true'%20class='w-6%20h-6%20animate-spin%20fill-secondary'%20viewBox='0%200%20100%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M100%2050.5908C100%2078.2051%2077.6142%20100.591%2050%20100.591C22.3858%20100.591%200%2078.2051%200%2050.5908C0%2022.9766%2022.3858%200.59082%2050%200.59082C77.6142%200.59082%20100%2022.9766%20100%2050.5908ZM9.08144%2050.5908C9.08144%2073.1895%2027.4013%2091.5094%2050%2091.5094C72.5987%2091.5094%2090.9186%2073.1895%2090.9186%2050.5908C90.9186%2027.9921%2072.5987%209.67226%2050%209.67226C27.4013%209.67226%209.08144%2027.9921%209.08144%2050.5908Z'%20fill='currentColor'%20/%3e%3cpath%20d='M93.9676%2039.0409C96.393%2038.4038%2097.8624%2035.9116%2097.0079%2033.5539C95.2932%2028.8227%2092.871%2024.3692%2089.8167%2020.348C85.8452%2015.1192%2080.8826%2010.7238%2075.2124%207.41289C69.5422%204.10194%2063.2754%201.94025%2056.7698%201.05124C51.7666%200.367541%2046.6976%200.446843%2041.7345%201.27873C39.2613%201.69328%2037.813%204.19778%2038.4501%206.62326C39.0873%209.04874%2041.5694%2010.4717%2044.0505%2010.1071C47.8511%209.54855%2051.7191%209.52689%2055.5402%2010.0491C60.8642%2010.7766%2065.9928%2012.5457%2070.6331%2015.2552C75.2735%2017.9648%2079.3347%2021.5619%2082.5849%2025.841C84.9175%2028.9121%2086.7997%2032.2913%2088.1811%2035.8758C89.083%2038.2158%2091.5421%2039.6781%2093.9676%2039.0409Z'%20fill='currentFill'%20/%3e%3c/svg%3e",A_t="/",M_t={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{PersonalitiesCommands:w_t,ChatBarButton:lp},setup(){},data(){return{isSendMenuVisible:!1,is_rt:!1,bindingHoveredIndex:null,modelHoveredIndex:null,personalityHoveredIndex:null,loader_v0:R_t,sendGlobe:pN,bUrl:A_t,message:"",selecting_binding:!1,selecting_model:!1,selectedModel:"",isListeningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,models_menu_icon:"",posts_headers:{accept:"application/json","Content-Type":"application/json"}}},computed:{leftPanelCollapsed(){return this.$store.state.leftPanelCollapsed},rightPanelCollapsed(){return this.$store.state.rightPanelCollapsed},isCompactMode(){return this.$store.state.view_mode==="compact"},isDataSourceNamesValid(){return console.log("dataSourceNames:",this.dataSourceNames),console.log("Type of dataSourceNames:",typeof this.dataSourceNames),Array.isArray(this.dataSourceNames)&&this.dataSourceNames.length>0},dataSourceNames(){console.log("dataSourceNames",this.$store.state.config.rag_databases);const n=this.$store.state.config.rag_databases.map(e=>{console.log("entry",e);const t=e.split("::");console.log("extracted",t[0]);const i=e.endsWith("mounted")?"feather:check":"";return console.log("icon decision",i),{name:t[0],value:t[0]||"default_value",icon:i,help:"mounts the database"}});return console.log("formatted data sources",n),n}},methods:{showSendMenu(){clearTimeout(this.hideSendMenuTimeout),this.isSendMenuVisible=!0},hideSendMenu(){this.hideSendMenuTimeout=setTimeout(()=>{this.isSendMenuVisible=!1},300)},toggleLeftPanel(){console.log(this.leftPanelCollapsed),this.$store.commit("setLeftPanelCollapsed",!this.leftPanelCollapsed)},async toggleRightPanel(){console.log(this.rightPanelCollapsed),this.$store.commit("setRightPanelCollapsed",!this.rightPanelCollapsed),this.rightPanelCollapsed&&(this.$store.commit("setleftPanelCollapsed",!0),this.$nextTick(()=>{this.extractHtml()})),console.log(this.rightPanelCollapsed)},handlePaste(n){const e=(n.clipboardData||n.originalEvent.clipboardData).items;let t=[];for(let s of e)if(s.type.indexOf("image")!==-1){const i=s.getAsFile(),o=`image_${Date.now()+"_"+Math.random().toString(36).substr(2,9)}.png`;console.log("newFileName",o);const a=new File([i],o,{type:i.type});this.addFiles([a])}else if(s.kind==="file"){const i=s.getAsFile();t.push(i)}t.length>0&&this.addFiles(t)},emitloaded(){this.$emit("loaded")},download_files(){te.get("/download_files")},remove_file(n){te.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:n}).then(e=>{console.log(e)})},clear_files(){te.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(n=>{console.log(n),n.data.state?(this.$store.state.toast.showToast("File removed successfully",4,!0),this.filesList.length=0,this.isFileSentList.length=0,this.totalSize=0):this.$store.state.toast.showToast("Files couldn't be removed",4,!1)})},send_file(n,e){console.log("Send file triggered");const t=new FileReader,s=24*1024;let i=0,r=0;t.onloadend=()=>{if(t.error){console.error("Error reading file:",t.error);return}const a=t.result,c=i+a.byteLength>=n.size;qe.emit("send_file_chunk",{filename:n.name,chunk:a,offset:i,isLastChunk:c,chunkIndex:r}),i+=a.byteLength,r++,c?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.$store.state.toast.showToast("File uploaded successfully",4,!0),e()):o()};function o(){const a=n.slice(i,i+s);t.readAsArrayBuffer(a)}console.log("Uploading file"),o()},makeAnEmptyUserMessage(){this.$emit("createEmptyUserMessage",this.message),this.message=""},makeAnEmptyAIMessage(){this.$emit("createEmptyAIMessage")},updateRT(){console.log("Updating rt status"),this.is_rt?this.stopRTCom():this.startRTCom()},startRTCom(){this.is_rt=!0,console.log("is_rt:",this.is_rt),qe.emit("start_bidirectional_audio_stream"),Ue(()=>{Ge.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),qe.emit("stop_bidirectional_audio_stream"),Ue(()=>{Ge.replace()})},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this.$store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isListeningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=n=>{let e="";for(let t=n.resultIndex;t{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=n=>{console.error("Speech recognition error:",n.error),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isListeningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},computedFileSize(n){return Ue(()=>{Ge.replace()}),ii(n)},removeItem(n){console.log("Removing ",n.name),te.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:n.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=n)}),console.log(this.filesList)},sendMessageEvent(n,e="no_internet"){this.$emit("messageSentEvent",n,e)},sendCMDEvent(n){this.$emit("sendCMDEvent",n)},async mountDB(n){await te.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,database_name:n}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const n=document.createElement("input");n.type="file",n.style.display="none",n.multiple=!0,document.body.appendChild(n),n.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(n.files),document.body.removeChild(n)}),n.click()},takePicture(){qe.emit("take_picture"),qe.on("picture_taken",()=>{te.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(n=>{this.filesList=n.data.files,this.isFileSentList=n.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(n){this.loading||n.which===13&&(n.preventDefault(),n.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},submitWithInternetSearch(){this.message&&(this.sendMessageEvent(this.message,"internet"),this.message="")},stopGenerating(){this.$emit("stopGenerating")},addFiles(n){console.log("Adding files");const e=[...n];let t=0;const s=()=>{if(t>=e.length){console.log(`Files_list: ${this.filesList}`);return}const i=e[t];this.filesList.push(i),this.isFileSentList.push(!1),this.send_file(i,()=>{t++,s()})};s()}},watch:{installedModels:{immediate:!0,handler(n){this.$nextTick(()=>{this.installedModels=n})}},model_name:{immediate:!0,handler(n){this.$nextTick(()=>{this.model_name=n})}},showfilesList(){Ue(()=>{Ge.replace()})},loading(n,e){Ue(()=>{Ge.replace()})},filesList:{handler(n,e){let t=0;if(n.length>0)for(let s=0;s{Ge.replace()}),console.log("Chatbar mounted"),qe.on("rtcom_status_changed",n=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",n.status),console.log("active_tts_service: ",this.$store.state.config.active_tts_service),console.log("is_rt_on: ",this.$store.state.is_rt_on)}),this.$store.dispatch("fetchisRTOn")},activated(){Ue(()=>{Ge.replace()})}},N_t={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},I_t={key:0,class:"items-center gap-2 panels-color shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},O_t={class:"flex"},k_t=["title"],D_t={key:0},L_t={class:"flex flex-col max-h-64"},P_t=["title"],F_t={class:"flex flex-row items-center gap-1 text-left p-2 text-sm font-medium items-center gap-2 rounded-lg border bg-gray-100 p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-700 hover:bg-primary dark:hover:bg-primary"},U_t={key:0,filesList:"",role:"status"},B_t={class:"flex flex-row items-center"},G_t={class:"whitespace-nowrap"},V_t=["onClick"],z_t={key:1,class:"flex mx-1 w-500"},H_t={class:"whitespace-nowrap flex flex-row gap-2"},q_t={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end panels-color"},Y_t={role:"status"},$_t=["src"],W_t={class:"flex w-fit relative grow w-full"},K_t={class:"chat-bar",tabindex:"0"},j_t={key:0,title:"Waiting for reply"},Q_t=["src"],X_t={class:"w-fit"},Z_t={class:"w-fit"},J_t={class:"relative grow m-0 p-0"},emt={class:"m-0 p-0"},tmt={class:"flex items-center space-x-3"},nmt={class:"relative inline-block"},smt={class:"p-4 m-0 flex flex-col gap-4 max-h-96 overflow-y-auto custom-scrollbar"},imt={class:"flex flex-col gap-2"};function rmt(n,e,t,s,i,r){const o=Je("ChatBarButton"),a=Je("PersonalitiesCommands");return T(),x("div",N_t,[i.filesList.length>0?(T(),x("div",I_t,[l("div",O_t,[l("button",{class:"mx-1 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:i.showfilesList?"Hide file list":"Show file list",type:"button",onClick:e[0]||(e[0]=$(c=>i.showfilesList=!i.showfilesList,["stop"]))},e[11]||(e[11]=[l("i",{"data-feather":"list"},null,-1)]),8,k_t)]),i.filesList.length>0&&i.showfilesList==!0?(T(),x("div",D_t,[l("div",L_t,[z(Oi,{name:"list",tag:"div",class:"flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},{default:Ne(()=>[(T(!0),x(Le,null,We(i.filesList,(c,d)=>(T(),x("div",{key:d+"-"+c.name},[l("div",{class:"m-1",title:c.name},[l("div",F_t,[i.isFileSentList[d]?B("",!0):(T(),x("div",U_t,e[12]||(e[12]=[l("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),l("span",{class:"sr-only"},"Loading...",-1)]))),e[14]||(e[14]=l("div",null,[l("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),l("div",{class:Pe(["line-clamp-1 w-3/5",i.isFileSentList[d]?"text-green-500":"text-red-200"])},Y(c.name),3),e[15]||(e[15]=l("div",{class:"grow"},null,-1)),l("div",B_t,[l("p",G_t,Y(r.computedFileSize(c.size)),1),l("button",{type:"button",title:"Remove item",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:u=>r.removeItem(c)},e[13]||(e[13]=[l("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)]),8,V_t)])])],8,P_t)]))),128))]),_:1})])])):B("",!0),i.filesList.length>0?(T(),x("div",z_t,[l("div",H_t,[e[16]||(e[16]=l("p",{class:"font-bold"}," Total size: ",-1)),Ze(" "+Y(i.totalSize)+" ("+Y(i.filesList.length)+") ",1)]),e[19]||(e[19]=l("div",{class:"grow"},null,-1)),l("button",{type:"button",title:"Clear all",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[1]||(e[1]=(...c)=>r.clear_files&&r.clear_files(...c))},e[17]||(e[17]=[l("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)])),l("button",{type:"button",title:"Download database",class:"flex items-center p-0.5 text-sm rounded-sm hover:text-red-600 active:scale-75",onClick:e[2]||(e[2]=(...c)=>r.download_files&&r.download_files(...c))},e[18]||(e[18]=[l("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)]))])):B("",!0)])):B("",!0),i.selecting_model||i.selecting_binding?(T(),x("div",q_t,[l("div",Y_t,[l("img",{src:i.loader_v0,class:"w-50 h-50"},null,8,$_t),e[20]||(e[20]=l("span",{class:"sr-only"},"Selecting model...",-1))])])):B("",!0),l("div",W_t,[l("div",K_t,[t.loading?(T(),x("div",j_t,[l("img",{src:i.loader_v0},null,8,Q_t),e[21]||(e[21]=l("div",{role:"status"},[l("span",{class:"sr-only"},"Loading...")],-1))])):B("",!0),z(o,{onClick:r.toggleLeftPanel,class:Pe({"text-red-500":r.leftPanelCollapsed}),title:"Toggle View Mode"},{default:Ne(()=>[k(l("div",null,e[22]||(e[22]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[l("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[_t,r.leftPanelCollapsed]]),k(l("div",null,e[23]||(e[23]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[l("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[_t,!r.leftPanelCollapsed]])]),_:1},8,["onClick","class"]),l("div",X_t,[this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(T(),at(a,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:r.sendCMDEvent,"on-show-toast-message":t.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):B("",!0)]),l("div",Z_t,[r.isDataSourceNamesValid?(T(),at(a,{key:0,icon:"feather:book",commandsList:r.dataSourceNames,sendCommand:r.mountDB,"on-show-toast-message":t.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):B("",!0)]),l("div",J_t,[l("form",emt,[k(l("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[3]||(e[3]=c=>i.message=c),onPaste:e[4]||(e[4]=(...c)=>r.handlePaste&&r.handlePaste(...c)),onKeydown:e[5]||(e[5]=qn($(c=>r.submitOnEnter(c),["exact"]),["enter"])),class:"w-full p-2 text-sm text-gray-900 dark:text-white bg-gray-100 dark:bg-gray-700 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",placeholder:"Send message..."},null,544),[[ue,i.message]])])]),l("div",tmt,[t.loading?(T(),at(o,{key:0,onClick:r.stopGenerating,class:"bg-red-500 dark:bg-red-600 hover:bg-red-600 dark:hover:bg-red-700"},{icon:Ne(()=>e[24]||(e[24]=[l("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[l("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),l("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])),default:Ne(()=>[e[25]||(e[25]=l("span",null,"Stop",-1))]),_:1},8,["onClick"])):(T(),at(o,{key:1,onClick:r.submit,title:"Send"},{icon:Ne(()=>e[26]||(e[26]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 19l9 2-9-18-9 18 9-2zm0 0v-8"})],-1)])),_:1},8,["onClick"])),z(o,{onClick:r.submitWithInternetSearch,title:"Send with internet search"},{icon:Ne(()=>e[27]||(e[27]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})],-1)])),_:1},8,["onClick"]),z(o,{onClick:r.startSpeechRecognition,class:Pe({"text-red-500":i.isListeningToVoice}),title:"Voice input"},{icon:Ne(()=>e[28]||(e[28]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})],-1)])),_:1},8,["onClick","class"]),n.$store.state.config.active_tts_service!="None"&&n.$store.state.config.active_tts_service!=null&&this.$store.state.config.active_stt_service!="None"&&this.$store.state.config.active_stt_service!=null?(T(),at(o,{key:2,onClick:r.updateRT,class:Pe(i.is_rt?"bg-red-500 dark:bg-red-600":"bg-green-500 dark:bg-green-600"),title:"Real-time audio mode"},{icon:Ne(()=>e[29]||(e[29]=[Ze(" 🌟 ")])),_:1},8,["onClick","class"])):B("",!0),t.loading?B("",!0):(T(),x("div",{key:3,class:"relative",onMouseleave:e[9]||(e[9]=(...c)=>r.hideSendMenu&&r.hideSendMenu(...c))},[l("div",nmt,[k(l("div",{onMouseenter:e[6]||(e[6]=(...c)=>r.showSendMenu&&r.showSendMenu(...c)),class:"absolute m-0 p-0 z-10 bottom-full left-1/2 transform -translate-x-1/2 w-25 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[l("div",smt,[l("div",imt,[z(o,{onClick:r.add_file,title:"Send file"},{icon:Ne(()=>e[30]||(e[30]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)])),_:1},8,["onClick"]),z(o,{onClick:r.takePicture,title:"Take picture"},{icon:Ne(()=>e[31]||(e[31]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})],-1)])),_:1},8,["onClick"]),z(o,{onClick:r.addWebLink,title:"Add web link"},{icon:Ne(()=>e[32]||(e[32]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})],-1)])),_:1},8,["onClick"])])])],544),[[_t,i.isSendMenuVisible]]),l("div",{onMouseenter:e[8]||(e[8]=(...c)=>r.showSendMenu&&r.showSendMenu(...c))},[l("button",{onClick:e[7]||(e[7]=$((...c)=>n.toggleSendMenu&&n.toggleSendMenu(...c),["prevent"])),class:"chat-bar-button"},e[33]||(e[33]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)]))],32)])],32)),z(o,{onClick:r.makeAnEmptyUserMessage,title:"New user message"},{icon:Ne(()=>e[34]||(e[34]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})],-1)])),_:1},8,["onClick"]),z(o,{onClick:r.makeAnEmptyAIMessage,title:"New AI message",class:"text-red-400 dark:text-red-300"},{icon:Ne(()=>e[35]||(e[35]=[l("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})],-1)])),_:1},8,["onClick"]),z(o,{onClick:r.toggleRightPanel,class:Pe({"text-red-500":!r.rightPanelCollapsed}),title:"Toggle right Panel"},{default:Ne(()=>[k(l("div",null,e[36]||(e[36]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[l("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[_t,r.rightPanelCollapsed]]),k(l("div",null,e[37]||(e[37]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[l("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[_t,!r.rightPanelCollapsed]])]),_:1},8,["onClick","class"])]),l("input",{type:"file",ref:"fileDialog",onChange:e[10]||(e[10]=(...c)=>r.addFiles&&r.addFiles(...c)),multiple:"",style:{display:"none"}},null,544)]),e[38]||(e[38]=l("div",{class:"ml-auto gap-2"},null,-1))])])}const _N=st(M_t,[["render",rmt],["__scopeId","data-v-908c73f4"]]),omt={name:"WelcomeComponent",data(){return{videoUrl:"",videoType:"",latestNews:"",error:"",showVideoButton:!1,lastVideoUrl:""}},computed:{getImageForVideoType(){switch(this.videoType.toLowerCase()){case"podcast":return"/podcast.png";case"music":return"/music.png";case"movie":return"/movie.png";case"tutorial":return"/tutorial.png";default:return"/play_video.png"}},logoSrc(){return this.$store.state.config&&this.$store.state.config.app_custom_logo?`/user_infos/${this.$store.state.config.app_custom_logo}`:Gs}},methods:{async fetchLatestNews(){try{const n=await te.get("/get_news");this.latestNews=n.data}catch(n){console.error("Failed to fetch latest news:",n),this.error="Unable to fetch the latest news. Please try again later."}},async fetchVideoUrl(){try{const n=await te.get("/get_last_video_url");this.videoUrl=n.data.url,this.videoType=n.data.type,this.checkVideoUpdate()}catch(n){console.error("Failed to fetch video information:",n),this.error="Unable to fetch the latest video information. Please try again later."}},async handleClick(){await te.post("/set_last_viewed_video_url",{client_id:this.$store.state.client_id,last_viewed_video_url:this.videoUrl}),this.showVideoButton=!1},async checkVideoUpdate(){const e=(await te.get("/get_last_viewed_video_url")).data;console.log("storedVideoUrl"),console.log(e),this.videoUrl!==e&&(this.showVideoButton=!0)}},mounted(){this.fetchLatestNews(),this.fetchVideoUrl()}},amt={class:"flex flex-col items-center justify-center w-full h-full min-h-screen p-8"},lmt={class:"text-center max-w-4xl"},cmt={class:"flex items-center justify-center gap-8 mb-12"},dmt={class:"relative w-24 h-24"},umt=["src"],pmt={class:"flex flex-col items-start"},fmt={class:"text-6xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-indigo-600 to-purple-600 dark:from-indigo-400 dark:to-purple-400"},_mt={class:"space-y-8 animate-fade-in-up"},mmt={class:"text-4xl font-semibold"},hmt={class:"text-xl max-w-3xl mx-auto"},gmt={key:0,class:"mt-12 p-6 rounded-lg shadow-md animate-fade-in-up overflow-y-scroll scrollbar-thin"},bmt=["innerHTML"],ymt={key:1,class:"mt-6 text-red-500"},Emt={key:0,class:"floating-button-container"},vmt=["href"],Smt=["src","alt"];function Tmt(n,e,t,s,i,r){return T(),x("div",amt,[l("div",lmt,[l("div",cmt,[l("div",dmt,[l("img",{src:r.logoSrc,alt:"LoLLMS Logo",class:"w-24 h-24 rounded-full absolute animate-rolling-ball"},null,8,umt)]),l("div",pmt,[l("h1",fmt,Y(n.$store.state.theme_vars.lollms_title),1),e[1]||(e[1]=l("p",{class:"text-2xl italic mt-2"}," Lord of Large Language And Multimodal Systems ",-1))])]),l("div",_mt,[l("h2",mmt,Y(n.$store.state.theme_vars.lollms_welcome_short_message),1),l("p",hmt,Y(n.$store.state.theme_vars.lollms_welcome_message),1)]),i.latestNews?(T(),x("div",gmt,[e[2]||(e[2]=l("h3",null,"Latest LoLLMS News",-1)),l("p",{innerHTML:i.latestNews},null,8,bmt)])):B("",!0),i.error?(T(),x("div",ymt,Y(i.error),1)):B("",!0)]),i.showVideoButton?(T(),x("div",Emt,[l("a",{href:i.videoUrl,target:"_blank",class:"floating-button",onClick:e[0]||(e[0]=(...o)=>r.handleClick&&r.handleClick(...o))},[e[3]||(e[3]=l("span",{class:"tooltip"},"New ParisNeo Video!",-1)),l("img",{src:r.getImageForVideoType,alt:"New "+i.videoType,class:"w-full h-full object-cover"},null,8,Smt)],8,vmt)])):B("",!0)])}const mN=st(omt,[["render",Tmt],["__scopeId","data-v-d9375d3e"]]);var xmt=function(){function n(e,t){t===void 0&&(t=[]),this._eventType=e,this._eventFunctions=t}return n.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(t){typeof window<"u"&&window.addEventListener(e._eventType,t)})},n}(),ou=function(){return ou=Object.assign||function(n){for(var e,t=1,s=arguments.length;t{const e=n.data;console.log("Done"),e.status?(this.currentPersonConfig=e.config,this.showPersonalityEditor=!0):console.error(e.error)}).catch(n=>{console.error(n)})}}},Rmt={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},Amt={class:"relative w-full max-h-full bg-bg-light dark:bg-bg-dark"},Mmt={class:"w-full h-full relative items-center gap-2 rounded-lg border bg-bg-light dark:bg-bg-dark p-1.5 shadow-sm hover:shadow-none dark:border-gray-800 dark:bg-gray-900"},Nmt={class:"justify-center text-center items-center w-full bg-bg-light dark:bg-bg-dark"},Imt={class:"w-full flex flex-row mt-4 text-center justify-center"},Omt={class:"w-full max-h-full container bg-bg-light dark:bg-bg-dark"},kmt={class:"mb-4 w-full"},Dmt={class:"w-full bg-bg-light dark:bg-bg-dark"};function Lmt(n,e,t,s,i,r){return i.show?(T(),x("div",Rmt,[l("div",Amt,[l("div",Mmt,[l("button",{type:"button",onClick:e[0]||(e[0]=o=>r.hide()),class:"absolute top-1 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},e[17]||(e[17]=[l("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),l("span",{class:"sr-only"},"Close modal",-1)])),l("div",Nmt,[l("div",Imt,[l("button",{type:"submit",onClick:e[1]||(e[1]=$((...o)=>r.submitForm&&r.submitForm(...o),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Commit AI to Server "),l("button",{onClick:e[2]||(e[2]=$(o=>r.hide(),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Close ")]),l("div",Omt,[l("form",kmt,[l("table",Dmt,[l("tr",null,[e[18]||(e[18]=l("td",null,[l("label",{for:"personalityConditioning"},"Personality Conditioning:")],-1)),l("td",null,[k(l("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"personalityConditioning","onUpdate:modelValue":e[3]||(e[3]=o=>t.config.personality_conditioning=o)},null,512),[[ue,t.config.personality_conditioning]])])]),l("tr",null,[e[19]||(e[19]=l("td",null,[l("label",{for:"userMessagePrefix"},"User Message Prefix:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"userMessagePrefix","onUpdate:modelValue":e[4]||(e[4]=o=>t.config.user_message_prefix=o)},null,512),[[ue,t.config.user_message_prefix]])])]),l("tr",null,[e[20]||(e[20]=l("td",null,[l("label",{for:"aiMessagePrefix"},"AI Message Prefix:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"aiMessagePrefix","onUpdate:modelValue":e[5]||(e[5]=o=>t.config.ai_message_prefix=o)},null,512),[[ue,t.config.ai_message_prefix]])])]),l("tr",null,[e[21]||(e[21]=l("td",null,[l("label",{for:"linkText"},"Link Text:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"linkText","onUpdate:modelValue":e[6]||(e[6]=o=>t.config.link_text=o)},null,512),[[ue,t.config.link_text]])])]),l("tr",null,[e[22]||(e[22]=l("td",null,[l("label",{for:"welcomeMessage"},"Welcome Message:")],-1)),l("td",null,[k(l("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"welcomeMessage","onUpdate:modelValue":e[7]||(e[7]=o=>t.config.welcome_message=o)},null,512),[[ue,t.config.welcome_message]])])]),l("tr",null,[e[23]||(e[23]=l("td",null,[l("label",{for:"modelTemperature"},"Model Temperature:")],-1)),l("td",null,[k(l("input",{type:"number",id:"modelTemperature","onUpdate:modelValue":e[8]||(e[8]=o=>t.config.model_temperature=o)},null,512),[[ue,t.config.model_temperature]])])]),l("tr",null,[e[24]||(e[24]=l("td",null,[l("label",{for:"modelTopK"},"Model Top K:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopK","onUpdate:modelValue":e[9]||(e[9]=o=>t.config.model_top_k=o)},null,512),[[ue,t.config.model_top_k]])])]),l("tr",null,[e[25]||(e[25]=l("td",null,[l("label",{for:"modelTopP"},"Model Top P:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopP","onUpdate:modelValue":e[10]||(e[10]=o=>t.config.model_top_p=o)},null,512),[[ue,t.config.model_top_p]])])]),l("tr",null,[e[26]||(e[26]=l("td",null,[l("label",{for:"modelRepeatPenalty"},"Model Repeat Penalty:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatPenalty","onUpdate:modelValue":e[11]||(e[11]=o=>t.config.model_repeat_penalty=o)},null,512),[[ue,t.config.model_repeat_penalty]])])]),l("tr",null,[e[27]||(e[27]=l("td",null,[l("label",{for:"modelRepeatLastN"},"Model Repeat Last N:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatLastN","onUpdate:modelValue":e[12]||(e[12]=o=>t.config.model_repeat_last_n=o)},null,512),[[ue,t.config.model_repeat_last_n]])])]),l("tr",null,[e[28]||(e[28]=l("td",null,[l("label",{for:"recommendedBinding"},"Recommended Binding:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedBinding","onUpdate:modelValue":e[13]||(e[13]=o=>t.config.recommended_binding=o)},null,512),[[ue,t.config.recommended_binding]])])]),l("tr",null,[e[29]||(e[29]=l("td",null,[l("label",{for:"recommendedModel"},"Recommended Model:")],-1)),l("td",null,[k(l("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedModel","onUpdate:modelValue":e[14]||(e[14]=o=>t.config.recommended_model=o)},null,512),[[ue,t.config.recommended_model]])])]),l("tr",null,[e[30]||(e[30]=l("td",null,[l("label",{class:"dark:bg-black dark:text-primary w-full",for:"dependencies"},"Dependencies:")],-1)),l("td",null,[k(l("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"dependencies","onUpdate:modelValue":e[15]||(e[15]=o=>t.config.dependencies=o)},null,512),[[ue,t.config.dependencies]])])]),l("tr",null,[e[31]||(e[31]=l("td",null,[l("label",{for:"antiPrompts"},"Anti Prompts:")],-1)),l("td",null,[k(l("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"antiPrompts","onUpdate:modelValue":e[16]||(e[16]=o=>t.config.anti_prompts=o)},null,512),[[ue,t.config.anti_prompts]])])])])])])])])])])):B("",!0)}const RN=st(wmt,[["render",Lmt]]),Pmt={data(){return{showPopup:!1,webpageUrl:"https://lollms.com/"}},methods:{show(){this.showPopup=!0},hide(){this.showPopup=!1},save_configuration(){te.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config}).then(n=>{this.isLoading=!1,n.data.status?(this.$store.state.toast.showToast("Configuration changed successfully.",4,!0),this.settingsChanged=!1):this.$store.state.toast.showToast("Configuration change failed.",4,!1)})}}},Fmt={key:0,class:"fixed inset-0 flex items-center justify-center z-50"},Umt={class:"popup-container"},Bmt=["src"],Gmt={class:"checkbox-container"};function Vmt(n,e,t,s,i,r){return T(),at(Bs,{name:"fade"},{default:Ne(()=>[i.showPopup?(T(),x("div",Fmt,[l("div",Umt,[l("button",{onClick:e[0]||(e[0]=(...o)=>r.hide&&r.hide(...o)),class:"close-button"}," X "),l("iframe",{src:i.webpageUrl,class:"iframe-content"},null,8,Bmt),l("div",Gmt,[k(l("input",{type:"checkbox",id:"startup",class:"styled-checkbox","onUpdate:modelValue":e[1]||(e[1]=o=>this.$store.state.config.show_news_panel=o),onChange:e[2]||(e[2]=(...o)=>r.save_configuration&&r.save_configuration(...o))},null,544),[[Ye,this.$store.state.config.show_news_panel]]),e[3]||(e[3]=l("label",{for:"startup",class:"checkbox-label"},"Show at startup",-1))])])])):B("",!0)]),_:1})}const AN=st(Pmt,[["render",Vmt],["__scopeId","data-v-d504dfc9"]]),zmt="/assets/fastapi-BQj-rjUJ.png",Hmt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20127.14%2096.36'%3e%3cg%20id='图层_2'%20data-name='图层%202'%3e%3cg%20id='Discord_Logos'%20data-name='Discord%20Logos'%3e%3cg%20id='Discord_Logo_-_Large_-_White'%20data-name='Discord%20Logo%20-%20Large%20-%20White'%3e%3cpath%20d='M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",qmt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%3e%3ccircle%20cx='25'%20cy='25'%20r='20'%20fill='none'%20stroke='black'%20stroke-width='3'%3e%3c/circle%3e%3cline%20x1='25'%20y1='30'%20x2='25'%20y2='15'%20style='stroke:black;stroke-width:3'%3e%3c/line%3e%3ccircle%20cx='25'%20cy='35'%20r='3'%20fill='black'%3e%3c/circle%3e%3c/svg%3e",Ymt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%3e%3ccircle%20cx='25'%20cy='25'%20r='20'%20fill='none'%20stroke='black'%20stroke-width='3'%3e%3c/circle%3e%3cline%20x1='25'%20y1='30'%20x2='25'%20y2='15'%20style='stroke:black;stroke-width:3'%3e%3canimate%20attributeName='y1'%20values='30;25;30'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3canimate%20attributeName='y2'%20values='15;20;15'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3c/line%3e%3ccircle%20cx='25'%20cy='35'%20r='3'%20fill='black'%3e%3canimate%20attributeName='cy'%20values='35;30;35'%20dur='1s'%20repeatCount='indefinite'%3e%3c/animate%3e%3c/circle%3e%3c/svg%3e",$mt="data:image/svg+xml,%3c?xml%20version='1.0'%20?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20width='800px'%20height='800px'%20viewBox='0%200%2064%2064'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20data-name='Layer%205'%20id='Layer_5'%3e%3cpath%20d='M47,33H17a1,1,0,0,0-1,1c0,9.93,7.18,18,16,18s16-8.07,16-18A1,1,0,0,0,47,33ZM18,35H46a18,18,0,0,1-.67,4H18.71A18,18,0,0,1,18,35ZM26.7,48.8a6.42,6.42,0,0,1,10.6,0,12.3,12.3,0,0,1-10.6,0Zm12.34-1A8.81,8.81,0,0,0,32,44a8.81,8.81,0,0,0-7,3.81A15.56,15.56,0,0,1,19.43,41H44.57A15.56,15.56,0,0,1,39,47.81ZM36,22a1.1,1.1,0,0,1,0-.18,1.17,1.17,0,0,1,.06-.2s0-.05,0-.07a.28.28,0,0,1,.07-.09.71.71,0,0,1,.28-.28s.06-.06.09-.07l10-5a1,1,0,1,1,.9,1.78L39.24,22l8.21,4.11a1,1,0,0,1,.44,1.34A1,1,0,0,1,47,28a.93.93,0,0,1-.45-.11l-10-5h0a1.18,1.18,0,0,1-.28-.22l0-.06a.65.65,0,0,1-.1-.15s0-.05,0-.07a1.17,1.17,0,0,1-.06-.2A1.1,1.1,0,0,1,36,22ZM16.55,26.11,24.76,22l-8.21-4.11a1,1,0,1,1,.9-1.78l10,5s.06.05.09.07a.71.71,0,0,1,.28.28.28.28,0,0,1,.07.09s0,.05,0,.07a1.17,1.17,0,0,1,.06.2.82.82,0,0,1,0,.36,1.17,1.17,0,0,1-.06.2s0,.05,0,.07a.65.65,0,0,1-.1.15.21.21,0,0,0,0,.06,1.18,1.18,0,0,1-.28.22h0l-10,5A.93.93,0,0,1,17,28a1,1,0,0,1-.89-.55A1,1,0,0,1,16.55,26.11ZM60.66,36.45A29.69,29.69,0,0,0,61,32,29,29,0,0,0,3,32a29.69,29.69,0,0,0,.34,4.45,4.65,4.65,0,0,0,2.39,7.82,29,29,0,0,0,52.54,0,4.65,4.65,0,0,0,2.39-7.82ZM4.78,41.58a2.91,2.91,0,0,1-.24-.27A2.62,2.62,0,0,1,4,39.71a.61.61,0,0,1,0-.14,2.58,2.58,0,0,1,.77-1.73,4.38,4.38,0,0,1,.74-.55C7,36.38,10,34.9,12.69,33.67c-1.52,3.3-3.42,7.17-4.17,7.91a2.59,2.59,0,0,1-1.47.72A2.66,2.66,0,0,1,4.78,41.58ZM32,59A27,27,0,0,1,7.92,44.18a4.56,4.56,0,0,0,2-1.18c1.48-1.49,5-9.36,5.66-10.92a1,1,0,0,0-1.32-1.32c-.78.34-3.14,1.39-5.49,2.53-1.29.63-2.58,1.29-3.6,1.88A25.58,25.58,0,0,1,5,32a27,27,0,0,1,54,0,25.58,25.58,0,0,1-.19,3.17c-2.88-1.66-7.88-3.88-9.09-4.41a1,1,0,0,0-1.32,1.32c.69,1.56,4.18,9.43,5.66,10.92a4.56,4.56,0,0,0,2,1.18A27,27,0,0,1,32,59ZM59.46,41.31a2.91,2.91,0,0,1-.24.27A2.66,2.66,0,0,1,57,42.3a2.59,2.59,0,0,1-1.47-.72c-.75-.74-2.65-4.61-4.17-7.91,1.65.76,3.44,1.61,4.91,2.37.91.47,1.7.9,2.26,1.25a4.38,4.38,0,0,1,.74.55A2.58,2.58,0,0,1,60,39.57a.61.61,0,0,1,0,.14A2.62,2.62,0,0,1,59.46,41.31Z'/%3e%3c/g%3e%3c/svg%3e",Wmt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512.001%20512.001'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cpath%20d='M256.001,0C114.841,0,0,114.841,0,256.001s114.841,256.001,256.001,256.001S512.001,397.16,512.001,256.001%20S397.16,0,256.001,0z%20M256.001,493.701c-131.069,0-237.702-106.631-237.702-237.7S124.932,18.299,256.001,18.299%20s237.702,106.632,237.702,237.702S387.068,493.701,256.001,493.701z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M371.284,296.658H138.275c-5.054,0-9.15,4.097-9.15,9.15s4.095,9.15,9.15,9.15h233.008c5.054,0,9.15-4.097,9.15-9.15%20C380.433,300.754,376.337,296.658,371.284,296.658z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M297.481,330.816h-85.403c-5.054,0-9.15,4.097-9.15,9.15s4.095,9.15,9.15,9.15h85.403c5.054,0,9.15-4.097,9.15-9.15%20S302.534,330.816,297.481,330.816z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M146.725,192.982c-18.666,0-33.852,15.186-33.852,33.852c0,18.666,15.186,33.852,33.852,33.852%20c18.666,0,33.852-15.186,33.852-33.852C180.577,208.168,165.391,192.982,146.725,192.982z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20d='M365.275,192.982c-18.666,0-33.852,15.186-33.852,33.852c0,18.666,15.186,33.852,33.852,33.852%20s33.852-15.186,33.852-33.852C399.128,208.168,383.942,192.982,365.275,192.982z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cg%3e%3ccircle%20cx='155.969'%20cy='219.735'%20r='9.15'/%3e%3ccircle%20cx='374.338'%20cy='219.735'%20r='9.15'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Kmt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20299.92%20299.92'%20xml:space='preserve'%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20d='M293.4,65.2H6.52C2.914,65.2,0,68.114,0,71.72v117.36c0,3.606,2.914,6.52,6.52,6.52h6.52v32.6%20c0,3.606,2.914,6.52,6.52,6.52h260.8c3.606,0,6.52-2.914,6.52-6.52v-32.6h6.52c3.606,0,6.52-2.914,6.52-6.52V71.72%20C299.92,68.114,297.006,65.2,293.4,65.2z%20M273.84,221.68h-19.56H228.2h-26.08h-26.08h-26.08h-26.08H97.8H71.72H45.64H26.08V195.6%20h19.56h26.08H97.8h26.08h26.08h26.08h26.08h26.08h26.08h19.56V221.68z%20M286.88,182.56h-6.52H19.56h-6.52V78.24h273.84V182.56z'/%3e%3cpath%20d='M32.6,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H32.6c-3.606,0-6.52,2.914-6.52,6.52%20V163C26.08,166.606,28.994,169.52,32.6,169.52z%20M39.12,104.32H65.2v52.16H39.12V104.32z'/%3e%3cpath%20d='M97.8,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H97.8c-3.606,0-6.52,2.914-6.52,6.52%20V163C91.28,166.606,94.194,169.52,97.8,169.52z%20M104.32,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M163,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H163c-3.606,0-6.52,2.914-6.52,6.52%20V163C156.48,166.606,159.394,169.52,163,169.52z%20M169.52,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M228.2,169.52h39.12c3.606,0,6.52-2.914,6.52-6.52V97.8c0-3.606-2.914-6.52-6.52-6.52H228.2%20c-3.606,0-6.52,2.914-6.52,6.52V163C221.68,166.606,224.594,169.52,228.2,169.52z%20M234.72,104.32h26.08v52.16h-26.08V104.32z'/%3e%3cpath%20d='M52.16,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C49.246,221.68,52.16,218.766,52.16,215.16z'/%3e%3cpath%20d='M78.24,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C75.326,221.68,78.24,218.766,78.24,215.16z'/%3e%3cpath%20d='M104.32,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C101.406,221.68,104.32,218.766,104.32,215.16z'/%3e%3cpath%20d='M130.4,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C127.486,221.68,130.4,218.766,130.4,215.16z'/%3e%3cpath%20d='M156.48,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52s-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20S156.48,218.766,156.48,215.16z'/%3e%3cpath%20d='M182.56,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C179.646,221.68,182.56,218.766,182.56,215.16z'/%3e%3cpath%20d='M208.64,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C205.726,221.68,208.64,218.766,208.64,215.16z'/%3e%3cpath%20d='M234.72,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C231.806,221.68,234.72,218.766,234.72,215.16z'/%3e%3cpath%20d='M260.8,215.16v-13.04c0-3.606-2.914-6.52-6.52-6.52c-3.606,0-6.52,2.914-6.52,6.52v13.04c0,3.606,2.914,6.52,6.52,6.52%20C257.886,221.68,260.8,218.766,260.8,215.16z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",jmt="data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='40'%20stroke='green'%20stroke-width='4'%20fill='green'%20/%3e%3cpath%20stroke='white'%20stroke-width='4'%20d='M40%2050%20l10%2010%2020%20-20'%20fill='none'%20/%3e%3c/svg%3e",Qmt="data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='50'%20cy='50'%20r='40'%20stroke='red'%20stroke-width='4'%20fill='red'%20/%3e%3cline%20x1='35'%20y1='35'%20x2='65'%20y2='65'%20stroke='white'%20stroke-width='4'%20/%3e%3cline%20x1='65'%20y1='35'%20x2='35'%20y2='65'%20stroke='white'%20stroke-width='4'%20/%3e%3c/svg%3e",Xmt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20fill='%23000000'%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='800px'%20height='800px'%20viewBox='0%200%20461.759%20461.759'%20xml:space='preserve'%3e%3cg%3e%3cpath%20d='M0,301.058h147.916v147.919H0V301.058z%20M194.432,448.977H342.35V301.058H194.432V448.977z%20M2.802,257.347h147.916V109.434%20H2.802V257.347z%20M325.476,92.219l-51.603-79.437l-79.441,51.601l51.604,79.437L325.476,92.219z%20M219.337,213.733l71.045,62.663%20l62.66-71.039l-71.044-62.669L219.337,213.733z%20M412.107,57.967l-80.668,49.656l49.652,80.666l80.668-49.65L412.107,57.967z'/%3e%3c/g%3e%3c/svg%3e",Zmt="/assets/robot-CQPaMbxU.svg",Jmt="/";te.defaults.baseURL="/";const eht={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:w0,UniversalForm:yM},data(){return{bUrl:Jmt,isMounted:!1,show:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},mountedPers:{get(){return console.log("asked for:",this.$store.state.mountedPers),this.$store.state.mountedPers},set(n){this.$store.commit("setMountedPers",n)}},personalities:{get(){return this.$store.state.personalities},set(n){this.$store.commit("setPersonalities",n)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(n){this.$store.commit("setMountedPers",n)}}},methods:{async handleOnTalk(){const n=this.mountedPers;console.log("pers:",n),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await te.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const t=this.$store.state.config.personalities.findIndex(i=>i===n.full_path),s={client_id:this.$store.state.client_id,id:t};e=await te.post("/select_personality",s),console.log("Generating message from ",e.data.status),qe.emit("generate_msg_from",{id:-1})}},async remount_personality(){const n=this.mountedPers;if(console.log("Remounting personality ",n),!n)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:n.category,folder:n.folder,language:n.language};console.log("after");const t=await te.post("/remount_personality",e);if(console.log("Remounting personality executed:",t),t)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),t.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(n){try{te.get("/get_active_personality_settings").then(e=>{e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this.$refs.universalForm.showForm(e.data,"Personality settings - "+n.name,"Save changes","Cancel").then(t=>{try{te.post("/set_active_personality_settings",t).then(s=>{s&&s.data?(console.log("personality set with new settings",s.data),this.$store.state.toast.showToast("Personality settings updated successfully!",4,!0)):this.$store.state.toast.showToast(`Did not get Personality settings responses. `+s,4,!1)})}catch(s){this.$store.state.toast.showToast(`Did not get Personality settings responses. - Endpoint error: `+s.message,4,!1)}}):this.$store.state.toast.showToast("Personality has no settings",4,!1))})}catch(e){this.$store.state.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},async constructor(){for(Ue(()=>{Ge.replace()});this.$store.state.ready===!1;)await new Promise(n=>setTimeout(n,100));this.onReady()},async api_get_req(n){try{const e=await te.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(n){n.target.src=j0}}},eht={class:"relative group/item"},tht=["src","alt"],nht={class:"absolute bottom-6 left-0 w-full flex items-center justify-center opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 p-1"},sht={class:"p-1 bg-gray-500 rounded-full text-white hover:bg-gray-600 focus:outline-none ml-1",title:"Show more"},iht={class:"text-xs font-bold"};function rht(n,e,t,s,i,r){const o=Je("UniversalForm");return T(),x(Le,null,[l("div",eht,[l("button",{onClick:e[1]||(e[1]=$((...a)=>r.onSettingsPersonality&&r.onSettingsPersonality(...a),["prevent"])),class:Pe(["w-6 h-6 rounded-full overflow-hidden transition-transform duration-200 transform group-hover/item:scale-110 focus:outline-none relative",{"glow-effect":n.$store.state.config.activate_skills_lib}])},[l("img",{src:r.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),alt:r.mountedPers.name,class:Pe(["w-full h-full object-cover",{"border-2 border-secondary":n.isActive}])},null,42,tht)],2),l("div",nht,[l("button",{onClick:e[2]||(e[2]=$(a=>r.remount_personality(),["prevent"])),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Remount"},e[4]||(e[4]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)])),l("button",{onClick:e[3]||(e[3]=$(a=>r.handleOnTalk(),["prevent"])),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none ml-1",title:"Talk"},e[5]||(e[5]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})],-1)])),l("button",sht,[l("span",iht,"+"+Y(r.mountedPersArr.length-1),1)])])]),z(o,{ref:"universalForm",class:"z-50"},null,512)],64)}const MN=st(Jmt,[["render",rht],["__scopeId","data-v-31178107"]]),oht={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center overflow-hidden"},aht={key:0,class:"absolute inset-0 pointer-events-none overflow-hidden"},lht={class:"flex flex-col items-center text-center max-w-4xl w-full px-4 relative z-10"},cht={class:"mb-8 w-full"},dht={class:"text-5xl md:text-6xl font-bold mb-2 hover:scale-105 transition-transform lollms-title-style"},uht={class:"bottom-0 text-2xl italic"},pht={class:"text-lg"},fht=["innerHTML"],_ht={class:"animated-progressbar-bg"},mht={class:"w-full max-w-2xl"},hht={role:"status",class:"w-full"},ght={class:"text-xl"},bht={class:"text-2xl font-bold mt-2"},yht={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-[16rem]"},Eht={class:"logo-container"},vht=["src"],Sht={class:"toolbar discussion"},Tht={class:"toolbar-container"},xht={class:"p-4 flex flex-wrap gap-2 items-center"},Cht={class:"p-4 flex flex-wrap gap-2 items-center"},wht={class:"relative"},Rht={class:"relative"},Aht={key:0,title:"Loading..",class:"flex justify-center"},Mht={key:1,class:"flex justify-center space-x-4"},Nht={key:2,class:"flex flex-col space-y-2"},Iht={class:"relative inline-block"},Oht={class:"p-2 border-b border-gray-200 dark:border-gray-700"},kht={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Dht={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Lht=["onClick","title"],Pht=["src","alt"],Fht=["title"],Uht={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},Bht=["onClick"],Ght={class:"flex space-x-1"},Vht=["onClick"],zht=["src","title"],Hht={class:"relative inline-block"},qht={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Yht={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},$ht={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Wht=["onClick","title"],Kht=["src","alt"],jht=["title"],Qht={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},Xht=["onClick"],Zht={class:"flex space-x-1"},Jht=["onClick"],egt=["src","title"],tgt={class:"relative inline-block"},ngt={class:"p-2 border-b border-gray-200 dark:border-gray-700"},sgt={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},igt={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},rgt=["onClick","title"],ogt=["src","alt"],agt=["title"],lgt={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},cgt=["onClick"],dgt={class:"flex space-x-1"},ugt=["onClick"],pgt=["onClick"],fgt=["onClick"],_gt={class:"personalities-container"},mgt={class:"w-auto max-w-md mx-auto p-2"},hgt={class:"flex items-center"},ggt={class:"relative flex-grow"},bgt={key:0,class:"w-full p-4 bg-bg-light dark:bg-bg-dark"},ygt={class:"flex flex-col space-y-2"},Egt={key:0},vgt={key:1,class:"flex space-x-2"},Sgt={key:1,class:"flex space-x-2"},Tgt={class:"flex space-x-2"},xgt={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},Cgt={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},wgt={class:"flex flex-row items-center justify-center panels-color"},Rgt={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},Agt={key:0,class:"relative flex flex-col flex-grow"},Mgt={class:"container pt-4 pb-50 mb-50 w-full"},Ngt={key:0,class:"w-full rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col overflow-hidden p-4 pb-2"},Igt={class:"overflow-x-auto flex-grow scrollbar-thin scrollbar-thumb-gray-400 dark:scrollbar-thumb-gray-600 scrollbar-track-gray-200 dark:scrollbar-track-gray-800 scrollbar-thumb-rounded-full scrollbar-track-rounded-full"},Ogt={class:"flex flex-nowrap gap-6 p-4 min-w-full"},kgt=["title","onClick"],Dgt={class:"space-y-3"},Lgt=["title"],Pgt=["title"],Fgt={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},Ugt={class:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] flex flex-col"},Bgt={class:"flex-1 flex flex-col min-h-0"},Ggt={class:"mb-4 p-4 bg-gray-100 dark:bg-gray-700 rounded-lg"},Vgt={class:"flex-1 h-[200px] overflow-y-auto scrollbar scrollbar-thumb-gray-400 dark:scrollbar-thumb-gray-500 scrollbar-track-gray-200 dark:scrollbar-track-gray-700 scrollbar-thin rounded-md"},zgt={class:"text-base whitespace-pre-wrap"},Hgt={class:"flex-1 overflow-y-auto"},qgt={class:"space-y-4"},Ygt=["for"],$gt=["id","onUpdate:modelValue","placeholder"],Wgt=["id","onUpdate:modelValue"],Kgt=["id","onUpdate:modelValue"],jgt=["id","onUpdate:modelValue"],Qgt={key:4,class:"border rounded-md overflow-hidden"},Xgt={class:"bg-gray-200 dark:bg-gray-900 p-2 text-sm"},Zgt=["id","onUpdate:modelValue"],Jgt=["id","onUpdate:modelValue"],ebt=["value"],tbt={class:"mt-6 flex justify-end space-x-4"},nbt={key:0,class:"flex flex-row items-center justify-center h-10"},sbt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-1/2 bg-bg-light-tone dark:bg-bg-dark-tone h-full"},ibt={ref:"isolatedContent",class:"h-full"},rbt={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},obt={class:"text-2xl animate-pulse mt-2 text-white"},abt={id:"app"},lbt=n=>{const e=n.replace("[","").replace("]","").split("::"),t=e[0];if(e.length===1)return{label:t,type:"text",fullText:n};const s=e[1],i={label:t,type:s,fullText:n};switch(s){case"int":case"float":case"multiline":break;case"code":i.language=e[2]||"plaintext";break;case"options":i.options=e[2]?e[2].split(",").map(r=>r.trim()):[];break;default:i.type="text"}return i},cbt="/",dbt={setup(){},data(){return{interestingFacts:["ParisNeo, the creator of LoLLMs, originally built his high-performance PC to play Cyberpunk 2077. However, his passion for AI took an unexpected turn, leading him to develop LoLLMs instead. Ironically, he never found the time to actually play the game that inspired his powerful setup!","Saïph, version 14 of LoLLMs, is named after a star in Orion's constellation (Kappa Orionis), representing bright guidance in AI!","At 12, ParisNeo coded 'Saif14' in BASIC on a Tandy 1000, an 'all-in-one' suite named with a friend. LoLLMs v14 'Saïph' - a star in Orion - echoes this BASIC creation's spirit and hints at OpenAI's future.",`The new AI Village app in LoLLMs, simulating AI agents believing they're human, mirrors "The Hitchhiker's Guide to the Galaxy" (ParisNeo's favorite) where Earth was a simulation to compute the Ultimate Question. Both explore the idea of unsuspecting inhabitants participating in a grand cosmic calculation!`,'Once upon a time, young ParisNeo dove so deep into "The Matrix" that he watched it 60 times in two months, practically becoming a human DVD player! Fast forward to today, and this same Matrix-obsessed kid grew up to create LoLLMs, where AI personas are like digital kung-fu masters, and users are the chosen ones. Talk about life imitating art - ParisNeo went from "I know kung fu" to "I code AI"! Who knew binge-watching could lead to bending the rules of AI reality?',"Did you know? The first computer programmer was a woman - Ada Lovelace!","Large Language Models (LLMs) have evolved from having millions of parameters to hundreds of billions in just a few years.","LoLLMs (Lord of Large Language Multimodal Systems) is an open-source AI assistant platform created by ParisNeo.","Saïph (κ Orionis) is a blue-white supergiant star approximately 650 light-years away from Earth.","Neural networks were first proposed in 1943 by Warren McCulloch and Walter Pitts.","Modern LLMs like GPT-4 can understand and generate multiple languages, code, and even analyze images.","LoLLMs supports multiple AI models and can perform tasks like code interpretation, image analysis, and internet searches.","The term 'transformer' in AI, which powers most modern LLMs, was introduced in the 'Attention is All You Need' paper in 2017.","LoLLMs can generate various types of diagrams, including SVG, Graphviz, and Mermaid diagrams.","The Python programming language was named after Monty Python.","LoLLMs features a built-in code interpreter that can execute multiple programming languages.","Quantum computers can perform calculations in minutes that would take classical computers thousands of years.","LoLLMs supports multimodal interactions, allowing users to work with both text and images.","The name Saïph in Arabic (سيف) means 'sword', symbolizing cutting-edge AI technology.",'
',"LoLLMs' version naming often contains clever easter eggs and references to AI advancements.","The 'Strawberry' version of LoLLMs was a playful nod to ChatGPT's internal codename for one of its versions.","The 'Saïph' version name was an intentional reference to Orion, anticipating OpenAI's rumored AGI-capable model codenamed 'Orion'.","LoLLMs' evolution can be traced through its version names: Warp, Starship, Robot, Brainwave, Strawberry, Feather and Saïph.","Each LoLLMs version name reflects either technological advancement or pays homage to significant developments in AI.","'Warp' and 'Starship' versions symbolized the quantum leap in AI capabilities and speed improvements.","'Robot' represented the system's growing autonomy and ability to perform complex tasks.","'Brainwave' highlighted the neural network aspects and cognitive capabilities of the system.","LoLLMs' version naming shows ParisNeo's keen awareness of industry trends and playful approach to development.","LoLLMs can generate and visualize mathematical equations using LaTeX, making it a powerful tool for scientific documentation.","The system's multimodel capabilities allow it to analyze medical images, architectural blueprints, and technical diagrams.","LoLLMs includes a unique feature called 'personality system' that allows it to adapt its communication style and expertise.","Did you know? LoLLMs can process and generate music notation using ABC notation or LilyPond formats.","LoLLMs supports over 2000 different AI models, making it one of the most versatile open-source AI platforms.","The system can generate realistic 3D scenes descriptions that can be rendered using tools like Blender.","LoLLMs features a unique 'model fusion' capability, combining strengths of different AI models for better results.","The platform includes specialized modules for scientific computing, allowing it to solve complex mathematical problems.","LoLLMs can analyze and generate code in over 20 programming languages, including rare ones like COBOL and Fortran.","The system includes advanced prompt engineering tools, helping users get better results from AI models.","LoLLMs can generate and interpret QR codes, making it useful for creating interactive marketing materials.","The platform supports real-time voice interaction through its advanced speech-to-text and text-to-speech capabilities.","LoLLMs can analyze satellite imagery for environmental monitoring and urban planning applications.","The system includes specialized modules for protein folding prediction and molecular visualization.","LoLLMs features a built-in 'ethical AI' framework that ensures responsible and bias-aware AI interactions.","The platform can generate realistic synthetic data while preserving privacy and maintaining statistical properties.","LoLLMs includes advanced natural language processing capabilities in over 100 languages.","The system can perform sentiment analysis on social media trends and customer feedback in real-time.","LoLLMs features a unique 'time-aware' context system that understands and reasons about temporal relationships.","The world's first computer programmer was a woman named Ada Lovelace.","There are more possible iterations of a game of chess than there are atoms in the known universe.","The first AI program was written in 1951 to play checkers.","The Internet was originally called ARPANET and was developed by the US Department of Defense.","The concept of zero as a number was developed in ancient India, with the earliest known text using it dating to 458 CE.","Light from the Sun takes about 8 minutes and 20 seconds to reach Earth.","The first mobile phone call was made in 1973 by Martin Cooper.","The human brain processes images 60,000 times faster than text.","The most powerful supercomputer today can perform about 442 quadrillion calculations per second.","The ancient Egyptians invented the 365-day calendar we still use today.","Mathematicians have calculated pi to over 62 trillion digits.","Quantum computers can theoretically solve certain problems in seconds that would take classical computers billions of years.","The first email was sent in 1971 by Ray Tomlinson.","The Hubble Space Telescope can see galaxies so far away, it's like looking back in time billions of years.","The largest known prime number has over 24 million digits.","AI can now generate realistic images, music, and even write stories.","The Great Wall of China is not visible from space with the naked eye, contrary to popular belief.","There are more possible ways to shuffle a deck of 52 cards than there are atoms on Earth.","The first computer virus was created in 1983 as an experiment.","The speed of light in a vacuum is exactly 299,792,458 meters per second.","ParisNeo started coding at age 11 after an older programmer refused to teach him BASIC programming","ParisNeo learned BASIC by reverse engineering other people's games, even before he learned English","At age 12, ParisNeo co-created SAIF14, a suite of programs on a Tandy 1000 computer built by two kids","LoLLMs runs on a custom-built gaming PC that ParisNeo assembled and configured himself","The project started as a simple Chrome plugin called 'chatgpt personality selector'","ParisNeo's summer bet involved watching The Matrix 60 times in one month (twice daily) while his uncle gave up","The name LoLLMs was inspired by 'Lord of the Rings', positioning itself as 'one tool to rule them all'","LoLLMs has a 'Personalities Zoo' with over 500 different AI personas","The project evolved from handling just language models to becoming a multimodal system, hence the 'M' in LoLLMs","ParisNeo's difficulty with academic writing led him to develop AI solutions for writing assistance","LoLLMs' development was influenced by science fiction concepts from Wall-E, Terminator, and The Hitchhiker's Guide to the Galaxy","The project went from being 'GPT4All WebUI' to 'Lord of Large Language Models' before becoming 'Lord of Large Language & Multimodal Systems'","ParisNeo received early access to GPT-3 and used it to push the boundaries of what was possible with AI","The project maintains a philosophy of 'Don't panic, bring a towel, and trust in AI' - a reference to The Hitchhiker's Guide to the Galaxy","Despite having multiple patents in various fields, ParisNeo's interest in AI was sparked when he read about AlexNet in 2012","LoLLMs receives daily updates, similar to course corrections on a starship","ParisNeo's journey into programming shows his determination - he taught himself BASIC by reverse engineering games before he even knew English"],randomFact:"",showPlaceholderModal:!1,selectedPrompt:"",placeholders:[],placeholderValues:{},previewPrompt:"",uniquePlaceholders:new Map,bindingSearchQuery:"",modelSearchQuery:"",personalitySearchQuery:"",isSearching:!1,isPersonalitiesMenuVisible:!1,isSkillsLibraryMenuVisible:!1,isModelsMenuVisible:!1,isBindingsMenuVisible:!1,isMenuVisible:!1,isNavMenuVisible:!1,static_info:Hmt,animated_info:qmt,normal_mode:$mt,fun_mode:Ymt,is_first_connection:!0,discord:zmt,FastAPI:Vmt,modelImgPlaceholder:Wn,customLanguage:"",rebooting_audio:new Audio("rebooting.wav"),connection_lost_audio:new Audio("connection_lost.wav"),connection_recovered_audio:new Audio("connection_recovered.wav"),database_selectorDialogVisible:!1,progress_visibility:!1,progress_value:0,codeBlockStylesheet:"",lastMessageHtml:"",defaultMessageHtml:` + Endpoint error: `+s.message,4,!1)}}):this.$store.state.toast.showToast("Personality has no settings",4,!1))})}catch(e){this.$store.state.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},async constructor(){for(Ue(()=>{Ge.replace()});this.$store.state.ready===!1;)await new Promise(n=>setTimeout(n,100));this.onReady()},async api_get_req(n){try{const e=await te.get("/"+n);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(n){n.target.src=j0}}},tht={class:"relative group/item"},nht=["src","alt"],sht={class:"absolute bottom-6 left-0 w-full flex items-center justify-center opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 p-1"},iht={class:"p-1 bg-gray-500 rounded-full text-white hover:bg-gray-600 focus:outline-none ml-1",title:"Show more"},rht={class:"text-xs font-bold"};function oht(n,e,t,s,i,r){const o=Je("UniversalForm");return T(),x(Le,null,[l("div",tht,[l("button",{onClick:e[1]||(e[1]=$((...a)=>r.onSettingsPersonality&&r.onSettingsPersonality(...a),["prevent"])),class:Pe(["w-6 h-6 rounded-full overflow-hidden transition-transform duration-200 transform group-hover/item:scale-110 focus:outline-none relative",{"glow-effect":n.$store.state.config.activate_skills_lib}])},[l("img",{src:r.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...a)),alt:r.mountedPers.name,class:Pe(["w-full h-full object-cover",{"border-2 border-secondary":n.isActive}])},null,42,nht)],2),l("div",sht,[l("button",{onClick:e[2]||(e[2]=$(a=>r.remount_personality(),["prevent"])),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Remount"},e[4]||(e[4]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)])),l("button",{onClick:e[3]||(e[3]=$(a=>r.handleOnTalk(),["prevent"])),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none ml-1",title:"Talk"},e[5]||(e[5]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})],-1)])),l("button",iht,[l("span",rht,"+"+Y(r.mountedPersArr.length-1),1)])])]),z(o,{ref:"universalForm",class:"z-50"},null,512)],64)}const MN=st(eht,[["render",oht],["__scopeId","data-v-31178107"]]),aht={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center overflow-hidden"},lht={key:0,class:"absolute inset-0 pointer-events-none overflow-hidden"},cht={class:"flex flex-col items-center text-center max-w-4xl w-full px-4 relative z-10"},dht={class:"mb-8 w-full"},uht={class:"text-5xl md:text-6xl font-bold mb-2 hover:scale-105 transition-transform lollms-title-style"},pht={class:"bottom-0 text-2xl italic"},fht={class:"text-lg"},_ht=["innerHTML"],mht={class:"animated-progressbar-bg"},hht={class:"w-full max-w-2xl"},ght={role:"status",class:"w-full"},bht={class:"text-xl"},yht={class:"text-2xl font-bold mt-2"},Eht={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-[16rem]"},vht={class:"logo-container"},Sht=["src"],Tht={class:"toolbar discussion"},xht={class:"toolbar-container"},Cht={class:"p-4 flex flex-wrap gap-2 items-center"},wht={class:"p-4 flex flex-wrap gap-2 items-center"},Rht={class:"relative"},Aht={class:"relative"},Mht={key:0,title:"Loading..",class:"flex justify-center"},Nht={key:1,class:"flex justify-center space-x-4"},Iht={key:2,class:"flex flex-col space-y-2"},Oht={class:"relative inline-block"},kht={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Dht={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Lht={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Pht=["onClick","title"],Fht=["src","alt"],Uht=["title"],Bht={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},Ght=["onClick"],Vht={class:"flex space-x-1"},zht=["onClick"],Hht=["src","title"],qht={class:"relative inline-block"},Yht={class:"p-2 border-b border-gray-200 dark:border-gray-700"},$ht={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Wht={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Kht=["onClick","title"],jht=["src","alt"],Qht=["title"],Xht={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},Zht=["onClick"],Jht={class:"flex space-x-1"},egt=["onClick"],tgt=["src","title"],ngt={class:"relative inline-block"},sgt={class:"p-2 border-b border-gray-200 dark:border-gray-700"},igt={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},rgt={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},ogt=["onClick","title"],agt=["src","alt"],lgt=["title"],cgt={class:"absolute top-0 left-0 w-full h-full opacity-0 group-hover/item:opacity-100 transition-opacity duration-200 bg-white dark:bg-gray-900 rounded-md shadow-md p-2 flex flex-col items-center justify-center"},dgt=["onClick"],ugt={class:"flex space-x-1"},pgt=["onClick"],fgt=["onClick"],_gt=["onClick"],mgt={class:"personalities-container"},hgt={class:"w-auto max-w-md mx-auto p-2"},ggt={class:"flex items-center"},bgt={class:"relative flex-grow"},ygt={key:0,class:"w-full p-4 bg-bg-light dark:bg-bg-dark"},Egt={class:"flex flex-col space-y-2"},vgt={key:0},Sgt={key:1,class:"flex space-x-2"},Tgt={key:1,class:"flex space-x-2"},xgt={class:"flex space-x-2"},Cgt={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},wgt={key:1,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},Rgt={class:"flex flex-row items-center justify-center panels-color"},Agt={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},Mgt={key:0,class:"relative flex flex-col flex-grow"},Ngt={class:"container pt-4 pb-50 mb-50 w-full"},Igt={key:0,class:"w-full rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col overflow-hidden p-4 pb-2"},Ogt={class:"overflow-x-auto flex-grow scrollbar-thin scrollbar-thumb-gray-400 dark:scrollbar-thumb-gray-600 scrollbar-track-gray-200 dark:scrollbar-track-gray-800 scrollbar-thumb-rounded-full scrollbar-track-rounded-full"},kgt={class:"flex flex-nowrap gap-6 p-4 min-w-full"},Dgt=["title","onClick"],Lgt={class:"space-y-3"},Pgt=["title"],Fgt=["title"],Ugt={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},Bgt={class:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] flex flex-col"},Ggt={class:"flex-1 flex flex-col min-h-0"},Vgt={class:"mb-4 p-4 bg-gray-100 dark:bg-gray-700 rounded-lg"},zgt={class:"flex-1 h-[200px] overflow-y-auto scrollbar scrollbar-thumb-gray-400 dark:scrollbar-thumb-gray-500 scrollbar-track-gray-200 dark:scrollbar-track-gray-700 scrollbar-thin rounded-md"},Hgt={class:"text-base whitespace-pre-wrap"},qgt={class:"flex-1 overflow-y-auto"},Ygt={class:"space-y-4"},$gt=["for"],Wgt=["id","onUpdate:modelValue","placeholder"],Kgt=["id","onUpdate:modelValue"],jgt=["id","onUpdate:modelValue"],Qgt=["id","onUpdate:modelValue"],Xgt={key:4,class:"border rounded-md overflow-hidden"},Zgt={class:"bg-gray-200 dark:bg-gray-900 p-2 text-sm"},Jgt=["id","onUpdate:modelValue"],ebt=["id","onUpdate:modelValue"],tbt=["value"],nbt={class:"mt-6 flex justify-end space-x-4"},sbt={key:0,class:"flex flex-row items-center justify-center h-10"},ibt={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-1/2 bg-bg-light-tone dark:bg-bg-dark-tone h-full"},rbt={ref:"isolatedContent",class:"h-full"},obt={role:"status",class:"fixed m-0 p-2 left-2 bottom-2 min-w-[24rem] max-w-[24rem] h-20 flex flex-col justify-center items-center pb-4 bg-blue-500 rounded-lg shadow-lg z-50 background-a"},abt={class:"text-2xl animate-pulse mt-2 text-white"},lbt={id:"app"},cbt=n=>{const e=n.replace("[","").replace("]","").split("::"),t=e[0];if(e.length===1)return{label:t,type:"text",fullText:n};const s=e[1],i={label:t,type:s,fullText:n};switch(s){case"int":case"float":case"multiline":break;case"code":i.language=e[2]||"plaintext";break;case"options":i.options=e[2]?e[2].split(",").map(r=>r.trim()):[];break;default:i.type="text"}return i},dbt="/",ubt={setup(){},data(){return{interestingFacts:["ParisNeo, the creator of LoLLMs, originally built his high-performance PC to play Cyberpunk 2077. However, his passion for AI took an unexpected turn, leading him to develop LoLLMs instead. Ironically, he never found the time to actually play the game that inspired his powerful setup!","Saïph, version 14 of LoLLMs, is named after a star in Orion's constellation (Kappa Orionis), representing bright guidance in AI!","At 12, ParisNeo coded 'Saif14' in BASIC on a Tandy 1000, an 'all-in-one' suite named with a friend. LoLLMs v14 'Saïph' - a star in Orion - echoes this BASIC creation's spirit and hints at OpenAI's future.",`The new AI Village app in LoLLMs, simulating AI agents believing they're human, mirrors "The Hitchhiker's Guide to the Galaxy" (ParisNeo's favorite) where Earth was a simulation to compute the Ultimate Question. Both explore the idea of unsuspecting inhabitants participating in a grand cosmic calculation!`,'Once upon a time, young ParisNeo dove so deep into "The Matrix" that he watched it 60 times in two months, practically becoming a human DVD player! Fast forward to today, and this same Matrix-obsessed kid grew up to create LoLLMs, where AI personas are like digital kung-fu masters, and users are the chosen ones. Talk about life imitating art - ParisNeo went from "I know kung fu" to "I code AI"! Who knew binge-watching could lead to bending the rules of AI reality?',"Did you know? The first computer programmer was a woman - Ada Lovelace!","Large Language Models (LLMs) have evolved from having millions of parameters to hundreds of billions in just a few years.","LoLLMs (Lord of Large Language Multimodal Systems) is an open-source AI assistant platform created by ParisNeo.","Saïph (κ Orionis) is a blue-white supergiant star approximately 650 light-years away from Earth.","Neural networks were first proposed in 1943 by Warren McCulloch and Walter Pitts.","Modern LLMs like GPT-4 can understand and generate multiple languages, code, and even analyze images.","LoLLMs supports multiple AI models and can perform tasks like code interpretation, image analysis, and internet searches.","The term 'transformer' in AI, which powers most modern LLMs, was introduced in the 'Attention is All You Need' paper in 2017.","LoLLMs can generate various types of diagrams, including SVG, Graphviz, and Mermaid diagrams.","The Python programming language was named after Monty Python.","LoLLMs features a built-in code interpreter that can execute multiple programming languages.","Quantum computers can perform calculations in minutes that would take classical computers thousands of years.","LoLLMs supports multimodal interactions, allowing users to work with both text and images.","The name Saïph in Arabic (سيف) means 'sword', symbolizing cutting-edge AI technology.",'
',"LoLLMs' version naming often contains clever easter eggs and references to AI advancements.","The 'Strawberry' version of LoLLMs was a playful nod to ChatGPT's internal codename for one of its versions.","The 'Saïph' version name was an intentional reference to Orion, anticipating OpenAI's rumored AGI-capable model codenamed 'Orion'.","LoLLMs' evolution can be traced through its version names: Warp, Starship, Robot, Brainwave, Strawberry, Feather and Saïph.","Each LoLLMs version name reflects either technological advancement or pays homage to significant developments in AI.","'Warp' and 'Starship' versions symbolized the quantum leap in AI capabilities and speed improvements.","'Robot' represented the system's growing autonomy and ability to perform complex tasks.","'Brainwave' highlighted the neural network aspects and cognitive capabilities of the system.","LoLLMs' version naming shows ParisNeo's keen awareness of industry trends and playful approach to development.","LoLLMs can generate and visualize mathematical equations using LaTeX, making it a powerful tool for scientific documentation.","The system's multimodel capabilities allow it to analyze medical images, architectural blueprints, and technical diagrams.","LoLLMs includes a unique feature called 'personality system' that allows it to adapt its communication style and expertise.","Did you know? LoLLMs can process and generate music notation using ABC notation or LilyPond formats.","LoLLMs supports over 2000 different AI models, making it one of the most versatile open-source AI platforms.","The system can generate realistic 3D scenes descriptions that can be rendered using tools like Blender.","LoLLMs features a unique 'model fusion' capability, combining strengths of different AI models for better results.","The platform includes specialized modules for scientific computing, allowing it to solve complex mathematical problems.","LoLLMs can analyze and generate code in over 20 programming languages, including rare ones like COBOL and Fortran.","The system includes advanced prompt engineering tools, helping users get better results from AI models.","LoLLMs can generate and interpret QR codes, making it useful for creating interactive marketing materials.","The platform supports real-time voice interaction through its advanced speech-to-text and text-to-speech capabilities.","LoLLMs can analyze satellite imagery for environmental monitoring and urban planning applications.","The system includes specialized modules for protein folding prediction and molecular visualization.","LoLLMs features a built-in 'ethical AI' framework that ensures responsible and bias-aware AI interactions.","The platform can generate realistic synthetic data while preserving privacy and maintaining statistical properties.","LoLLMs includes advanced natural language processing capabilities in over 100 languages.","The system can perform sentiment analysis on social media trends and customer feedback in real-time.","LoLLMs features a unique 'time-aware' context system that understands and reasons about temporal relationships.","The world's first computer programmer was a woman named Ada Lovelace.","There are more possible iterations of a game of chess than there are atoms in the known universe.","The first AI program was written in 1951 to play checkers.","The Internet was originally called ARPANET and was developed by the US Department of Defense.","The concept of zero as a number was developed in ancient India, with the earliest known text using it dating to 458 CE.","Light from the Sun takes about 8 minutes and 20 seconds to reach Earth.","The first mobile phone call was made in 1973 by Martin Cooper.","The human brain processes images 60,000 times faster than text.","The most powerful supercomputer today can perform about 442 quadrillion calculations per second.","The ancient Egyptians invented the 365-day calendar we still use today.","Mathematicians have calculated pi to over 62 trillion digits.","Quantum computers can theoretically solve certain problems in seconds that would take classical computers billions of years.","The first email was sent in 1971 by Ray Tomlinson.","The Hubble Space Telescope can see galaxies so far away, it's like looking back in time billions of years.","The largest known prime number has over 24 million digits.","AI can now generate realistic images, music, and even write stories.","The Great Wall of China is not visible from space with the naked eye, contrary to popular belief.","There are more possible ways to shuffle a deck of 52 cards than there are atoms on Earth.","The first computer virus was created in 1983 as an experiment.","The speed of light in a vacuum is exactly 299,792,458 meters per second.","ParisNeo started coding at age 11 after an older programmer refused to teach him BASIC programming","ParisNeo learned BASIC by reverse engineering other people's games, even before he learned English","At age 12, ParisNeo co-created SAIF14, a suite of programs on a Tandy 1000 computer built by two kids","LoLLMs runs on a custom-built gaming PC that ParisNeo assembled and configured himself","The project started as a simple Chrome plugin called 'chatgpt personality selector'","ParisNeo's summer bet involved watching The Matrix 60 times in one month (twice daily) while his uncle gave up","The name LoLLMs was inspired by 'Lord of the Rings', positioning itself as 'one tool to rule them all'","LoLLMs has a 'Personalities Zoo' with over 500 different AI personas","The project evolved from handling just language models to becoming a multimodal system, hence the 'M' in LoLLMs","ParisNeo's difficulty with academic writing led him to develop AI solutions for writing assistance","LoLLMs' development was influenced by science fiction concepts from Wall-E, Terminator, and The Hitchhiker's Guide to the Galaxy","The project went from being 'GPT4All WebUI' to 'Lord of Large Language Models' before becoming 'Lord of Large Language & Multimodal Systems'","ParisNeo received early access to GPT-3 and used it to push the boundaries of what was possible with AI","The project maintains a philosophy of 'Don't panic, bring a towel, and trust in AI' - a reference to The Hitchhiker's Guide to the Galaxy","Despite having multiple patents in various fields, ParisNeo's interest in AI was sparked when he read about AlexNet in 2012","LoLLMs receives daily updates, similar to course corrections on a starship","ParisNeo's journey into programming shows his determination - he taught himself BASIC by reverse engineering games before he even knew English"],randomFact:"",showPlaceholderModal:!1,selectedPrompt:"",placeholders:[],placeholderValues:{},previewPrompt:"",uniquePlaceholders:new Map,bindingSearchQuery:"",modelSearchQuery:"",personalitySearchQuery:"",isSearching:!1,isPersonalitiesMenuVisible:!1,isSkillsLibraryMenuVisible:!1,isModelsMenuVisible:!1,isBindingsMenuVisible:!1,isMenuVisible:!1,isNavMenuVisible:!1,static_info:qmt,animated_info:Ymt,normal_mode:Wmt,fun_mode:$mt,is_first_connection:!0,discord:Hmt,FastAPI:zmt,modelImgPlaceholder:Wn,customLanguage:"",rebooting_audio:new Audio("rebooting.wav"),connection_lost_audio:new Audio("connection_lost.wav"),connection_recovered_audio:new Audio("connection_recovered.wav"),database_selectorDialogVisible:!1,progress_visibility:!1,progress_value:0,codeBlockStylesheet:"",lastMessageHtml:"",defaultMessageHtml:` @@ -302,7 +302,7 @@ If You are using windows, this will install wsl so you need to activate it. - `,memory_icon:Wmt,active_skills:Kmt,inactive_skills:jmt,skillsRegistry:Qmt,robot:Xmt,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CONTENT:1,MSG_TYPE_CONTENT_INVISIBLE_TO_AI:2,MSG_TYPE_CONTENT_INVISIBLE_TO_USER:3},operationTypes:{MSG_OPERATION_TYPE_ADD_CHUNK:0,MSG_OPERATION_TYPE_SET_CONTENT:1,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI:2,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_USER:3,MSG_OPERATION_TYPE_EXCEPTION:4,MSG_OPERATION_TYPE_WARNING:5,MSG_OPERATION_TYPE_INFO:6,MSG_OPERATION_TYPE_STEP:7,MSG_OPERATION_TYPE_STEP_START:8,MSG_OPERATION_TYPE_STEP_PROGRESS:9,MSG_OPERATION_TYPE_STEP_END_SUCCESS:10,MSG_OPERATION_TYPE_STEP_END_FAILURE:11,MSG_OPERATION_TYPE_JSON_INFOS:12,MSG_OPERATION_TYPE_REF:13,MSG_OPERATION_TYPE_CODE:14,MSG_OPERATION_TYPE_UI:15,MSG_OPERATION_TYPE_NEW_MESSAGE:16,MSG_OPERATION_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,isOpen:!1,discussion_id:0}},methods:{updateRandomFact(){let n;do n=this.interestingFacts[Math.floor(Math.random()*this.interestingFacts.length)];while(n===this.randomFact&&this.interestingFacts.length>1);this.randomFact=n},handleOnTalk(n){this.showPersonalities=!1,this.$store.state.toast.showToast(`Personality ${n.name} is Talking`,4,!0),this.onTalk(n)},onPersonalitiesReadyFun(){this.$store.state.personalities_ready=!0},async showBindingHoveredIn(n){this.bindingHoveredIndex=n},async showBindingHoveredOut(){this.bindingHoveredIndex=null},async showModelHoveredIn(n){this.modelHoveredIndex=n},async showModelHoveredOut(){this.modelHoveredIndex=null},async showPersonalityHoveredIn(n){this.personalityHoveredIndex=n},async showPersonalityHoveredOut(){this.personalityHoveredIndex=null},async onPersonalitySelected(n){if(this.hidePersonalitiesMenu(),n){if(n.selected){this.$store.state.toast.showToast("Personality already selected",4,!0);return}const e=n.full_path;if(this.$store.state.config.personalities.includes(e)){const t=await this.select_personality(n);await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshMountedPersonalities"),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage"),await this.$store.dispatch("fetchisRTOn"),t&&t.status&&t.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: + `,memory_icon:Kmt,active_skills:jmt,inactive_skills:Qmt,skillsRegistry:Xmt,robot:Zmt,posts_headers:{accept:"application/json","Content-Type":"application/json"},host:"",progress_visibility_val:!0,progress_value:0,msgTypes:{MSG_TYPE_CONTENT:1,MSG_TYPE_CONTENT_INVISIBLE_TO_AI:2,MSG_TYPE_CONTENT_INVISIBLE_TO_USER:3},operationTypes:{MSG_OPERATION_TYPE_ADD_CHUNK:0,MSG_OPERATION_TYPE_SET_CONTENT:1,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI:2,MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_USER:3,MSG_OPERATION_TYPE_EXCEPTION:4,MSG_OPERATION_TYPE_WARNING:5,MSG_OPERATION_TYPE_INFO:6,MSG_OPERATION_TYPE_STEP:7,MSG_OPERATION_TYPE_STEP_START:8,MSG_OPERATION_TYPE_STEP_PROGRESS:9,MSG_OPERATION_TYPE_STEP_END_SUCCESS:10,MSG_OPERATION_TYPE_STEP_END_FAILURE:11,MSG_OPERATION_TYPE_JSON_INFOS:12,MSG_OPERATION_TYPE_REF:13,MSG_OPERATION_TYPE_CODE:14,MSG_OPERATION_TYPE_UI:15,MSG_OPERATION_TYPE_NEW_MESSAGE:16,MSG_OPERATION_TYPE_FINISHED_MESSAGE:17},senderTypes:{SENDER_TYPES_USER:0,SENDER_TYPES_AI:1,SENDER_TYPES_SYSTEM:2},list:[],tempList:[],currentDiscussion:{},discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,isCreated:!1,isCheckbox:!1,isSelectAll:!1,showSaveConfirmation:!1,showBrainConfirmation:!1,showConfirmation:!1,chime:new Audio("chime_aud.wav"),showToast:!1,isDiscussionBottom:!1,personalityAvatars:[],fileList:[],database_selectorDialogVisible:!1,isDragOverDiscussion:!1,isDragOverChat:!1,isOpen:!1,discussion_id:0}},methods:{updateRandomFact(){let n;do n=this.interestingFacts[Math.floor(Math.random()*this.interestingFacts.length)];while(n===this.randomFact&&this.interestingFacts.length>1);this.randomFact=n},handleOnTalk(n){this.showPersonalities=!1,this.$store.state.toast.showToast(`Personality ${n.name} is Talking`,4,!0),this.onTalk(n)},onPersonalitiesReadyFun(){this.$store.state.personalities_ready=!0},async showBindingHoveredIn(n){this.bindingHoveredIndex=n},async showBindingHoveredOut(){this.bindingHoveredIndex=null},async showModelHoveredIn(n){this.modelHoveredIndex=n},async showModelHoveredOut(){this.modelHoveredIndex=null},async showPersonalityHoveredIn(n){this.personalityHoveredIndex=n},async showPersonalityHoveredOut(){this.personalityHoveredIndex=null},async onPersonalitySelected(n){if(this.hidePersonalitiesMenu(),n){if(n.selected){this.$store.state.toast.showToast("Personality already selected",4,!0);return}const e=n.full_path;if(this.$store.state.config.personalities.includes(e)){const t=await this.select_personality(n);await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshMountedPersonalities"),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage"),await this.$store.dispatch("fetchisRTOn"),t&&t.status&&t.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: `+n.name,4,!0):this.$store.state.toast.showToast(`Error on select personality: `+n.name,4,!1)}this.$emit("personalitySelected"),Ue(()=>{Ge.replace()})}},async select_personality(n){if(!n)return{status:!1,error:"no personality - select_personality"};const e=n.full_path,t=this.$store.state.config.personalities.findIndex(i=>i===e),s={client_id:this.$store.state.client_id,id:t};try{const i=await te.post("/select_personality",s);if(i)return this.$store.dispatch("refreshConfig").then(()=>{this.$store.dispatch("refreshPersonalitiesZoo").then(()=>{this.$store.dispatch("refreshMountedPersonalities")})}),i.data}catch(i){console.log(i.message,"select_personality - settings");return}},showPersonalitiesMenu(){clearTimeout(this.hideMenuTimeout),this.isPersonalitiesMenuVisible=!0},showSkillsLibraryMenu(){clearTimeout(this.hideSkillsLibraryMenuTimeout),this.isSkillsLibraryMenuVisible=!0},hideSkillsLibraryMenu(){this.hideMenuTimeout=setTimeout(()=>{this.isSkillsLibraryMenuVisible=!1},300)},hidePersonalitiesMenu(){this.hideMenuTimeout=setTimeout(()=>{this.isPersonalitiesMenuVisible=!1},300)},copyModelName(){navigator.clipboard.writeText(this.binding_name+"::"+this.model_name),this.$store.state.toast.showToast("Model name copyed to clipboard: "+this.binding_name+"::"+this.model_name,4,!0)},copyModelNameFrom(n){navigator.clipboard.writeText(this.binding_name+"::"+n),this.$store.state.toast.showToast("Model name copyed to clipboard: "+this.binding_name+"::"+this.model_name,4,!0)},showBindingsMenu(){clearTimeout(this.hideBindingsMenuTimeout),this.isBindingsMenuVisible=!0},hideBindingsMenu(){this.hideBindingsMenuTimeout=setTimeout(()=>{this.isBindingsMenuVisible=!1},300)},setBinding(n){this.selecting_binding=!0,this.selectedBinding=n,this.$store.state.messageBox.showBlockingMessage("Loading binding"),te.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"binding_name",setting_value:n.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshBindings"),await this.$store.dispatch("refreshModelsZoo"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Binding changed to ${this.currentBinding.name}`,4,!0),this.selecting_binding=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_binding=!1})},showModelsMenu(){clearTimeout(this.hideModelsMenuTimeout),this.isModelsMenuVisible=!0},hideModelsMenu(){this.hideModelsMenuTimeout=setTimeout(()=>{this.isModelsMenuVisible=!1},300)},setModel(n){this.selecting_model=!0,this.selectedModel=n,this.$store.state.messageBox.showBlockingMessage("Loading model"),te.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:n.name}).then(async e=>{this.$store.state.messageBox.hideMessage(),await this.$store.dispatch("refreshConfig"),await this.$store.dispatch("refreshModels"),this.$store.state.toast.showToast(`Model changed to ${this.currentModel.name}`,4,!0),this.selecting_model=!1}).catch(e=>{this.$store.state.messageBox.hideMessage(),this.$store.state.toast.showToast(`Error ${e}`,4,!0),this.selecting_model=!1})},showModelConfig(){try{this.isLoading=!0,te.get("/get_active_binding_settings").then(n=>{this.isLoading=!1,n&&(n.data&&Object.keys(n.data).length>0?this.$store.state.universalForm.showForm(n.data,"Binding settings ","Save changes","Cancel").then(e=>{try{te.post("/set_active_binding_settings",{client_id:this.$store.state.client_id,settings:e}).then(t=>{t&&t.data?this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0):(this.$store.state.toast.showToast(`Did not get binding settings responses. `+t,4,!1),this.isLoading=!1)})}catch(t){this.$store.state.toast.showToast(`Did not get binding settings responses. @@ -321,15 +321,15 @@ ${e} ${c}`;navigator.clipboard.writeText(d)}else navigator.clipboard.writeText(e);this.$store.state.toast.showToast("Copied to clipboard successfully",4,!0),Ue(()=>{Ge.replace()})},closeToast(){this.showToast=!1},saveJSONtoFile(n,e){e=e||"data.json";const t=document.createElement("a");t.href=URL.createObjectURL(new Blob([JSON.stringify(n,null,2)],{type:"text/plain"})),t.setAttribute("download",e),document.body.appendChild(t),t.click(),document.body.removeChild(t)},saveMarkdowntoFile(n,e){e=e||"data.md";const t=document.createElement("a");t.href=URL.createObjectURL(new Blob([n],{type:"text/plain"})),t.setAttribute("download",e),document.body.appendChild(t),t.click(),document.body.removeChild(t)},parseJsonObj(n){try{return JSON.parse(n)}catch(e){return this.$store.state.toast.showToast(`Could not parse JSON. `+e.message,4,!1),null}},async parseJsonFile(n){return new Promise((e,t)=>{const s=new FileReader;s.onload=i=>e(this.parseJsonObj(i.target.result)),s.onerror=i=>t(i),s.readAsText(n)})},async exportDiscussionsAsMarkdown(){const n=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(n.length>0){let e=new Date;const t=e.getFullYear(),s=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),o=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),d="discussions_export_"+(t+"."+s+"."+i+"."+r+o+a)+".md";this.loading=!0;const u=await this.export_multiple_discussions(n,"markdown");u?(this.saveMarkdowntoFile(u,d),this.$store.state.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$store.state.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async exportDiscussions(){},async exportDiscussionsAsJson(){const n=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(n.length>0){let e=new Date;const t=e.getFullYear(),s=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),o=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),d="discussions_export_"+(t+"."+s+"."+i+"."+r+o+a)+".json";this.loading=!0;const u=await this.export_multiple_discussions(n,"json");u?(this.saveJSONtoFile(u,d),this.$store.state.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this.$store.state.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async importDiscussionsBundle(n){},async importDiscussions(n){const e=await this.parseJsonFile(n.target.files[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1)},async getPersonalityAvatars(){for(;this.$store.state.personalities===null;)await new Promise(e=>setTimeout(e,100));let n=this.$store.state.personalities;this.personalityAvatars=n.map(e=>({name:e.name,avatar:e.avatar}))},getAvatar(n){if(n.toLowerCase().trim()==this.$store.state.config.user_name.toLowerCase().trim())return"user_infos/"+this.$store.state.config.user_avatar;const e=this.personalityAvatars.findIndex(s=>s.name===n),t=this.personalityAvatars[e];if(t)return t.avatar},setFileListChat(n){try{this.$refs.chatBox.fileList=this.$refs.chatBox.fileList.concat(n)}catch(e){this.$store.state.toast.showToast(`Failed to set filelist in chatbox -`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(n){if(n.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(n[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){this.randomFact=this.interestingFacts[Math.floor(Math.random()*this.interestingFacts.length)];const e=(await te.get("/get_versionID")).data.versionId;qe.onopen=()=>{this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.versionId!==e&&(this.$store.commit("updateVersionId",e),window.location.reload(!0)),this.$nextTick(()=>{Ge.replace()});try{this.$store.state.loading_infos="Getting version",this.$store.state.loading_progress=30,await this.$store.dispatch("getVersion")}catch(t){console.log("Error cought:",t)}try{for(this.$store.state.loading_infos="Loading Configuration";qe.id===void 0;)await new Promise(t=>setTimeout(t,100));this.$store.state.client_id=qe.id,await this.$store.dispatch("refreshConfig")}catch(t){console.log("Error cought:",t)}try{this.$store.state.loading_infos="Loading Database",this.$store.state.loading_progress=20,await this.$store.dispatch("refreshDatabase")}catch(t){console.log("Error cought:",t)}try{this.$store.state.loading_infos="Getting Bindings list",this.$store.state.loading_progress=40,await this.$store.dispatch("refreshBindings")}catch(t){console.log("Error cought:",t)}try{this.$store.state.loading_infos="Getting personalities zoo",this.$store.state.loading_progress=70,await this.$store.dispatch("refreshPersonalitiesZoo")}catch(t){console.log("Error cought:",t)}try{this.$store.state.loading_infos="Getting mounted personalities",this.$store.state.loading_progress=80,await this.$store.dispatch("refreshMountedPersonalities")}catch(t){console.log("Error cought:",t)}try{this.$store.state.loading_infos="Getting models zoo",this.$store.state.loading_progress=90,await this.$store.dispatch("refreshModelsZoo")}catch(t){console.log("Error cought:",t)}try{this.$store.state.loading_infos="Getting active models",this.$store.state.loading_progress=100,await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshModelStatus")}catch(t){console.log("Error cought:",t)}try{await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage")}catch(t){console.log("Error cought:",t)}try{await this.$store.dispatch("fetchisRTOn")}catch(t){console.log("Error cought:",t)}this.$store.state.isConnected=!0,this.$store.state.client_id=qe.id,this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),this.isCreated=!0,this.$store.state.ready=!0,qe.on("connected",this.socketIOConnected),qe.on("disconnected",this.socketIODisconnected),qe.on("show_progress",this.show_progress),qe.on("hide_progress",this.hide_progress),qe.on("update_progress",this.update_progress),qe.on("notification",this.notify),qe.on("new_message",this.new_message),qe.on("update_message",this.update_message),qe.on("close_message",this.finalMsgEvent),qe.on("disucssion_renamed",t=>{const s=this.list.findIndex(r=>r.id==t.discussion_id),i=this.list[s];i.title=t.title}),qe.onclose=t=>{this.socketIODisconnected()},qe.on("connect_error",t=>{t.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",t),this.$store.state.isConnected=!1}),qe.onerror=t=>{console.log("WebSocket connection error:",t.code,t.reason),this.socketIODisconnected(),qe.disconnect()}},beforeUnmount(){window.removeEventListener("resize",this.adjustMenuPosition)},async mounted(){window.addEventListener("keydown",this.handleShortcut),this.$store.state.news=this.$refs.news,this.$store.state.personality_editor=this.$refs.personality_editor,window.addEventListener("resize",this.adjustMenuPosition),qe.on("refresh_files",()=>{this.recoverFiles()})},async activated(){for(;this.isReady===!1;)await new Promise(n=>setTimeout(n,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&Ue(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)}),this.$store.state.config.show_news_panel&&this.$store.state.news.show()},components:{Discussion:X0,Message:fN,ChatBox:_N,WelcomeComponent:mN,ChoiceDialog:Q0,ProgressBar:C0,InputBox:Bpt,SkillsLibraryViewer:uN,PersonalityEditor:RN,PopupViewer:AN,ActionButton:OA,SocialIcon:kA,MountedPersonalities:MN,ChatBarButton:lp},watch:{installedModels:{immediate:!0,handler(n){this.$nextTick(()=>{this.installedModels=n})}},"$store.state.config.fun_mode":function(n,e){},"$store.state.isConnected":function(n,e){this.isConnected?this.is_first_connection||(this.$store.state.messageBox.hideMessage(),this.$store.state.messageBox.showMessage("Server connected."),this.$store.state.config.activate_audio_infos&&this.connection_recovered_audio.play()):(this.$store.state.messageBox.showBlockingMessage("Server suddenly disconnected. Please reboot the server to recover the connection"),this.is_first_connection=!1,this.$store.state.config.activate_audio_infos&&this.connection_lost_audio.play()),Ue(()=>{Ge.replace()})},messages:{handler:"extractHtml",deep:!0},progress_visibility_val(n){console.log("progress_visibility changed to "+n)},filterTitle(n){n==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(n){Ue(()=>{Ge.replace()}),n||(this.isSelectAll=!1)},socketConnected(n){console.log("Websocket connected (watch)",n)},showConfirmation(){Ue(()=>{Ge.replace()})}},computed:{parsedPlaceholders(){const n=new Map;return this.placeholders.forEach(e=>{const t=lbt(e);n.set(t.fullText,t)}),Array.from(n.values())},filteredBindings(){return this.installedBindings.filter(n=>n.name.toLowerCase().includes(this.bindingSearchQuery.toLowerCase()))},filteredModels(){return this.installedModels.filter(n=>n.name.toLowerCase().includes(this.modelSearchQuery.toLowerCase()))},filteredPersonalities(){return this.mountedPersonalities.filter(n=>n.name.toLowerCase().includes(this.personalitySearchQuery.toLowerCase()))},currentModel(){return this.$store.state.currentModel||{}},currentModelIcon(){return this.currentModel.icon||this.modelImgPlaceholder},binding_name(){return this.$store.state.config.binding_name},installedModels(){return this.$store.state.installedModels},model_name(){return this.$store.state.config.model_name},mountedPersonalities(){return this.$store.state.mountedPersArr},personality_name(){return this.$store.state.config.active_personality_id},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},installedBindings(){return this.$store.state.installedBindings},currentBindingIcon(){return this.currentBinding.icon||this.modelImgPlaceholder},currentBinding(){return this.$store.state.currentBinding||{}},isFullMode(){return this.$store.state.view_mode==="full"},storeLogo(){return this.$store.state.config?Gs:this.$store.state.config.app_custom_logo!=""?"/user_infos/"+this.$store.state.config.app_custom_logo:Gs},currentPersonConfig(){try{return this.$store.state.currentPersonConfig}catch{console.log("Error finding current personality configuration");return}},selectedPersonality(){try{return this.$store.state.selectedPersonality}catch{console.log("Error finding current personality configuration");return}},loading_infos(){return this.$store.state.loading_infos},is_fun_mode(){try{return this.$store.state.config?this.$store.state.config.fun_mode:!1}catch(n){return console.error("Oopsie! Looks like we hit a snag: ",n),!1}},isModelOK(){return this.$store.state.isModelOk},isGenerating(){return this.$store.state.isGenerating},isConnected(){return this.$store.state.isConnected},...dL({versionId:n=>n.versionId}),progress_visibility:{get(){return self.progress_visibility_val}},version_info:{get(){return this.$store.state.version!=null&&this.$store.state.version!="unknown"?this.$store.state.version:"..."}},loading_infos:{get(){return this.$store.state.loading_infos}},loading_progress:{get(){return this.$store.state.loading_progress}},isModelOk:{get(){return this.$store.state.isModelOk},set(n){this.$store.state.isModelOk=n}},isGenerating:{get(){return this.$store.state.isGenerating},set(n){this.$store.state.isGenerating=n}},personality(){const n=this.$store.state.config.personalities[this.$store.state.config.active_personality_id].split(":")[0];return this.$store.state.personalities.find(t=>t.full_path===n)},prompts_list(){return this.personality.prompts_list},formatted_database_name(){return this.$store.state.config.discussion_db_name},UseDiscussionHistory(){return this.$store.state.config.activate_skills_lib},isReady(){return this.$store.state.ready},databases(){return this.$store.state.databases},client_id(){return qe.id},showLeftPanel(){return console.log("showLeftPanel"),console.log(this.$store.state.leftPanelCollapsed),this.$store.state.ready&&!this.$store.state.leftPanelCollapsed},showRightPanel(){return console.log("showRightPanel"),console.log(this.$store.state.rightPanelCollapsed),this.$store.state.ready&&!this.$store.state.rightPanelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this.$store.commit("setIsConnected",!0),!0},socketDisconnected(){return this.$store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return Ue(()=>{Ge.replace()}),this.list.filter(n=>n.checkBoxValue==!0)}}},ubt=Object.assign(dbt,{__name:"DiscussionsView",setup(n){return di(()=>{wN()}),te.defaults.baseURL="/",(e,t)=>(T(),x(Le,null,[z(Bs,{name:"fade-and-fly"},{default:Ne(()=>[e.isReady?B("",!0):(T(),x("div",oht,[e.$store.state.theme_vars.activate_dropping_animation?(T(),x("div",aht,[(T(),x(Le,null,We(50,s=>l("div",{key:s,class:"absolute animate-fall animate-giggle",style:Vt({left:`${Math.random()*100}%`,top:"-20px",animationDuration:`${3+Math.random()*7}s`,animationDelay:`${Math.random()*5}s`})},Y(e.$store.state.theme_vars.falling_object),5)),64))])):B("",!0),l("div",lht,[l("div",cht,[l("div",dht,Y(e.$store.state.theme_vars.lollms_title),1),t[61]||(t[61]=l("p",{class:"text-2xl italic"}," One tool to rule them all ",-1)),t[62]||(t[62]=l("p",{class:"text-xl mb-6"}," by ParisNeo ",-1)),l("p",uht,Y(e.version_info),1),l("div",{class:"interesting-facts transition-transform duration-300 cursor-pointer",onClick:t[0]||(t[0]=(...s)=>e.updateRandomFact&&e.updateRandomFact(...s))},[l("p",pht,[t[60]||(t[60]=l("span",{class:"font-semibold"},"🤔 Fun Fact: ",-1)),l("span",{innerHTML:e.randomFact},null,8,fht)])]),l("div",_ht,[l("div",{class:"animated-progressbar-fg",style:Vt({width:`${e.loading_progress}%`})},null,4),l("div",{class:"absolute top-0 h-full flex items-center transition-all duration-300",style:Vt({left:`${e.loading_progress}%`,transform:"translateX(-50%)"})},null,4)])]),l("div",mht,[l("div",hht,[l("p",ght,Y(e.loading_infos)+"... ",1),l("p",bht,Y(Math.round(e.loading_progress))+"% ",1)])])])]))]),_:1}),z(Bs,{name:"slide-right"},{default:Ne(()=>[e.showLeftPanel?(T(),x("div",yht,[z(bt(Xd),{to:{name:"discussions"},class:"flex items-center space-x-2"},{default:Ne(()=>[l("div",Eht,[l("img",{class:"w-12 h-12 rounded-full object-cover logo-image",src:e.$store.state.config==null?bt(Gs):e.$store.state.config.app_custom_logo!=""?"/user_infos/"+e.$store.state.config.app_custom_logo:bt(Gs),alt:"Logo",title:"LoLLMS WebUI"},null,8,vht)]),t[63]||(t[63]=l("div",{class:"flex flex-col justify-center"},[l("div",{class:"text-center p-2"},[l("div",{class:"text-md relative inline-block"},[l("span",{class:"relative inline-block font-bold tracking-wide text-black dark:text-white"}," LoLLMS "),l("div",{class:"absolute -bottom-0.5 left-0 w-full h-0.5 bg-black dark:bg-white transform origin-left transition-transform duration-300 hover:scale-x-100 scale-x-0"})])]),l("p",{class:"text-gray-400 text-sm"},"One tool to rule them all")],-1))]),_:1}),l("div",Sht,[l("div",Tht,[l("button",{class:"toolbar-button",title:"Create new discussion",onClick:t[1]||(t[1]=(...s)=>e.createNewDiscussion&&e.createNewDiscussion(...s))},t[64]||(t[64]=[l("i",{"data-feather":"plus"},null,-1)])),e.loading?B("",!0):(T(),x("div",{key:0,class:"toolbar-button",onMouseleave:t[8]||(t[8]=(...s)=>e.hideSkillsLibraryMenu&&e.hideSkillsLibraryMenu(...s))},[k(l("div",{onMouseenter:t[6]||(t[6]=(...s)=>e.showSkillsLibraryMenu&&e.showSkillsLibraryMenu(...s)),class:"absolute m-0 p-0 z-50 top-full left-0 transform bg-white dark:bg-bg-dark rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[l("div",xht,[e.loading?B("",!0):(T(),x("button",{key:0,type:"button",onClick:t[2]||(t[2]=$((...s)=>e.addDiscussion2SkillsLibrary&&e.addDiscussion2SkillsLibrary(...s),["stop"])),title:"Add this discussion content to skills database",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},t[65]||(t[65]=[l("i",{"data-feather":"plus"},null,-1)]))),!e.loading&&e.$store.state.config.activate_skills_lib?(T(),x("button",{key:1,type:"button",onClick:t[3]||(t[3]=$((...s)=>e.toggleSkillsLib&&e.toggleSkillsLib(...s),["stop"])),title:"Skills database is activated",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},t[66]||(t[66]=[l("i",{"data-feather":"check-circle"},null,-1)]))):B("",!0),!e.loading&&!e.$store.state.config.activate_skills_lib?(T(),x("button",{key:2,type:"button",onClick:t[4]||(t[4]=$((...s)=>e.toggleSkillsLib&&e.toggleSkillsLib(...s),["stop"])),title:"Skills database is deactivated",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},t[67]||(t[67]=[l("i",{"data-feather":"x-octagon"},null,-1)]))):B("",!0),e.loading?B("",!0):(T(),x("button",{key:3,type:"button",onClick:t[5]||(t[5]=$((...s)=>e.showSkillsLib&&e.showSkillsLib(...s),["stop"])),title:"Show Skills database",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},t[68]||(t[68]=[l("i",{"data-feather":"book"},null,-1)])))])],544),[[_t,e.isSkillsLibraryMenuVisible]]),l("div",{onMouseenter:t[7]||(t[7]=(...s)=>e.showSkillsLibraryMenu&&e.showSkillsLibraryMenu(...s)),class:"menu-hover-area"},t[69]||(t[69]=[l("button",{class:"w-8 h-8",title:"Toggle Skills library menu"},[l("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M4 4v16h16V4H4zm2 2h12v12H6V6zm2 2h2v8H8V8zm3 0h2v8h-2V8zm3 0h2v8h-2V8z",fill:"currentColor"})])],-1)]),32)],32)),e.loading?B("",!0):(T(),x("div",{key:1,class:"toolbar-button",onMouseleave:t[22]||(t[22]=(...s)=>e.hideMenu&&e.hideMenu(...s))},[k(l("div",{onMouseenter:t[20]||(t[20]=(...s)=>e.showMenu&&e.showMenu(...s)),class:"absolute m-0 p-0 z-50 top-full left-0 transform bg-white dark:bg-bg-dark rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[l("div",Cht,[l("button",{class:Pe(["text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95",e.isCheckbox?"text-secondary dark:text-secondary-light":"text-gray-700 dark:text-gray-300"]),title:"Edit discussion list",type:"button",onClick:t[9]||(t[9]=s=>e.isCheckbox=!e.isCheckbox)},t[70]||(t[70]=[l("i",{"data-feather":"check-square"},null,-1)]),2),l("button",{class:"text-3xl hover:text-red-500 dark:hover:text-red-400 duration-150 active:scale-95",title:"Reset database, remove all discussions",onClick:t[10]||(t[10]=$(()=>{},["stop"]))},t[71]||(t[71]=[l("i",{"data-feather":"trash-2"},null,-1)])),l("button",{class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95",title:"Export database",type:"button",onClick:t[11]||(t[11]=$(s=>e.database_selectorDialogVisible=!0,["stop"]))},t[72]||(t[72]=[l("i",{"data-feather":"database"},null,-1)])),l("div",wht,[l("input",{type:"file",ref:"fileDialog",class:"hidden",onChange:t[12]||(t[12]=(...s)=>e.importDiscussions&&e.importDiscussions(...s))},null,544),l("button",{class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95 rotate-90",title:"Import discussions",type:"button",onClick:t[13]||(t[13]=$(s=>e.$refs.fileDialog.click(),["stop"]))},t[73]||(t[73]=[l("i",{"data-feather":"log-in"},null,-1)]))]),l("div",Rht,[l("input",{type:"file",ref:"bundleLoadingDialog",class:"hidden",onChange:t[14]||(t[14]=(...s)=>e.importDiscussionsBundle&&e.importDiscussionsBundle(...s))},null,544),e.showSaveConfirmation?B("",!0):(T(),x("button",{key:0,title:"Import discussion bundle",onClick:t[15]||(t[15]=$(s=>e.$refs.bundleLoadingDialog.click(),["stop"])),class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},t[74]||(t[74]=[l("i",{"data-feather":"folder"},null,-1)])))]),e.loading?(T(),x("div",Aht,t[75]||(t[75]=[l("div",{role:"status"},[l("svg",{"aria-hidden":"true",class:"w-8 h-8 animate-spin fill-secondary dark:fill-secondary-light",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),l("span",{class:"sr-only"},"Loading...")],-1)]))):B("",!0),e.showSaveConfirmation?(T(),x("div",Mht,[l("button",{class:"text-3xl hover:text-red-500 dark:hover:text-red-400 duration-150 active:scale-95",title:"Cancel",type:"button",onClick:t[16]||(t[16]=$(s=>e.showSaveConfirmation=!1,["stop"]))},t[76]||(t[76]=[l("i",{"data-feather":"x"},null,-1)])),l("button",{class:"text-3xl hover:text-green-500 dark:hover:text-green-400 duration-150 active:scale-95",title:"Confirm save changes",type:"button",onClick:t[17]||(t[17]=$(s=>e.save_configuration(),["stop"]))},t[77]||(t[77]=[l("i",{"data-feather":"check"},null,-1)]))])):B("",!0),e.isOpen?(T(),x("div",Nht,[l("button",{onClick:t[18]||(t[18]=(...s)=>e.importDiscussions&&e.importDiscussions(...s)),class:"text-sm hover:text-secondary dark:hover:text-secondary-light"},"LOLLMS"),l("button",{onClick:t[19]||(t[19]=(...s)=>e.importChatGPT&&e.importChatGPT(...s)),class:"text-sm hover:text-secondary dark:hover:text-secondary-light"},"ChatGPT")])):B("",!0)])],544),[[_t,e.isMenuVisible]]),l("div",{onMouseenter:t[21]||(t[21]=(...s)=>e.showMenu&&e.showMenu(...s)),class:"menu-hover-area"},t[78]||(t[78]=[l("button",{class:"w-8 h-8",title:"Toggle menu"},[l("i",{"data-feather":"menu"})],-1)]),32)],32)),e.loading?B("",!0):(T(),x("div",{key:2,class:"toolbar-button",onMouseleave:t[28]||(t[28]=(...s)=>e.hideBindingsMenu&&e.hideBindingsMenu(...s))},[l("div",Iht,[k(l("div",{onMouseenter:t[25]||(t[25]=(...s)=>e.showBindingsMenu&&e.showBindingsMenu(...s)),class:"absolute m-0 p-0 z-10 top-full left-0 transform w-80 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[l("div",Oht,[k(l("input",{type:"text","onUpdate:modelValue":t[23]||(t[23]=s=>e.bindingSearchQuery=s),placeholder:"Search bindings...",class:"w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[ue,e.bindingSearchQuery]])]),l("div",kht,[(T(!0),x(Le,null,We(e.filteredBindings,(s,i)=>(T(),x("div",{key:i,class:"relative group/item flex flex-col items-center"},[l("div",Dht,[l("button",{onClick:$(r=>e.setBinding(s),["prevent"]),title:s.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[l("img",{src:s.icon?s.icon:bt(Wn),onError:t[24]||(t[24]=(...r)=>bt(Wn)&&bt(Wn)(...r)),alt:s.name,class:Pe(["w-full h-full object-cover",{"border-2 border-secondary":s.name==e.binding_name}])},null,42,Pht)],8,Lht),l("span",{class:"mt-1 text-xs text-center w-full truncate",title:s.name},Y(s.name),9,Fht)]),l("div",Uht,[l("span",{class:"text-xs font-medium mb-2 text-center",onClick:$(r=>e.setBinding(s),["prevent"])},Y(s.name),9,Bht),l("div",Ght,[l("button",{onClick:$(r=>e.showModelConfig(s),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Configure Binding"},t[79]||(t[79]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)]),8,Vht)])])]))),128))])],544),[[_t,e.isBindingsMenuVisible]]),l("div",{onMouseenter:t[27]||(t[27]=(...s)=>e.showBindingsMenu&&e.showBindingsMenu(...s)),class:"bindings-hover-area"},[l("button",{onClick:t[26]||(t[26]=$(s=>e.showModelConfig(),["prevent"])),class:"w-6 h-6"},[l("img",{src:e.currentBindingIcon,class:"w-6 h-6 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-200",title:e.currentBinding?e.currentBinding.name:"unknown"},null,8,zht)])],32)])],32)),e.loading?B("",!0):(T(),x("div",{key:3,class:"toolbar-button",onMouseleave:t[34]||(t[34]=(...s)=>e.hideModelsMenu&&e.hideModelsMenu(...s))},[l("div",Hht,[k(l("div",{onMouseenter:t[31]||(t[31]=(...s)=>e.showModelsMenu&&e.showModelsMenu(...s)),class:"absolute m-0 p-0 z-10 top-full left-0 transform w-80 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[l("div",qht,[k(l("input",{type:"text","onUpdate:modelValue":t[29]||(t[29]=s=>e.modelSearchQuery=s),placeholder:"Search models...",class:"w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[ue,e.modelSearchQuery]])]),l("div",Yht,[(T(!0),x(Le,null,We(e.filteredModels,(s,i)=>(T(),x("div",{key:i,class:"relative group/item flex flex-col items-center"},[l("div",$ht,[l("button",{onClick:$(r=>e.setModel(s),["prevent"]),title:s.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[l("img",{src:s.icon?s.icon:bt(Wn),onError:t[30]||(t[30]=(...r)=>e.personalityImgPlacehodler&&e.personalityImgPlacehodler(...r)),alt:s.name,class:Pe(["w-full h-full object-cover",{"border-2 border-secondary":s.name==e.model_name}])},null,42,Kht)],8,Wht),l("span",{class:"mt-1 text-xs text-center w-full truncate",title:s.name},Y(s.name),9,jht)]),l("div",Qht,[l("span",{class:"text-xs font-medium mb-2 text-center",onClick:$(r=>e.setModel(s),["prevent"])},Y(s.name),9,Xht),l("div",Zht,[l("button",{onClick:$(r=>e.copyModelNameFrom(s.name),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Copy Model Name"},t[80]||(t[80]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1)]),8,Jht)])])]))),128))])],544),[[_t,e.isModelsMenuVisible]]),l("div",{onMouseenter:t[33]||(t[33]=(...s)=>e.showModelsMenu&&e.showModelsMenu(...s)),class:"models-hover-area"},[l("button",{onClick:t[32]||(t[32]=$(s=>e.copyModelName(),["prevent"])),class:"w-6 h-6"},[l("img",{src:e.currentModelIcon,class:"w-6 h-6 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-400",title:e.currentModel?e.currentModel.name:"unknown"},null,8,egt)])],32)])],32)),e.loading?B("",!0):(T(),x("div",{key:4,class:"toolbar-button",onMouseleave:t[39]||(t[39]=(...s)=>e.hidePersonalitiesMenu&&e.hidePersonalitiesMenu(...s))},[l("div",tgt,[k(l("div",{onMouseenter:t[37]||(t[37]=(...s)=>e.showPersonalitiesMenu&&e.showPersonalitiesMenu(...s)),class:"absolute m-0 p-0 z-10 top-full left-0 transform w-80 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[l("div",ngt,[k(l("input",{type:"text","onUpdate:modelValue":t[35]||(t[35]=s=>e.personalitySearchQuery=s),placeholder:"Search personalities...",class:"w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[ue,e.personalitySearchQuery]])]),l("div",sgt,[(T(!0),x(Le,null,We(e.filteredPersonalities,(s,i)=>(T(),x("div",{key:i,class:"relative group/item flex flex-col items-center"},[l("div",igt,[l("button",{onClick:$(r=>e.onPersonalitySelected(s),["prevent"]),title:s.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[l("img",{src:bt(cbt)+s.avatar,onError:t[36]||(t[36]=(...r)=>e.personalityImgPlacehodler&&e.personalityImgPlacehodler(...r)),alt:s.name,class:Pe(["w-full h-full object-cover",{"border-2 border-secondary":e.$store.state.active_personality_id==e.$store.state.personalities.indexOf(s.full_path)}])},null,42,ogt)],8,rgt),l("span",{class:"mt-1 text-xs text-center w-full truncate",title:s.name},Y(s.name),9,agt)]),l("div",lgt,[l("span",{class:"text-xs font-medium mb-2 text-center",onClick:$(r=>e.onPersonalitySelected(s),["prevent"])},Y(s.name),9,cgt),l("div",dgt,[l("button",{onClick:$(r=>e.unmountPersonality(s),["prevent"]),class:"p-1 bg-red-500 rounded-full text-white hover:bg-red-600 focus:outline-none",title:"Unmount"},t[81]||(t[81]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]),8,ugt),l("button",{onClick:$(r=>e.remount_personality(s),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Remount"},t[82]||(t[82]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)]),8,pgt),l("button",{onClick:$(r=>e.handleOnTalk(s),["prevent"]),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none",title:"Talk"},t[83]||(t[83]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})],-1)]),8,fgt)])])]))),128))])],544),[[_t,e.isPersonalitiesMenuVisible]]),l("div",_gt,[l("div",{onMouseenter:t[38]||(t[38]=(...s)=>e.showPersonalitiesMenu&&e.showPersonalitiesMenu(...s)),class:"personalities-hover-area"},[z(MN,{ref:"mountedPers",onShowPersList:e.onShowPersList,onReady:e.onPersonalitiesReady},null,8,["onShowPersList","onReady"])],32)])])],32))])]),l("div",mgt,[l("form",{onSubmit:t[42]||(t[42]=$((...s)=>e.handleSearch&&e.handleSearch(...s),["prevent"])),class:"relative"},[l("div",hgt,[l("div",ggt,[k(l("input",{type:"search",id:"default-search",class:"block w-full h-8 px-8 text-sm border border-gray-300 rounded-md bg-bg-light focus:ring-1 focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary transition-all duration-200",placeholder:"Search discussions...",title:"Filter discussions by title","onUpdate:modelValue":t[40]||(t[40]=s=>e.filterTitle=s),onKeyup:t[41]||(t[41]=qn((...s)=>e.handleSearch&&e.handleSearch(...s),["enter"]))},null,544),[[ue,e.filterTitle]]),t[84]||(t[84]=l("div",{class:"absolute left-2 top-1/2 -translate-y-1/2"},[l("i",{"data-feather":"search",class:"w-4 h-4 text-gray-400"})],-1)),t[85]||(t[85]=l("button",{type:"submit",class:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-600 hover:text-secondary rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-1 focus:ring-secondary transition-all duration-150 active:scale-98",title:"Search"},[l("i",{"data-feather":"arrow-right",class:"w-4 h-4"})],-1))])])],32)]),e.isCheckbox?(T(),x("div",bgt,[l("div",ygt,[e.selectedDiscussions.length>0?(T(),x("p",Egt,"Selected: "+Y(e.selectedDiscussions.length),1)):B("",!0),e.selectedDiscussions.length>0?(T(),x("div",vgt,[e.showConfirmation?B("",!0):(T(),x("button",{key:0,class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:t[43]||(t[43]=$(s=>e.showConfirmation=!0,["stop"]))},t[86]||(t[86]=[l("i",{"data-feather":"trash"},null,-1)]))),e.showConfirmation?(T(),x("div",Sgt,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:t[44]||(t[44]=$((...s)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...s),["stop"]))},t[87]||(t[87]=[l("i",{"data-feather":"check"},null,-1)])),l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:t[45]||(t[45]=$(s=>e.showConfirmation=!1,["stop"]))},t[88]||(t[88]=[l("i",{"data-feather":"x"},null,-1)]))])):B("",!0)])):B("",!0),l("div",Tgt,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:t[46]||(t[46]=$((...s)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...s),["stop"]))},t[89]||(t[89]=[l("i",{"data-feather":"codepen"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a markdown file",type:"button",onClick:t[47]||(t[47]=$((...s)=>e.exportDiscussions&&e.exportDiscussions(...s),["stop"]))},t[90]||(t[90]=[l("i",{"data-feather":"folder"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a markdown file",type:"button",onClick:t[48]||(t[48]=$((...s)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...s),["stop"]))},t[91]||(t[91]=[l("i",{"data-feather":"bookmark"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:t[49]||(t[49]=$((...s)=>e.selectAllDiscussions&&e.selectAllDiscussions(...s),["stop"]))},t[92]||(t[92]=[l("i",{"data-feather":"list"},null,-1)]))])])])):B("",!0),l("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll overflow-x-hidden custom-scrollbar",onDragover:t[50]||(t[50]=$(s=>e.setDropZoneDiscussion(),["stop","prevent"]))},[l("div",xgt,[l("div",{class:Pe(["mx-0 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[l("div",{id:"dis-list",class:Pe([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full pb-80"])},[e.list.length>0?(T(),at(Oi,{key:0,name:"list"},{default:Ne(()=>[(T(!0),x(Le,null,We(e.list,(s,i)=>(T(),at(X0,{key:s.id,id:s.id,title:s.title,selected:e.currentDiscussion.id==s.id,loading:s.loading,isCheckbox:e.isCheckbox,checkBoxValue:s.checkBoxValue,openfolder_enabled:!0,onSelect:r=>e.selectDiscussion(s),onDelete:r=>e.deleteDiscussion(s.id),onOpenFolder:e.openFolder,onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onOpenFolder","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):B("",!0),e.list.length<1?(T(),x("div",Cgt,t[93]||(t[93]=[l("p",{class:"px-3"},"No discussions are found",-1)]))):B("",!0)],2)],2)])],32),l("div",wgt,[l("div",{class:"chat-bar text-center flex items-center",onClick:t[51]||(t[51]=(...s)=>e.showDatabaseSelector&&e.showDatabaseSelector(...s))},[z(lp,null,{default:Ne(()=>t[94]||(t[94]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"mr-2"},[l("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),l("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),l("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})],-1)])),_:1}),l("p",Rgt,Y(e.formatted_database_name.replace("_"," ")),1)])])])):B("",!0)]),_:1}),e.isReady?(T(),x("div",Agt,[l("div",{id:"messages-list",class:Pe(["w-full z-0 flex flex-col flex-grow overflow-y-auto scrollbar",e.isDragOverChat?"pointer-events-none":""])},[l("div",Mgt,[e.discussionArr.length>0?(T(),at(Oi,{key:0,name:"list"},{default:Ne(()=>[(T(!0),x(Le,null,We(e.discussionArr,(s,i)=>(T(),at(fN,{key:s.id,message:s,id:"msg-"+s.id,ref_for:!0,ref:"msg-"+s.id,host:e.host,onCopy:e.copyToClipBoard,onDelete:e.deleteMessage,onRankUp:e.rankUpMessage,onRankDown:e.rankDownMessage,onUpdateMessage:e.updateMessage,onResendMessage:e.resendMessage,onContinueMessage:e.continueMessage,avatar:e.getAvatar(s.sender)},null,8,["message","id","host","onCopy","onDelete","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","avatar"]))),128)),e.discussionArr.length<2&&e.personality.prompts_list.length>0?(T(),x("div",Ngt,[t[99]||(t[99]=l("h2",{class:"text-2xl font-bold mb-6 text-gray-800 dark:text-gray-200"},"Prompt Examples",-1)),l("div",Igt,[l("div",Ogt,[(T(!0),x(Le,null,We(e.personality.prompts_list,(s,i)=>(T(),x("div",{title:e.extractTitle(s),key:i,onClick:r=>e.handlePromptSelection(s),class:"flex-shrink-0 w-[300px] bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg p-6 cursor-pointer hover:shadow-xl transition-all duration-300 ease-in-out transform hover:scale-105 flex flex-col justify-between min-h-[220px] group"},[l("div",Dgt,[l("h3",{class:"font-bold text-lg text-gray-900 dark:text-gray-100 mb-2 truncate",title:e.extractTitle(s)},Y(e.extractTitle(s)),9,Lgt),l("div",{title:s,class:"text-base text-gray-700 dark:text-gray-300 overflow-hidden line-clamp-4"},Y(e.getPromptContent(s)),9,Pgt)]),t[95]||(t[95]=l("div",{class:"mt-4 text-sm font-medium text-blue-600 dark:text-blue-400 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}," Click to select ",-1))],8,kgt))),128))])]),e.showPlaceholderModal?(T(),x("div",Fgt,[l("div",Ugt,[t[98]||(t[98]=l("h3",{class:"text-lg font-semibold mb-4"},"Fill in the placeholders",-1)),l("div",Bgt,[l("div",Ggt,[t[96]||(t[96]=l("h4",{class:"text-sm font-medium mb-2 text-gray-600 dark:text-gray-400"},"Live Preview:",-1)),l("div",Vgt,[l("span",zgt,Y(e.getPromptContent(e.previewPrompt)),1)])]),l("div",Hgt,[l("div",qgt,[(T(!0),x(Le,null,We(e.parsedPlaceholders,(s,i)=>(T(),x("div",{key:s.fullText,class:"flex flex-col"},[l("label",{for:"placeholder-"+i,class:"text-sm font-medium mb-1"},Y(s.label),9,Ygt),s.type==="text"?k((T(),x("input",{key:0,id:"placeholder-"+i,"onUpdate:modelValue":r=>e.placeholderValues[i]=r,type:"text",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",placeholder:s.label,onInput:t[52]||(t[52]=(...r)=>e.updatePreview&&e.updatePreview(...r))},null,40,$gt)),[[ue,e.placeholderValues[i]]]):B("",!0),s.type==="int"?k((T(),x("input",{key:1,id:"placeholder-"+i,"onUpdate:modelValue":r=>e.placeholderValues[i]=r,type:"number",step:"1",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:t[53]||(t[53]=(...r)=>e.updatePreview&&e.updatePreview(...r))},null,40,Wgt)),[[ue,e.placeholderValues[i],void 0,{number:!0}]]):B("",!0),s.type==="float"?k((T(),x("input",{key:2,id:"placeholder-"+i,"onUpdate:modelValue":r=>e.placeholderValues[i]=r,type:"number",step:"0.01",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:t[54]||(t[54]=(...r)=>e.updatePreview&&e.updatePreview(...r))},null,40,Kgt)),[[ue,e.placeholderValues[i],void 0,{number:!0}]]):B("",!0),s.type==="multiline"?k((T(),x("textarea",{key:3,id:"placeholder-"+i,"onUpdate:modelValue":r=>e.placeholderValues[i]=r,rows:"4",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:t[55]||(t[55]=(...r)=>e.updatePreview&&e.updatePreview(...r))},null,40,jgt)),[[ue,e.placeholderValues[i]]]):B("",!0),s.type==="code"?(T(),x("div",Qgt,[l("div",Xgt,Y(s.language||"Plain text"),1),k(l("textarea",{id:"placeholder-"+i,"onUpdate:modelValue":r=>e.placeholderValues[i]=r,rows:"8",class:"w-full p-2 font-mono bg-gray-100 dark:bg-gray-900 border-t",onInput:t[56]||(t[56]=(...r)=>e.updatePreview&&e.updatePreview(...r))},null,40,Zgt),[[ue,e.placeholderValues[i]]])])):B("",!0),s.type==="options"?k((T(),x("select",{key:5,id:"placeholder-"+i,"onUpdate:modelValue":r=>e.placeholderValues[i]=r,class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onChange:t[57]||(t[57]=(...r)=>e.updatePreview&&e.updatePreview(...r))},[t[97]||(t[97]=l("option",{value:"",disabled:""},"Select an option",-1)),(T(!0),x(Le,null,We(s.options,r=>(T(),x("option",{key:r,value:r},Y(r),9,ebt))),128))],40,Jgt)),[[Ot,e.placeholderValues[i]]]):B("",!0)]))),128))])])]),l("div",tbt,[l("button",{onClick:t[58]||(t[58]=(...s)=>e.cancelPlaceholders&&e.cancelPlaceholders(...s)),class:"px-4 py-2 text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"}," Cancel "),l("button",{onClick:t[59]||(t[59]=(...s)=>e.applyPlaceholders&&e.applyPlaceholders(...s)),class:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600"}," Apply ")])])])):B("",!0)])):B("",!0)]),_:1})):B("",!0),e.currentDiscussion.id?B("",!0):(T(),at(mN,{key:1})),t[100]||(t[100]=l("div",null,[l("br"),l("br"),l("br"),l("br"),l("br"),l("br"),l("br")],-1))]),t[101]||(t[101]=l("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1))],2),e.currentDiscussion.id?(T(),x("div",nbt,[z(_N,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onPersonalitySelected:e.recoverFiles,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onAddWebLink:e.add_webpage,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onPersonalitySelected","onMessageSentEvent","onSendCMDEvent","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):B("",!0)])):B("",!0),z(Bs,{name:"slide-left"},{default:Ne(()=>[e.showRightPanel?(T(),x("div",sbt,[l("div",ibt,null,512)])):B("",!0)]),_:1}),z(Q0,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,"can-remove":!0,onChoiceRemoved:e.ondatabase_selectorDialogRemoved,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceRemoved","onChoiceSelected","onCloseDialog","onChoiceValidated"]),k(l("div",rbt,[z(C0,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),l("p",obt,Y(e.loading_infos)+" ...",1)],512),[[_t,e.progress_visibility]]),z(RN,{ref:"personality_editor",config:e.currentPersonConfig,personality:e.selectedPersonality},null,8,["config","personality"]),l("div",abt,[z(AN,{ref:"news"},null,512)]),z(uN,{ref:"skills_lib"},null,512)],64))}}),pbt=st(ubt,[["__scopeId","data-v-57566b64"]]);/** +`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(n){if(n.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(n[0]);await this.import_multiple_discussions(e)?(this.$store.state.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this.$store.state.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1}},async created(){this.randomFact=this.interestingFacts[Math.floor(Math.random()*this.interestingFacts.length)];const e=(await te.get("/get_versionID")).data.versionId;qe.onopen=()=>{this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.versionId!==e&&(this.$store.commit("updateVersionId",e),window.location.reload(!0)),this.$nextTick(()=>{Ge.replace()});try{this.$store.state.loading_infos="Getting version",this.$store.state.loading_progress=30,await this.$store.dispatch("getVersion")}catch(t){console.log("Error cought:",t)}try{for(this.$store.state.loading_infos="Loading Configuration";qe.id===void 0;)await new Promise(t=>setTimeout(t,100));this.$store.state.client_id=qe.id,await this.$store.dispatch("refreshConfig")}catch(t){console.log("Error cought:",t)}try{this.$store.state.loading_infos="Loading Database",this.$store.state.loading_progress=20,await this.$store.dispatch("refreshDatabase")}catch(t){console.log("Error cought:",t)}try{this.$store.state.loading_infos="Getting Bindings list",this.$store.state.loading_progress=40,await this.$store.dispatch("refreshBindings")}catch(t){console.log("Error cought:",t)}try{this.$store.state.loading_infos="Getting personalities zoo",this.$store.state.loading_progress=70,await this.$store.dispatch("refreshPersonalitiesZoo")}catch(t){console.log("Error cought:",t)}try{this.$store.state.loading_infos="Getting mounted personalities",this.$store.state.loading_progress=80,await this.$store.dispatch("refreshMountedPersonalities")}catch(t){console.log("Error cought:",t)}try{this.$store.state.loading_infos="Getting models zoo",this.$store.state.loading_progress=90,await this.$store.dispatch("refreshModelsZoo")}catch(t){console.log("Error cought:",t)}try{this.$store.state.loading_infos="Getting active models",this.$store.state.loading_progress=100,await this.$store.dispatch("refreshModels"),await this.$store.dispatch("refreshModelStatus")}catch(t){console.log("Error cought:",t)}try{await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage")}catch(t){console.log("Error cought:",t)}try{await this.$store.dispatch("fetchisRTOn")}catch(t){console.log("Error cought:",t)}this.$store.state.isConnected=!0,this.$store.state.client_id=qe.id,this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),this.isCreated=!0,this.$store.state.ready=!0,qe.on("connected",this.socketIOConnected),qe.on("disconnected",this.socketIODisconnected),qe.on("show_progress",this.show_progress),qe.on("hide_progress",this.hide_progress),qe.on("update_progress",this.update_progress),qe.on("notification",this.notify),qe.on("new_message",this.new_message),qe.on("update_message",this.update_message),qe.on("close_message",this.finalMsgEvent),qe.on("disucssion_renamed",t=>{const s=this.list.findIndex(r=>r.id==t.discussion_id),i=this.list[s];i.title=t.title}),qe.onclose=t=>{this.socketIODisconnected()},qe.on("connect_error",t=>{t.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",t),this.$store.state.isConnected=!1}),qe.onerror=t=>{console.log("WebSocket connection error:",t.code,t.reason),this.socketIODisconnected(),qe.disconnect()}},beforeUnmount(){window.removeEventListener("resize",this.adjustMenuPosition)},async mounted(){window.addEventListener("keydown",this.handleShortcut),this.$store.state.news=this.$refs.news,this.$store.state.personality_editor=this.$refs.personality_editor,window.addEventListener("resize",this.adjustMenuPosition),qe.on("refresh_files",()=>{this.recoverFiles()})},async activated(){for(;this.isReady===!1;)await new Promise(n=>setTimeout(n,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&Ue(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)}),this.$store.state.config.show_news_panel&&this.$store.state.news.show()},components:{Discussion:X0,Message:fN,ChatBox:_N,WelcomeComponent:mN,ChoiceDialog:Q0,ProgressBar:C0,InputBox:Gpt,SkillsLibraryViewer:uN,PersonalityEditor:RN,PopupViewer:AN,ActionButton:OA,SocialIcon:kA,MountedPersonalities:MN,ChatBarButton:lp},watch:{installedModels:{immediate:!0,handler(n){this.$nextTick(()=>{this.installedModels=n})}},"$store.state.config.fun_mode":function(n,e){},"$store.state.isConnected":function(n,e){this.isConnected?this.is_first_connection||(this.$store.state.messageBox.hideMessage(),this.$store.state.messageBox.showMessage("Server connected."),this.$store.state.config.activate_audio_infos&&this.connection_recovered_audio.play()):(this.$store.state.messageBox.showBlockingMessage("Server suddenly disconnected. Please reboot the server to recover the connection"),this.is_first_connection=!1,this.$store.state.config.activate_audio_infos&&this.connection_lost_audio.play()),Ue(()=>{Ge.replace()})},messages:{handler:"extractHtml",deep:!0},progress_visibility_val(n){console.log("progress_visibility changed to "+n)},filterTitle(n){n==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(n){Ue(()=>{Ge.replace()}),n||(this.isSelectAll=!1)},socketConnected(n){console.log("Websocket connected (watch)",n)},showConfirmation(){Ue(()=>{Ge.replace()})}},computed:{parsedPlaceholders(){const n=new Map;return this.placeholders.forEach(e=>{const t=cbt(e);n.set(t.fullText,t)}),Array.from(n.values())},filteredBindings(){return this.installedBindings.filter(n=>n.name.toLowerCase().includes(this.bindingSearchQuery.toLowerCase()))},filteredModels(){return this.installedModels.filter(n=>n.name.toLowerCase().includes(this.modelSearchQuery.toLowerCase()))},filteredPersonalities(){return this.mountedPersonalities.filter(n=>n.name.toLowerCase().includes(this.personalitySearchQuery.toLowerCase()))},currentModel(){return this.$store.state.currentModel||{}},currentModelIcon(){return this.currentModel.icon||this.modelImgPlaceholder},binding_name(){return this.$store.state.config.binding_name},installedModels(){return this.$store.state.installedModels},model_name(){return this.$store.state.config.model_name},mountedPersonalities(){return this.$store.state.mountedPersArr},personality_name(){return this.$store.state.config.active_personality_id},config(){return this.$store.state.config},mountedPers(){return this.$store.state.mountedPers},installedBindings(){return this.$store.state.installedBindings},currentBindingIcon(){return this.currentBinding.icon||this.modelImgPlaceholder},currentBinding(){return this.$store.state.currentBinding||{}},isFullMode(){return this.$store.state.view_mode==="full"},storeLogo(){return this.$store.state.config?Gs:this.$store.state.config.app_custom_logo!=""?"/user_infos/"+this.$store.state.config.app_custom_logo:Gs},currentPersonConfig(){try{return this.$store.state.currentPersonConfig}catch{console.log("Error finding current personality configuration");return}},selectedPersonality(){try{return this.$store.state.selectedPersonality}catch{console.log("Error finding current personality configuration");return}},loading_infos(){return this.$store.state.loading_infos},is_fun_mode(){try{return this.$store.state.config?this.$store.state.config.fun_mode:!1}catch(n){return console.error("Oopsie! Looks like we hit a snag: ",n),!1}},isModelOK(){return this.$store.state.isModelOk},isGenerating(){return this.$store.state.isGenerating},isConnected(){return this.$store.state.isConnected},...dL({versionId:n=>n.versionId}),progress_visibility:{get(){return self.progress_visibility_val}},version_info:{get(){return this.$store.state.version!=null&&this.$store.state.version!="unknown"?this.$store.state.version:"..."}},loading_infos:{get(){return this.$store.state.loading_infos}},loading_progress:{get(){return this.$store.state.loading_progress}},isModelOk:{get(){return this.$store.state.isModelOk},set(n){this.$store.state.isModelOk=n}},isGenerating:{get(){return this.$store.state.isGenerating},set(n){this.$store.state.isGenerating=n}},personality(){const n=this.$store.state.config.personalities[this.$store.state.config.active_personality_id].split(":")[0];return this.$store.state.personalities.find(t=>t.full_path===n)},prompts_list(){return this.personality.prompts_list},formatted_database_name(){return this.$store.state.config.discussion_db_name},UseDiscussionHistory(){return this.$store.state.config.activate_skills_lib},isReady(){return this.$store.state.ready},databases(){return this.$store.state.databases},client_id(){return qe.id},showLeftPanel(){return console.log("showLeftPanel"),console.log(this.$store.state.leftPanelCollapsed),this.$store.state.ready&&!this.$store.state.leftPanelCollapsed},showRightPanel(){return console.log("showRightPanel"),console.log(this.$store.state.rightPanelCollapsed),this.$store.state.ready&&!this.$store.state.rightPanelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this.$store.commit("setIsConnected",!0),!0},socketDisconnected(){return this.$store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return Ue(()=>{Ge.replace()}),this.list.filter(n=>n.checkBoxValue==!0)}}},pbt=Object.assign(ubt,{__name:"DiscussionsView",setup(n){return di(()=>{wN()}),te.defaults.baseURL="/",(e,t)=>(T(),x(Le,null,[z(Bs,{name:"fade-and-fly"},{default:Ne(()=>[e.isReady?B("",!0):(T(),x("div",aht,[e.$store.state.theme_vars.activate_dropping_animation?(T(),x("div",lht,[(T(),x(Le,null,We(50,s=>l("div",{key:s,class:"absolute animate-fall animate-giggle",style:Vt({left:`${Math.random()*100}%`,top:"-20px",animationDuration:`${3+Math.random()*7}s`,animationDelay:`${Math.random()*5}s`})},Y(e.$store.state.theme_vars.falling_object),5)),64))])):B("",!0),l("div",cht,[l("div",dht,[l("div",uht,Y(e.$store.state.theme_vars.lollms_title),1),t[61]||(t[61]=l("p",{class:"text-2xl italic"}," One tool to rule them all ",-1)),t[62]||(t[62]=l("p",{class:"text-xl mb-6"}," by ParisNeo ",-1)),l("p",pht,Y(e.version_info),1),l("div",{class:"interesting-facts transition-transform duration-300 cursor-pointer",onClick:t[0]||(t[0]=(...s)=>e.updateRandomFact&&e.updateRandomFact(...s))},[l("p",fht,[t[60]||(t[60]=l("span",{class:"font-semibold"},"🤔 Fun Fact: ",-1)),l("span",{innerHTML:e.randomFact},null,8,_ht)])]),l("div",mht,[l("div",{class:"animated-progressbar-fg",style:Vt({width:`${e.loading_progress}%`})},null,4),l("div",{class:"absolute top-0 h-full flex items-center transition-all duration-300",style:Vt({left:`${e.loading_progress}%`,transform:"translateX(-50%)"})},null,4)])]),l("div",hht,[l("div",ght,[l("p",bht,Y(e.loading_infos)+"... ",1),l("p",yht,Y(Math.round(e.loading_progress))+"% ",1)])])])]))]),_:1}),z(Bs,{name:"slide-right"},{default:Ne(()=>[e.showLeftPanel?(T(),x("div",Eht,[z(bt(Xd),{to:{name:"discussions"},class:"flex items-center space-x-2"},{default:Ne(()=>[l("div",vht,[l("img",{class:"w-12 h-12 rounded-full object-cover logo-image",src:e.$store.state.config==null?bt(Gs):e.$store.state.config.app_custom_logo!=""?"/user_infos/"+e.$store.state.config.app_custom_logo:bt(Gs),alt:"Logo",title:"LoLLMS WebUI"},null,8,Sht)]),t[63]||(t[63]=l("div",{class:"flex flex-col justify-center"},[l("div",{class:"text-center p-2"},[l("div",{class:"text-md relative inline-block"},[l("span",{class:"relative inline-block font-bold tracking-wide text-black dark:text-white"}," LoLLMS "),l("div",{class:"absolute -bottom-0.5 left-0 w-full h-0.5 bg-black dark:bg-white transform origin-left transition-transform duration-300 hover:scale-x-100 scale-x-0"})])]),l("p",{class:"text-gray-400 text-sm"},"One tool to rule them all")],-1))]),_:1}),l("div",Tht,[l("div",xht,[l("button",{class:"toolbar-button",title:"Create new discussion",onClick:t[1]||(t[1]=(...s)=>e.createNewDiscussion&&e.createNewDiscussion(...s))},t[64]||(t[64]=[l("i",{"data-feather":"plus"},null,-1)])),e.loading?B("",!0):(T(),x("div",{key:0,class:"toolbar-button",onMouseleave:t[8]||(t[8]=(...s)=>e.hideSkillsLibraryMenu&&e.hideSkillsLibraryMenu(...s))},[k(l("div",{onMouseenter:t[6]||(t[6]=(...s)=>e.showSkillsLibraryMenu&&e.showSkillsLibraryMenu(...s)),class:"absolute m-0 p-0 z-50 top-full left-0 transform bg-white dark:bg-bg-dark rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[l("div",Cht,[e.loading?B("",!0):(T(),x("button",{key:0,type:"button",onClick:t[2]||(t[2]=$((...s)=>e.addDiscussion2SkillsLibrary&&e.addDiscussion2SkillsLibrary(...s),["stop"])),title:"Add this discussion content to skills database",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},t[65]||(t[65]=[l("i",{"data-feather":"plus"},null,-1)]))),!e.loading&&e.$store.state.config.activate_skills_lib?(T(),x("button",{key:1,type:"button",onClick:t[3]||(t[3]=$((...s)=>e.toggleSkillsLib&&e.toggleSkillsLib(...s),["stop"])),title:"Skills database is activated",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},t[66]||(t[66]=[l("i",{"data-feather":"check-circle"},null,-1)]))):B("",!0),!e.loading&&!e.$store.state.config.activate_skills_lib?(T(),x("button",{key:2,type:"button",onClick:t[4]||(t[4]=$((...s)=>e.toggleSkillsLib&&e.toggleSkillsLib(...s),["stop"])),title:"Skills database is deactivated",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},t[67]||(t[67]=[l("i",{"data-feather":"x-octagon"},null,-1)]))):B("",!0),e.loading?B("",!0):(T(),x("button",{key:3,type:"button",onClick:t[5]||(t[5]=$((...s)=>e.showSkillsLib&&e.showSkillsLib(...s),["stop"])),title:"Show Skills database",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},t[68]||(t[68]=[l("i",{"data-feather":"book"},null,-1)])))])],544),[[_t,e.isSkillsLibraryMenuVisible]]),l("div",{onMouseenter:t[7]||(t[7]=(...s)=>e.showSkillsLibraryMenu&&e.showSkillsLibraryMenu(...s)),class:"menu-hover-area"},t[69]||(t[69]=[l("button",{class:"w-8 h-8",title:"Toggle Skills library menu"},[l("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M4 4v16h16V4H4zm2 2h12v12H6V6zm2 2h2v8H8V8zm3 0h2v8h-2V8zm3 0h2v8h-2V8z",fill:"currentColor"})])],-1)]),32)],32)),e.loading?B("",!0):(T(),x("div",{key:1,class:"toolbar-button",onMouseleave:t[22]||(t[22]=(...s)=>e.hideMenu&&e.hideMenu(...s))},[k(l("div",{onMouseenter:t[20]||(t[20]=(...s)=>e.showMenu&&e.showMenu(...s)),class:"absolute m-0 p-0 z-50 top-full left-0 transform bg-white dark:bg-bg-dark rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[l("div",wht,[l("button",{class:Pe(["text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95",e.isCheckbox?"text-secondary dark:text-secondary-light":"text-gray-700 dark:text-gray-300"]),title:"Edit discussion list",type:"button",onClick:t[9]||(t[9]=s=>e.isCheckbox=!e.isCheckbox)},t[70]||(t[70]=[l("i",{"data-feather":"check-square"},null,-1)]),2),l("button",{class:"text-3xl hover:text-red-500 dark:hover:text-red-400 duration-150 active:scale-95",title:"Reset database, remove all discussions",onClick:t[10]||(t[10]=$(()=>{},["stop"]))},t[71]||(t[71]=[l("i",{"data-feather":"trash-2"},null,-1)])),l("button",{class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95",title:"Export database",type:"button",onClick:t[11]||(t[11]=$(s=>e.database_selectorDialogVisible=!0,["stop"]))},t[72]||(t[72]=[l("i",{"data-feather":"database"},null,-1)])),l("div",Rht,[l("input",{type:"file",ref:"fileDialog",class:"hidden",onChange:t[12]||(t[12]=(...s)=>e.importDiscussions&&e.importDiscussions(...s))},null,544),l("button",{class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95 rotate-90",title:"Import discussions",type:"button",onClick:t[13]||(t[13]=$(s=>e.$refs.fileDialog.click(),["stop"]))},t[73]||(t[73]=[l("i",{"data-feather":"log-in"},null,-1)]))]),l("div",Aht,[l("input",{type:"file",ref:"bundleLoadingDialog",class:"hidden",onChange:t[14]||(t[14]=(...s)=>e.importDiscussionsBundle&&e.importDiscussionsBundle(...s))},null,544),e.showSaveConfirmation?B("",!0):(T(),x("button",{key:0,title:"Import discussion bundle",onClick:t[15]||(t[15]=$(s=>e.$refs.bundleLoadingDialog.click(),["stop"])),class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},t[74]||(t[74]=[l("i",{"data-feather":"folder"},null,-1)])))]),e.loading?(T(),x("div",Mht,t[75]||(t[75]=[l("div",{role:"status"},[l("svg",{"aria-hidden":"true",class:"w-8 h-8 animate-spin fill-secondary dark:fill-secondary-light",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),l("span",{class:"sr-only"},"Loading...")],-1)]))):B("",!0),e.showSaveConfirmation?(T(),x("div",Nht,[l("button",{class:"text-3xl hover:text-red-500 dark:hover:text-red-400 duration-150 active:scale-95",title:"Cancel",type:"button",onClick:t[16]||(t[16]=$(s=>e.showSaveConfirmation=!1,["stop"]))},t[76]||(t[76]=[l("i",{"data-feather":"x"},null,-1)])),l("button",{class:"text-3xl hover:text-green-500 dark:hover:text-green-400 duration-150 active:scale-95",title:"Confirm save changes",type:"button",onClick:t[17]||(t[17]=$(s=>e.save_configuration(),["stop"]))},t[77]||(t[77]=[l("i",{"data-feather":"check"},null,-1)]))])):B("",!0),e.isOpen?(T(),x("div",Iht,[l("button",{onClick:t[18]||(t[18]=(...s)=>e.importDiscussions&&e.importDiscussions(...s)),class:"text-sm hover:text-secondary dark:hover:text-secondary-light"},"LOLLMS"),l("button",{onClick:t[19]||(t[19]=(...s)=>e.importChatGPT&&e.importChatGPT(...s)),class:"text-sm hover:text-secondary dark:hover:text-secondary-light"},"ChatGPT")])):B("",!0)])],544),[[_t,e.isMenuVisible]]),l("div",{onMouseenter:t[21]||(t[21]=(...s)=>e.showMenu&&e.showMenu(...s)),class:"menu-hover-area"},t[78]||(t[78]=[l("button",{class:"w-8 h-8",title:"Toggle menu"},[l("i",{"data-feather":"menu"})],-1)]),32)],32)),e.loading?B("",!0):(T(),x("div",{key:2,class:"toolbar-button",onMouseleave:t[28]||(t[28]=(...s)=>e.hideBindingsMenu&&e.hideBindingsMenu(...s))},[l("div",Oht,[k(l("div",{onMouseenter:t[25]||(t[25]=(...s)=>e.showBindingsMenu&&e.showBindingsMenu(...s)),class:"absolute m-0 p-0 z-10 top-full left-0 transform w-80 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[l("div",kht,[k(l("input",{type:"text","onUpdate:modelValue":t[23]||(t[23]=s=>e.bindingSearchQuery=s),placeholder:"Search bindings...",class:"w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[ue,e.bindingSearchQuery]])]),l("div",Dht,[(T(!0),x(Le,null,We(e.filteredBindings,(s,i)=>(T(),x("div",{key:i,class:"relative group/item flex flex-col items-center"},[l("div",Lht,[l("button",{onClick:$(r=>e.setBinding(s),["prevent"]),title:s.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[l("img",{src:s.icon?s.icon:bt(Wn),onError:t[24]||(t[24]=(...r)=>bt(Wn)&&bt(Wn)(...r)),alt:s.name,class:Pe(["w-full h-full object-cover",{"border-2 border-secondary":s.name==e.binding_name}])},null,42,Fht)],8,Pht),l("span",{class:"mt-1 text-xs text-center w-full truncate",title:s.name},Y(s.name),9,Uht)]),l("div",Bht,[l("span",{class:"text-xs font-medium mb-2 text-center",onClick:$(r=>e.setBinding(s),["prevent"])},Y(s.name),9,Ght),l("div",Vht,[l("button",{onClick:$(r=>e.showModelConfig(s),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Configure Binding"},t[79]||(t[79]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)]),8,zht)])])]))),128))])],544),[[_t,e.isBindingsMenuVisible]]),l("div",{onMouseenter:t[27]||(t[27]=(...s)=>e.showBindingsMenu&&e.showBindingsMenu(...s)),class:"bindings-hover-area"},[l("button",{onClick:t[26]||(t[26]=$(s=>e.showModelConfig(),["prevent"])),class:"w-6 h-6"},[l("img",{src:e.currentBindingIcon,class:"w-6 h-6 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-200",title:e.currentBinding?e.currentBinding.name:"unknown"},null,8,Hht)])],32)])],32)),e.loading?B("",!0):(T(),x("div",{key:3,class:"toolbar-button",onMouseleave:t[34]||(t[34]=(...s)=>e.hideModelsMenu&&e.hideModelsMenu(...s))},[l("div",qht,[k(l("div",{onMouseenter:t[31]||(t[31]=(...s)=>e.showModelsMenu&&e.showModelsMenu(...s)),class:"absolute m-0 p-0 z-10 top-full left-0 transform w-80 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[l("div",Yht,[k(l("input",{type:"text","onUpdate:modelValue":t[29]||(t[29]=s=>e.modelSearchQuery=s),placeholder:"Search models...",class:"w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[ue,e.modelSearchQuery]])]),l("div",$ht,[(T(!0),x(Le,null,We(e.filteredModels,(s,i)=>(T(),x("div",{key:i,class:"relative group/item flex flex-col items-center"},[l("div",Wht,[l("button",{onClick:$(r=>e.setModel(s),["prevent"]),title:s.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[l("img",{src:s.icon?s.icon:bt(Wn),onError:t[30]||(t[30]=(...r)=>e.personalityImgPlacehodler&&e.personalityImgPlacehodler(...r)),alt:s.name,class:Pe(["w-full h-full object-cover",{"border-2 border-secondary":s.name==e.model_name}])},null,42,jht)],8,Kht),l("span",{class:"mt-1 text-xs text-center w-full truncate",title:s.name},Y(s.name),9,Qht)]),l("div",Xht,[l("span",{class:"text-xs font-medium mb-2 text-center",onClick:$(r=>e.setModel(s),["prevent"])},Y(s.name),9,Zht),l("div",Jht,[l("button",{onClick:$(r=>e.copyModelNameFrom(s.name),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Copy Model Name"},t[80]||(t[80]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1)]),8,egt)])])]))),128))])],544),[[_t,e.isModelsMenuVisible]]),l("div",{onMouseenter:t[33]||(t[33]=(...s)=>e.showModelsMenu&&e.showModelsMenu(...s)),class:"models-hover-area"},[l("button",{onClick:t[32]||(t[32]=$(s=>e.copyModelName(),["prevent"])),class:"w-6 h-6"},[l("img",{src:e.currentModelIcon,class:"w-6 h-6 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:border-secondary hover:scale-110 hover:-translate-y-1 duration-400",title:e.currentModel?e.currentModel.name:"unknown"},null,8,tgt)])],32)])],32)),e.loading?B("",!0):(T(),x("div",{key:4,class:"toolbar-button",onMouseleave:t[39]||(t[39]=(...s)=>e.hidePersonalitiesMenu&&e.hidePersonalitiesMenu(...s))},[l("div",ngt,[k(l("div",{onMouseenter:t[37]||(t[37]=(...s)=>e.showPersonalitiesMenu&&e.showPersonalitiesMenu(...s)),class:"absolute m-0 p-0 z-10 top-full left-0 transform w-80 bg-white dark:bg-gray-900 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[l("div",sgt,[k(l("input",{type:"text","onUpdate:modelValue":t[35]||(t[35]=s=>e.personalitySearchQuery=s),placeholder:"Search personalities...",class:"w-full px-3 py-2 rounded-md border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:outline-none focus:ring-2 focus:ring-blue-500"},null,512),[[ue,e.personalitySearchQuery]])]),l("div",igt,[(T(!0),x(Le,null,We(e.filteredPersonalities,(s,i)=>(T(),x("div",{key:i,class:"relative group/item flex flex-col items-center"},[l("div",rgt,[l("button",{onClick:$(r=>e.onPersonalitySelected(s),["prevent"]),title:s.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[l("img",{src:bt(dbt)+s.avatar,onError:t[36]||(t[36]=(...r)=>e.personalityImgPlacehodler&&e.personalityImgPlacehodler(...r)),alt:s.name,class:Pe(["w-full h-full object-cover",{"border-2 border-secondary":e.$store.state.active_personality_id==e.$store.state.personalities.indexOf(s.full_path)}])},null,42,agt)],8,ogt),l("span",{class:"mt-1 text-xs text-center w-full truncate",title:s.name},Y(s.name),9,lgt)]),l("div",cgt,[l("span",{class:"text-xs font-medium mb-2 text-center",onClick:$(r=>e.onPersonalitySelected(s),["prevent"])},Y(s.name),9,dgt),l("div",ugt,[l("button",{onClick:$(r=>e.unmountPersonality(s),["prevent"]),class:"p-1 bg-red-500 rounded-full text-white hover:bg-red-600 focus:outline-none",title:"Unmount"},t[81]||(t[81]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]),8,pgt),l("button",{onClick:$(r=>e.remount_personality(s),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Remount"},t[82]||(t[82]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1)]),8,fgt),l("button",{onClick:$(r=>e.handleOnTalk(s),["prevent"]),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none",title:"Talk"},t[83]||(t[83]=[l("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})],-1)]),8,_gt)])])]))),128))])],544),[[_t,e.isPersonalitiesMenuVisible]]),l("div",mgt,[l("div",{onMouseenter:t[38]||(t[38]=(...s)=>e.showPersonalitiesMenu&&e.showPersonalitiesMenu(...s)),class:"personalities-hover-area"},[z(MN,{ref:"mountedPers",onShowPersList:e.onShowPersList,onReady:e.onPersonalitiesReady},null,8,["onShowPersList","onReady"])],32)])])],32))])]),l("div",hgt,[l("form",{onSubmit:t[42]||(t[42]=$((...s)=>e.handleSearch&&e.handleSearch(...s),["prevent"])),class:"relative"},[l("div",ggt,[l("div",bgt,[k(l("input",{type:"search",id:"default-search",class:"block w-full h-8 px-8 text-sm border border-gray-300 rounded-md bg-bg-light focus:ring-1 focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary transition-all duration-200",placeholder:"Search discussions...",title:"Filter discussions by title","onUpdate:modelValue":t[40]||(t[40]=s=>e.filterTitle=s),onKeyup:t[41]||(t[41]=qn((...s)=>e.handleSearch&&e.handleSearch(...s),["enter"]))},null,544),[[ue,e.filterTitle]]),t[84]||(t[84]=l("div",{class:"absolute left-2 top-1/2 -translate-y-1/2"},[l("i",{"data-feather":"search",class:"w-4 h-4 text-gray-400"})],-1)),t[85]||(t[85]=l("button",{type:"submit",class:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-600 hover:text-secondary rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-1 focus:ring-secondary transition-all duration-150 active:scale-98",title:"Search"},[l("i",{"data-feather":"arrow-right",class:"w-4 h-4"})],-1))])])],32)]),e.isCheckbox?(T(),x("div",ygt,[l("div",Egt,[e.selectedDiscussions.length>0?(T(),x("p",vgt,"Selected: "+Y(e.selectedDiscussions.length),1)):B("",!0),e.selectedDiscussions.length>0?(T(),x("div",Sgt,[e.showConfirmation?B("",!0):(T(),x("button",{key:0,class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:t[43]||(t[43]=$(s=>e.showConfirmation=!0,["stop"]))},t[86]||(t[86]=[l("i",{"data-feather":"trash"},null,-1)]))),e.showConfirmation?(T(),x("div",Tgt,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:t[44]||(t[44]=$((...s)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...s),["stop"]))},t[87]||(t[87]=[l("i",{"data-feather":"check"},null,-1)])),l("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:t[45]||(t[45]=$(s=>e.showConfirmation=!1,["stop"]))},t[88]||(t[88]=[l("i",{"data-feather":"x"},null,-1)]))])):B("",!0)])):B("",!0),l("div",xgt,[l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:t[46]||(t[46]=$((...s)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...s),["stop"]))},t[89]||(t[89]=[l("i",{"data-feather":"codepen"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a markdown file",type:"button",onClick:t[47]||(t[47]=$((...s)=>e.exportDiscussions&&e.exportDiscussions(...s),["stop"]))},t[90]||(t[90]=[l("i",{"data-feather":"folder"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a markdown file",type:"button",onClick:t[48]||(t[48]=$((...s)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...s),["stop"]))},t[91]||(t[91]=[l("i",{"data-feather":"bookmark"},null,-1)])),l("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:t[49]||(t[49]=$((...s)=>e.selectAllDiscussions&&e.selectAllDiscussions(...s),["stop"]))},t[92]||(t[92]=[l("i",{"data-feather":"list"},null,-1)]))])])])):B("",!0),l("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll overflow-x-hidden custom-scrollbar",onDragover:t[50]||(t[50]=$(s=>e.setDropZoneDiscussion(),["stop","prevent"]))},[l("div",Cgt,[l("div",{class:Pe(["mx-0 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[l("div",{id:"dis-list",class:Pe([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full pb-80"])},[e.list.length>0?(T(),at(Oi,{key:0,name:"list"},{default:Ne(()=>[(T(!0),x(Le,null,We(e.list,(s,i)=>(T(),at(X0,{key:s.id,id:s.id,title:s.title,selected:e.currentDiscussion.id==s.id,loading:s.loading,isCheckbox:e.isCheckbox,checkBoxValue:s.checkBoxValue,openfolder_enabled:!0,onSelect:r=>e.selectDiscussion(s),onDelete:r=>e.deleteDiscussion(s.id),onOpenFolder:e.openFolder,onEditTitle:e.editTitle,onMakeTitle:e.makeTitle,onChecked:e.checkUncheckDiscussion},null,8,["id","title","selected","loading","isCheckbox","checkBoxValue","onSelect","onDelete","onOpenFolder","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):B("",!0),e.list.length<1?(T(),x("div",wgt,t[93]||(t[93]=[l("p",{class:"px-3"},"No discussions are found",-1)]))):B("",!0)],2)],2)])],32),l("div",Rgt,[l("div",{class:"chat-bar text-center flex items-center",onClick:t[51]||(t[51]=(...s)=>e.showDatabaseSelector&&e.showDatabaseSelector(...s))},[z(lp,null,{default:Ne(()=>t[94]||(t[94]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"mr-2"},[l("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),l("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),l("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})],-1)])),_:1}),l("p",Agt,Y(e.formatted_database_name.replace("_"," ")),1)])])])):B("",!0)]),_:1}),e.isReady?(T(),x("div",Mgt,[l("div",{id:"messages-list",class:Pe(["w-full z-0 flex flex-col flex-grow overflow-y-auto scrollbar",e.isDragOverChat?"pointer-events-none":""])},[l("div",Ngt,[e.discussionArr.length>0?(T(),at(Oi,{key:0,name:"list"},{default:Ne(()=>[(T(!0),x(Le,null,We(e.discussionArr,(s,i)=>(T(),at(fN,{key:s.id,message:s,id:"msg-"+s.id,ref_for:!0,ref:"msg-"+s.id,host:e.host,onCopy:e.copyToClipBoard,onDelete:e.deleteMessage,onRankUp:e.rankUpMessage,onRankDown:e.rankDownMessage,onUpdateMessage:e.updateMessage,onResendMessage:e.resendMessage,onContinueMessage:e.continueMessage,avatar:e.getAvatar(s.sender)},null,8,["message","id","host","onCopy","onDelete","onRankUp","onRankDown","onUpdateMessage","onResendMessage","onContinueMessage","avatar"]))),128)),e.discussionArr.length<2&&e.personality.prompts_list.length>0?(T(),x("div",Igt,[t[99]||(t[99]=l("h2",{class:"text-2xl font-bold mb-6 text-gray-800 dark:text-gray-200"},"Prompt Examples",-1)),l("div",Ogt,[l("div",kgt,[(T(!0),x(Le,null,We(e.personality.prompts_list,(s,i)=>(T(),x("div",{title:e.extractTitle(s),key:i,onClick:r=>e.handlePromptSelection(s),class:"flex-shrink-0 w-[300px] bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg p-6 cursor-pointer hover:shadow-xl transition-all duration-300 ease-in-out transform hover:scale-105 flex flex-col justify-between min-h-[220px] group"},[l("div",Lgt,[l("h3",{class:"font-bold text-lg text-gray-900 dark:text-gray-100 mb-2 truncate",title:e.extractTitle(s)},Y(e.extractTitle(s)),9,Pgt),l("div",{title:s,class:"text-base text-gray-700 dark:text-gray-300 overflow-hidden line-clamp-4"},Y(e.getPromptContent(s)),9,Fgt)]),t[95]||(t[95]=l("div",{class:"mt-4 text-sm font-medium text-blue-600 dark:text-blue-400 opacity-0 group-hover:opacity-100 transition-opacity duration-300"}," Click to select ",-1))],8,Dgt))),128))])]),e.showPlaceholderModal?(T(),x("div",Ugt,[l("div",Bgt,[t[98]||(t[98]=l("h3",{class:"text-lg font-semibold mb-4"},"Fill in the placeholders",-1)),l("div",Ggt,[l("div",Vgt,[t[96]||(t[96]=l("h4",{class:"text-sm font-medium mb-2 text-gray-600 dark:text-gray-400"},"Live Preview:",-1)),l("div",zgt,[l("span",Hgt,Y(e.getPromptContent(e.previewPrompt)),1)])]),l("div",qgt,[l("div",Ygt,[(T(!0),x(Le,null,We(e.parsedPlaceholders,(s,i)=>(T(),x("div",{key:s.fullText,class:"flex flex-col"},[l("label",{for:"placeholder-"+i,class:"text-sm font-medium mb-1"},Y(s.label),9,$gt),s.type==="text"?k((T(),x("input",{key:0,id:"placeholder-"+i,"onUpdate:modelValue":r=>e.placeholderValues[i]=r,type:"text",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",placeholder:s.label,onInput:t[52]||(t[52]=(...r)=>e.updatePreview&&e.updatePreview(...r))},null,40,Wgt)),[[ue,e.placeholderValues[i]]]):B("",!0),s.type==="int"?k((T(),x("input",{key:1,id:"placeholder-"+i,"onUpdate:modelValue":r=>e.placeholderValues[i]=r,type:"number",step:"1",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:t[53]||(t[53]=(...r)=>e.updatePreview&&e.updatePreview(...r))},null,40,Kgt)),[[ue,e.placeholderValues[i],void 0,{number:!0}]]):B("",!0),s.type==="float"?k((T(),x("input",{key:2,id:"placeholder-"+i,"onUpdate:modelValue":r=>e.placeholderValues[i]=r,type:"number",step:"0.01",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:t[54]||(t[54]=(...r)=>e.updatePreview&&e.updatePreview(...r))},null,40,jgt)),[[ue,e.placeholderValues[i],void 0,{number:!0}]]):B("",!0),s.type==="multiline"?k((T(),x("textarea",{key:3,id:"placeholder-"+i,"onUpdate:modelValue":r=>e.placeholderValues[i]=r,rows:"4",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:t[55]||(t[55]=(...r)=>e.updatePreview&&e.updatePreview(...r))},null,40,Qgt)),[[ue,e.placeholderValues[i]]]):B("",!0),s.type==="code"?(T(),x("div",Xgt,[l("div",Zgt,Y(s.language||"Plain text"),1),k(l("textarea",{id:"placeholder-"+i,"onUpdate:modelValue":r=>e.placeholderValues[i]=r,rows:"8",class:"w-full p-2 font-mono bg-gray-100 dark:bg-gray-900 border-t",onInput:t[56]||(t[56]=(...r)=>e.updatePreview&&e.updatePreview(...r))},null,40,Jgt),[[ue,e.placeholderValues[i]]])])):B("",!0),s.type==="options"?k((T(),x("select",{key:5,id:"placeholder-"+i,"onUpdate:modelValue":r=>e.placeholderValues[i]=r,class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onChange:t[57]||(t[57]=(...r)=>e.updatePreview&&e.updatePreview(...r))},[t[97]||(t[97]=l("option",{value:"",disabled:""},"Select an option",-1)),(T(!0),x(Le,null,We(s.options,r=>(T(),x("option",{key:r,value:r},Y(r),9,tbt))),128))],40,ebt)),[[Ot,e.placeholderValues[i]]]):B("",!0)]))),128))])])]),l("div",nbt,[l("button",{onClick:t[58]||(t[58]=(...s)=>e.cancelPlaceholders&&e.cancelPlaceholders(...s)),class:"px-4 py-2 text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"}," Cancel "),l("button",{onClick:t[59]||(t[59]=(...s)=>e.applyPlaceholders&&e.applyPlaceholders(...s)),class:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600"}," Apply ")])])])):B("",!0)])):B("",!0)]),_:1})):B("",!0),e.currentDiscussion.id?B("",!0):(T(),at(mN,{key:1})),t[100]||(t[100]=l("div",null,[l("br"),l("br"),l("br"),l("br"),l("br"),l("br"),l("br")],-1))]),t[101]||(t[101]=l("div",{class:"absolute w-full bottom-0 bg-transparent p-10 pt-16 bg-gradient-to-t from-bg-light dark:from-bg-dark from-5% via-bg-light dark:via-bg-dark via-10% to-transparent to-100%"},null,-1))],2),e.currentDiscussion.id?(T(),x("div",sbt,[z(_N,{ref:"chatBox",loading:e.isGenerating,discussionList:e.discussionArr,"on-show-toast-message":e.showToastMessage,"on-talk":e.talk,onPersonalitySelected:e.recoverFiles,onMessageSentEvent:e.sendMsg,onSendCMDEvent:e.sendCmd,onAddWebLink:e.add_webpage,onCreateEmptyUserMessage:e.createEmptyUserMessage,onCreateEmptyAIMessage:e.createEmptyAIMessage,onStopGenerating:e.stopGenerating,onLoaded:e.recoverFiles},null,8,["loading","discussionList","on-show-toast-message","on-talk","onPersonalitySelected","onMessageSentEvent","onSendCMDEvent","onAddWebLink","onCreateEmptyUserMessage","onCreateEmptyAIMessage","onStopGenerating","onLoaded"])])):B("",!0)])):B("",!0),z(Bs,{name:"slide-left"},{default:Ne(()=>[e.showRightPanel?(T(),x("div",ibt,[l("div",rbt,null,512)])):B("",!0)]),_:1}),z(Q0,{reference:"database_selector",class:"z-20",show:e.database_selectorDialogVisible,choices:e.databases,"can-remove":!0,onChoiceRemoved:e.ondatabase_selectorDialogRemoved,onChoiceSelected:e.ondatabase_selectorDialogSelected,onCloseDialog:e.onclosedatabase_selectorDialog,onChoiceValidated:e.onvalidatedatabase_selectorChoice},null,8,["show","choices","onChoiceRemoved","onChoiceSelected","onCloseDialog","onChoiceValidated"]),k(l("div",obt,[z(C0,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),l("p",abt,Y(e.loading_infos)+" ...",1)],512),[[_t,e.progress_visibility]]),z(RN,{ref:"personality_editor",config:e.currentPersonConfig,personality:e.selectedPersonality},null,8,["config","personality"]),l("div",lbt,[z(AN,{ref:"news"},null,512)]),z(uN,{ref:"skills_lib"},null,512)],64))}}),fbt=st(pbt,[["__scopeId","data-v-57566b64"]]);/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const cy="159",fbt=0,oC=1,_bt=2,NN=1,mbt=2,Ci=3,Fi=0,Jn=1,ei=2,hr=0,ra=1,aC=2,lC=3,cC=4,hbt=5,Yr=100,gbt=101,bbt=102,dC=103,uC=104,ybt=200,Ebt=201,vbt=202,Sbt=203,fb=204,_b=205,Tbt=206,xbt=207,Cbt=208,wbt=209,Rbt=210,Abt=211,Mbt=212,Nbt=213,Ibt=214,Obt=0,kbt=1,Dbt=2,mu=3,Lbt=4,Pbt=5,Fbt=6,Ubt=7,dy=0,Bbt=1,Gbt=2,gr=0,Vbt=1,zbt=2,Hbt=3,qbt=4,Ybt=5,pC="attached",$bt="detached",IN=300,ya=301,Ea=302,mb=303,hb=304,fp=306,va=1e3,hs=1001,hu=1002,gn=1003,gb=1004,kd=1005,Kn=1006,ON=1007,_o=1008,br=1009,Wbt=1010,Kbt=1011,uy=1012,kN=1013,fr=1014,Mi=1015,Ql=1016,DN=1017,LN=1018,no=1020,jbt=1021,gs=1023,Qbt=1024,Xbt=1025,so=1026,Sa=1027,Zbt=1028,PN=1029,Jbt=1030,FN=1031,UN=1033,qh=33776,Yh=33777,$h=33778,Wh=33779,fC=35840,_C=35841,mC=35842,hC=35843,BN=36196,gC=37492,bC=37496,yC=37808,EC=37809,vC=37810,SC=37811,TC=37812,xC=37813,CC=37814,wC=37815,RC=37816,AC=37817,MC=37818,NC=37819,IC=37820,OC=37821,Kh=36492,kC=36494,DC=36495,e0t=36283,LC=36284,PC=36285,FC=36286,Xl=2300,Ta=2301,jh=2302,UC=2400,BC=2401,GC=2402,t0t=2500,n0t=0,GN=1,bb=2,VN=3e3,io=3001,s0t=3200,i0t=3201,py=0,r0t=1,bs="",nn="srgb",Cn="srgb-linear",fy="display-p3",_p="display-p3-linear",gu="linear",jt="srgb",bu="rec709",yu="p3",Ro=7680,VC=519,o0t=512,a0t=513,l0t=514,zN=515,c0t=516,d0t=517,u0t=518,p0t=519,yb=35044,zC="300 es",Eb=1035,Ni=2e3,Eu=2001;class Ha{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const s=this._listeners;s[e]===void 0&&(s[e]=[]),s[e].indexOf(t)===-1&&s[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const s=this._listeners;return s[e]!==void 0&&s[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const s=this._listeners[e.type];if(s!==void 0){e.target=this;const i=s.slice(0);for(let r=0,o=i.length;r>8&255]+An[n>>16&255]+An[n>>24&255]+"-"+An[e&255]+An[e>>8&255]+"-"+An[e>>16&15|64]+An[e>>24&255]+"-"+An[t&63|128]+An[t>>8&255]+"-"+An[t>>16&255]+An[t>>24&255]+An[s&255]+An[s>>8&255]+An[s>>16&255]+An[s>>24&255]).toLowerCase()}function In(n,e,t){return Math.max(e,Math.min(t,n))}function _y(n,e){return(n%e+e)%e}function f0t(n,e,t,s,i){return s+(n-e)*(i-s)/(t-e)}function _0t(n,e,t){return n!==e?(t-n)/(e-n):0}function Ol(n,e,t){return(1-t)*n+t*e}function m0t(n,e,t,s){return Ol(n,e,1-Math.exp(-t*s))}function h0t(n,e=1){return e-Math.abs(_y(n,e*2)-e)}function g0t(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function b0t(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function y0t(n,e){return n+Math.floor(Math.random()*(e-n+1))}function E0t(n,e){return n+Math.random()*(e-n)}function v0t(n){return n*(.5-Math.random())}function S0t(n){n!==void 0&&(HC=n);let e=HC+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function T0t(n){return n*Il}function x0t(n){return n*xa}function vb(n){return(n&n-1)===0&&n!==0}function C0t(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function vu(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function w0t(n,e,t,s,i){const r=Math.cos,o=Math.sin,a=r(t/2),c=o(t/2),d=r((e+s)/2),u=o((e+s)/2),_=r((e-s)/2),m=o((e-s)/2),h=r((s-e)/2),g=o((s-e)/2);switch(i){case"XYX":n.set(a*u,c*_,c*m,a*d);break;case"YZY":n.set(c*m,a*u,c*_,a*d);break;case"ZXZ":n.set(c*_,c*m,a*u,a*d);break;case"XZX":n.set(a*u,c*g,c*h,a*d);break;case"YXY":n.set(c*h,a*u,c*g,a*d);break;case"ZYZ":n.set(c*g,c*h,a*u,a*d);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function ti(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Bt(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const R0t={DEG2RAD:Il,RAD2DEG:xa,generateUUID:Vs,clamp:In,euclideanModulo:_y,mapLinear:f0t,inverseLerp:_0t,lerp:Ol,damp:m0t,pingpong:h0t,smoothstep:g0t,smootherstep:b0t,randInt:y0t,randFloat:E0t,randFloatSpread:v0t,seededRandom:S0t,degToRad:T0t,radToDeg:x0t,isPowerOfTwo:vb,ceilPowerOfTwo:C0t,floorPowerOfTwo:vu,setQuaternionFromProperEuler:w0t,normalize:Bt,denormalize:ti};class Rt{constructor(e=0,t=0){Rt.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,s=this.y,i=e.elements;return this.x=i[0]*t+i[3]*s+i[6],this.y=i[1]*t+i[4]*s+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(t,s)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const s=this.dot(e)/t;return Math.acos(In(s,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,s=this.y-e.y;return t*t+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,s){return this.x=e.x+(t.x-e.x)*s,this.y=e.y+(t.y-e.y)*s,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const s=Math.cos(t),i=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*s-o*i+e.x,this.y=r*i+o*s+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Tt{constructor(e,t,s,i,r,o,a,c,d){Tt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,s,i,r,o,a,c,d)}set(e,t,s,i,r,o,a,c,d){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=t,u[4]=r,u[5]=c,u[6]=s,u[7]=o,u[8]=d,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,s=e.elements;return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t[4]=s[4],t[5]=s[5],t[6]=s[6],t[7]=s[7],t[8]=s[8],this}extractBasis(e,t,s){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),s.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const s=e.elements,i=t.elements,r=this.elements,o=s[0],a=s[3],c=s[6],d=s[1],u=s[4],_=s[7],m=s[2],h=s[5],g=s[8],f=i[0],b=i[3],y=i[6],E=i[1],v=i[4],S=i[7],R=i[2],w=i[5],A=i[8];return r[0]=o*f+a*E+c*R,r[3]=o*b+a*v+c*w,r[6]=o*y+a*S+c*A,r[1]=d*f+u*E+_*R,r[4]=d*b+u*v+_*w,r[7]=d*y+u*S+_*A,r[2]=m*f+h*E+g*R,r[5]=m*b+h*v+g*w,r[8]=m*y+h*S+g*A,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],d=e[7],u=e[8];return t*o*u-t*a*d-s*r*u+s*a*c+i*r*d-i*o*c}invert(){const e=this.elements,t=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],d=e[7],u=e[8],_=u*o-a*d,m=a*c-u*r,h=d*r-o*c,g=t*_+s*m+i*h;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const f=1/g;return e[0]=_*f,e[1]=(i*d-u*s)*f,e[2]=(a*s-i*o)*f,e[3]=m*f,e[4]=(u*t-i*c)*f,e[5]=(i*r-a*t)*f,e[6]=h*f,e[7]=(s*c-d*t)*f,e[8]=(o*t-s*r)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,s,i,r,o,a){const c=Math.cos(r),d=Math.sin(r);return this.set(s*c,s*d,-s*(c*o+d*a)+o+e,-i*d,i*c,-i*(-d*o+c*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Qh.makeScale(e,t)),this}rotate(e){return this.premultiply(Qh.makeRotation(-e)),this}translate(e,t){return this.premultiply(Qh.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),s=Math.sin(e);return this.set(t,-s,0,s,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,s=e.elements;for(let i=0;i<9;i++)if(t[i]!==s[i])return!1;return!0}fromArray(e,t=0){for(let s=0;s<9;s++)this.elements[s]=e[s+t];return this}toArray(e=[],t=0){const s=this.elements;return e[t]=s[0],e[t+1]=s[1],e[t+2]=s[2],e[t+3]=s[3],e[t+4]=s[4],e[t+5]=s[5],e[t+6]=s[6],e[t+7]=s[7],e[t+8]=s[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Qh=new Tt;function HN(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function Zl(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function A0t(){const n=Zl("canvas");return n.style.display="block",n}const qC={};function kl(n){n in qC||(qC[n]=!0,console.warn(n))}const YC=new Tt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),$C=new Tt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Hc={[Cn]:{transfer:gu,primaries:bu,toReference:n=>n,fromReference:n=>n},[nn]:{transfer:jt,primaries:bu,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[_p]:{transfer:gu,primaries:yu,toReference:n=>n.applyMatrix3($C),fromReference:n=>n.applyMatrix3(YC)},[fy]:{transfer:jt,primaries:yu,toReference:n=>n.convertSRGBToLinear().applyMatrix3($C),fromReference:n=>n.applyMatrix3(YC).convertLinearToSRGB()}},M0t=new Set([Cn,_p]),Pt={enabled:!0,_workingColorSpace:Cn,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(n){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!n},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!M0t.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const s=Hc[e].toReference,i=Hc[t].fromReference;return i(s(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return Hc[n].primaries},getTransfer:function(n){return n===bs?gu:Hc[n].transfer}};function oa(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Xh(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let Ao;class qN{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Ao===void 0&&(Ao=Zl("canvas")),Ao.width=e.width,Ao.height=e.height;const s=Ao.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),t=Ao}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Zl("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");s.drawImage(e,0,0,e.width,e.height);const i=s.getImageData(0,0,e.width,e.height),r=i.data;for(let o=0;o0&&(s.userData=this.userData),t||(e.textures[this.uuid]=s),s}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==IN)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case va:e.x=e.x-Math.floor(e.x);break;case hs:e.x=e.x<0?0:1;break;case hu:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case va:e.y=e.y-Math.floor(e.y);break;case hs:e.y=e.y<0?0:1;break;case hu:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return kl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===nn?io:VN}set encoding(e){kl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===io?nn:bs}}xn.DEFAULT_IMAGE=null;xn.DEFAULT_MAPPING=IN;xn.DEFAULT_ANISOTROPY=1;class Wt{constructor(e=0,t=0,s=0,i=1){Wt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=s,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,s,i){return this.x=e,this.y=t,this.z=s,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,s=this.y,i=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*s+o[8]*i+o[12]*r,this.y=o[1]*t+o[5]*s+o[9]*i+o[13]*r,this.z=o[2]*t+o[6]*s+o[10]*i+o[14]*r,this.w=o[3]*t+o[7]*s+o[11]*i+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,s,i,r;const c=e.elements,d=c[0],u=c[4],_=c[8],m=c[1],h=c[5],g=c[9],f=c[2],b=c[6],y=c[10];if(Math.abs(u-m)<.01&&Math.abs(_-f)<.01&&Math.abs(g-b)<.01){if(Math.abs(u+m)<.1&&Math.abs(_+f)<.1&&Math.abs(g+b)<.1&&Math.abs(d+h+y-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const v=(d+1)/2,S=(h+1)/2,R=(y+1)/2,w=(u+m)/4,A=(_+f)/4,O=(g+b)/4;return v>S&&v>R?v<.01?(s=0,i=.707106781,r=.707106781):(s=Math.sqrt(v),i=w/s,r=A/s):S>R?S<.01?(s=.707106781,i=0,r=.707106781):(i=Math.sqrt(S),s=w/i,r=O/i):R<.01?(s=.707106781,i=.707106781,r=0):(r=Math.sqrt(R),s=A/r,i=O/r),this.set(s,i,r,t),this}let E=Math.sqrt((b-g)*(b-g)+(_-f)*(_-f)+(m-u)*(m-u));return Math.abs(E)<.001&&(E=1),this.x=(b-g)/E,this.y=(_-f)/E,this.z=(m-u)/E,this.w=Math.acos((d+h+y-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(t,s)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,s){return this.x=e.x+(t.x-e.x)*s,this.y=e.y+(t.y-e.y)*s,this.z=e.z+(t.z-e.z)*s,this.w=e.w+(t.w-e.w)*s,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class O0t extends Ha{constructor(e=1,t=1,s={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Wt(0,0,e,t),this.scissorTest=!1,this.viewport=new Wt(0,0,e,t);const i={width:e,height:t,depth:1};s.encoding!==void 0&&(kl("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),s.colorSpace=s.encoding===io?nn:bs),s=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Kn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},s),this.texture=new xn(i,s.mapping,s.wrapS,s.wrapT,s.magFilter,s.minFilter,s.format,s.type,s.anisotropy,s.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=s.generateMipmaps,this.texture.internalFormat=s.internalFormat,this.depthBuffer=s.depthBuffer,this.stencilBuffer=s.stencilBuffer,this.depthTexture=s.depthTexture,this.samples=s.samples}setSize(e,t,s=1){(this.width!==e||this.height!==t||this.depth!==s)&&(this.width=e,this.height=t,this.depth=s,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=s,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new YN(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class mo extends O0t{constructor(e=1,t=1,s={}){super(e,t,s),this.isWebGLRenderTarget=!0}}class $N extends xn{constructor(e=null,t=1,s=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:s,depth:i},this.magFilter=gn,this.minFilter=gn,this.wrapR=hs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class k0t extends xn{constructor(e=null,t=1,s=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:s,depth:i},this.magFilter=gn,this.minFilter=gn,this.wrapR=hs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Mr{constructor(e=0,t=0,s=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=s,this._w=i}static slerpFlat(e,t,s,i,r,o,a){let c=s[i+0],d=s[i+1],u=s[i+2],_=s[i+3];const m=r[o+0],h=r[o+1],g=r[o+2],f=r[o+3];if(a===0){e[t+0]=c,e[t+1]=d,e[t+2]=u,e[t+3]=_;return}if(a===1){e[t+0]=m,e[t+1]=h,e[t+2]=g,e[t+3]=f;return}if(_!==f||c!==m||d!==h||u!==g){let b=1-a;const y=c*m+d*h+u*g+_*f,E=y>=0?1:-1,v=1-y*y;if(v>Number.EPSILON){const R=Math.sqrt(v),w=Math.atan2(R,y*E);b=Math.sin(b*w)/R,a=Math.sin(a*w)/R}const S=a*E;if(c=c*b+m*S,d=d*b+h*S,u=u*b+g*S,_=_*b+f*S,b===1-a){const R=1/Math.sqrt(c*c+d*d+u*u+_*_);c*=R,d*=R,u*=R,_*=R}}e[t]=c,e[t+1]=d,e[t+2]=u,e[t+3]=_}static multiplyQuaternionsFlat(e,t,s,i,r,o){const a=s[i],c=s[i+1],d=s[i+2],u=s[i+3],_=r[o],m=r[o+1],h=r[o+2],g=r[o+3];return e[t]=a*g+u*_+c*h-d*m,e[t+1]=c*g+u*m+d*_-a*h,e[t+2]=d*g+u*h+a*m-c*_,e[t+3]=u*g-a*_-c*m-d*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,s,i){return this._x=e,this._y=t,this._z=s,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const s=e._x,i=e._y,r=e._z,o=e._order,a=Math.cos,c=Math.sin,d=a(s/2),u=a(i/2),_=a(r/2),m=c(s/2),h=c(i/2),g=c(r/2);switch(o){case"XYZ":this._x=m*u*_+d*h*g,this._y=d*h*_-m*u*g,this._z=d*u*g+m*h*_,this._w=d*u*_-m*h*g;break;case"YXZ":this._x=m*u*_+d*h*g,this._y=d*h*_-m*u*g,this._z=d*u*g-m*h*_,this._w=d*u*_+m*h*g;break;case"ZXY":this._x=m*u*_-d*h*g,this._y=d*h*_+m*u*g,this._z=d*u*g+m*h*_,this._w=d*u*_-m*h*g;break;case"ZYX":this._x=m*u*_-d*h*g,this._y=d*h*_+m*u*g,this._z=d*u*g-m*h*_,this._w=d*u*_+m*h*g;break;case"YZX":this._x=m*u*_+d*h*g,this._y=d*h*_+m*u*g,this._z=d*u*g-m*h*_,this._w=d*u*_-m*h*g;break;case"XZY":this._x=m*u*_-d*h*g,this._y=d*h*_-m*u*g,this._z=d*u*g+m*h*_,this._w=d*u*_+m*h*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const s=t/2,i=Math.sin(s);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(s),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,s=t[0],i=t[4],r=t[8],o=t[1],a=t[5],c=t[9],d=t[2],u=t[6],_=t[10],m=s+a+_;if(m>0){const h=.5/Math.sqrt(m+1);this._w=.25/h,this._x=(u-c)*h,this._y=(r-d)*h,this._z=(o-i)*h}else if(s>a&&s>_){const h=2*Math.sqrt(1+s-a-_);this._w=(u-c)/h,this._x=.25*h,this._y=(i+o)/h,this._z=(r+d)/h}else if(a>_){const h=2*Math.sqrt(1+a-s-_);this._w=(r-d)/h,this._x=(i+o)/h,this._y=.25*h,this._z=(c+u)/h}else{const h=2*Math.sqrt(1+_-s-a);this._w=(o-i)/h,this._x=(r+d)/h,this._y=(c+u)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let s=e.dot(t)+1;return sMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=s):(this._x=0,this._y=-e.z,this._z=e.y,this._w=s)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=s),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(In(this.dot(e),-1,1)))}rotateTowards(e,t){const s=this.angleTo(e);if(s===0)return this;const i=Math.min(1,t/s);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const s=e._x,i=e._y,r=e._z,o=e._w,a=t._x,c=t._y,d=t._z,u=t._w;return this._x=s*u+o*a+i*d-r*c,this._y=i*u+o*c+r*a-s*d,this._z=r*u+o*d+s*c-i*a,this._w=o*u-s*a-i*c-r*d,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const s=this._x,i=this._y,r=this._z,o=this._w;let a=o*e._w+s*e._x+i*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=s,this._y=i,this._z=r,this;const c=1-a*a;if(c<=Number.EPSILON){const h=1-t;return this._w=h*o+t*this._w,this._x=h*s+t*this._x,this._y=h*i+t*this._y,this._z=h*r+t*this._z,this.normalize(),this._onChangeCallback(),this}const d=Math.sqrt(c),u=Math.atan2(d,a),_=Math.sin((1-t)*u)/d,m=Math.sin(t*u)/d;return this._w=o*_+this._w*m,this._x=s*_+this._x*m,this._y=i*_+this._y*m,this._z=r*_+this._z*m,this._onChangeCallback(),this}slerpQuaternions(e,t,s){return this.copy(e).slerp(t,s)}random(){const e=Math.random(),t=Math.sqrt(1-e),s=Math.sqrt(e),i=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(i),s*Math.sin(r),s*Math.cos(r),t*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class re{constructor(e=0,t=0,s=0){re.prototype.isVector3=!0,this.x=e,this.y=t,this.z=s}set(e,t,s){return s===void 0&&(s=this.z),this.x=e,this.y=t,this.z=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(WC.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(WC.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,s=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*s+r[6]*i,this.y=r[1]*t+r[4]*s+r[7]*i,this.z=r[2]*t+r[5]*s+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,s=this.y,i=this.z,r=e.elements,o=1/(r[3]*t+r[7]*s+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*s+r[8]*i+r[12])*o,this.y=(r[1]*t+r[5]*s+r[9]*i+r[13])*o,this.z=(r[2]*t+r[6]*s+r[10]*i+r[14])*o,this}applyQuaternion(e){const t=this.x,s=this.y,i=this.z,r=e.x,o=e.y,a=e.z,c=e.w,d=2*(o*i-a*s),u=2*(a*t-r*i),_=2*(r*s-o*t);return this.x=t+c*d+o*_-a*u,this.y=s+c*u+a*d-r*_,this.z=i+c*_+r*u-o*d,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,s=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*s+r[8]*i,this.y=r[1]*t+r[5]*s+r[9]*i,this.z=r[2]*t+r[6]*s+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(t,s)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,s){return this.x=e.x+(t.x-e.x)*s,this.y=e.y+(t.y-e.y)*s,this.z=e.z+(t.z-e.z)*s,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const s=e.x,i=e.y,r=e.z,o=t.x,a=t.y,c=t.z;return this.x=i*c-r*a,this.y=r*o-s*c,this.z=s*a-i*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const s=e.dot(this)/t;return this.copy(e).multiplyScalar(s)}projectOnPlane(e){return Jh.copy(this).projectOnVector(e),this.sub(Jh)}reflect(e){return this.sub(Jh.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const s=this.dot(e)/t;return Math.acos(In(s,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,s=this.y-e.y,i=this.z-e.z;return t*t+s*s+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,s){const i=Math.sin(t)*e;return this.x=i*Math.sin(s),this.y=Math.cos(t)*e,this.z=i*Math.cos(s),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,s){return this.x=e*Math.sin(t),this.y=s,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),s=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=s,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,s=Math.sqrt(1-e**2);return this.x=s*Math.cos(t),this.y=s*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Jh=new re,WC=new Mr;class Gi{constructor(e=new re(1/0,1/0,1/0),t=new re(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,s=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Os),Os.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,s;return e.normal.x>0?(t=e.normal.x*this.min.x,s=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,s=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,s+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,s+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,s+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,s+=e.normal.z*this.min.z),t<=-e.constant&&s>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ol),Yc.subVectors(this.max,ol),Mo.subVectors(e.a,ol),No.subVectors(e.b,ol),Io.subVectors(e.c,ol),Ki.subVectors(No,Mo),ji.subVectors(Io,No),Dr.subVectors(Mo,Io);let t=[0,-Ki.z,Ki.y,0,-ji.z,ji.y,0,-Dr.z,Dr.y,Ki.z,0,-Ki.x,ji.z,0,-ji.x,Dr.z,0,-Dr.x,-Ki.y,Ki.x,0,-ji.y,ji.x,0,-Dr.y,Dr.x,0];return!eg(t,Mo,No,Io,Yc)||(t=[1,0,0,0,1,0,0,0,1],!eg(t,Mo,No,Io,Yc))?!1:($c.crossVectors(Ki,ji),t=[$c.x,$c.y,$c.z],eg(t,Mo,No,Io,Yc))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Os).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Os).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(bi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),bi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),bi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),bi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),bi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),bi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),bi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),bi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(bi),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const bi=[new re,new re,new re,new re,new re,new re,new re,new re],Os=new re,qc=new Gi,Mo=new re,No=new re,Io=new re,Ki=new re,ji=new re,Dr=new re,ol=new re,Yc=new re,$c=new re,Lr=new re;function eg(n,e,t,s,i){for(let r=0,o=n.length-3;r<=o;r+=3){Lr.fromArray(n,r);const a=i.x*Math.abs(Lr.x)+i.y*Math.abs(Lr.y)+i.z*Math.abs(Lr.z),c=e.dot(Lr),d=t.dot(Lr),u=s.dot(Lr);if(Math.max(-Math.max(c,d,u),Math.min(c,d,u))>a)return!1}return!0}const D0t=new Gi,al=new re,tg=new re;class fi{constructor(e=new re,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const s=this.center;t!==void 0?s.copy(t):D0t.setFromPoints(e).getCenter(s);let i=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;al.subVectors(e,this.center);const t=al.lengthSq();if(t>this.radius*this.radius){const s=Math.sqrt(t),i=(s-this.radius)*.5;this.center.addScaledVector(al,i/s),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(tg.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(al.copy(e.center).add(tg)),this.expandByPoint(al.copy(e.center).sub(tg))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const yi=new re,ng=new re,Wc=new re,Qi=new re,sg=new re,Kc=new re,ig=new re;class mp{constructor(e=new re,t=new re(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,yi)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const s=t.dot(this.direction);return s<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,s)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=yi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(yi.copy(this.origin).addScaledVector(this.direction,t),yi.distanceToSquared(e))}distanceSqToSegment(e,t,s,i){ng.copy(e).add(t).multiplyScalar(.5),Wc.copy(t).sub(e).normalize(),Qi.copy(this.origin).sub(ng);const r=e.distanceTo(t)*.5,o=-this.direction.dot(Wc),a=Qi.dot(this.direction),c=-Qi.dot(Wc),d=Qi.lengthSq(),u=Math.abs(1-o*o);let _,m,h,g;if(u>0)if(_=o*c-a,m=o*a-c,g=r*u,_>=0)if(m>=-g)if(m<=g){const f=1/u;_*=f,m*=f,h=_*(_+o*m+2*a)+m*(o*_+m+2*c)+d}else m=r,_=Math.max(0,-(o*m+a)),h=-_*_+m*(m+2*c)+d;else m=-r,_=Math.max(0,-(o*m+a)),h=-_*_+m*(m+2*c)+d;else m<=-g?(_=Math.max(0,-(-o*r+a)),m=_>0?-r:Math.min(Math.max(-r,-c),r),h=-_*_+m*(m+2*c)+d):m<=g?(_=0,m=Math.min(Math.max(-r,-c),r),h=m*(m+2*c)+d):(_=Math.max(0,-(o*r+a)),m=_>0?r:Math.min(Math.max(-r,-c),r),h=-_*_+m*(m+2*c)+d);else m=o>0?-r:r,_=Math.max(0,-(o*m+a)),h=-_*_+m*(m+2*c)+d;return s&&s.copy(this.origin).addScaledVector(this.direction,_),i&&i.copy(ng).addScaledVector(Wc,m),h}intersectSphere(e,t){yi.subVectors(e.center,this.origin);const s=yi.dot(this.direction),i=yi.dot(yi)-s*s,r=e.radius*e.radius;if(i>r)return null;const o=Math.sqrt(r-i),a=s-o,c=s+o;return c<0?null:a<0?this.at(c,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const s=-(this.origin.dot(e.normal)+e.constant)/t;return s>=0?s:null}intersectPlane(e,t){const s=this.distanceToPlane(e);return s===null?null:this.at(s,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let s,i,r,o,a,c;const d=1/this.direction.x,u=1/this.direction.y,_=1/this.direction.z,m=this.origin;return d>=0?(s=(e.min.x-m.x)*d,i=(e.max.x-m.x)*d):(s=(e.max.x-m.x)*d,i=(e.min.x-m.x)*d),u>=0?(r=(e.min.y-m.y)*u,o=(e.max.y-m.y)*u):(r=(e.max.y-m.y)*u,o=(e.min.y-m.y)*u),s>o||r>i||((r>s||isNaN(s))&&(s=r),(o=0?(a=(e.min.z-m.z)*_,c=(e.max.z-m.z)*_):(a=(e.max.z-m.z)*_,c=(e.min.z-m.z)*_),s>c||a>i)||((a>s||s!==s)&&(s=a),(c=0?s:i,t)}intersectsBox(e){return this.intersectBox(e,yi)!==null}intersectTriangle(e,t,s,i,r){sg.subVectors(t,e),Kc.subVectors(s,e),ig.crossVectors(sg,Kc);let o=this.direction.dot(ig),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Qi.subVectors(this.origin,e);const c=a*this.direction.dot(Kc.crossVectors(Qi,Kc));if(c<0)return null;const d=a*this.direction.dot(sg.cross(Qi));if(d<0||c+d>o)return null;const u=-a*Qi.dot(ig);return u<0?null:this.at(u/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class xt{constructor(e,t,s,i,r,o,a,c,d,u,_,m,h,g,f,b){xt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,s,i,r,o,a,c,d,u,_,m,h,g,f,b)}set(e,t,s,i,r,o,a,c,d,u,_,m,h,g,f,b){const y=this.elements;return y[0]=e,y[4]=t,y[8]=s,y[12]=i,y[1]=r,y[5]=o,y[9]=a,y[13]=c,y[2]=d,y[6]=u,y[10]=_,y[14]=m,y[3]=h,y[7]=g,y[11]=f,y[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new xt().fromArray(this.elements)}copy(e){const t=this.elements,s=e.elements;return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t[4]=s[4],t[5]=s[5],t[6]=s[6],t[7]=s[7],t[8]=s[8],t[9]=s[9],t[10]=s[10],t[11]=s[11],t[12]=s[12],t[13]=s[13],t[14]=s[14],t[15]=s[15],this}copyPosition(e){const t=this.elements,s=e.elements;return t[12]=s[12],t[13]=s[13],t[14]=s[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,s){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),s.setFromMatrixColumn(this,2),this}makeBasis(e,t,s){return this.set(e.x,t.x,s.x,0,e.y,t.y,s.y,0,e.z,t.z,s.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,s=e.elements,i=1/Oo.setFromMatrixColumn(e,0).length(),r=1/Oo.setFromMatrixColumn(e,1).length(),o=1/Oo.setFromMatrixColumn(e,2).length();return t[0]=s[0]*i,t[1]=s[1]*i,t[2]=s[2]*i,t[3]=0,t[4]=s[4]*r,t[5]=s[5]*r,t[6]=s[6]*r,t[7]=0,t[8]=s[8]*o,t[9]=s[9]*o,t[10]=s[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,s=e.x,i=e.y,r=e.z,o=Math.cos(s),a=Math.sin(s),c=Math.cos(i),d=Math.sin(i),u=Math.cos(r),_=Math.sin(r);if(e.order==="XYZ"){const m=o*u,h=o*_,g=a*u,f=a*_;t[0]=c*u,t[4]=-c*_,t[8]=d,t[1]=h+g*d,t[5]=m-f*d,t[9]=-a*c,t[2]=f-m*d,t[6]=g+h*d,t[10]=o*c}else if(e.order==="YXZ"){const m=c*u,h=c*_,g=d*u,f=d*_;t[0]=m+f*a,t[4]=g*a-h,t[8]=o*d,t[1]=o*_,t[5]=o*u,t[9]=-a,t[2]=h*a-g,t[6]=f+m*a,t[10]=o*c}else if(e.order==="ZXY"){const m=c*u,h=c*_,g=d*u,f=d*_;t[0]=m-f*a,t[4]=-o*_,t[8]=g+h*a,t[1]=h+g*a,t[5]=o*u,t[9]=f-m*a,t[2]=-o*d,t[6]=a,t[10]=o*c}else if(e.order==="ZYX"){const m=o*u,h=o*_,g=a*u,f=a*_;t[0]=c*u,t[4]=g*d-h,t[8]=m*d+f,t[1]=c*_,t[5]=f*d+m,t[9]=h*d-g,t[2]=-d,t[6]=a*c,t[10]=o*c}else if(e.order==="YZX"){const m=o*c,h=o*d,g=a*c,f=a*d;t[0]=c*u,t[4]=f-m*_,t[8]=g*_+h,t[1]=_,t[5]=o*u,t[9]=-a*u,t[2]=-d*u,t[6]=h*_+g,t[10]=m-f*_}else if(e.order==="XZY"){const m=o*c,h=o*d,g=a*c,f=a*d;t[0]=c*u,t[4]=-_,t[8]=d*u,t[1]=m*_+f,t[5]=o*u,t[9]=h*_-g,t[2]=g*_-h,t[6]=a*u,t[10]=f*_+m}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(L0t,e,P0t)}lookAt(e,t,s){const i=this.elements;return ns.subVectors(e,t),ns.lengthSq()===0&&(ns.z=1),ns.normalize(),Xi.crossVectors(s,ns),Xi.lengthSq()===0&&(Math.abs(s.z)===1?ns.x+=1e-4:ns.z+=1e-4,ns.normalize(),Xi.crossVectors(s,ns)),Xi.normalize(),jc.crossVectors(ns,Xi),i[0]=Xi.x,i[4]=jc.x,i[8]=ns.x,i[1]=Xi.y,i[5]=jc.y,i[9]=ns.y,i[2]=Xi.z,i[6]=jc.z,i[10]=ns.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const s=e.elements,i=t.elements,r=this.elements,o=s[0],a=s[4],c=s[8],d=s[12],u=s[1],_=s[5],m=s[9],h=s[13],g=s[2],f=s[6],b=s[10],y=s[14],E=s[3],v=s[7],S=s[11],R=s[15],w=i[0],A=i[4],O=i[8],C=i[12],M=i[1],G=i[5],V=i[9],ee=i[13],I=i[2],H=i[6],q=i[10],L=i[14],W=i[3],se=i[7],oe=i[11],ye=i[15];return r[0]=o*w+a*M+c*I+d*W,r[4]=o*A+a*G+c*H+d*se,r[8]=o*O+a*V+c*q+d*oe,r[12]=o*C+a*ee+c*L+d*ye,r[1]=u*w+_*M+m*I+h*W,r[5]=u*A+_*G+m*H+h*se,r[9]=u*O+_*V+m*q+h*oe,r[13]=u*C+_*ee+m*L+h*ye,r[2]=g*w+f*M+b*I+y*W,r[6]=g*A+f*G+b*H+y*se,r[10]=g*O+f*V+b*q+y*oe,r[14]=g*C+f*ee+b*L+y*ye,r[3]=E*w+v*M+S*I+R*W,r[7]=E*A+v*G+S*H+R*se,r[11]=E*O+v*V+S*q+R*oe,r[15]=E*C+v*ee+S*L+R*ye,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],s=e[4],i=e[8],r=e[12],o=e[1],a=e[5],c=e[9],d=e[13],u=e[2],_=e[6],m=e[10],h=e[14],g=e[3],f=e[7],b=e[11],y=e[15];return g*(+r*c*_-i*d*_-r*a*m+s*d*m+i*a*h-s*c*h)+f*(+t*c*h-t*d*m+r*o*m-i*o*h+i*d*u-r*c*u)+b*(+t*d*_-t*a*h-r*o*_+s*o*h+r*a*u-s*d*u)+y*(-i*a*u-t*c*_+t*a*m+i*o*_-s*o*m+s*c*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,s){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=s),this}invert(){const e=this.elements,t=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],d=e[7],u=e[8],_=e[9],m=e[10],h=e[11],g=e[12],f=e[13],b=e[14],y=e[15],E=_*b*d-f*m*d+f*c*h-a*b*h-_*c*y+a*m*y,v=g*m*d-u*b*d-g*c*h+o*b*h+u*c*y-o*m*y,S=u*f*d-g*_*d+g*a*h-o*f*h-u*a*y+o*_*y,R=g*_*c-u*f*c-g*a*m+o*f*m+u*a*b-o*_*b,w=t*E+s*v+i*S+r*R;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/w;return e[0]=E*A,e[1]=(f*m*r-_*b*r-f*i*h+s*b*h+_*i*y-s*m*y)*A,e[2]=(a*b*r-f*c*r+f*i*d-s*b*d-a*i*y+s*c*y)*A,e[3]=(_*c*r-a*m*r-_*i*d+s*m*d+a*i*h-s*c*h)*A,e[4]=v*A,e[5]=(u*b*r-g*m*r+g*i*h-t*b*h-u*i*y+t*m*y)*A,e[6]=(g*c*r-o*b*r-g*i*d+t*b*d+o*i*y-t*c*y)*A,e[7]=(o*m*r-u*c*r+u*i*d-t*m*d-o*i*h+t*c*h)*A,e[8]=S*A,e[9]=(g*_*r-u*f*r-g*s*h+t*f*h+u*s*y-t*_*y)*A,e[10]=(o*f*r-g*a*r+g*s*d-t*f*d-o*s*y+t*a*y)*A,e[11]=(u*a*r-o*_*r-u*s*d+t*_*d+o*s*h-t*a*h)*A,e[12]=R*A,e[13]=(u*f*i-g*_*i+g*s*m-t*f*m-u*s*b+t*_*b)*A,e[14]=(g*a*i-o*f*i-g*s*c+t*f*c+o*s*b-t*a*b)*A,e[15]=(o*_*i-u*a*i+u*s*c-t*_*c-o*s*m+t*a*m)*A,this}scale(e){const t=this.elements,s=e.x,i=e.y,r=e.z;return t[0]*=s,t[4]*=i,t[8]*=r,t[1]*=s,t[5]*=i,t[9]*=r,t[2]*=s,t[6]*=i,t[10]*=r,t[3]*=s,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],s=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,s,i))}makeTranslation(e,t,s){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,s,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),s=Math.sin(e);return this.set(1,0,0,0,0,t,-s,0,0,s,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),s=Math.sin(e);return this.set(t,0,s,0,0,1,0,0,-s,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),s=Math.sin(e);return this.set(t,-s,0,0,s,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const s=Math.cos(t),i=Math.sin(t),r=1-s,o=e.x,a=e.y,c=e.z,d=r*o,u=r*a;return this.set(d*o+s,d*a-i*c,d*c+i*a,0,d*a+i*c,u*a+s,u*c-i*o,0,d*c-i*a,u*c+i*o,r*c*c+s,0,0,0,0,1),this}makeScale(e,t,s){return this.set(e,0,0,0,0,t,0,0,0,0,s,0,0,0,0,1),this}makeShear(e,t,s,i,r,o){return this.set(1,s,r,0,e,1,o,0,t,i,1,0,0,0,0,1),this}compose(e,t,s){const i=this.elements,r=t._x,o=t._y,a=t._z,c=t._w,d=r+r,u=o+o,_=a+a,m=r*d,h=r*u,g=r*_,f=o*u,b=o*_,y=a*_,E=c*d,v=c*u,S=c*_,R=s.x,w=s.y,A=s.z;return i[0]=(1-(f+y))*R,i[1]=(h+S)*R,i[2]=(g-v)*R,i[3]=0,i[4]=(h-S)*w,i[5]=(1-(m+y))*w,i[6]=(b+E)*w,i[7]=0,i[8]=(g+v)*A,i[9]=(b-E)*A,i[10]=(1-(m+f))*A,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,s){const i=this.elements;let r=Oo.set(i[0],i[1],i[2]).length();const o=Oo.set(i[4],i[5],i[6]).length(),a=Oo.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],ks.copy(this);const d=1/r,u=1/o,_=1/a;return ks.elements[0]*=d,ks.elements[1]*=d,ks.elements[2]*=d,ks.elements[4]*=u,ks.elements[5]*=u,ks.elements[6]*=u,ks.elements[8]*=_,ks.elements[9]*=_,ks.elements[10]*=_,t.setFromRotationMatrix(ks),s.x=r,s.y=o,s.z=a,this}makePerspective(e,t,s,i,r,o,a=Ni){const c=this.elements,d=2*r/(t-e),u=2*r/(s-i),_=(t+e)/(t-e),m=(s+i)/(s-i);let h,g;if(a===Ni)h=-(o+r)/(o-r),g=-2*o*r/(o-r);else if(a===Eu)h=-o/(o-r),g=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=_,c[12]=0,c[1]=0,c[5]=u,c[9]=m,c[13]=0,c[2]=0,c[6]=0,c[10]=h,c[14]=g,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,s,i,r,o,a=Ni){const c=this.elements,d=1/(t-e),u=1/(s-i),_=1/(o-r),m=(t+e)*d,h=(s+i)*u;let g,f;if(a===Ni)g=(o+r)*_,f=-2*_;else if(a===Eu)g=r*_,f=-1*_;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*d,c[4]=0,c[8]=0,c[12]=-m,c[1]=0,c[5]=2*u,c[9]=0,c[13]=-h,c[2]=0,c[6]=0,c[10]=f,c[14]=-g,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){const t=this.elements,s=e.elements;for(let i=0;i<16;i++)if(t[i]!==s[i])return!1;return!0}fromArray(e,t=0){for(let s=0;s<16;s++)this.elements[s]=e[s+t];return this}toArray(e=[],t=0){const s=this.elements;return e[t]=s[0],e[t+1]=s[1],e[t+2]=s[2],e[t+3]=s[3],e[t+4]=s[4],e[t+5]=s[5],e[t+6]=s[6],e[t+7]=s[7],e[t+8]=s[8],e[t+9]=s[9],e[t+10]=s[10],e[t+11]=s[11],e[t+12]=s[12],e[t+13]=s[13],e[t+14]=s[14],e[t+15]=s[15],e}}const Oo=new re,ks=new xt,L0t=new re(0,0,0),P0t=new re(1,1,1),Xi=new re,jc=new re,ns=new re,KC=new xt,jC=new Mr;class hp{constructor(e=0,t=0,s=0,i=hp.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=s,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,s,i=this._order){return this._x=e,this._y=t,this._z=s,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,s=!0){const i=e.elements,r=i[0],o=i[4],a=i[8],c=i[1],d=i[5],u=i[9],_=i[2],m=i[6],h=i[10];switch(t){case"XYZ":this._y=Math.asin(In(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,h),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-In(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-_,r),this._z=0);break;case"ZXY":this._x=Math.asin(In(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-_,h),this._z=Math.atan2(-o,d)):(this._y=0,this._z=Math.atan2(c,r));break;case"ZYX":this._y=Math.asin(-In(_,-1,1)),Math.abs(_)<.9999999?(this._x=Math.atan2(m,h),this._z=Math.atan2(c,r)):(this._x=0,this._z=Math.atan2(-o,d));break;case"YZX":this._z=Math.asin(In(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-_,r)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-In(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(m,d),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-u,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,s===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,s){return KC.makeRotationFromQuaternion(e),this.setFromRotationMatrix(KC,t,s)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return jC.setFromEuler(this),this.setFromQuaternion(jC,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}hp.DEFAULT_ORDER="XYZ";class WN{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let s=0;s0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function r(a,c){return a[c.uuid]===void 0&&(a[c.uuid]=c.toJSON(e)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const c=a.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(s.geometries=a),c.length>0&&(s.materials=c),d.length>0&&(s.textures=d),u.length>0&&(s.images=u),_.length>0&&(s.shapes=_),m.length>0&&(s.skeletons=m),h.length>0&&(s.animations=h),g.length>0&&(s.nodes=g)}return s.object=i,s;function o(a){const c=[];for(const d in a){const u=a[d];delete u.metadata,c.push(u)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let s=0;s0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,s,i,r){Ds.subVectors(i,t),vi.subVectors(s,t),rg.subVectors(e,t);const o=Ds.dot(Ds),a=Ds.dot(vi),c=Ds.dot(rg),d=vi.dot(vi),u=vi.dot(rg),_=o*d-a*a;if(_===0)return r.set(-2,-1,-1);const m=1/_,h=(d*c-a*u)*m,g=(o*u-a*c)*m;return r.set(1-h-g,g,h)}static containsPoint(e,t,s,i){return this.getBarycoord(e,t,s,i,Si),Si.x>=0&&Si.y>=0&&Si.x+Si.y<=1}static getUV(e,t,s,i,r,o,a,c){return Xc===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Xc=!0),this.getInterpolation(e,t,s,i,r,o,a,c)}static getInterpolation(e,t,s,i,r,o,a,c){return this.getBarycoord(e,t,s,i,Si),c.setScalar(0),c.addScaledVector(r,Si.x),c.addScaledVector(o,Si.y),c.addScaledVector(a,Si.z),c}static isFrontFacing(e,t,s,i){return Ds.subVectors(s,t),vi.subVectors(e,t),Ds.cross(vi).dot(i)<0}set(e,t,s){return this.a.copy(e),this.b.copy(t),this.c.copy(s),this}setFromPointsAndIndices(e,t,s,i){return this.a.copy(e[t]),this.b.copy(e[s]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,s,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,s),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ds.subVectors(this.c,this.b),vi.subVectors(this.a,this.b),Ds.cross(vi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Fs.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Fs.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,s,i,r){return Xc===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Xc=!0),Fs.getInterpolation(e,this.a,this.b,this.c,t,s,i,r)}getInterpolation(e,t,s,i,r){return Fs.getInterpolation(e,this.a,this.b,this.c,t,s,i,r)}containsPoint(e){return Fs.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Fs.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const s=this.a,i=this.b,r=this.c;let o,a;Do.subVectors(i,s),Lo.subVectors(r,s),og.subVectors(e,s);const c=Do.dot(og),d=Lo.dot(og);if(c<=0&&d<=0)return t.copy(s);ag.subVectors(e,i);const u=Do.dot(ag),_=Lo.dot(ag);if(u>=0&&_<=u)return t.copy(i);const m=c*_-u*d;if(m<=0&&c>=0&&u<=0)return o=c/(c-u),t.copy(s).addScaledVector(Do,o);lg.subVectors(e,r);const h=Do.dot(lg),g=Lo.dot(lg);if(g>=0&&h<=g)return t.copy(r);const f=h*d-c*g;if(f<=0&&d>=0&&g<=0)return a=d/(d-g),t.copy(s).addScaledVector(Lo,a);const b=u*g-h*_;if(b<=0&&_-u>=0&&h-g>=0)return ew.subVectors(r,i),a=(_-u)/(_-u+(h-g)),t.copy(i).addScaledVector(ew,a);const y=1/(b+f+m);return o=f*y,a=m*y,t.copy(s).addScaledVector(Do,o).addScaledVector(Lo,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const KN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Zi={h:0,s:0,l:0},Zc={h:0,s:0,l:0};function cg(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class pt{constructor(e,t,s){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,s)}set(e,t,s){if(t===void 0&&s===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,s);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=nn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Pt.toWorkingColorSpace(this,t),this}setRGB(e,t,s,i=Pt.workingColorSpace){return this.r=e,this.g=t,this.b=s,Pt.toWorkingColorSpace(this,i),this}setHSL(e,t,s,i=Pt.workingColorSpace){if(e=_y(e,1),t=In(t,0,1),s=In(s,0,1),t===0)this.r=this.g=this.b=s;else{const r=s<=.5?s*(1+t):s+t-s*t,o=2*s-r;this.r=cg(o,r,e+1/3),this.g=cg(o,r,e),this.b=cg(o,r,e-1/3)}return Pt.toWorkingColorSpace(this,i),this}setStyle(e,t=nn){function s(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=i[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=nn){const s=KN[e.toLowerCase()];return s!==void 0?this.setHex(s,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=oa(e.r),this.g=oa(e.g),this.b=oa(e.b),this}copyLinearToSRGB(e){return this.r=Xh(e.r),this.g=Xh(e.g),this.b=Xh(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=nn){return Pt.fromWorkingColorSpace(Mn.copy(this),e),Math.round(In(Mn.r*255,0,255))*65536+Math.round(In(Mn.g*255,0,255))*256+Math.round(In(Mn.b*255,0,255))}getHexString(e=nn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Pt.workingColorSpace){Pt.fromWorkingColorSpace(Mn.copy(this),t);const s=Mn.r,i=Mn.g,r=Mn.b,o=Math.max(s,i,r),a=Math.min(s,i,r);let c,d;const u=(a+o)/2;if(a===o)c=0,d=0;else{const _=o-a;switch(d=u<=.5?_/(o+a):_/(2-o-a),o){case s:c=(i-r)/_+(i0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const s=e[t];if(s===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(s):i&&i.isVector3&&s&&s.isVector3?i.copy(s):this[t]=s}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const s={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.color&&this.color.isColor&&(s.color=this.color.getHex()),this.roughness!==void 0&&(s.roughness=this.roughness),this.metalness!==void 0&&(s.metalness=this.metalness),this.sheen!==void 0&&(s.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(s.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(s.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(s.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(s.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(s.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(s.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(s.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(s.shininess=this.shininess),this.clearcoat!==void 0&&(s.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(s.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(s.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(s.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(s.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,s.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(s.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(s.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(s.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(s.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(s.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(s.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(s.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(s.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(s.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(s.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(s.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(s.lightMap=this.lightMap.toJSON(e).uuid,s.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(s.aoMap=this.aoMap.toJSON(e).uuid,s.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(s.bumpMap=this.bumpMap.toJSON(e).uuid,s.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(s.normalMap=this.normalMap.toJSON(e).uuid,s.normalMapType=this.normalMapType,s.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(s.displacementMap=this.displacementMap.toJSON(e).uuid,s.displacementScale=this.displacementScale,s.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(s.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(s.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(s.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(s.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(s.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(s.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(s.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(s.combine=this.combine)),this.envMapIntensity!==void 0&&(s.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(s.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(s.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(s.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(s.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(s.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(s.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(s.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(s.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(s.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(s.size=this.size),this.shadowSide!==null&&(s.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(s.sizeAttenuation=this.sizeAttenuation),this.blending!==ra&&(s.blending=this.blending),this.side!==Fi&&(s.side=this.side),this.vertexColors===!0&&(s.vertexColors=!0),this.opacity<1&&(s.opacity=this.opacity),this.transparent===!0&&(s.transparent=!0),this.blendSrc!==fb&&(s.blendSrc=this.blendSrc),this.blendDst!==_b&&(s.blendDst=this.blendDst),this.blendEquation!==Yr&&(s.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(s.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(s.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(s.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(s.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(s.blendAlpha=this.blendAlpha),this.depthFunc!==mu&&(s.depthFunc=this.depthFunc),this.depthTest===!1&&(s.depthTest=this.depthTest),this.depthWrite===!1&&(s.depthWrite=this.depthWrite),this.colorWrite===!1&&(s.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(s.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==VC&&(s.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(s.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(s.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ro&&(s.stencilFail=this.stencilFail),this.stencilZFail!==Ro&&(s.stencilZFail=this.stencilZFail),this.stencilZPass!==Ro&&(s.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(s.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(s.rotation=this.rotation),this.polygonOffset===!0&&(s.polygonOffset=!0),this.polygonOffsetFactor!==0&&(s.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(s.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(s.linewidth=this.linewidth),this.dashSize!==void 0&&(s.dashSize=this.dashSize),this.gapSize!==void 0&&(s.gapSize=this.gapSize),this.scale!==void 0&&(s.scale=this.scale),this.dithering===!0&&(s.dithering=!0),this.alphaTest>0&&(s.alphaTest=this.alphaTest),this.alphaHash===!0&&(s.alphaHash=!0),this.alphaToCoverage===!0&&(s.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(s.premultipliedAlpha=!0),this.forceSinglePass===!0&&(s.forceSinglePass=!0),this.wireframe===!0&&(s.wireframe=!0),this.wireframeLinewidth>1&&(s.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(s.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(s.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(s.flatShading=!0),this.visible===!1&&(s.visible=!1),this.toneMapped===!1&&(s.toneMapped=!1),this.fog===!1&&(s.fog=!1),Object.keys(this.userData).length>0&&(s.userData=this.userData);function i(r){const o=[];for(const a in r){const c=r[a];delete c.metadata,o.push(c)}return o}if(t){const r=i(e.textures),o=i(e.images);r.length>0&&(s.textures=r),o.length>0&&(s.images=o)}return s}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let s=null;if(t!==null){const i=t.length;s=new Array(i);for(let r=0;r!==i;++r)s[r]=t[r].clone()}return this.clippingPlanes=s,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class _r extends zs{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new pt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=dy,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const rn=new re,Jc=new Rt;class zn{constructor(e,t,s=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=s,this.usage=yb,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Mi,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,s){e*=this.itemSize,s*=t.itemSize;for(let i=0,r=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const c=this.parameters;for(const d in c)c[d]!==void 0&&(e[d]=c[d]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const s=this.attributes;for(const c in s){const d=s[c];e.data.attributes[c]=d.toJSON(e.data)}const i={};let r=!1;for(const c in this.morphAttributes){const d=this.morphAttributes[c],u=[];for(let _=0,m=d.length;_0&&(i[c]=u,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const s=e.index;s!==null&&this.setIndex(s.clone(t));const i=e.attributes;for(const d in i){const u=i[d];this.setAttribute(d,u.clone(t))}const r=e.morphAttributes;for(const d in r){const u=[],_=r[d];for(let m=0,h=_.length;m0){const i=t[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r(e.far-e.near)**2))&&(tw.copy(r).invert(),Pr.copy(e.ray).applyMatrix4(tw),!(s.boundingBox!==null&&Pr.intersectsBox(s.boundingBox)===!1)&&this._computeIntersections(e,t,Pr)))}_computeIntersections(e,t,s){let i;const r=this.geometry,o=this.material,a=r.index,c=r.attributes.position,d=r.attributes.uv,u=r.attributes.uv1,_=r.attributes.normal,m=r.groups,h=r.drawRange;if(a!==null)if(Array.isArray(o))for(let g=0,f=m.length;gt.far?null:{distance:d,point:od.clone(),object:n}}function ad(n,e,t,s,i,r,o,a,c,d){n.getVertexPosition(a,Fo),n.getVertexPosition(c,Uo),n.getVertexPosition(d,Bo);const u=q0t(n,e,t,s,Fo,Uo,Bo,rd);if(u){i&&(nd.fromBufferAttribute(i,a),sd.fromBufferAttribute(i,c),id.fromBufferAttribute(i,d),u.uv=Fs.getInterpolation(rd,Fo,Uo,Bo,nd,sd,id,new Rt)),r&&(nd.fromBufferAttribute(r,a),sd.fromBufferAttribute(r,c),id.fromBufferAttribute(r,d),u.uv1=Fs.getInterpolation(rd,Fo,Uo,Bo,nd,sd,id,new Rt),u.uv2=u.uv1),o&&(sw.fromBufferAttribute(o,a),iw.fromBufferAttribute(o,c),rw.fromBufferAttribute(o,d),u.normal=Fs.getInterpolation(rd,Fo,Uo,Bo,sw,iw,rw,new re),u.normal.dot(s.direction)>0&&u.normal.multiplyScalar(-1));const _={a,b:c,c:d,normal:new re,materialIndex:0};Fs.getNormal(Fo,Uo,Bo,_.normal),u.face=_}return u}class yr extends _i{constructor(e=1,t=1,s=1,i=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:s,widthSegments:i,heightSegments:r,depthSegments:o};const a=this;i=Math.floor(i),r=Math.floor(r),o=Math.floor(o);const c=[],d=[],u=[],_=[];let m=0,h=0;g("z","y","x",-1,-1,s,t,e,o,r,0),g("z","y","x",1,-1,s,t,-e,o,r,1),g("x","z","y",1,1,e,s,t,i,o,2),g("x","z","y",1,-1,e,s,-t,i,o,3),g("x","y","z",1,-1,e,t,s,i,r,4),g("x","y","z",-1,-1,e,t,-s,i,r,5),this.setIndex(c),this.setAttribute("position",new ki(d,3)),this.setAttribute("normal",new ki(u,3)),this.setAttribute("uv",new ki(_,2));function g(f,b,y,E,v,S,R,w,A,O,C){const M=S/A,G=R/O,V=S/2,ee=R/2,I=w/2,H=A+1,q=O+1;let L=0,W=0;const se=new re;for(let oe=0;oe0?1:-1,u.push(se.x,se.y,se.z),_.push(xe/A),_.push(1-oe/O),L+=1}}for(let oe=0;oe>8&255]+An[n>>16&255]+An[n>>24&255]+"-"+An[e&255]+An[e>>8&255]+"-"+An[e>>16&15|64]+An[e>>24&255]+"-"+An[t&63|128]+An[t>>8&255]+"-"+An[t>>16&255]+An[t>>24&255]+An[s&255]+An[s>>8&255]+An[s>>16&255]+An[s>>24&255]).toLowerCase()}function In(n,e,t){return Math.max(e,Math.min(t,n))}function _y(n,e){return(n%e+e)%e}function _0t(n,e,t,s,i){return s+(n-e)*(i-s)/(t-e)}function m0t(n,e,t){return n!==e?(t-n)/(e-n):0}function Ol(n,e,t){return(1-t)*n+t*e}function h0t(n,e,t,s){return Ol(n,e,1-Math.exp(-t*s))}function g0t(n,e=1){return e-Math.abs(_y(n,e*2)-e)}function b0t(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function y0t(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function E0t(n,e){return n+Math.floor(Math.random()*(e-n+1))}function v0t(n,e){return n+Math.random()*(e-n)}function S0t(n){return n*(.5-Math.random())}function T0t(n){n!==void 0&&(HC=n);let e=HC+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function x0t(n){return n*Il}function C0t(n){return n*xa}function vb(n){return(n&n-1)===0&&n!==0}function w0t(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function vu(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function R0t(n,e,t,s,i){const r=Math.cos,o=Math.sin,a=r(t/2),c=o(t/2),d=r((e+s)/2),u=o((e+s)/2),_=r((e-s)/2),m=o((e-s)/2),h=r((s-e)/2),g=o((s-e)/2);switch(i){case"XYX":n.set(a*u,c*_,c*m,a*d);break;case"YZY":n.set(c*m,a*u,c*_,a*d);break;case"ZXZ":n.set(c*_,c*m,a*u,a*d);break;case"XZX":n.set(a*u,c*g,c*h,a*d);break;case"YXY":n.set(c*h,a*u,c*g,a*d);break;case"ZYZ":n.set(c*g,c*h,a*u,a*d);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function ti(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Bt(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const A0t={DEG2RAD:Il,RAD2DEG:xa,generateUUID:Vs,clamp:In,euclideanModulo:_y,mapLinear:_0t,inverseLerp:m0t,lerp:Ol,damp:h0t,pingpong:g0t,smoothstep:b0t,smootherstep:y0t,randInt:E0t,randFloat:v0t,randFloatSpread:S0t,seededRandom:T0t,degToRad:x0t,radToDeg:C0t,isPowerOfTwo:vb,ceilPowerOfTwo:w0t,floorPowerOfTwo:vu,setQuaternionFromProperEuler:R0t,normalize:Bt,denormalize:ti};class Rt{constructor(e=0,t=0){Rt.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,s=this.y,i=e.elements;return this.x=i[0]*t+i[3]*s+i[6],this.y=i[1]*t+i[4]*s+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(t,s)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const s=this.dot(e)/t;return Math.acos(In(s,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,s=this.y-e.y;return t*t+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,s){return this.x=e.x+(t.x-e.x)*s,this.y=e.y+(t.y-e.y)*s,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const s=Math.cos(t),i=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*s-o*i+e.x,this.y=r*i+o*s+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Tt{constructor(e,t,s,i,r,o,a,c,d){Tt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,s,i,r,o,a,c,d)}set(e,t,s,i,r,o,a,c,d){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=t,u[4]=r,u[5]=c,u[6]=s,u[7]=o,u[8]=d,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,s=e.elements;return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t[4]=s[4],t[5]=s[5],t[6]=s[6],t[7]=s[7],t[8]=s[8],this}extractBasis(e,t,s){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),s.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const s=e.elements,i=t.elements,r=this.elements,o=s[0],a=s[3],c=s[6],d=s[1],u=s[4],_=s[7],m=s[2],h=s[5],g=s[8],f=i[0],b=i[3],y=i[6],E=i[1],v=i[4],S=i[7],R=i[2],w=i[5],A=i[8];return r[0]=o*f+a*E+c*R,r[3]=o*b+a*v+c*w,r[6]=o*y+a*S+c*A,r[1]=d*f+u*E+_*R,r[4]=d*b+u*v+_*w,r[7]=d*y+u*S+_*A,r[2]=m*f+h*E+g*R,r[5]=m*b+h*v+g*w,r[8]=m*y+h*S+g*A,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],d=e[7],u=e[8];return t*o*u-t*a*d-s*r*u+s*a*c+i*r*d-i*o*c}invert(){const e=this.elements,t=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],d=e[7],u=e[8],_=u*o-a*d,m=a*c-u*r,h=d*r-o*c,g=t*_+s*m+i*h;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const f=1/g;return e[0]=_*f,e[1]=(i*d-u*s)*f,e[2]=(a*s-i*o)*f,e[3]=m*f,e[4]=(u*t-i*c)*f,e[5]=(i*r-a*t)*f,e[6]=h*f,e[7]=(s*c-d*t)*f,e[8]=(o*t-s*r)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,s,i,r,o,a){const c=Math.cos(r),d=Math.sin(r);return this.set(s*c,s*d,-s*(c*o+d*a)+o+e,-i*d,i*c,-i*(-d*o+c*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Qh.makeScale(e,t)),this}rotate(e){return this.premultiply(Qh.makeRotation(-e)),this}translate(e,t){return this.premultiply(Qh.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),s=Math.sin(e);return this.set(t,-s,0,s,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,s=e.elements;for(let i=0;i<9;i++)if(t[i]!==s[i])return!1;return!0}fromArray(e,t=0){for(let s=0;s<9;s++)this.elements[s]=e[s+t];return this}toArray(e=[],t=0){const s=this.elements;return e[t]=s[0],e[t+1]=s[1],e[t+2]=s[2],e[t+3]=s[3],e[t+4]=s[4],e[t+5]=s[5],e[t+6]=s[6],e[t+7]=s[7],e[t+8]=s[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Qh=new Tt;function HN(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function Zl(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function M0t(){const n=Zl("canvas");return n.style.display="block",n}const qC={};function kl(n){n in qC||(qC[n]=!0,console.warn(n))}const YC=new Tt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),$C=new Tt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Hc={[Cn]:{transfer:gu,primaries:bu,toReference:n=>n,fromReference:n=>n},[nn]:{transfer:jt,primaries:bu,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[_p]:{transfer:gu,primaries:yu,toReference:n=>n.applyMatrix3($C),fromReference:n=>n.applyMatrix3(YC)},[fy]:{transfer:jt,primaries:yu,toReference:n=>n.convertSRGBToLinear().applyMatrix3($C),fromReference:n=>n.applyMatrix3(YC).convertLinearToSRGB()}},N0t=new Set([Cn,_p]),Pt={enabled:!0,_workingColorSpace:Cn,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(n){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!n},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!N0t.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const s=Hc[e].toReference,i=Hc[t].fromReference;return i(s(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return Hc[n].primaries},getTransfer:function(n){return n===bs?gu:Hc[n].transfer}};function oa(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Xh(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let Ao;class qN{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Ao===void 0&&(Ao=Zl("canvas")),Ao.width=e.width,Ao.height=e.height;const s=Ao.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),t=Ao}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Zl("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");s.drawImage(e,0,0,e.width,e.height);const i=s.getImageData(0,0,e.width,e.height),r=i.data;for(let o=0;o0&&(s.userData=this.userData),t||(e.textures[this.uuid]=s),s}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==IN)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case va:e.x=e.x-Math.floor(e.x);break;case hs:e.x=e.x<0?0:1;break;case hu:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case va:e.y=e.y-Math.floor(e.y);break;case hs:e.y=e.y<0?0:1;break;case hu:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return kl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===nn?io:VN}set encoding(e){kl("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===io?nn:bs}}xn.DEFAULT_IMAGE=null;xn.DEFAULT_MAPPING=IN;xn.DEFAULT_ANISOTROPY=1;class Wt{constructor(e=0,t=0,s=0,i=1){Wt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=s,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,s,i){return this.x=e,this.y=t,this.z=s,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,s=this.y,i=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*s+o[8]*i+o[12]*r,this.y=o[1]*t+o[5]*s+o[9]*i+o[13]*r,this.z=o[2]*t+o[6]*s+o[10]*i+o[14]*r,this.w=o[3]*t+o[7]*s+o[11]*i+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,s,i,r;const c=e.elements,d=c[0],u=c[4],_=c[8],m=c[1],h=c[5],g=c[9],f=c[2],b=c[6],y=c[10];if(Math.abs(u-m)<.01&&Math.abs(_-f)<.01&&Math.abs(g-b)<.01){if(Math.abs(u+m)<.1&&Math.abs(_+f)<.1&&Math.abs(g+b)<.1&&Math.abs(d+h+y-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const v=(d+1)/2,S=(h+1)/2,R=(y+1)/2,w=(u+m)/4,A=(_+f)/4,O=(g+b)/4;return v>S&&v>R?v<.01?(s=0,i=.707106781,r=.707106781):(s=Math.sqrt(v),i=w/s,r=A/s):S>R?S<.01?(s=.707106781,i=0,r=.707106781):(i=Math.sqrt(S),s=w/i,r=O/i):R<.01?(s=.707106781,i=.707106781,r=0):(r=Math.sqrt(R),s=A/r,i=O/r),this.set(s,i,r,t),this}let E=Math.sqrt((b-g)*(b-g)+(_-f)*(_-f)+(m-u)*(m-u));return Math.abs(E)<.001&&(E=1),this.x=(b-g)/E,this.y=(_-f)/E,this.z=(m-u)/E,this.w=Math.acos((d+h+y-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(t,s)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,s){return this.x=e.x+(t.x-e.x)*s,this.y=e.y+(t.y-e.y)*s,this.z=e.z+(t.z-e.z)*s,this.w=e.w+(t.w-e.w)*s,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class k0t extends Ha{constructor(e=1,t=1,s={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Wt(0,0,e,t),this.scissorTest=!1,this.viewport=new Wt(0,0,e,t);const i={width:e,height:t,depth:1};s.encoding!==void 0&&(kl("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),s.colorSpace=s.encoding===io?nn:bs),s=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Kn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},s),this.texture=new xn(i,s.mapping,s.wrapS,s.wrapT,s.magFilter,s.minFilter,s.format,s.type,s.anisotropy,s.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=s.generateMipmaps,this.texture.internalFormat=s.internalFormat,this.depthBuffer=s.depthBuffer,this.stencilBuffer=s.stencilBuffer,this.depthTexture=s.depthTexture,this.samples=s.samples}setSize(e,t,s=1){(this.width!==e||this.height!==t||this.depth!==s)&&(this.width=e,this.height=t,this.depth=s,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=s,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new YN(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class mo extends k0t{constructor(e=1,t=1,s={}){super(e,t,s),this.isWebGLRenderTarget=!0}}class $N extends xn{constructor(e=null,t=1,s=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:s,depth:i},this.magFilter=gn,this.minFilter=gn,this.wrapR=hs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class D0t extends xn{constructor(e=null,t=1,s=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:s,depth:i},this.magFilter=gn,this.minFilter=gn,this.wrapR=hs,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Mr{constructor(e=0,t=0,s=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=s,this._w=i}static slerpFlat(e,t,s,i,r,o,a){let c=s[i+0],d=s[i+1],u=s[i+2],_=s[i+3];const m=r[o+0],h=r[o+1],g=r[o+2],f=r[o+3];if(a===0){e[t+0]=c,e[t+1]=d,e[t+2]=u,e[t+3]=_;return}if(a===1){e[t+0]=m,e[t+1]=h,e[t+2]=g,e[t+3]=f;return}if(_!==f||c!==m||d!==h||u!==g){let b=1-a;const y=c*m+d*h+u*g+_*f,E=y>=0?1:-1,v=1-y*y;if(v>Number.EPSILON){const R=Math.sqrt(v),w=Math.atan2(R,y*E);b=Math.sin(b*w)/R,a=Math.sin(a*w)/R}const S=a*E;if(c=c*b+m*S,d=d*b+h*S,u=u*b+g*S,_=_*b+f*S,b===1-a){const R=1/Math.sqrt(c*c+d*d+u*u+_*_);c*=R,d*=R,u*=R,_*=R}}e[t]=c,e[t+1]=d,e[t+2]=u,e[t+3]=_}static multiplyQuaternionsFlat(e,t,s,i,r,o){const a=s[i],c=s[i+1],d=s[i+2],u=s[i+3],_=r[o],m=r[o+1],h=r[o+2],g=r[o+3];return e[t]=a*g+u*_+c*h-d*m,e[t+1]=c*g+u*m+d*_-a*h,e[t+2]=d*g+u*h+a*m-c*_,e[t+3]=u*g-a*_-c*m-d*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,s,i){return this._x=e,this._y=t,this._z=s,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const s=e._x,i=e._y,r=e._z,o=e._order,a=Math.cos,c=Math.sin,d=a(s/2),u=a(i/2),_=a(r/2),m=c(s/2),h=c(i/2),g=c(r/2);switch(o){case"XYZ":this._x=m*u*_+d*h*g,this._y=d*h*_-m*u*g,this._z=d*u*g+m*h*_,this._w=d*u*_-m*h*g;break;case"YXZ":this._x=m*u*_+d*h*g,this._y=d*h*_-m*u*g,this._z=d*u*g-m*h*_,this._w=d*u*_+m*h*g;break;case"ZXY":this._x=m*u*_-d*h*g,this._y=d*h*_+m*u*g,this._z=d*u*g+m*h*_,this._w=d*u*_-m*h*g;break;case"ZYX":this._x=m*u*_-d*h*g,this._y=d*h*_+m*u*g,this._z=d*u*g-m*h*_,this._w=d*u*_+m*h*g;break;case"YZX":this._x=m*u*_+d*h*g,this._y=d*h*_+m*u*g,this._z=d*u*g-m*h*_,this._w=d*u*_-m*h*g;break;case"XZY":this._x=m*u*_-d*h*g,this._y=d*h*_-m*u*g,this._z=d*u*g+m*h*_,this._w=d*u*_+m*h*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const s=t/2,i=Math.sin(s);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(s),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,s=t[0],i=t[4],r=t[8],o=t[1],a=t[5],c=t[9],d=t[2],u=t[6],_=t[10],m=s+a+_;if(m>0){const h=.5/Math.sqrt(m+1);this._w=.25/h,this._x=(u-c)*h,this._y=(r-d)*h,this._z=(o-i)*h}else if(s>a&&s>_){const h=2*Math.sqrt(1+s-a-_);this._w=(u-c)/h,this._x=.25*h,this._y=(i+o)/h,this._z=(r+d)/h}else if(a>_){const h=2*Math.sqrt(1+a-s-_);this._w=(r-d)/h,this._x=(i+o)/h,this._y=.25*h,this._z=(c+u)/h}else{const h=2*Math.sqrt(1+_-s-a);this._w=(o-i)/h,this._x=(r+d)/h,this._y=(c+u)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let s=e.dot(t)+1;return sMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=s):(this._x=0,this._y=-e.z,this._z=e.y,this._w=s)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=s),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(In(this.dot(e),-1,1)))}rotateTowards(e,t){const s=this.angleTo(e);if(s===0)return this;const i=Math.min(1,t/s);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const s=e._x,i=e._y,r=e._z,o=e._w,a=t._x,c=t._y,d=t._z,u=t._w;return this._x=s*u+o*a+i*d-r*c,this._y=i*u+o*c+r*a-s*d,this._z=r*u+o*d+s*c-i*a,this._w=o*u-s*a-i*c-r*d,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const s=this._x,i=this._y,r=this._z,o=this._w;let a=o*e._w+s*e._x+i*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=s,this._y=i,this._z=r,this;const c=1-a*a;if(c<=Number.EPSILON){const h=1-t;return this._w=h*o+t*this._w,this._x=h*s+t*this._x,this._y=h*i+t*this._y,this._z=h*r+t*this._z,this.normalize(),this._onChangeCallback(),this}const d=Math.sqrt(c),u=Math.atan2(d,a),_=Math.sin((1-t)*u)/d,m=Math.sin(t*u)/d;return this._w=o*_+this._w*m,this._x=s*_+this._x*m,this._y=i*_+this._y*m,this._z=r*_+this._z*m,this._onChangeCallback(),this}slerpQuaternions(e,t,s){return this.copy(e).slerp(t,s)}random(){const e=Math.random(),t=Math.sqrt(1-e),s=Math.sqrt(e),i=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(i),s*Math.sin(r),s*Math.cos(r),t*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class re{constructor(e=0,t=0,s=0){re.prototype.isVector3=!0,this.x=e,this.y=t,this.z=s}set(e,t,s){return s===void 0&&(s=this.z),this.x=e,this.y=t,this.z=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(WC.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(WC.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,s=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*s+r[6]*i,this.y=r[1]*t+r[4]*s+r[7]*i,this.z=r[2]*t+r[5]*s+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,s=this.y,i=this.z,r=e.elements,o=1/(r[3]*t+r[7]*s+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*s+r[8]*i+r[12])*o,this.y=(r[1]*t+r[5]*s+r[9]*i+r[13])*o,this.z=(r[2]*t+r[6]*s+r[10]*i+r[14])*o,this}applyQuaternion(e){const t=this.x,s=this.y,i=this.z,r=e.x,o=e.y,a=e.z,c=e.w,d=2*(o*i-a*s),u=2*(a*t-r*i),_=2*(r*s-o*t);return this.x=t+c*d+o*_-a*u,this.y=s+c*u+a*d-r*_,this.z=i+c*_+r*u-o*d,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,s=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*s+r[8]*i,this.y=r[1]*t+r[5]*s+r[9]*i,this.z=r[2]*t+r[6]*s+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const s=this.length();return this.divideScalar(s||1).multiplyScalar(Math.max(e,Math.min(t,s)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,s){return this.x=e.x+(t.x-e.x)*s,this.y=e.y+(t.y-e.y)*s,this.z=e.z+(t.z-e.z)*s,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const s=e.x,i=e.y,r=e.z,o=t.x,a=t.y,c=t.z;return this.x=i*c-r*a,this.y=r*o-s*c,this.z=s*a-i*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const s=e.dot(this)/t;return this.copy(e).multiplyScalar(s)}projectOnPlane(e){return Jh.copy(this).projectOnVector(e),this.sub(Jh)}reflect(e){return this.sub(Jh.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const s=this.dot(e)/t;return Math.acos(In(s,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,s=this.y-e.y,i=this.z-e.z;return t*t+s*s+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,s){const i=Math.sin(t)*e;return this.x=i*Math.sin(s),this.y=Math.cos(t)*e,this.z=i*Math.cos(s),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,s){return this.x=e*Math.sin(t),this.y=s,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),s=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=s,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,s=Math.sqrt(1-e**2);return this.x=s*Math.cos(t),this.y=s*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Jh=new re,WC=new Mr;class Gi{constructor(e=new re(1/0,1/0,1/0),t=new re(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,s=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Os),Os.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,s;return e.normal.x>0?(t=e.normal.x*this.min.x,s=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,s=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,s+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,s+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,s+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,s+=e.normal.z*this.min.z),t<=-e.constant&&s>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(ol),Yc.subVectors(this.max,ol),Mo.subVectors(e.a,ol),No.subVectors(e.b,ol),Io.subVectors(e.c,ol),Ki.subVectors(No,Mo),ji.subVectors(Io,No),Dr.subVectors(Mo,Io);let t=[0,-Ki.z,Ki.y,0,-ji.z,ji.y,0,-Dr.z,Dr.y,Ki.z,0,-Ki.x,ji.z,0,-ji.x,Dr.z,0,-Dr.x,-Ki.y,Ki.x,0,-ji.y,ji.x,0,-Dr.y,Dr.x,0];return!eg(t,Mo,No,Io,Yc)||(t=[1,0,0,0,1,0,0,0,1],!eg(t,Mo,No,Io,Yc))?!1:($c.crossVectors(Ki,ji),t=[$c.x,$c.y,$c.z],eg(t,Mo,No,Io,Yc))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Os).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Os).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(bi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),bi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),bi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),bi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),bi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),bi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),bi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),bi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(bi),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const bi=[new re,new re,new re,new re,new re,new re,new re,new re],Os=new re,qc=new Gi,Mo=new re,No=new re,Io=new re,Ki=new re,ji=new re,Dr=new re,ol=new re,Yc=new re,$c=new re,Lr=new re;function eg(n,e,t,s,i){for(let r=0,o=n.length-3;r<=o;r+=3){Lr.fromArray(n,r);const a=i.x*Math.abs(Lr.x)+i.y*Math.abs(Lr.y)+i.z*Math.abs(Lr.z),c=e.dot(Lr),d=t.dot(Lr),u=s.dot(Lr);if(Math.max(-Math.max(c,d,u),Math.min(c,d,u))>a)return!1}return!0}const L0t=new Gi,al=new re,tg=new re;class fi{constructor(e=new re,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const s=this.center;t!==void 0?s.copy(t):L0t.setFromPoints(e).getCenter(s);let i=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;al.subVectors(e,this.center);const t=al.lengthSq();if(t>this.radius*this.radius){const s=Math.sqrt(t),i=(s-this.radius)*.5;this.center.addScaledVector(al,i/s),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(tg.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(al.copy(e.center).add(tg)),this.expandByPoint(al.copy(e.center).sub(tg))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const yi=new re,ng=new re,Wc=new re,Qi=new re,sg=new re,Kc=new re,ig=new re;class mp{constructor(e=new re,t=new re(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,yi)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const s=t.dot(this.direction);return s<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,s)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=yi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(yi.copy(this.origin).addScaledVector(this.direction,t),yi.distanceToSquared(e))}distanceSqToSegment(e,t,s,i){ng.copy(e).add(t).multiplyScalar(.5),Wc.copy(t).sub(e).normalize(),Qi.copy(this.origin).sub(ng);const r=e.distanceTo(t)*.5,o=-this.direction.dot(Wc),a=Qi.dot(this.direction),c=-Qi.dot(Wc),d=Qi.lengthSq(),u=Math.abs(1-o*o);let _,m,h,g;if(u>0)if(_=o*c-a,m=o*a-c,g=r*u,_>=0)if(m>=-g)if(m<=g){const f=1/u;_*=f,m*=f,h=_*(_+o*m+2*a)+m*(o*_+m+2*c)+d}else m=r,_=Math.max(0,-(o*m+a)),h=-_*_+m*(m+2*c)+d;else m=-r,_=Math.max(0,-(o*m+a)),h=-_*_+m*(m+2*c)+d;else m<=-g?(_=Math.max(0,-(-o*r+a)),m=_>0?-r:Math.min(Math.max(-r,-c),r),h=-_*_+m*(m+2*c)+d):m<=g?(_=0,m=Math.min(Math.max(-r,-c),r),h=m*(m+2*c)+d):(_=Math.max(0,-(o*r+a)),m=_>0?r:Math.min(Math.max(-r,-c),r),h=-_*_+m*(m+2*c)+d);else m=o>0?-r:r,_=Math.max(0,-(o*m+a)),h=-_*_+m*(m+2*c)+d;return s&&s.copy(this.origin).addScaledVector(this.direction,_),i&&i.copy(ng).addScaledVector(Wc,m),h}intersectSphere(e,t){yi.subVectors(e.center,this.origin);const s=yi.dot(this.direction),i=yi.dot(yi)-s*s,r=e.radius*e.radius;if(i>r)return null;const o=Math.sqrt(r-i),a=s-o,c=s+o;return c<0?null:a<0?this.at(c,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const s=-(this.origin.dot(e.normal)+e.constant)/t;return s>=0?s:null}intersectPlane(e,t){const s=this.distanceToPlane(e);return s===null?null:this.at(s,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let s,i,r,o,a,c;const d=1/this.direction.x,u=1/this.direction.y,_=1/this.direction.z,m=this.origin;return d>=0?(s=(e.min.x-m.x)*d,i=(e.max.x-m.x)*d):(s=(e.max.x-m.x)*d,i=(e.min.x-m.x)*d),u>=0?(r=(e.min.y-m.y)*u,o=(e.max.y-m.y)*u):(r=(e.max.y-m.y)*u,o=(e.min.y-m.y)*u),s>o||r>i||((r>s||isNaN(s))&&(s=r),(o=0?(a=(e.min.z-m.z)*_,c=(e.max.z-m.z)*_):(a=(e.max.z-m.z)*_,c=(e.min.z-m.z)*_),s>c||a>i)||((a>s||s!==s)&&(s=a),(c=0?s:i,t)}intersectsBox(e){return this.intersectBox(e,yi)!==null}intersectTriangle(e,t,s,i,r){sg.subVectors(t,e),Kc.subVectors(s,e),ig.crossVectors(sg,Kc);let o=this.direction.dot(ig),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Qi.subVectors(this.origin,e);const c=a*this.direction.dot(Kc.crossVectors(Qi,Kc));if(c<0)return null;const d=a*this.direction.dot(sg.cross(Qi));if(d<0||c+d>o)return null;const u=-a*Qi.dot(ig);return u<0?null:this.at(u/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class xt{constructor(e,t,s,i,r,o,a,c,d,u,_,m,h,g,f,b){xt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,s,i,r,o,a,c,d,u,_,m,h,g,f,b)}set(e,t,s,i,r,o,a,c,d,u,_,m,h,g,f,b){const y=this.elements;return y[0]=e,y[4]=t,y[8]=s,y[12]=i,y[1]=r,y[5]=o,y[9]=a,y[13]=c,y[2]=d,y[6]=u,y[10]=_,y[14]=m,y[3]=h,y[7]=g,y[11]=f,y[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new xt().fromArray(this.elements)}copy(e){const t=this.elements,s=e.elements;return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t[4]=s[4],t[5]=s[5],t[6]=s[6],t[7]=s[7],t[8]=s[8],t[9]=s[9],t[10]=s[10],t[11]=s[11],t[12]=s[12],t[13]=s[13],t[14]=s[14],t[15]=s[15],this}copyPosition(e){const t=this.elements,s=e.elements;return t[12]=s[12],t[13]=s[13],t[14]=s[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,s){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),s.setFromMatrixColumn(this,2),this}makeBasis(e,t,s){return this.set(e.x,t.x,s.x,0,e.y,t.y,s.y,0,e.z,t.z,s.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,s=e.elements,i=1/Oo.setFromMatrixColumn(e,0).length(),r=1/Oo.setFromMatrixColumn(e,1).length(),o=1/Oo.setFromMatrixColumn(e,2).length();return t[0]=s[0]*i,t[1]=s[1]*i,t[2]=s[2]*i,t[3]=0,t[4]=s[4]*r,t[5]=s[5]*r,t[6]=s[6]*r,t[7]=0,t[8]=s[8]*o,t[9]=s[9]*o,t[10]=s[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,s=e.x,i=e.y,r=e.z,o=Math.cos(s),a=Math.sin(s),c=Math.cos(i),d=Math.sin(i),u=Math.cos(r),_=Math.sin(r);if(e.order==="XYZ"){const m=o*u,h=o*_,g=a*u,f=a*_;t[0]=c*u,t[4]=-c*_,t[8]=d,t[1]=h+g*d,t[5]=m-f*d,t[9]=-a*c,t[2]=f-m*d,t[6]=g+h*d,t[10]=o*c}else if(e.order==="YXZ"){const m=c*u,h=c*_,g=d*u,f=d*_;t[0]=m+f*a,t[4]=g*a-h,t[8]=o*d,t[1]=o*_,t[5]=o*u,t[9]=-a,t[2]=h*a-g,t[6]=f+m*a,t[10]=o*c}else if(e.order==="ZXY"){const m=c*u,h=c*_,g=d*u,f=d*_;t[0]=m-f*a,t[4]=-o*_,t[8]=g+h*a,t[1]=h+g*a,t[5]=o*u,t[9]=f-m*a,t[2]=-o*d,t[6]=a,t[10]=o*c}else if(e.order==="ZYX"){const m=o*u,h=o*_,g=a*u,f=a*_;t[0]=c*u,t[4]=g*d-h,t[8]=m*d+f,t[1]=c*_,t[5]=f*d+m,t[9]=h*d-g,t[2]=-d,t[6]=a*c,t[10]=o*c}else if(e.order==="YZX"){const m=o*c,h=o*d,g=a*c,f=a*d;t[0]=c*u,t[4]=f-m*_,t[8]=g*_+h,t[1]=_,t[5]=o*u,t[9]=-a*u,t[2]=-d*u,t[6]=h*_+g,t[10]=m-f*_}else if(e.order==="XZY"){const m=o*c,h=o*d,g=a*c,f=a*d;t[0]=c*u,t[4]=-_,t[8]=d*u,t[1]=m*_+f,t[5]=o*u,t[9]=h*_-g,t[2]=g*_-h,t[6]=a*u,t[10]=f*_+m}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(P0t,e,F0t)}lookAt(e,t,s){const i=this.elements;return ns.subVectors(e,t),ns.lengthSq()===0&&(ns.z=1),ns.normalize(),Xi.crossVectors(s,ns),Xi.lengthSq()===0&&(Math.abs(s.z)===1?ns.x+=1e-4:ns.z+=1e-4,ns.normalize(),Xi.crossVectors(s,ns)),Xi.normalize(),jc.crossVectors(ns,Xi),i[0]=Xi.x,i[4]=jc.x,i[8]=ns.x,i[1]=Xi.y,i[5]=jc.y,i[9]=ns.y,i[2]=Xi.z,i[6]=jc.z,i[10]=ns.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const s=e.elements,i=t.elements,r=this.elements,o=s[0],a=s[4],c=s[8],d=s[12],u=s[1],_=s[5],m=s[9],h=s[13],g=s[2],f=s[6],b=s[10],y=s[14],E=s[3],v=s[7],S=s[11],R=s[15],w=i[0],A=i[4],O=i[8],C=i[12],M=i[1],G=i[5],V=i[9],ee=i[13],I=i[2],H=i[6],q=i[10],L=i[14],W=i[3],se=i[7],oe=i[11],ye=i[15];return r[0]=o*w+a*M+c*I+d*W,r[4]=o*A+a*G+c*H+d*se,r[8]=o*O+a*V+c*q+d*oe,r[12]=o*C+a*ee+c*L+d*ye,r[1]=u*w+_*M+m*I+h*W,r[5]=u*A+_*G+m*H+h*se,r[9]=u*O+_*V+m*q+h*oe,r[13]=u*C+_*ee+m*L+h*ye,r[2]=g*w+f*M+b*I+y*W,r[6]=g*A+f*G+b*H+y*se,r[10]=g*O+f*V+b*q+y*oe,r[14]=g*C+f*ee+b*L+y*ye,r[3]=E*w+v*M+S*I+R*W,r[7]=E*A+v*G+S*H+R*se,r[11]=E*O+v*V+S*q+R*oe,r[15]=E*C+v*ee+S*L+R*ye,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],s=e[4],i=e[8],r=e[12],o=e[1],a=e[5],c=e[9],d=e[13],u=e[2],_=e[6],m=e[10],h=e[14],g=e[3],f=e[7],b=e[11],y=e[15];return g*(+r*c*_-i*d*_-r*a*m+s*d*m+i*a*h-s*c*h)+f*(+t*c*h-t*d*m+r*o*m-i*o*h+i*d*u-r*c*u)+b*(+t*d*_-t*a*h-r*o*_+s*o*h+r*a*u-s*d*u)+y*(-i*a*u-t*c*_+t*a*m+i*o*_-s*o*m+s*c*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,s){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=s),this}invert(){const e=this.elements,t=e[0],s=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],d=e[7],u=e[8],_=e[9],m=e[10],h=e[11],g=e[12],f=e[13],b=e[14],y=e[15],E=_*b*d-f*m*d+f*c*h-a*b*h-_*c*y+a*m*y,v=g*m*d-u*b*d-g*c*h+o*b*h+u*c*y-o*m*y,S=u*f*d-g*_*d+g*a*h-o*f*h-u*a*y+o*_*y,R=g*_*c-u*f*c-g*a*m+o*f*m+u*a*b-o*_*b,w=t*E+s*v+i*S+r*R;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/w;return e[0]=E*A,e[1]=(f*m*r-_*b*r-f*i*h+s*b*h+_*i*y-s*m*y)*A,e[2]=(a*b*r-f*c*r+f*i*d-s*b*d-a*i*y+s*c*y)*A,e[3]=(_*c*r-a*m*r-_*i*d+s*m*d+a*i*h-s*c*h)*A,e[4]=v*A,e[5]=(u*b*r-g*m*r+g*i*h-t*b*h-u*i*y+t*m*y)*A,e[6]=(g*c*r-o*b*r-g*i*d+t*b*d+o*i*y-t*c*y)*A,e[7]=(o*m*r-u*c*r+u*i*d-t*m*d-o*i*h+t*c*h)*A,e[8]=S*A,e[9]=(g*_*r-u*f*r-g*s*h+t*f*h+u*s*y-t*_*y)*A,e[10]=(o*f*r-g*a*r+g*s*d-t*f*d-o*s*y+t*a*y)*A,e[11]=(u*a*r-o*_*r-u*s*d+t*_*d+o*s*h-t*a*h)*A,e[12]=R*A,e[13]=(u*f*i-g*_*i+g*s*m-t*f*m-u*s*b+t*_*b)*A,e[14]=(g*a*i-o*f*i-g*s*c+t*f*c+o*s*b-t*a*b)*A,e[15]=(o*_*i-u*a*i+u*s*c-t*_*c-o*s*m+t*a*m)*A,this}scale(e){const t=this.elements,s=e.x,i=e.y,r=e.z;return t[0]*=s,t[4]*=i,t[8]*=r,t[1]*=s,t[5]*=i,t[9]*=r,t[2]*=s,t[6]*=i,t[10]*=r,t[3]*=s,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],s=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,s,i))}makeTranslation(e,t,s){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,s,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),s=Math.sin(e);return this.set(1,0,0,0,0,t,-s,0,0,s,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),s=Math.sin(e);return this.set(t,0,s,0,0,1,0,0,-s,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),s=Math.sin(e);return this.set(t,-s,0,0,s,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const s=Math.cos(t),i=Math.sin(t),r=1-s,o=e.x,a=e.y,c=e.z,d=r*o,u=r*a;return this.set(d*o+s,d*a-i*c,d*c+i*a,0,d*a+i*c,u*a+s,u*c-i*o,0,d*c-i*a,u*c+i*o,r*c*c+s,0,0,0,0,1),this}makeScale(e,t,s){return this.set(e,0,0,0,0,t,0,0,0,0,s,0,0,0,0,1),this}makeShear(e,t,s,i,r,o){return this.set(1,s,r,0,e,1,o,0,t,i,1,0,0,0,0,1),this}compose(e,t,s){const i=this.elements,r=t._x,o=t._y,a=t._z,c=t._w,d=r+r,u=o+o,_=a+a,m=r*d,h=r*u,g=r*_,f=o*u,b=o*_,y=a*_,E=c*d,v=c*u,S=c*_,R=s.x,w=s.y,A=s.z;return i[0]=(1-(f+y))*R,i[1]=(h+S)*R,i[2]=(g-v)*R,i[3]=0,i[4]=(h-S)*w,i[5]=(1-(m+y))*w,i[6]=(b+E)*w,i[7]=0,i[8]=(g+v)*A,i[9]=(b-E)*A,i[10]=(1-(m+f))*A,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,s){const i=this.elements;let r=Oo.set(i[0],i[1],i[2]).length();const o=Oo.set(i[4],i[5],i[6]).length(),a=Oo.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],ks.copy(this);const d=1/r,u=1/o,_=1/a;return ks.elements[0]*=d,ks.elements[1]*=d,ks.elements[2]*=d,ks.elements[4]*=u,ks.elements[5]*=u,ks.elements[6]*=u,ks.elements[8]*=_,ks.elements[9]*=_,ks.elements[10]*=_,t.setFromRotationMatrix(ks),s.x=r,s.y=o,s.z=a,this}makePerspective(e,t,s,i,r,o,a=Ni){const c=this.elements,d=2*r/(t-e),u=2*r/(s-i),_=(t+e)/(t-e),m=(s+i)/(s-i);let h,g;if(a===Ni)h=-(o+r)/(o-r),g=-2*o*r/(o-r);else if(a===Eu)h=-o/(o-r),g=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=_,c[12]=0,c[1]=0,c[5]=u,c[9]=m,c[13]=0,c[2]=0,c[6]=0,c[10]=h,c[14]=g,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,s,i,r,o,a=Ni){const c=this.elements,d=1/(t-e),u=1/(s-i),_=1/(o-r),m=(t+e)*d,h=(s+i)*u;let g,f;if(a===Ni)g=(o+r)*_,f=-2*_;else if(a===Eu)g=r*_,f=-1*_;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*d,c[4]=0,c[8]=0,c[12]=-m,c[1]=0,c[5]=2*u,c[9]=0,c[13]=-h,c[2]=0,c[6]=0,c[10]=f,c[14]=-g,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){const t=this.elements,s=e.elements;for(let i=0;i<16;i++)if(t[i]!==s[i])return!1;return!0}fromArray(e,t=0){for(let s=0;s<16;s++)this.elements[s]=e[s+t];return this}toArray(e=[],t=0){const s=this.elements;return e[t]=s[0],e[t+1]=s[1],e[t+2]=s[2],e[t+3]=s[3],e[t+4]=s[4],e[t+5]=s[5],e[t+6]=s[6],e[t+7]=s[7],e[t+8]=s[8],e[t+9]=s[9],e[t+10]=s[10],e[t+11]=s[11],e[t+12]=s[12],e[t+13]=s[13],e[t+14]=s[14],e[t+15]=s[15],e}}const Oo=new re,ks=new xt,P0t=new re(0,0,0),F0t=new re(1,1,1),Xi=new re,jc=new re,ns=new re,KC=new xt,jC=new Mr;class hp{constructor(e=0,t=0,s=0,i=hp.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=s,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,s,i=this._order){return this._x=e,this._y=t,this._z=s,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,s=!0){const i=e.elements,r=i[0],o=i[4],a=i[8],c=i[1],d=i[5],u=i[9],_=i[2],m=i[6],h=i[10];switch(t){case"XYZ":this._y=Math.asin(In(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,h),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(m,d),this._z=0);break;case"YXZ":this._x=Math.asin(-In(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-_,r),this._z=0);break;case"ZXY":this._x=Math.asin(In(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-_,h),this._z=Math.atan2(-o,d)):(this._y=0,this._z=Math.atan2(c,r));break;case"ZYX":this._y=Math.asin(-In(_,-1,1)),Math.abs(_)<.9999999?(this._x=Math.atan2(m,h),this._z=Math.atan2(c,r)):(this._x=0,this._z=Math.atan2(-o,d));break;case"YZX":this._z=Math.asin(In(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-_,r)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-In(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(m,d),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-u,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,s===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,s){return KC.makeRotationFromQuaternion(e),this.setFromRotationMatrix(KC,t,s)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return jC.setFromEuler(this),this.setFromQuaternion(jC,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}hp.DEFAULT_ORDER="XYZ";class WN{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let s=0;s0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function r(a,c){return a[c.uuid]===void 0&&(a[c.uuid]=c.toJSON(e)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const c=a.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(s.geometries=a),c.length>0&&(s.materials=c),d.length>0&&(s.textures=d),u.length>0&&(s.images=u),_.length>0&&(s.shapes=_),m.length>0&&(s.skeletons=m),h.length>0&&(s.animations=h),g.length>0&&(s.nodes=g)}return s.object=i,s;function o(a){const c=[];for(const d in a){const u=a[d];delete u.metadata,c.push(u)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let s=0;s0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,s,i,r){Ds.subVectors(i,t),vi.subVectors(s,t),rg.subVectors(e,t);const o=Ds.dot(Ds),a=Ds.dot(vi),c=Ds.dot(rg),d=vi.dot(vi),u=vi.dot(rg),_=o*d-a*a;if(_===0)return r.set(-2,-1,-1);const m=1/_,h=(d*c-a*u)*m,g=(o*u-a*c)*m;return r.set(1-h-g,g,h)}static containsPoint(e,t,s,i){return this.getBarycoord(e,t,s,i,Si),Si.x>=0&&Si.y>=0&&Si.x+Si.y<=1}static getUV(e,t,s,i,r,o,a,c){return Xc===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Xc=!0),this.getInterpolation(e,t,s,i,r,o,a,c)}static getInterpolation(e,t,s,i,r,o,a,c){return this.getBarycoord(e,t,s,i,Si),c.setScalar(0),c.addScaledVector(r,Si.x),c.addScaledVector(o,Si.y),c.addScaledVector(a,Si.z),c}static isFrontFacing(e,t,s,i){return Ds.subVectors(s,t),vi.subVectors(e,t),Ds.cross(vi).dot(i)<0}set(e,t,s){return this.a.copy(e),this.b.copy(t),this.c.copy(s),this}setFromPointsAndIndices(e,t,s,i){return this.a.copy(e[t]),this.b.copy(e[s]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,s,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,s),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ds.subVectors(this.c,this.b),vi.subVectors(this.a,this.b),Ds.cross(vi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Fs.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Fs.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,s,i,r){return Xc===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Xc=!0),Fs.getInterpolation(e,this.a,this.b,this.c,t,s,i,r)}getInterpolation(e,t,s,i,r){return Fs.getInterpolation(e,this.a,this.b,this.c,t,s,i,r)}containsPoint(e){return Fs.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Fs.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const s=this.a,i=this.b,r=this.c;let o,a;Do.subVectors(i,s),Lo.subVectors(r,s),og.subVectors(e,s);const c=Do.dot(og),d=Lo.dot(og);if(c<=0&&d<=0)return t.copy(s);ag.subVectors(e,i);const u=Do.dot(ag),_=Lo.dot(ag);if(u>=0&&_<=u)return t.copy(i);const m=c*_-u*d;if(m<=0&&c>=0&&u<=0)return o=c/(c-u),t.copy(s).addScaledVector(Do,o);lg.subVectors(e,r);const h=Do.dot(lg),g=Lo.dot(lg);if(g>=0&&h<=g)return t.copy(r);const f=h*d-c*g;if(f<=0&&d>=0&&g<=0)return a=d/(d-g),t.copy(s).addScaledVector(Lo,a);const b=u*g-h*_;if(b<=0&&_-u>=0&&h-g>=0)return ew.subVectors(r,i),a=(_-u)/(_-u+(h-g)),t.copy(i).addScaledVector(ew,a);const y=1/(b+f+m);return o=f*y,a=m*y,t.copy(s).addScaledVector(Do,o).addScaledVector(Lo,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const KN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Zi={h:0,s:0,l:0},Zc={h:0,s:0,l:0};function cg(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class pt{constructor(e,t,s){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,s)}set(e,t,s){if(t===void 0&&s===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,s);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=nn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Pt.toWorkingColorSpace(this,t),this}setRGB(e,t,s,i=Pt.workingColorSpace){return this.r=e,this.g=t,this.b=s,Pt.toWorkingColorSpace(this,i),this}setHSL(e,t,s,i=Pt.workingColorSpace){if(e=_y(e,1),t=In(t,0,1),s=In(s,0,1),t===0)this.r=this.g=this.b=s;else{const r=s<=.5?s*(1+t):s+t-s*t,o=2*s-r;this.r=cg(o,r,e+1/3),this.g=cg(o,r,e),this.b=cg(o,r,e-1/3)}return Pt.toWorkingColorSpace(this,i),this}setStyle(e,t=nn){function s(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=i[1],a=i[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=i[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=nn){const s=KN[e.toLowerCase()];return s!==void 0?this.setHex(s,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=oa(e.r),this.g=oa(e.g),this.b=oa(e.b),this}copyLinearToSRGB(e){return this.r=Xh(e.r),this.g=Xh(e.g),this.b=Xh(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=nn){return Pt.fromWorkingColorSpace(Mn.copy(this),e),Math.round(In(Mn.r*255,0,255))*65536+Math.round(In(Mn.g*255,0,255))*256+Math.round(In(Mn.b*255,0,255))}getHexString(e=nn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Pt.workingColorSpace){Pt.fromWorkingColorSpace(Mn.copy(this),t);const s=Mn.r,i=Mn.g,r=Mn.b,o=Math.max(s,i,r),a=Math.min(s,i,r);let c,d;const u=(a+o)/2;if(a===o)c=0,d=0;else{const _=o-a;switch(d=u<=.5?_/(o+a):_/(2-o-a),o){case s:c=(i-r)/_+(i0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const s=e[t];if(s===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(s):i&&i.isVector3&&s&&s.isVector3?i.copy(s):this[t]=s}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const s={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.color&&this.color.isColor&&(s.color=this.color.getHex()),this.roughness!==void 0&&(s.roughness=this.roughness),this.metalness!==void 0&&(s.metalness=this.metalness),this.sheen!==void 0&&(s.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(s.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(s.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(s.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(s.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(s.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(s.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(s.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(s.shininess=this.shininess),this.clearcoat!==void 0&&(s.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(s.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(s.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(s.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(s.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,s.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(s.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(s.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(s.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(s.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(s.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(s.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(s.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(s.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(s.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(s.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(s.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(s.lightMap=this.lightMap.toJSON(e).uuid,s.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(s.aoMap=this.aoMap.toJSON(e).uuid,s.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(s.bumpMap=this.bumpMap.toJSON(e).uuid,s.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(s.normalMap=this.normalMap.toJSON(e).uuid,s.normalMapType=this.normalMapType,s.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(s.displacementMap=this.displacementMap.toJSON(e).uuid,s.displacementScale=this.displacementScale,s.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(s.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(s.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(s.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(s.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(s.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(s.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(s.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(s.combine=this.combine)),this.envMapIntensity!==void 0&&(s.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(s.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(s.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(s.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(s.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(s.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(s.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(s.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(s.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(s.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(s.size=this.size),this.shadowSide!==null&&(s.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(s.sizeAttenuation=this.sizeAttenuation),this.blending!==ra&&(s.blending=this.blending),this.side!==Fi&&(s.side=this.side),this.vertexColors===!0&&(s.vertexColors=!0),this.opacity<1&&(s.opacity=this.opacity),this.transparent===!0&&(s.transparent=!0),this.blendSrc!==fb&&(s.blendSrc=this.blendSrc),this.blendDst!==_b&&(s.blendDst=this.blendDst),this.blendEquation!==Yr&&(s.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(s.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(s.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(s.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(s.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(s.blendAlpha=this.blendAlpha),this.depthFunc!==mu&&(s.depthFunc=this.depthFunc),this.depthTest===!1&&(s.depthTest=this.depthTest),this.depthWrite===!1&&(s.depthWrite=this.depthWrite),this.colorWrite===!1&&(s.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(s.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==VC&&(s.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(s.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(s.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ro&&(s.stencilFail=this.stencilFail),this.stencilZFail!==Ro&&(s.stencilZFail=this.stencilZFail),this.stencilZPass!==Ro&&(s.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(s.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(s.rotation=this.rotation),this.polygonOffset===!0&&(s.polygonOffset=!0),this.polygonOffsetFactor!==0&&(s.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(s.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(s.linewidth=this.linewidth),this.dashSize!==void 0&&(s.dashSize=this.dashSize),this.gapSize!==void 0&&(s.gapSize=this.gapSize),this.scale!==void 0&&(s.scale=this.scale),this.dithering===!0&&(s.dithering=!0),this.alphaTest>0&&(s.alphaTest=this.alphaTest),this.alphaHash===!0&&(s.alphaHash=!0),this.alphaToCoverage===!0&&(s.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(s.premultipliedAlpha=!0),this.forceSinglePass===!0&&(s.forceSinglePass=!0),this.wireframe===!0&&(s.wireframe=!0),this.wireframeLinewidth>1&&(s.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(s.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(s.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(s.flatShading=!0),this.visible===!1&&(s.visible=!1),this.toneMapped===!1&&(s.toneMapped=!1),this.fog===!1&&(s.fog=!1),Object.keys(this.userData).length>0&&(s.userData=this.userData);function i(r){const o=[];for(const a in r){const c=r[a];delete c.metadata,o.push(c)}return o}if(t){const r=i(e.textures),o=i(e.images);r.length>0&&(s.textures=r),o.length>0&&(s.images=o)}return s}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let s=null;if(t!==null){const i=t.length;s=new Array(i);for(let r=0;r!==i;++r)s[r]=t[r].clone()}return this.clippingPlanes=s,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class _r extends zs{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new pt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=dy,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const rn=new re,Jc=new Rt;class zn{constructor(e,t,s=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=s,this.usage=yb,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Mi,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.BufferAttribute: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,s){e*=this.itemSize,s*=t.itemSize;for(let i=0,r=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const c=this.parameters;for(const d in c)c[d]!==void 0&&(e[d]=c[d]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const s=this.attributes;for(const c in s){const d=s[c];e.data.attributes[c]=d.toJSON(e.data)}const i={};let r=!1;for(const c in this.morphAttributes){const d=this.morphAttributes[c],u=[];for(let _=0,m=d.length;_0&&(i[c]=u,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const s=e.index;s!==null&&this.setIndex(s.clone(t));const i=e.attributes;for(const d in i){const u=i[d];this.setAttribute(d,u.clone(t))}const r=e.morphAttributes;for(const d in r){const u=[],_=r[d];for(let m=0,h=_.length;m0){const i=t[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r(e.far-e.near)**2))&&(tw.copy(r).invert(),Pr.copy(e.ray).applyMatrix4(tw),!(s.boundingBox!==null&&Pr.intersectsBox(s.boundingBox)===!1)&&this._computeIntersections(e,t,Pr)))}_computeIntersections(e,t,s){let i;const r=this.geometry,o=this.material,a=r.index,c=r.attributes.position,d=r.attributes.uv,u=r.attributes.uv1,_=r.attributes.normal,m=r.groups,h=r.drawRange;if(a!==null)if(Array.isArray(o))for(let g=0,f=m.length;gt.far?null:{distance:d,point:od.clone(),object:n}}function ad(n,e,t,s,i,r,o,a,c,d){n.getVertexPosition(a,Fo),n.getVertexPosition(c,Uo),n.getVertexPosition(d,Bo);const u=Y0t(n,e,t,s,Fo,Uo,Bo,rd);if(u){i&&(nd.fromBufferAttribute(i,a),sd.fromBufferAttribute(i,c),id.fromBufferAttribute(i,d),u.uv=Fs.getInterpolation(rd,Fo,Uo,Bo,nd,sd,id,new Rt)),r&&(nd.fromBufferAttribute(r,a),sd.fromBufferAttribute(r,c),id.fromBufferAttribute(r,d),u.uv1=Fs.getInterpolation(rd,Fo,Uo,Bo,nd,sd,id,new Rt),u.uv2=u.uv1),o&&(sw.fromBufferAttribute(o,a),iw.fromBufferAttribute(o,c),rw.fromBufferAttribute(o,d),u.normal=Fs.getInterpolation(rd,Fo,Uo,Bo,sw,iw,rw,new re),u.normal.dot(s.direction)>0&&u.normal.multiplyScalar(-1));const _={a,b:c,c:d,normal:new re,materialIndex:0};Fs.getNormal(Fo,Uo,Bo,_.normal),u.face=_}return u}class yr extends _i{constructor(e=1,t=1,s=1,i=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:s,widthSegments:i,heightSegments:r,depthSegments:o};const a=this;i=Math.floor(i),r=Math.floor(r),o=Math.floor(o);const c=[],d=[],u=[],_=[];let m=0,h=0;g("z","y","x",-1,-1,s,t,e,o,r,0),g("z","y","x",1,-1,s,t,-e,o,r,1),g("x","z","y",1,1,e,s,t,i,o,2),g("x","z","y",1,-1,e,s,-t,i,o,3),g("x","y","z",1,-1,e,t,s,i,r,4),g("x","y","z",-1,-1,e,t,-s,i,r,5),this.setIndex(c),this.setAttribute("position",new ki(d,3)),this.setAttribute("normal",new ki(u,3)),this.setAttribute("uv",new ki(_,2));function g(f,b,y,E,v,S,R,w,A,O,C){const M=S/A,G=R/O,V=S/2,ee=R/2,I=w/2,H=A+1,q=O+1;let L=0,W=0;const se=new re;for(let oe=0;oe0?1:-1,u.push(se.x,se.y,se.z),_.push(xe/A),_.push(1-oe/O),L+=1}}for(let oe=0;oe0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const s={};for(const i in this.extensions)this.extensions[i]===!0&&(s[i]=!0);return Object.keys(s).length>0&&(t.extensions=s),t}}class ZN extends Jt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new xt,this.projectionMatrix=new xt,this.projectionMatrixInverse=new xt,this.coordinateSystem=Ni}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Gn extends ZN{constructor(e=50,t=1,s=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=s,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=xa*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Il*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return xa*2*Math.atan(Math.tan(Il*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,s,i,r,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=s,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(Il*.5*this.fov)/this.zoom,s=2*t,i=this.aspect*s,r=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const c=o.fullWidth,d=o.fullHeight;r+=o.offsetX*i/c,t-=o.offsetY*s/d,i*=o.width/c,s*=o.height/d}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-s,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Go=-90,Vo=1;class j0t extends Jt{constructor(e,t,s){super(),this.type="CubeCamera",this.renderTarget=s,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Gn(Go,Vo,e,t);i.layers=this.layers,this.add(i);const r=new Gn(Go,Vo,e,t);r.layers=this.layers,this.add(r);const o=new Gn(Go,Vo,e,t);o.layers=this.layers,this.add(o);const a=new Gn(Go,Vo,e,t);a.layers=this.layers,this.add(a);const c=new Gn(Go,Vo,e,t);c.layers=this.layers,this.add(c);const d=new Gn(Go,Vo,e,t);d.layers=this.layers,this.add(d)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[s,i,r,o,a,c]=t;for(const d of t)this.remove(d);if(e===Ni)s.up.set(0,1,0),s.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),c.up.set(0,1,0),c.lookAt(0,0,-1);else if(e===Eu)s.up.set(0,-1,0),s.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),c.up.set(0,-1,0),c.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const d of t)this.add(d),d.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:s,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,c,d,u]=this.children,_=e.getRenderTarget(),m=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),g=e.xr.enabled;e.xr.enabled=!1;const f=s.texture.generateMipmaps;s.texture.generateMipmaps=!1,e.setRenderTarget(s,0,i),e.render(t,r),e.setRenderTarget(s,1,i),e.render(t,o),e.setRenderTarget(s,2,i),e.render(t,a),e.setRenderTarget(s,3,i),e.render(t,c),e.setRenderTarget(s,4,i),e.render(t,d),s.texture.generateMipmaps=f,e.setRenderTarget(s,5,i),e.render(t,u),e.setRenderTarget(_,m,h),e.xr.enabled=g,s.texture.needsPMREMUpdate=!0}}class JN extends xn{constructor(e,t,s,i,r,o,a,c,d,u){e=e!==void 0?e:[],t=t!==void 0?t:ya,super(e,t,s,i,r,o,a,c,d,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Q0t extends mo{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const s={width:e,height:e,depth:1},i=[s,s,s,s,s,s];t.encoding!==void 0&&(kl("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===io?nn:bs),this.texture=new JN(i,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:Kn}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const s={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class ho extends zs{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=K0t,this.fragmentShader=j0t,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Ca(e.uniforms),this.uniformsGroups=$0t(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const i in this.uniforms){const o=this.uniforms[i].value;o&&o.isTexture?t.uniforms[i]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[i]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[i]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[i]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[i]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[i]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[i]={type:"m4",value:o.toArray()}:t.uniforms[i]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const s={};for(const i in this.extensions)this.extensions[i]===!0&&(s[i]=!0);return Object.keys(s).length>0&&(t.extensions=s),t}}class ZN extends Jt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new xt,this.projectionMatrix=new xt,this.projectionMatrixInverse=new xt,this.coordinateSystem=Ni}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Gn extends ZN{constructor(e=50,t=1,s=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=s,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=xa*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Il*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return xa*2*Math.atan(Math.tan(Il*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,s,i,r,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=s,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(Il*.5*this.fov)/this.zoom,s=2*t,i=this.aspect*s,r=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const c=o.fullWidth,d=o.fullHeight;r+=o.offsetX*i/c,t-=o.offsetY*s/d,i*=o.width/c,s*=o.height/d}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-s,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Go=-90,Vo=1;class Q0t extends Jt{constructor(e,t,s){super(),this.type="CubeCamera",this.renderTarget=s,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Gn(Go,Vo,e,t);i.layers=this.layers,this.add(i);const r=new Gn(Go,Vo,e,t);r.layers=this.layers,this.add(r);const o=new Gn(Go,Vo,e,t);o.layers=this.layers,this.add(o);const a=new Gn(Go,Vo,e,t);a.layers=this.layers,this.add(a);const c=new Gn(Go,Vo,e,t);c.layers=this.layers,this.add(c);const d=new Gn(Go,Vo,e,t);d.layers=this.layers,this.add(d)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[s,i,r,o,a,c]=t;for(const d of t)this.remove(d);if(e===Ni)s.up.set(0,1,0),s.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),c.up.set(0,1,0),c.lookAt(0,0,-1);else if(e===Eu)s.up.set(0,-1,0),s.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),c.up.set(0,-1,0),c.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const d of t)this.add(d),d.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:s,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,c,d,u]=this.children,_=e.getRenderTarget(),m=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),g=e.xr.enabled;e.xr.enabled=!1;const f=s.texture.generateMipmaps;s.texture.generateMipmaps=!1,e.setRenderTarget(s,0,i),e.render(t,r),e.setRenderTarget(s,1,i),e.render(t,o),e.setRenderTarget(s,2,i),e.render(t,a),e.setRenderTarget(s,3,i),e.render(t,c),e.setRenderTarget(s,4,i),e.render(t,d),s.texture.generateMipmaps=f,e.setRenderTarget(s,5,i),e.render(t,u),e.setRenderTarget(_,m,h),e.xr.enabled=g,s.texture.needsPMREMUpdate=!0}}class JN extends xn{constructor(e,t,s,i,r,o,a,c,d,u){e=e!==void 0?e:[],t=t!==void 0?t:ya,super(e,t,s,i,r,o,a,c,d,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class X0t extends mo{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const s={width:e,height:e,depth:1},i=[s,s,s,s,s,s];t.encoding!==void 0&&(kl("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===io?nn:bs),this.texture=new JN(i,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:Kn}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const s={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -364,9 +364,9 @@ ${c}`;navigator.clipboard.writeText(d)}else navigator.clipboard.writeText(e);thi gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},i=new yr(5,5,5),r=new ho({name:"CubemapFromEquirect",uniforms:Ca(s.uniforms),vertexShader:s.vertexShader,fragmentShader:s.fragmentShader,side:Jn,blending:hr});r.uniforms.tEquirect.value=t;const o=new Vn(i,r),a=t.minFilter;return t.minFilter===_o&&(t.minFilter=Kn),new j0t(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,s,i){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,s,i);e.setRenderTarget(r)}}const pg=new re,X0t=new re,Z0t=new Tt;class Vr{constructor(e=new re(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,s,i){return this.normal.set(e,t,s),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,s){const i=pg.subVectors(s,t).cross(X0t.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const s=e.delta(pg),i=this.normal.dot(s);if(i===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:t.copy(e.start).addScaledVector(s,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),s=this.distanceToPoint(e.end);return t<0&&s>0||s<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const s=t||Z0t.getNormalMatrix(e),i=this.coplanarPoint(pg).applyMatrix4(e),r=this.normal.applyMatrix3(s).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Fr=new fi,ld=new re;class my{constructor(e=new Vr,t=new Vr,s=new Vr,i=new Vr,r=new Vr,o=new Vr){this.planes=[e,t,s,i,r,o]}set(e,t,s,i,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(s),a[3].copy(i),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let s=0;s<6;s++)t[s].copy(e.planes[s]);return this}setFromProjectionMatrix(e,t=Ni){const s=this.planes,i=e.elements,r=i[0],o=i[1],a=i[2],c=i[3],d=i[4],u=i[5],_=i[6],m=i[7],h=i[8],g=i[9],f=i[10],b=i[11],y=i[12],E=i[13],v=i[14],S=i[15];if(s[0].setComponents(c-r,m-d,b-h,S-y).normalize(),s[1].setComponents(c+r,m+d,b+h,S+y).normalize(),s[2].setComponents(c+o,m+u,b+g,S+E).normalize(),s[3].setComponents(c-o,m-u,b-g,S-E).normalize(),s[4].setComponents(c-a,m-_,b-f,S-v).normalize(),t===Ni)s[5].setComponents(c+a,m+_,b+f,S+v).normalize();else if(t===Eu)s[5].setComponents(a,_,f,v).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Fr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Fr.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Fr)}intersectsSprite(e){return Fr.center.set(0,0,0),Fr.radius=.7071067811865476,Fr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Fr)}intersectsSphere(e){const t=this.planes,s=e.center,i=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(s)0?e.max.x:e.min.x,ld.y=i.normal.y>0?e.max.y:e.min.y,ld.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(ld)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let s=0;s<6;s++)if(t[s].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function eI(){let n=null,e=!1,t=null,s=null;function i(r,o){t(r,o),s=n.requestAnimationFrame(i)}return{start:function(){e!==!0&&t!==null&&(s=n.requestAnimationFrame(i),e=!0)},stop:function(){n.cancelAnimationFrame(s),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){n=r}}}function J0t(n,e){const t=e.isWebGL2,s=new WeakMap;function i(d,u){const _=d.array,m=d.usage,h=_.byteLength,g=n.createBuffer();n.bindBuffer(u,g),n.bufferData(u,_,m),d.onUploadCallback();let f;if(_ instanceof Float32Array)f=n.FLOAT;else if(_ instanceof Uint16Array)if(d.isFloat16BufferAttribute)if(t)f=n.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else f=n.UNSIGNED_SHORT;else if(_ instanceof Int16Array)f=n.SHORT;else if(_ instanceof Uint32Array)f=n.UNSIGNED_INT;else if(_ instanceof Int32Array)f=n.INT;else if(_ instanceof Int8Array)f=n.BYTE;else if(_ instanceof Uint8Array)f=n.UNSIGNED_BYTE;else if(_ instanceof Uint8ClampedArray)f=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+_);return{buffer:g,type:f,bytesPerElement:_.BYTES_PER_ELEMENT,version:d.version,size:h}}function r(d,u,_){const m=u.array,h=u._updateRange,g=u.updateRanges;if(n.bindBuffer(_,d),h.count===-1&&g.length===0&&n.bufferSubData(_,0,m),g.length!==0){for(let f=0,b=g.length;f1?null:t.copy(e.start).addScaledVector(s,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),s=this.distanceToPoint(e.end);return t<0&&s>0||s<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const s=t||J0t.getNormalMatrix(e),i=this.coplanarPoint(pg).applyMatrix4(e),r=this.normal.applyMatrix3(s).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Fr=new fi,ld=new re;class my{constructor(e=new Vr,t=new Vr,s=new Vr,i=new Vr,r=new Vr,o=new Vr){this.planes=[e,t,s,i,r,o]}set(e,t,s,i,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(s),a[3].copy(i),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let s=0;s<6;s++)t[s].copy(e.planes[s]);return this}setFromProjectionMatrix(e,t=Ni){const s=this.planes,i=e.elements,r=i[0],o=i[1],a=i[2],c=i[3],d=i[4],u=i[5],_=i[6],m=i[7],h=i[8],g=i[9],f=i[10],b=i[11],y=i[12],E=i[13],v=i[14],S=i[15];if(s[0].setComponents(c-r,m-d,b-h,S-y).normalize(),s[1].setComponents(c+r,m+d,b+h,S+y).normalize(),s[2].setComponents(c+o,m+u,b+g,S+E).normalize(),s[3].setComponents(c-o,m-u,b-g,S-E).normalize(),s[4].setComponents(c-a,m-_,b-f,S-v).normalize(),t===Ni)s[5].setComponents(c+a,m+_,b+f,S+v).normalize();else if(t===Eu)s[5].setComponents(a,_,f,v).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Fr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Fr.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Fr)}intersectsSprite(e){return Fr.center.set(0,0,0),Fr.radius=.7071067811865476,Fr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Fr)}intersectsSphere(e){const t=this.planes,s=e.center,i=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(s)0?e.max.x:e.min.x,ld.y=i.normal.y>0?e.max.y:e.min.y,ld.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(ld)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let s=0;s<6;s++)if(t[s].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function eI(){let n=null,e=!1,t=null,s=null;function i(r,o){t(r,o),s=n.requestAnimationFrame(i)}return{start:function(){e!==!0&&t!==null&&(s=n.requestAnimationFrame(i),e=!0)},stop:function(){n.cancelAnimationFrame(s),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){n=r}}}function eyt(n,e){const t=e.isWebGL2,s=new WeakMap;function i(d,u){const _=d.array,m=d.usage,h=_.byteLength,g=n.createBuffer();n.bindBuffer(u,g),n.bufferData(u,_,m),d.onUploadCallback();let f;if(_ instanceof Float32Array)f=n.FLOAT;else if(_ instanceof Uint16Array)if(d.isFloat16BufferAttribute)if(t)f=n.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else f=n.UNSIGNED_SHORT;else if(_ instanceof Int16Array)f=n.SHORT;else if(_ instanceof Uint32Array)f=n.UNSIGNED_INT;else if(_ instanceof Int32Array)f=n.INT;else if(_ instanceof Int8Array)f=n.BYTE;else if(_ instanceof Uint8Array)f=n.UNSIGNED_BYTE;else if(_ instanceof Uint8ClampedArray)f=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+_);return{buffer:g,type:f,bytesPerElement:_.BYTES_PER_ELEMENT,version:d.version,size:h}}function r(d,u,_){const m=u.array,h=u._updateRange,g=u.updateRanges;if(n.bindBuffer(_,d),h.count===-1&&g.length===0&&n.bufferSubData(_,0,m),g.length!==0){for(let f=0,b=g.length;f 0 +#endif`,hyt=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { @@ -563,26 +563,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #pragma unroll_loop_end if ( clipped ) discard; #endif -#endif`,hyt=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif`,gyt=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif`,byt=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,yyt=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,yyt=`#if defined( USE_COLOR_ALPHA ) +#endif`,Eyt=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,Eyt=`#if defined( USE_COLOR_ALPHA ) +#endif`,vyt=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,vyt=`#if defined( USE_COLOR_ALPHA ) +#endif`,Syt=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,Syt=`#if defined( USE_COLOR_ALPHA ) +#endif`,Tyt=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -592,7 +592,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,Tyt=`#define PI 3.141592653589793 +#endif`,xyt=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -670,7 +670,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,xyt=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,Cyt=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -768,7 +768,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,Cyt=`vec3 transformedNormal = objectNormal; +#endif`,wyt=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -797,18 +797,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,wyt=`#ifdef USE_DISPLACEMENTMAP +#endif`,Ryt=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,Ryt=`#ifdef USE_DISPLACEMENTMAP +#endif`,Ayt=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,Ayt=`#ifdef USE_EMISSIVEMAP +#endif`,Myt=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,Myt=`#ifdef USE_EMISSIVEMAP +#endif`,Nyt=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,Nyt="gl_FragColor = linearToOutputTexel( gl_FragColor );",Iyt=` +#endif`,Iyt="gl_FragColor = linearToOutputTexel( gl_FragColor );",Oyt=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -836,7 +836,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,Oyt=`#ifdef USE_ENVMAP +}`,kyt=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -865,7 +865,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,kyt=`#ifdef USE_ENVMAP +#endif`,Dyt=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -874,7 +874,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,Dyt=`#ifdef USE_ENVMAP +#endif`,Lyt=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -885,7 +885,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,Lyt=`#ifdef USE_ENVMAP +#endif`,Pyt=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -896,7 +896,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,Pyt=`#ifdef USE_ENVMAP +#endif`,Fyt=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -913,18 +913,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,Fyt=`#ifdef USE_FOG - vFogDepth = - mvPosition.z; #endif`,Uyt=`#ifdef USE_FOG - varying float vFogDepth; + vFogDepth = - mvPosition.z; #endif`,Byt=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,Gyt=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,Gyt=`#ifdef USE_FOG +#endif`,Vyt=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -933,7 +933,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,Vyt=`#ifdef USE_GRADIENTMAP +#endif`,zyt=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -945,16 +945,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,zyt=`#ifdef USE_LIGHTMAP +}`,Hyt=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,Hyt=`#ifdef USE_LIGHTMAP +#endif`,qyt=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,qyt=`LambertMaterial material; +#endif`,Yyt=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,Yyt=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,$yt=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -968,7 +968,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,$yt=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Wyt=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -1091,7 +1091,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,Wyt=`#ifdef USE_ENVMAP +#endif`,Kyt=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -1124,8 +1124,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,Kyt=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,jyt=`varying vec3 vViewPosition; +#endif`,jyt=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,Qyt=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -1137,11 +1137,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Qyt=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Xyt=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,Xyt=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,Zyt=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -1158,7 +1158,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Zyt=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Jyt=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -1241,7 +1241,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,Jyt=`struct PhysicalMaterial { +#endif`,eEt=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1541,7 +1541,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,eEt=` +}`,tEt=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1656,7 +1656,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,tEt=`#if defined( RE_IndirectDiffuse ) +#endif`,nEt=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1675,25 +1675,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,nEt=`#if defined( RE_IndirectDiffuse ) +#endif`,sEt=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,sEt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; #endif`,iEt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,rEt=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,rEt=`#ifdef USE_LOGDEPTHBUF +#endif`,oEt=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,oEt=`#ifdef USE_LOGDEPTHBUF +#endif`,aEt=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -1703,16 +1703,16 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,aEt=`#ifdef USE_MAP +#endif`,lEt=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,lEt=`#ifdef USE_MAP +#endif`,cEt=`#ifdef USE_MAP uniform sampler2D map; -#endif`,cEt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,dEt=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1724,7 +1724,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,dEt=`#if defined( USE_POINTS_UV ) +#endif`,uEt=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1736,13 +1736,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,uEt=`float metalnessFactor = metalness; +#endif`,pEt=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,pEt=`#ifdef USE_METALNESSMAP +#endif`,fEt=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,fEt=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,_Et=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1751,7 +1751,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,_Et=`#ifdef USE_MORPHNORMALS +#endif`,mEt=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1763,7 +1763,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,mEt=`#ifdef USE_MORPHTARGETS +#endif`,hEt=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1783,7 +1783,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,hEt=`#ifdef USE_MORPHTARGETS +#endif`,gEt=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1801,7 +1801,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,gEt=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,bEt=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1842,7 +1842,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,bEt=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,yEt=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1857,12 +1857,6 @@ vec3 nonPerturbedNormal = normal;`,bEt=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,yEt=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif #endif`,EEt=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT @@ -1870,12 +1864,18 @@ vec3 nonPerturbedNormal = normal;`,bEt=`#ifdef USE_NORMALMAP_OBJECTSPACE varying vec3 vBitangent; #endif #endif`,vEt=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,SEt=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,SEt=`#ifdef USE_NORMALMAP +#endif`,TEt=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1897,13 +1897,13 @@ vec3 nonPerturbedNormal = normal;`,bEt=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,TEt=`#ifdef USE_CLEARCOAT +#endif`,xEt=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,xEt=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,CEt=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,CEt=`#ifdef USE_CLEARCOATMAP +#endif`,wEt=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1912,18 +1912,18 @@ vec3 nonPerturbedNormal = normal;`,bEt=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,wEt=`#ifdef USE_IRIDESCENCEMAP +#endif`,REt=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,REt=`#ifdef OPAQUE +#endif`,AEt=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,AEt=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,MEt=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1964,9 +1964,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,MEt=`#ifdef PREMULTIPLIED_ALPHA +}`,NEt=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,NEt=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,IEt=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1974,22 +1974,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,IEt=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,OEt=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,OEt=`#ifdef DITHERING +#endif`,kEt=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,kEt=`float roughnessFactor = roughness; +#endif`,DEt=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,DEt=`#ifdef USE_ROUGHNESSMAP +#endif`,LEt=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,LEt=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,PEt=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -2166,7 +2166,7 @@ gl_Position = projectionMatrix * mvPosition;`,IEt=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,PEt=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,FEt=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -2204,7 +2204,7 @@ gl_Position = projectionMatrix * mvPosition;`,IEt=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,FEt=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,UEt=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -2236,7 +2236,7 @@ gl_Position = projectionMatrix * mvPosition;`,IEt=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,UEt=`float getShadowMask() { +#endif`,BEt=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -2268,12 +2268,12 @@ gl_Position = projectionMatrix * mvPosition;`,IEt=`#ifdef DITHERING #endif #endif return shadow; -}`,BEt=`#ifdef USE_SKINNING +}`,GEt=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,GEt=`#ifdef USE_SKINNING +#endif`,VEt=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2288,7 +2288,7 @@ gl_Position = projectionMatrix * mvPosition;`,IEt=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,VEt=`#ifdef USE_SKINNING +#endif`,zEt=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2296,7 +2296,7 @@ gl_Position = projectionMatrix * mvPosition;`,IEt=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,zEt=`#ifdef USE_SKINNING +#endif`,HEt=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2307,17 +2307,17 @@ gl_Position = projectionMatrix * mvPosition;`,IEt=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,HEt=`float specularStrength; +#endif`,qEt=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,qEt=`#ifdef USE_SPECULARMAP +#endif`,YEt=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,YEt=`#if defined( TONE_MAPPING ) +#endif`,$Et=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,$Et=`#ifndef saturate +#endif`,WEt=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2353,7 +2353,7 @@ vec3 ACESFilmicToneMapping( vec3 color ) { color = ACESOutputMat * color; return saturate( color ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,WEt=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,KEt=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2374,7 +2374,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,WEt=`#ifdef USE_TRANSMIS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,KEt=`#ifdef USE_TRANSMISSION +#endif`,jEt=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2480,7 +2480,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,WEt=`#ifdef USE_TRANSMIS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,jEt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,QEt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2550,7 +2550,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,WEt=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,QEt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,XEt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2644,7 +2644,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,WEt=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,XEt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,ZEt=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2715,7 +2715,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,WEt=`#ifdef USE_TRANSMIS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,ZEt=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,JEt=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -2724,12 +2724,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,WEt=`#ifdef USE_TRANSMIS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const JEt=`varying vec2 vUv; +#endif`;const evt=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,evt=`uniform sampler2D t2D; +}`,tvt=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2741,14 +2741,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,tvt=`varying vec3 vWorldDirection; +}`,nvt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,nvt=`#ifdef ENVMAP_TYPE_CUBE +}`,svt=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2770,14 +2770,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,svt=`varying vec3 vWorldDirection; +}`,ivt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,ivt=`uniform samplerCube tCube; +}`,rvt=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2787,7 +2787,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,rvt=`#include +}`,ovt=`#include #include #include #include @@ -2813,7 +2813,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,ovt=`#if DEPTH_PACKING == 3200 +}`,avt=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2843,7 +2843,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,avt=`#define DISTANCE +}`,lvt=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2869,7 +2869,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,lvt=`#define DISTANCE +}`,cvt=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2893,13 +2893,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,cvt=`varying vec3 vWorldDirection; +}`,dvt=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,dvt=`uniform sampler2D tEquirect; +}`,uvt=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2908,7 +2908,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,uvt=`uniform float scale; +}`,pvt=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2929,7 +2929,7 @@ void main() { #include #include #include -}`,pvt=`uniform vec3 diffuse; +}`,fvt=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2957,7 +2957,7 @@ void main() { #include #include #include -}`,fvt=`#include +}`,_vt=`#include #include #include #include @@ -2988,7 +2988,7 @@ void main() { #include #include #include -}`,_vt=`uniform vec3 diffuse; +}`,mvt=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -3036,7 +3036,7 @@ void main() { #include #include #include -}`,mvt=`#define LAMBERT +}`,hvt=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -3074,7 +3074,7 @@ void main() { #include #include #include -}`,hvt=`#define LAMBERT +}`,gvt=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3131,7 +3131,7 @@ void main() { #include #include #include -}`,gvt=`#define MATCAP +}`,bvt=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -3164,7 +3164,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,bvt=`#define MATCAP +}`,yvt=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3210,7 +3210,7 @@ void main() { #include #include #include -}`,yvt=`#define NORMAL +}`,Evt=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3242,7 +3242,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,Evt=`#define NORMAL +}`,vvt=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3263,7 +3263,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,vvt=`#define PHONG +}`,Svt=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3301,7 +3301,7 @@ void main() { #include #include #include -}`,Svt=`#define PHONG +}`,Tvt=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3360,7 +3360,7 @@ void main() { #include #include #include -}`,Tvt=`#define STANDARD +}`,xvt=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3402,7 +3402,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,xvt=`#define STANDARD +}`,Cvt=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3524,7 +3524,7 @@ void main() { #include #include #include -}`,Cvt=`#define TOON +}`,wvt=`#define TOON varying vec3 vViewPosition; #include #include @@ -3560,7 +3560,7 @@ void main() { #include #include #include -}`,wvt=`#define TOON +}`,Rvt=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3613,7 +3613,7 @@ void main() { #include #include #include -}`,Rvt=`uniform float size; +}`,Avt=`uniform float size; uniform float scale; #include #include @@ -3643,7 +3643,7 @@ void main() { #include #include #include -}`,Avt=`uniform vec3 diffuse; +}`,Mvt=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3668,7 +3668,7 @@ void main() { #include #include #include -}`,Mvt=`#include +}`,Nvt=`#include #include #include #include @@ -3690,7 +3690,7 @@ void main() { #include #include #include -}`,Nvt=`uniform vec3 color; +}`,Ivt=`uniform vec3 color; uniform float opacity; #include #include @@ -3706,7 +3706,7 @@ void main() { #include #include #include -}`,Ivt=`uniform float rotation; +}`,Ovt=`uniform float rotation; uniform vec2 center; #include #include @@ -3732,7 +3732,7 @@ void main() { #include #include #include -}`,Ovt=`uniform vec3 diffuse; +}`,kvt=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3757,7 +3757,7 @@ void main() { #include #include #include -}`,vt={alphahash_fragment:eyt,alphahash_pars_fragment:tyt,alphamap_fragment:nyt,alphamap_pars_fragment:syt,alphatest_fragment:iyt,alphatest_pars_fragment:ryt,aomap_fragment:oyt,aomap_pars_fragment:ayt,batching_pars_vertex:lyt,batching_vertex:cyt,begin_vertex:dyt,beginnormal_vertex:uyt,bsdfs:pyt,iridescence_fragment:fyt,bumpmap_pars_fragment:_yt,clipping_planes_fragment:myt,clipping_planes_pars_fragment:hyt,clipping_planes_pars_vertex:gyt,clipping_planes_vertex:byt,color_fragment:yyt,color_pars_fragment:Eyt,color_pars_vertex:vyt,color_vertex:Syt,common:Tyt,cube_uv_reflection_fragment:xyt,defaultnormal_vertex:Cyt,displacementmap_pars_vertex:wyt,displacementmap_vertex:Ryt,emissivemap_fragment:Ayt,emissivemap_pars_fragment:Myt,colorspace_fragment:Nyt,colorspace_pars_fragment:Iyt,envmap_fragment:Oyt,envmap_common_pars_fragment:kyt,envmap_pars_fragment:Dyt,envmap_pars_vertex:Lyt,envmap_physical_pars_fragment:Wyt,envmap_vertex:Pyt,fog_vertex:Fyt,fog_pars_vertex:Uyt,fog_fragment:Byt,fog_pars_fragment:Gyt,gradientmap_pars_fragment:Vyt,lightmap_fragment:zyt,lightmap_pars_fragment:Hyt,lights_lambert_fragment:qyt,lights_lambert_pars_fragment:Yyt,lights_pars_begin:$yt,lights_toon_fragment:Kyt,lights_toon_pars_fragment:jyt,lights_phong_fragment:Qyt,lights_phong_pars_fragment:Xyt,lights_physical_fragment:Zyt,lights_physical_pars_fragment:Jyt,lights_fragment_begin:eEt,lights_fragment_maps:tEt,lights_fragment_end:nEt,logdepthbuf_fragment:sEt,logdepthbuf_pars_fragment:iEt,logdepthbuf_pars_vertex:rEt,logdepthbuf_vertex:oEt,map_fragment:aEt,map_pars_fragment:lEt,map_particle_fragment:cEt,map_particle_pars_fragment:dEt,metalnessmap_fragment:uEt,metalnessmap_pars_fragment:pEt,morphcolor_vertex:fEt,morphnormal_vertex:_Et,morphtarget_pars_vertex:mEt,morphtarget_vertex:hEt,normal_fragment_begin:gEt,normal_fragment_maps:bEt,normal_pars_fragment:yEt,normal_pars_vertex:EEt,normal_vertex:vEt,normalmap_pars_fragment:SEt,clearcoat_normal_fragment_begin:TEt,clearcoat_normal_fragment_maps:xEt,clearcoat_pars_fragment:CEt,iridescence_pars_fragment:wEt,opaque_fragment:REt,packing:AEt,premultiplied_alpha_fragment:MEt,project_vertex:NEt,dithering_fragment:IEt,dithering_pars_fragment:OEt,roughnessmap_fragment:kEt,roughnessmap_pars_fragment:DEt,shadowmap_pars_fragment:LEt,shadowmap_pars_vertex:PEt,shadowmap_vertex:FEt,shadowmask_pars_fragment:UEt,skinbase_vertex:BEt,skinning_pars_vertex:GEt,skinning_vertex:VEt,skinnormal_vertex:zEt,specularmap_fragment:HEt,specularmap_pars_fragment:qEt,tonemapping_fragment:YEt,tonemapping_pars_fragment:$Et,transmission_fragment:WEt,transmission_pars_fragment:KEt,uv_pars_fragment:jEt,uv_pars_vertex:QEt,uv_vertex:XEt,worldpos_vertex:ZEt,background_vert:JEt,background_frag:evt,backgroundCube_vert:tvt,backgroundCube_frag:nvt,cube_vert:svt,cube_frag:ivt,depth_vert:rvt,depth_frag:ovt,distanceRGBA_vert:avt,distanceRGBA_frag:lvt,equirect_vert:cvt,equirect_frag:dvt,linedashed_vert:uvt,linedashed_frag:pvt,meshbasic_vert:fvt,meshbasic_frag:_vt,meshlambert_vert:mvt,meshlambert_frag:hvt,meshmatcap_vert:gvt,meshmatcap_frag:bvt,meshnormal_vert:yvt,meshnormal_frag:Evt,meshphong_vert:vvt,meshphong_frag:Svt,meshphysical_vert:Tvt,meshphysical_frag:xvt,meshtoon_vert:Cvt,meshtoon_frag:wvt,points_vert:Rvt,points_frag:Avt,shadow_vert:Mvt,shadow_frag:Nvt,sprite_vert:Ivt,sprite_frag:Ovt},$e={common:{diffuse:{value:new pt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Tt},alphaMap:{value:null},alphaMapTransform:{value:new Tt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Tt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Tt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Tt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Tt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Tt},normalScale:{value:new Rt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Tt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Tt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Tt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Tt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new pt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new pt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Tt},alphaTest:{value:0},uvTransform:{value:new Tt}},sprite:{diffuse:{value:new pt(16777215)},opacity:{value:1},center:{value:new Rt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Tt},alphaMap:{value:null},alphaMapTransform:{value:new Tt},alphaTest:{value:0}}},Js={basic:{uniforms:Fn([$e.common,$e.specularmap,$e.envmap,$e.aomap,$e.lightmap,$e.fog]),vertexShader:vt.meshbasic_vert,fragmentShader:vt.meshbasic_frag},lambert:{uniforms:Fn([$e.common,$e.specularmap,$e.envmap,$e.aomap,$e.lightmap,$e.emissivemap,$e.bumpmap,$e.normalmap,$e.displacementmap,$e.fog,$e.lights,{emissive:{value:new pt(0)}}]),vertexShader:vt.meshlambert_vert,fragmentShader:vt.meshlambert_frag},phong:{uniforms:Fn([$e.common,$e.specularmap,$e.envmap,$e.aomap,$e.lightmap,$e.emissivemap,$e.bumpmap,$e.normalmap,$e.displacementmap,$e.fog,$e.lights,{emissive:{value:new pt(0)},specular:{value:new pt(1118481)},shininess:{value:30}}]),vertexShader:vt.meshphong_vert,fragmentShader:vt.meshphong_frag},standard:{uniforms:Fn([$e.common,$e.envmap,$e.aomap,$e.lightmap,$e.emissivemap,$e.bumpmap,$e.normalmap,$e.displacementmap,$e.roughnessmap,$e.metalnessmap,$e.fog,$e.lights,{emissive:{value:new pt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:vt.meshphysical_vert,fragmentShader:vt.meshphysical_frag},toon:{uniforms:Fn([$e.common,$e.aomap,$e.lightmap,$e.emissivemap,$e.bumpmap,$e.normalmap,$e.displacementmap,$e.gradientmap,$e.fog,$e.lights,{emissive:{value:new pt(0)}}]),vertexShader:vt.meshtoon_vert,fragmentShader:vt.meshtoon_frag},matcap:{uniforms:Fn([$e.common,$e.bumpmap,$e.normalmap,$e.displacementmap,$e.fog,{matcap:{value:null}}]),vertexShader:vt.meshmatcap_vert,fragmentShader:vt.meshmatcap_frag},points:{uniforms:Fn([$e.points,$e.fog]),vertexShader:vt.points_vert,fragmentShader:vt.points_frag},dashed:{uniforms:Fn([$e.common,$e.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:vt.linedashed_vert,fragmentShader:vt.linedashed_frag},depth:{uniforms:Fn([$e.common,$e.displacementmap]),vertexShader:vt.depth_vert,fragmentShader:vt.depth_frag},normal:{uniforms:Fn([$e.common,$e.bumpmap,$e.normalmap,$e.displacementmap,{opacity:{value:1}}]),vertexShader:vt.meshnormal_vert,fragmentShader:vt.meshnormal_frag},sprite:{uniforms:Fn([$e.sprite,$e.fog]),vertexShader:vt.sprite_vert,fragmentShader:vt.sprite_frag},background:{uniforms:{uvTransform:{value:new Tt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:vt.background_vert,fragmentShader:vt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:vt.backgroundCube_vert,fragmentShader:vt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:vt.cube_vert,fragmentShader:vt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:vt.equirect_vert,fragmentShader:vt.equirect_frag},distanceRGBA:{uniforms:Fn([$e.common,$e.displacementmap,{referencePosition:{value:new re},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:vt.distanceRGBA_vert,fragmentShader:vt.distanceRGBA_frag},shadow:{uniforms:Fn([$e.lights,$e.fog,{color:{value:new pt(0)},opacity:{value:1}}]),vertexShader:vt.shadow_vert,fragmentShader:vt.shadow_frag}};Js.physical={uniforms:Fn([Js.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Tt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Tt},clearcoatNormalScale:{value:new Rt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Tt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Tt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Tt},sheen:{value:0},sheenColor:{value:new pt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Tt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Tt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Tt},transmissionSamplerSize:{value:new Rt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Tt},attenuationDistance:{value:0},attenuationColor:{value:new pt(0)},specularColor:{value:new pt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Tt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Tt},anisotropyVector:{value:new Rt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Tt}}]),vertexShader:vt.meshphysical_vert,fragmentShader:vt.meshphysical_frag};const cd={r:0,b:0,g:0};function kvt(n,e,t,s,i,r,o){const a=new pt(0);let c=r===!0?0:1,d,u,_=null,m=0,h=null;function g(b,y){let E=!1,v=y.isScene===!0?y.background:null;v&&v.isTexture&&(v=(y.backgroundBlurriness>0?t:e).get(v)),v===null?f(a,c):v&&v.isColor&&(f(v,1),E=!0);const S=n.xr.getEnvironmentBlendMode();S==="additive"?s.buffers.color.setClear(0,0,0,1,o):S==="alpha-blend"&&s.buffers.color.setClear(0,0,0,0,o),(n.autoClear||E)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),v&&(v.isCubeTexture||v.mapping===fp)?(u===void 0&&(u=new Vn(new yr(1,1,1),new ho({name:"BackgroundCubeMaterial",uniforms:Ca(Js.backgroundCube.uniforms),vertexShader:Js.backgroundCube.vertexShader,fragmentShader:Js.backgroundCube.fragmentShader,side:Jn,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(R,w,A){this.matrixWorld.copyPosition(A.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),u.material.uniforms.envMap.value=v,u.material.uniforms.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,u.material.toneMapped=Pt.getTransfer(v.colorSpace)!==jt,(_!==v||m!==v.version||h!==n.toneMapping)&&(u.material.needsUpdate=!0,_=v,m=v.version,h=n.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null)):v&&v.isTexture&&(d===void 0&&(d=new Vn(new hy(2,2),new ho({name:"BackgroundMaterial",uniforms:Ca(Js.background.uniforms),vertexShader:Js.background.vertexShader,fragmentShader:Js.background.fragmentShader,side:Fi,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),Object.defineProperty(d.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(d)),d.material.uniforms.t2D.value=v,d.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,d.material.toneMapped=Pt.getTransfer(v.colorSpace)!==jt,v.matrixAutoUpdate===!0&&v.updateMatrix(),d.material.uniforms.uvTransform.value.copy(v.matrix),(_!==v||m!==v.version||h!==n.toneMapping)&&(d.material.needsUpdate=!0,_=v,m=v.version,h=n.toneMapping),d.layers.enableAll(),b.unshift(d,d.geometry,d.material,0,0,null))}function f(b,y){b.getRGB(cd,XN(n)),s.buffers.color.setClear(cd.r,cd.g,cd.b,y,o)}return{getClearColor:function(){return a},setClearColor:function(b,y=1){a.set(b),c=y,f(a,c)},getClearAlpha:function(){return c},setClearAlpha:function(b){c=b,f(a,c)},render:g}}function Dvt(n,e,t,s){const i=n.getParameter(n.MAX_VERTEX_ATTRIBS),r=s.isWebGL2?null:e.get("OES_vertex_array_object"),o=s.isWebGL2||r!==null,a={},c=b(null);let d=c,u=!1;function _(I,H,q,L,W){let se=!1;if(o){const oe=f(L,q,H);d!==oe&&(d=oe,h(d.object)),se=y(I,L,q,W),se&&E(I,L,q,W)}else{const oe=H.wireframe===!0;(d.geometry!==L.id||d.program!==q.id||d.wireframe!==oe)&&(d.geometry=L.id,d.program=q.id,d.wireframe=oe,se=!0)}W!==null&&t.update(W,n.ELEMENT_ARRAY_BUFFER),(se||u)&&(u=!1,O(I,H,q,L),W!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(W).buffer))}function m(){return s.isWebGL2?n.createVertexArray():r.createVertexArrayOES()}function h(I){return s.isWebGL2?n.bindVertexArray(I):r.bindVertexArrayOES(I)}function g(I){return s.isWebGL2?n.deleteVertexArray(I):r.deleteVertexArrayOES(I)}function f(I,H,q){const L=q.wireframe===!0;let W=a[I.id];W===void 0&&(W={},a[I.id]=W);let se=W[H.id];se===void 0&&(se={},W[H.id]=se);let oe=se[L];return oe===void 0&&(oe=b(m()),se[L]=oe),oe}function b(I){const H=[],q=[],L=[];for(let W=0;W=0){const ve=W[xe];let Oe=se[xe];if(Oe===void 0&&(xe==="instanceMatrix"&&I.instanceMatrix&&(Oe=I.instanceMatrix),xe==="instanceColor"&&I.instanceColor&&(Oe=I.instanceColor)),ve===void 0||ve.attribute!==Oe||Oe&&ve.data!==Oe.data)return!0;oe++}return d.attributesNum!==oe||d.index!==L}function E(I,H,q,L){const W={},se=H.attributes;let oe=0;const ye=q.getAttributes();for(const xe in ye)if(ye[xe].location>=0){let ve=se[xe];ve===void 0&&(xe==="instanceMatrix"&&I.instanceMatrix&&(ve=I.instanceMatrix),xe==="instanceColor"&&I.instanceColor&&(ve=I.instanceColor));const Oe={};Oe.attribute=ve,ve&&ve.data&&(Oe.data=ve.data),W[xe]=Oe,oe++}d.attributes=W,d.attributesNum=oe,d.index=L}function v(){const I=d.newAttributes;for(let H=0,q=I.length;H=0){let le=W[ye];if(le===void 0&&(ye==="instanceMatrix"&&I.instanceMatrix&&(le=I.instanceMatrix),ye==="instanceColor"&&I.instanceColor&&(le=I.instanceColor)),le!==void 0){const ve=le.normalized,Oe=le.itemSize,De=t.get(le);if(De===void 0)continue;const Q=De.buffer,fe=De.type,_e=De.bytesPerElement,Ae=s.isWebGL2===!0&&(fe===n.INT||fe===n.UNSIGNED_INT||le.gpuType===kN);if(le.isInterleavedBufferAttribute){const Be=le.data,ne=Be.stride,U=le.offset;if(Be.isInstancedInterleavedBuffer){for(let P=0;P0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";A="mediump"}return A==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n.constructor.name==="WebGL2RenderingContext";let a=t.precision!==void 0?t.precision:"highp";const c=r(a);c!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",c,"instead."),a=c);const d=o||e.has("WEBGL_draw_buffers"),u=t.logarithmicDepthBuffer===!0,_=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),m=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=n.getParameter(n.MAX_TEXTURE_SIZE),g=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),f=n.getParameter(n.MAX_VERTEX_ATTRIBS),b=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),y=n.getParameter(n.MAX_VARYING_VECTORS),E=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),v=m>0,S=o||e.has("OES_texture_float"),R=v&&S,w=o?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:d,getMaxAnisotropy:i,getMaxPrecision:r,precision:a,logarithmicDepthBuffer:u,maxTextures:_,maxVertexTextures:m,maxTextureSize:h,maxCubemapSize:g,maxAttributes:f,maxVertexUniforms:b,maxVaryings:y,maxFragmentUniforms:E,vertexTextures:v,floatFragmentTextures:S,floatVertexTextures:R,maxSamples:w}}function Fvt(n){const e=this;let t=null,s=0,i=!1,r=!1;const o=new Vr,a=new Tt,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(_,m){const h=_.length!==0||m||s!==0||i;return i=m,s=_.length,h},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(_,m){t=u(_,m,0)},this.setState=function(_,m,h){const g=_.clippingPlanes,f=_.clipIntersection,b=_.clipShadows,y=n.get(_);if(!i||g===null||g.length===0||r&&!b)r?u(null):d();else{const E=r?0:s,v=E*4;let S=y.clippingState||null;c.value=S,S=u(g,m,v,h);for(let R=0;R!==v;++R)S[R]=t[R];y.clippingState=S,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=E}};function d(){c.value!==t&&(c.value=t,c.needsUpdate=s>0),e.numPlanes=s,e.numIntersection=0}function u(_,m,h,g){const f=_!==null?_.length:0;let b=null;if(f!==0){if(b=c.value,g!==!0||b===null){const y=h+f*4,E=m.matrixWorldInverse;a.getNormalMatrix(E),(b===null||b.length0){const d=new Q0t(c.height/2);return d.fromEquirectangularTexture(n,o),e.set(o,d),o.addEventListener("dispose",i),t(d.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const c=e.get(a);c!==void 0&&(e.delete(a),c.dispose())}function r(){e=new WeakMap}return{get:s,dispose:r}}class gy extends ZN{constructor(e=-1,t=1,s=1,i=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=s,this.bottom=i,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,s,i,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=s,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),s=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=s-e,o=s+e,a=i+t,c=i-t;if(this.view!==null&&this.view.enabled){const d=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=d*this.view.offsetX,o=r+d*this.view.width,a-=u*this.view.offsetY,c=a-u*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,c,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const jo=4,ow=[.125,.215,.35,.446,.526,.582],$r=20,fg=new gy,aw=new pt;let _g=null,mg=0,hg=0;const zr=(1+Math.sqrt(5))/2,zo=1/zr,lw=[new re(1,1,1),new re(-1,1,1),new re(1,1,-1),new re(-1,1,-1),new re(0,zr,zo),new re(0,zr,-zo),new re(zo,0,zr),new re(-zo,0,zr),new re(zr,zo,0),new re(-zr,zo,0)];class cw{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,s=.1,i=100){_g=this._renderer.getRenderTarget(),mg=this._renderer.getActiveCubeFace(),hg=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,s,i,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=pw(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=uw(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?v:0,v,v),u.setRenderTarget(i),f&&u.render(g,a),u.render(e,a)}g.geometry.dispose(),g.material.dispose(),u.toneMapping=m,u.autoClear=_,e.background=b}_textureToCubeUV(e,t){const s=this._renderer,i=e.mapping===ya||e.mapping===Ea;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=pw()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=uw());const r=i?this._cubemapMaterial:this._equirectMaterial,o=new Vn(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const c=this._cubeSize;dd(t,0,0,3*c,2*c),s.setRenderTarget(t),s.render(o,fg)}_applyPMREM(e){const t=this._renderer,s=t.autoClear;t.autoClear=!1;for(let i=1;i$r&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${$r}`);const y=[];let E=0;for(let A=0;A<$r;++A){const O=A/f,C=Math.exp(-O*O/2);y.push(C),A===0?E+=C:Av-jo?i-v+jo:0),w=4*(this._cubeSize-S);dd(t,R,w,3*S,2*S),c.setRenderTarget(t),c.render(_,fg)}}function Bvt(n){const e=[],t=[],s=[];let i=n;const r=n-jo+1+ow.length;for(let o=0;on-jo?c=ow[o-n+jo-1]:o===0&&(c=0),s.push(c);const d=1/(a-2),u=-d,_=1+d,m=[u,u,_,u,_,_,u,u,_,_,u,_],h=6,g=6,f=3,b=2,y=1,E=new Float32Array(f*g*h),v=new Float32Array(b*g*h),S=new Float32Array(y*g*h);for(let w=0;w2?0:-1,C=[A,O,0,A+2/3,O,0,A+2/3,O+1,0,A,O,0,A+2/3,O+1,0,A,O+1,0];E.set(C,f*g*w),v.set(m,b*g*w);const M=[w,w,w,w,w,w];S.set(M,y*g*w)}const R=new _i;R.setAttribute("position",new zn(E,f)),R.setAttribute("uv",new zn(v,b)),R.setAttribute("faceIndex",new zn(S,y)),e.push(R),i>jo&&i--}return{lodPlanes:e,sizeLods:t,sigmas:s}}function dw(n,e,t){const s=new mo(n,e,t);return s.texture.mapping=fp,s.texture.name="PMREM.cubeUv",s.scissorTest=!0,s}function dd(n,e,t,s,i){n.viewport.set(e,t,s,i),n.scissor.set(e,t,s,i)}function Gvt(n,e,t){const s=new Float32Array($r),i=new re(0,1,0);return new ho({name:"SphericalGaussianBlur",defines:{n:$r,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:s},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:by(),fragmentShader:` +}`,vt={alphahash_fragment:tyt,alphahash_pars_fragment:nyt,alphamap_fragment:syt,alphamap_pars_fragment:iyt,alphatest_fragment:ryt,alphatest_pars_fragment:oyt,aomap_fragment:ayt,aomap_pars_fragment:lyt,batching_pars_vertex:cyt,batching_vertex:dyt,begin_vertex:uyt,beginnormal_vertex:pyt,bsdfs:fyt,iridescence_fragment:_yt,bumpmap_pars_fragment:myt,clipping_planes_fragment:hyt,clipping_planes_pars_fragment:gyt,clipping_planes_pars_vertex:byt,clipping_planes_vertex:yyt,color_fragment:Eyt,color_pars_fragment:vyt,color_pars_vertex:Syt,color_vertex:Tyt,common:xyt,cube_uv_reflection_fragment:Cyt,defaultnormal_vertex:wyt,displacementmap_pars_vertex:Ryt,displacementmap_vertex:Ayt,emissivemap_fragment:Myt,emissivemap_pars_fragment:Nyt,colorspace_fragment:Iyt,colorspace_pars_fragment:Oyt,envmap_fragment:kyt,envmap_common_pars_fragment:Dyt,envmap_pars_fragment:Lyt,envmap_pars_vertex:Pyt,envmap_physical_pars_fragment:Kyt,envmap_vertex:Fyt,fog_vertex:Uyt,fog_pars_vertex:Byt,fog_fragment:Gyt,fog_pars_fragment:Vyt,gradientmap_pars_fragment:zyt,lightmap_fragment:Hyt,lightmap_pars_fragment:qyt,lights_lambert_fragment:Yyt,lights_lambert_pars_fragment:$yt,lights_pars_begin:Wyt,lights_toon_fragment:jyt,lights_toon_pars_fragment:Qyt,lights_phong_fragment:Xyt,lights_phong_pars_fragment:Zyt,lights_physical_fragment:Jyt,lights_physical_pars_fragment:eEt,lights_fragment_begin:tEt,lights_fragment_maps:nEt,lights_fragment_end:sEt,logdepthbuf_fragment:iEt,logdepthbuf_pars_fragment:rEt,logdepthbuf_pars_vertex:oEt,logdepthbuf_vertex:aEt,map_fragment:lEt,map_pars_fragment:cEt,map_particle_fragment:dEt,map_particle_pars_fragment:uEt,metalnessmap_fragment:pEt,metalnessmap_pars_fragment:fEt,morphcolor_vertex:_Et,morphnormal_vertex:mEt,morphtarget_pars_vertex:hEt,morphtarget_vertex:gEt,normal_fragment_begin:bEt,normal_fragment_maps:yEt,normal_pars_fragment:EEt,normal_pars_vertex:vEt,normal_vertex:SEt,normalmap_pars_fragment:TEt,clearcoat_normal_fragment_begin:xEt,clearcoat_normal_fragment_maps:CEt,clearcoat_pars_fragment:wEt,iridescence_pars_fragment:REt,opaque_fragment:AEt,packing:MEt,premultiplied_alpha_fragment:NEt,project_vertex:IEt,dithering_fragment:OEt,dithering_pars_fragment:kEt,roughnessmap_fragment:DEt,roughnessmap_pars_fragment:LEt,shadowmap_pars_fragment:PEt,shadowmap_pars_vertex:FEt,shadowmap_vertex:UEt,shadowmask_pars_fragment:BEt,skinbase_vertex:GEt,skinning_pars_vertex:VEt,skinning_vertex:zEt,skinnormal_vertex:HEt,specularmap_fragment:qEt,specularmap_pars_fragment:YEt,tonemapping_fragment:$Et,tonemapping_pars_fragment:WEt,transmission_fragment:KEt,transmission_pars_fragment:jEt,uv_pars_fragment:QEt,uv_pars_vertex:XEt,uv_vertex:ZEt,worldpos_vertex:JEt,background_vert:evt,background_frag:tvt,backgroundCube_vert:nvt,backgroundCube_frag:svt,cube_vert:ivt,cube_frag:rvt,depth_vert:ovt,depth_frag:avt,distanceRGBA_vert:lvt,distanceRGBA_frag:cvt,equirect_vert:dvt,equirect_frag:uvt,linedashed_vert:pvt,linedashed_frag:fvt,meshbasic_vert:_vt,meshbasic_frag:mvt,meshlambert_vert:hvt,meshlambert_frag:gvt,meshmatcap_vert:bvt,meshmatcap_frag:yvt,meshnormal_vert:Evt,meshnormal_frag:vvt,meshphong_vert:Svt,meshphong_frag:Tvt,meshphysical_vert:xvt,meshphysical_frag:Cvt,meshtoon_vert:wvt,meshtoon_frag:Rvt,points_vert:Avt,points_frag:Mvt,shadow_vert:Nvt,shadow_frag:Ivt,sprite_vert:Ovt,sprite_frag:kvt},$e={common:{diffuse:{value:new pt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Tt},alphaMap:{value:null},alphaMapTransform:{value:new Tt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Tt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Tt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Tt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Tt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Tt},normalScale:{value:new Rt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Tt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Tt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Tt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Tt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new pt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new pt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Tt},alphaTest:{value:0},uvTransform:{value:new Tt}},sprite:{diffuse:{value:new pt(16777215)},opacity:{value:1},center:{value:new Rt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Tt},alphaMap:{value:null},alphaMapTransform:{value:new Tt},alphaTest:{value:0}}},Js={basic:{uniforms:Fn([$e.common,$e.specularmap,$e.envmap,$e.aomap,$e.lightmap,$e.fog]),vertexShader:vt.meshbasic_vert,fragmentShader:vt.meshbasic_frag},lambert:{uniforms:Fn([$e.common,$e.specularmap,$e.envmap,$e.aomap,$e.lightmap,$e.emissivemap,$e.bumpmap,$e.normalmap,$e.displacementmap,$e.fog,$e.lights,{emissive:{value:new pt(0)}}]),vertexShader:vt.meshlambert_vert,fragmentShader:vt.meshlambert_frag},phong:{uniforms:Fn([$e.common,$e.specularmap,$e.envmap,$e.aomap,$e.lightmap,$e.emissivemap,$e.bumpmap,$e.normalmap,$e.displacementmap,$e.fog,$e.lights,{emissive:{value:new pt(0)},specular:{value:new pt(1118481)},shininess:{value:30}}]),vertexShader:vt.meshphong_vert,fragmentShader:vt.meshphong_frag},standard:{uniforms:Fn([$e.common,$e.envmap,$e.aomap,$e.lightmap,$e.emissivemap,$e.bumpmap,$e.normalmap,$e.displacementmap,$e.roughnessmap,$e.metalnessmap,$e.fog,$e.lights,{emissive:{value:new pt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:vt.meshphysical_vert,fragmentShader:vt.meshphysical_frag},toon:{uniforms:Fn([$e.common,$e.aomap,$e.lightmap,$e.emissivemap,$e.bumpmap,$e.normalmap,$e.displacementmap,$e.gradientmap,$e.fog,$e.lights,{emissive:{value:new pt(0)}}]),vertexShader:vt.meshtoon_vert,fragmentShader:vt.meshtoon_frag},matcap:{uniforms:Fn([$e.common,$e.bumpmap,$e.normalmap,$e.displacementmap,$e.fog,{matcap:{value:null}}]),vertexShader:vt.meshmatcap_vert,fragmentShader:vt.meshmatcap_frag},points:{uniforms:Fn([$e.points,$e.fog]),vertexShader:vt.points_vert,fragmentShader:vt.points_frag},dashed:{uniforms:Fn([$e.common,$e.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:vt.linedashed_vert,fragmentShader:vt.linedashed_frag},depth:{uniforms:Fn([$e.common,$e.displacementmap]),vertexShader:vt.depth_vert,fragmentShader:vt.depth_frag},normal:{uniforms:Fn([$e.common,$e.bumpmap,$e.normalmap,$e.displacementmap,{opacity:{value:1}}]),vertexShader:vt.meshnormal_vert,fragmentShader:vt.meshnormal_frag},sprite:{uniforms:Fn([$e.sprite,$e.fog]),vertexShader:vt.sprite_vert,fragmentShader:vt.sprite_frag},background:{uniforms:{uvTransform:{value:new Tt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:vt.background_vert,fragmentShader:vt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:vt.backgroundCube_vert,fragmentShader:vt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:vt.cube_vert,fragmentShader:vt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:vt.equirect_vert,fragmentShader:vt.equirect_frag},distanceRGBA:{uniforms:Fn([$e.common,$e.displacementmap,{referencePosition:{value:new re},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:vt.distanceRGBA_vert,fragmentShader:vt.distanceRGBA_frag},shadow:{uniforms:Fn([$e.lights,$e.fog,{color:{value:new pt(0)},opacity:{value:1}}]),vertexShader:vt.shadow_vert,fragmentShader:vt.shadow_frag}};Js.physical={uniforms:Fn([Js.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Tt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Tt},clearcoatNormalScale:{value:new Rt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Tt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Tt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Tt},sheen:{value:0},sheenColor:{value:new pt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Tt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Tt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Tt},transmissionSamplerSize:{value:new Rt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Tt},attenuationDistance:{value:0},attenuationColor:{value:new pt(0)},specularColor:{value:new pt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Tt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Tt},anisotropyVector:{value:new Rt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Tt}}]),vertexShader:vt.meshphysical_vert,fragmentShader:vt.meshphysical_frag};const cd={r:0,b:0,g:0};function Dvt(n,e,t,s,i,r,o){const a=new pt(0);let c=r===!0?0:1,d,u,_=null,m=0,h=null;function g(b,y){let E=!1,v=y.isScene===!0?y.background:null;v&&v.isTexture&&(v=(y.backgroundBlurriness>0?t:e).get(v)),v===null?f(a,c):v&&v.isColor&&(f(v,1),E=!0);const S=n.xr.getEnvironmentBlendMode();S==="additive"?s.buffers.color.setClear(0,0,0,1,o):S==="alpha-blend"&&s.buffers.color.setClear(0,0,0,0,o),(n.autoClear||E)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),v&&(v.isCubeTexture||v.mapping===fp)?(u===void 0&&(u=new Vn(new yr(1,1,1),new ho({name:"BackgroundCubeMaterial",uniforms:Ca(Js.backgroundCube.uniforms),vertexShader:Js.backgroundCube.vertexShader,fragmentShader:Js.backgroundCube.fragmentShader,side:Jn,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(R,w,A){this.matrixWorld.copyPosition(A.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),u.material.uniforms.envMap.value=v,u.material.uniforms.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,u.material.toneMapped=Pt.getTransfer(v.colorSpace)!==jt,(_!==v||m!==v.version||h!==n.toneMapping)&&(u.material.needsUpdate=!0,_=v,m=v.version,h=n.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null)):v&&v.isTexture&&(d===void 0&&(d=new Vn(new hy(2,2),new ho({name:"BackgroundMaterial",uniforms:Ca(Js.background.uniforms),vertexShader:Js.background.vertexShader,fragmentShader:Js.background.fragmentShader,side:Fi,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),Object.defineProperty(d.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(d)),d.material.uniforms.t2D.value=v,d.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,d.material.toneMapped=Pt.getTransfer(v.colorSpace)!==jt,v.matrixAutoUpdate===!0&&v.updateMatrix(),d.material.uniforms.uvTransform.value.copy(v.matrix),(_!==v||m!==v.version||h!==n.toneMapping)&&(d.material.needsUpdate=!0,_=v,m=v.version,h=n.toneMapping),d.layers.enableAll(),b.unshift(d,d.geometry,d.material,0,0,null))}function f(b,y){b.getRGB(cd,XN(n)),s.buffers.color.setClear(cd.r,cd.g,cd.b,y,o)}return{getClearColor:function(){return a},setClearColor:function(b,y=1){a.set(b),c=y,f(a,c)},getClearAlpha:function(){return c},setClearAlpha:function(b){c=b,f(a,c)},render:g}}function Lvt(n,e,t,s){const i=n.getParameter(n.MAX_VERTEX_ATTRIBS),r=s.isWebGL2?null:e.get("OES_vertex_array_object"),o=s.isWebGL2||r!==null,a={},c=b(null);let d=c,u=!1;function _(I,H,q,L,W){let se=!1;if(o){const oe=f(L,q,H);d!==oe&&(d=oe,h(d.object)),se=y(I,L,q,W),se&&E(I,L,q,W)}else{const oe=H.wireframe===!0;(d.geometry!==L.id||d.program!==q.id||d.wireframe!==oe)&&(d.geometry=L.id,d.program=q.id,d.wireframe=oe,se=!0)}W!==null&&t.update(W,n.ELEMENT_ARRAY_BUFFER),(se||u)&&(u=!1,O(I,H,q,L),W!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(W).buffer))}function m(){return s.isWebGL2?n.createVertexArray():r.createVertexArrayOES()}function h(I){return s.isWebGL2?n.bindVertexArray(I):r.bindVertexArrayOES(I)}function g(I){return s.isWebGL2?n.deleteVertexArray(I):r.deleteVertexArrayOES(I)}function f(I,H,q){const L=q.wireframe===!0;let W=a[I.id];W===void 0&&(W={},a[I.id]=W);let se=W[H.id];se===void 0&&(se={},W[H.id]=se);let oe=se[L];return oe===void 0&&(oe=b(m()),se[L]=oe),oe}function b(I){const H=[],q=[],L=[];for(let W=0;W=0){const ve=W[xe];let Oe=se[xe];if(Oe===void 0&&(xe==="instanceMatrix"&&I.instanceMatrix&&(Oe=I.instanceMatrix),xe==="instanceColor"&&I.instanceColor&&(Oe=I.instanceColor)),ve===void 0||ve.attribute!==Oe||Oe&&ve.data!==Oe.data)return!0;oe++}return d.attributesNum!==oe||d.index!==L}function E(I,H,q,L){const W={},se=H.attributes;let oe=0;const ye=q.getAttributes();for(const xe in ye)if(ye[xe].location>=0){let ve=se[xe];ve===void 0&&(xe==="instanceMatrix"&&I.instanceMatrix&&(ve=I.instanceMatrix),xe==="instanceColor"&&I.instanceColor&&(ve=I.instanceColor));const Oe={};Oe.attribute=ve,ve&&ve.data&&(Oe.data=ve.data),W[xe]=Oe,oe++}d.attributes=W,d.attributesNum=oe,d.index=L}function v(){const I=d.newAttributes;for(let H=0,q=I.length;H=0){let le=W[ye];if(le===void 0&&(ye==="instanceMatrix"&&I.instanceMatrix&&(le=I.instanceMatrix),ye==="instanceColor"&&I.instanceColor&&(le=I.instanceColor)),le!==void 0){const ve=le.normalized,Oe=le.itemSize,De=t.get(le);if(De===void 0)continue;const Q=De.buffer,fe=De.type,_e=De.bytesPerElement,Ae=s.isWebGL2===!0&&(fe===n.INT||fe===n.UNSIGNED_INT||le.gpuType===kN);if(le.isInterleavedBufferAttribute){const Be=le.data,ne=Be.stride,U=le.offset;if(Be.isInstancedInterleavedBuffer){for(let P=0;P0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";A="mediump"}return A==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n.constructor.name==="WebGL2RenderingContext";let a=t.precision!==void 0?t.precision:"highp";const c=r(a);c!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",c,"instead."),a=c);const d=o||e.has("WEBGL_draw_buffers"),u=t.logarithmicDepthBuffer===!0,_=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),m=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=n.getParameter(n.MAX_TEXTURE_SIZE),g=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),f=n.getParameter(n.MAX_VERTEX_ATTRIBS),b=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),y=n.getParameter(n.MAX_VARYING_VECTORS),E=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),v=m>0,S=o||e.has("OES_texture_float"),R=v&&S,w=o?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:d,getMaxAnisotropy:i,getMaxPrecision:r,precision:a,logarithmicDepthBuffer:u,maxTextures:_,maxVertexTextures:m,maxTextureSize:h,maxCubemapSize:g,maxAttributes:f,maxVertexUniforms:b,maxVaryings:y,maxFragmentUniforms:E,vertexTextures:v,floatFragmentTextures:S,floatVertexTextures:R,maxSamples:w}}function Uvt(n){const e=this;let t=null,s=0,i=!1,r=!1;const o=new Vr,a=new Tt,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(_,m){const h=_.length!==0||m||s!==0||i;return i=m,s=_.length,h},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(_,m){t=u(_,m,0)},this.setState=function(_,m,h){const g=_.clippingPlanes,f=_.clipIntersection,b=_.clipShadows,y=n.get(_);if(!i||g===null||g.length===0||r&&!b)r?u(null):d();else{const E=r?0:s,v=E*4;let S=y.clippingState||null;c.value=S,S=u(g,m,v,h);for(let R=0;R!==v;++R)S[R]=t[R];y.clippingState=S,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=E}};function d(){c.value!==t&&(c.value=t,c.needsUpdate=s>0),e.numPlanes=s,e.numIntersection=0}function u(_,m,h,g){const f=_!==null?_.length:0;let b=null;if(f!==0){if(b=c.value,g!==!0||b===null){const y=h+f*4,E=m.matrixWorldInverse;a.getNormalMatrix(E),(b===null||b.length0){const d=new X0t(c.height/2);return d.fromEquirectangularTexture(n,o),e.set(o,d),o.addEventListener("dispose",i),t(d.texture,o.mapping)}else return null}}return o}function i(o){const a=o.target;a.removeEventListener("dispose",i);const c=e.get(a);c!==void 0&&(e.delete(a),c.dispose())}function r(){e=new WeakMap}return{get:s,dispose:r}}class gy extends ZN{constructor(e=-1,t=1,s=1,i=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=s,this.bottom=i,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,s,i,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=s,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),s=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=s-e,o=s+e,a=i+t,c=i-t;if(this.view!==null&&this.view.enabled){const d=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=d*this.view.offsetX,o=r+d*this.view.width,a-=u*this.view.offsetY,c=a-u*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,c,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const jo=4,ow=[.125,.215,.35,.446,.526,.582],$r=20,fg=new gy,aw=new pt;let _g=null,mg=0,hg=0;const zr=(1+Math.sqrt(5))/2,zo=1/zr,lw=[new re(1,1,1),new re(-1,1,1),new re(1,1,-1),new re(-1,1,-1),new re(0,zr,zo),new re(0,zr,-zo),new re(zo,0,zr),new re(-zo,0,zr),new re(zr,zo,0),new re(-zr,zo,0)];class cw{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,s=.1,i=100){_g=this._renderer.getRenderTarget(),mg=this._renderer.getActiveCubeFace(),hg=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,s,i,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=pw(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=uw(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?v:0,v,v),u.setRenderTarget(i),f&&u.render(g,a),u.render(e,a)}g.geometry.dispose(),g.material.dispose(),u.toneMapping=m,u.autoClear=_,e.background=b}_textureToCubeUV(e,t){const s=this._renderer,i=e.mapping===ya||e.mapping===Ea;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=pw()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=uw());const r=i?this._cubemapMaterial:this._equirectMaterial,o=new Vn(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const c=this._cubeSize;dd(t,0,0,3*c,2*c),s.setRenderTarget(t),s.render(o,fg)}_applyPMREM(e){const t=this._renderer,s=t.autoClear;t.autoClear=!1;for(let i=1;i$r&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${$r}`);const y=[];let E=0;for(let A=0;A<$r;++A){const O=A/f,C=Math.exp(-O*O/2);y.push(C),A===0?E+=C:Av-jo?i-v+jo:0),w=4*(this._cubeSize-S);dd(t,R,w,3*S,2*S),c.setRenderTarget(t),c.render(_,fg)}}function Gvt(n){const e=[],t=[],s=[];let i=n;const r=n-jo+1+ow.length;for(let o=0;on-jo?c=ow[o-n+jo-1]:o===0&&(c=0),s.push(c);const d=1/(a-2),u=-d,_=1+d,m=[u,u,_,u,_,_,u,u,_,_,u,_],h=6,g=6,f=3,b=2,y=1,E=new Float32Array(f*g*h),v=new Float32Array(b*g*h),S=new Float32Array(y*g*h);for(let w=0;w2?0:-1,C=[A,O,0,A+2/3,O,0,A+2/3,O+1,0,A,O,0,A+2/3,O+1,0,A,O+1,0];E.set(C,f*g*w),v.set(m,b*g*w);const M=[w,w,w,w,w,w];S.set(M,y*g*w)}const R=new _i;R.setAttribute("position",new zn(E,f)),R.setAttribute("uv",new zn(v,b)),R.setAttribute("faceIndex",new zn(S,y)),e.push(R),i>jo&&i--}return{lodPlanes:e,sizeLods:t,sigmas:s}}function dw(n,e,t){const s=new mo(n,e,t);return s.texture.mapping=fp,s.texture.name="PMREM.cubeUv",s.scissorTest=!0,s}function dd(n,e,t,s,i){n.viewport.set(e,t,s,i),n.scissor.set(e,t,s,i)}function Vvt(n,e,t){const s=new Float32Array($r),i=new re(0,1,0);return new ho({name:"SphericalGaussianBlur",defines:{n:$r,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:s},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:by(),fragmentShader:` precision mediump float; precision mediump int; @@ -3907,26 +3907,26 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function Vvt(n){let e=new WeakMap,t=null;function s(a){if(a&&a.isTexture){const c=a.mapping,d=c===mb||c===hb,u=c===ya||c===Ea;if(d||u)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let _=e.get(a);return t===null&&(t=new cw(n)),_=d?t.fromEquirectangular(a,_):t.fromCubemap(a,_),e.set(a,_),_.texture}else{if(e.has(a))return e.get(a).texture;{const _=a.image;if(d&&_&&_.height>0||u&&_&&i(_)){t===null&&(t=new cw(n));const m=d?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,m),a.addEventListener("dispose",r),m.texture}else return null}}}return a}function i(a){let c=0;const d=6;for(let u=0;ue.maxTextureSize&&(G=Math.ceil(M/e.maxTextureSize),M=e.maxTextureSize);const V=new Float32Array(M*G*4*f),ee=new $N(V,M,G,f);ee.type=Mi,ee.needsUpdate=!0;const I=C*4;for(let q=0;q0)return n;const i=e*t;let r=fw[i];if(r===void 0&&(r=new Float32Array(i),fw[i]=r),e!==0){s.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(r,a)}return r}function fn(n,e){if(n.length!==e.length)return!1;for(let t=0,s=n.length;t0||u&&_&&i(_)){t===null&&(t=new cw(n));const m=d?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,m),a.addEventListener("dispose",r),m.texture}else return null}}}return a}function i(a){let c=0;const d=6;for(let u=0;ue.maxTextureSize&&(G=Math.ceil(M/e.maxTextureSize),M=e.maxTextureSize);const V=new Float32Array(M*G*4*f),ee=new $N(V,M,G,f);ee.type=Mi,ee.needsUpdate=!0;const I=C*4;for(let q=0;q0)return n;const i=e*t;let r=fw[i];if(r===void 0&&(r=new Float32Array(i),fw[i]=r),e!==0){s.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(r,a)}return r}function fn(n,e){if(n.length!==e.length)return!1;for(let t=0,s=n.length;t":" "} ${a}: ${t[o]}`)}return s.join(` -`)}function HSt(n){const e=Pt.getPrimaries(Pt.workingColorSpace),t=Pt.getPrimaries(n);let s;switch(e===t?s="":e===yu&&t===bu?s="LinearDisplayP3ToLinearSRGB":e===bu&&t===yu&&(s="LinearSRGBToLinearDisplayP3"),n){case Cn:case _p:return[s,"LinearTransferOETF"];case nn:case fy:return[s,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[s,"LinearTransferOETF"]}}function Ew(n,e,t){const s=n.getShaderParameter(e,n.COMPILE_STATUS),i=n.getShaderInfoLog(e).trim();if(s&&i==="")return"";const r=/ERROR: 0:(\d+)/.exec(i);if(r){const o=parseInt(r[1]);return t.toUpperCase()+` +`)}function qSt(n){const e=Pt.getPrimaries(Pt.workingColorSpace),t=Pt.getPrimaries(n);let s;switch(e===t?s="":e===yu&&t===bu?s="LinearDisplayP3ToLinearSRGB":e===bu&&t===yu&&(s="LinearSRGBToLinearDisplayP3"),n){case Cn:case _p:return[s,"LinearTransferOETF"];case nn:case fy:return[s,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[s,"LinearTransferOETF"]}}function Ew(n,e,t){const s=n.getShaderParameter(e,n.COMPILE_STATUS),i=n.getShaderInfoLog(e).trim();if(s&&i==="")return"";const r=/ERROR: 0:(\d+)/.exec(i);if(r){const o=parseInt(r[1]);return t.toUpperCase()+` `+i+` -`+zSt(n.getShaderSource(e),o)}else return i}function qSt(n,e){const t=HSt(e);return`vec4 ${n}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function YSt(n,e){let t;switch(e){case Vbt:t="Linear";break;case zbt:t="Reinhard";break;case Hbt:t="OptimizedCineon";break;case qbt:t="ACESFilmic";break;case Ybt:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function $St(n){return[n.extensionDerivatives||n.envMapCubeUVHeight||n.bumpMap||n.normalMapTangentSpace||n.clearcoatNormalMap||n.flatShading||n.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(n.extensionFragDepth||n.logarithmicDepthBuffer)&&n.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",n.extensionDrawBuffers&&n.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(n.extensionShaderTextureLOD||n.envMap||n.transmission)&&n.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(gl).join(` -`)}function WSt(n){const e=[];for(const t in n){const s=n[t];s!==!1&&e.push("#define "+t+" "+s)}return e.join(` -`)}function KSt(n,e){const t={},s=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function Sb(n){return n.replace(jSt,XSt)}const QSt=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function XSt(n,e){let t=vt[e];if(t===void 0){const s=QSt.get(e);if(s!==void 0)t=vt[s],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,s);else throw new Error("Can not resolve #include <"+e+">")}return Sb(t)}const ZSt=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Tw(n){return n.replace(ZSt,JSt)}function JSt(n,e,t,s){let i="";for(let r=parseInt(e);r/gm;function Sb(n){return n.replace(QSt,ZSt)}const XSt=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function ZSt(n,e){let t=vt[e];if(t===void 0){const s=XSt.get(e);if(s!==void 0)t=vt[s],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,s);else throw new Error("Can not resolve #include <"+e+">")}return Sb(t)}const JSt=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Tw(n){return n.replace(JSt,e1t)}function e1t(n,e,t,s){let i="";for(let r=parseInt(e);r0&&(b+=` `),y=[h,"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(gl).join(` `),y.length>0&&(y+=` `)):(b=[xw(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.batching?"#define USE_BATCHING":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(gl).join(` -`),y=[h,xw(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+d:"",t.envMap?"#define "+u:"",t.envMap?"#define "+_:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==gr?"#define TONE_MAPPING":"",t.toneMapping!==gr?vt.tonemapping_pars_fragment:"",t.toneMapping!==gr?YSt("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",vt.colorspace_pars_fragment,qSt("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`),y=[h,xw(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+d:"",t.envMap?"#define "+u:"",t.envMap?"#define "+_:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==gr?"#define TONE_MAPPING":"",t.toneMapping!==gr?vt.tonemapping_pars_fragment:"",t.toneMapping!==gr?$St("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",vt.colorspace_pars_fragment,YSt("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` `].filter(gl).join(` `)),o=Sb(o),o=vw(o,t),o=Sw(o,t),a=Sb(a),a=vw(a,t),a=Sw(a,t),o=Tw(o),a=Tw(a),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(E=`#version 300 es `,b=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` @@ -3937,9 +3937,9 @@ precision `+n.precision+" int;";return n.precision==="highp"?e+=` Program Info Log: `+V+` `+L+` -`+W)}else V!==""?console.warn("THREE.WebGLProgram: Program Info Log:",V):(ee===""||I==="")&&(q=!1);q&&(G.diagnostics={runnable:H,programLog:V,vertexShader:{log:ee,prefix:b},fragmentShader:{log:I,prefix:y}})}i.deleteShader(R),i.deleteShader(w),O=new Dd(i,f),C=KSt(i,f)}let O;this.getUniforms=function(){return O===void 0&&A(this),O};let C;this.getAttributes=function(){return C===void 0&&A(this),C};let M=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return M===!1&&(M=i.getProgramParameter(f,GSt)),M},this.destroy=function(){s.releaseStatesOfProgram(this),i.deleteProgram(f),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=VSt++,this.cacheKey=e,this.usedTimes=1,this.program=f,this.vertexShader=R,this.fragmentShader=w,this}let o1t=0;class a1t{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,s=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(s),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const s of t)s.usedTimes--,s.usedTimes===0&&this.shaderCache.delete(s.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let s=t.get(e);return s===void 0&&(s=new Set,t.set(e,s)),s}_getShaderStage(e){const t=this.shaderCache;let s=t.get(e);return s===void 0&&(s=new l1t(e),t.set(e,s)),s}}class l1t{constructor(e){this.id=o1t++,this.code=e,this.usedTimes=0}}function c1t(n,e,t,s,i,r,o){const a=new WN,c=new a1t,d=[],u=i.isWebGL2,_=i.logarithmicDepthBuffer,m=i.vertexTextures;let h=i.precision;const g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function f(C){return C===0?"uv":`uv${C}`}function b(C,M,G,V,ee){const I=V.fog,H=ee.geometry,q=C.isMeshStandardMaterial?V.environment:null,L=(C.isMeshStandardMaterial?t:e).get(C.envMap||q),W=L&&L.mapping===fp?L.image.height:null,se=g[C.type];C.precision!==null&&(h=i.getMaxPrecision(C.precision),h!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",h,"instead."));const oe=H.morphAttributes.position||H.morphAttributes.normal||H.morphAttributes.color,ye=oe!==void 0?oe.length:0;let xe=0;H.morphAttributes.position!==void 0&&(xe=1),H.morphAttributes.normal!==void 0&&(xe=2),H.morphAttributes.color!==void 0&&(xe=3);let le,ve,Oe,De;if(se){const wn=Js[se];le=wn.vertexShader,ve=wn.fragmentShader}else le=C.vertexShader,ve=C.fragmentShader,c.update(C),Oe=c.getVertexShaderID(C),De=c.getFragmentShaderID(C);const Q=n.getRenderTarget(),fe=ee.isInstancedMesh===!0,_e=ee.isBatchedMesh===!0,Ae=!!C.map,Be=!!C.matcap,ne=!!L,U=!!C.aoMap,P=!!C.lightMap,Z=!!C.bumpMap,ce=!!C.normalMap,pe=!!C.displacementMap,he=!!C.emissiveMap,ae=!!C.metalnessMap,Me=!!C.roughnessMap,Re=C.anisotropy>0,ge=C.clearcoat>0,D=C.iridescence>0,N=C.sheen>0,K=C.transmission>0,me=Re&&!!C.anisotropyMap,j=ge&&!!C.clearcoatMap,ie=ge&&!!C.clearcoatNormalMap,Ce=ge&&!!C.clearcoatRoughnessMap,we=D&&!!C.iridescenceMap,ke=D&&!!C.iridescenceThicknessMap,Ke=N&&!!C.sheenColorMap,lt=N&&!!C.sheenRoughnessMap,Fe=!!C.specularMap,Mt=!!C.specularColorMap,tt=!!C.specularIntensityMap,nt=K&&!!C.transmissionMap,ze=K&&!!C.thicknessMap,je=!!C.gradientMap,mt=!!C.alphaMap,J=C.alphaTest>0,Qe=!!C.alphaHash,Ve=!!C.extensions,Ie=!!H.attributes.uv1,He=!!H.attributes.uv2,dt=!!H.attributes.uv3;let Nt=gr;return C.toneMapped&&(Q===null||Q.isXRRenderTarget===!0)&&(Nt=n.toneMapping),{isWebGL2:u,shaderID:se,shaderType:C.type,shaderName:C.name,vertexShader:le,fragmentShader:ve,defines:C.defines,customVertexShaderID:Oe,customFragmentShaderID:De,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:h,batching:_e,instancing:fe,instancingColor:fe&&ee.instanceColor!==null,supportsVertexTextures:m,outputColorSpace:Q===null?n.outputColorSpace:Q.isXRRenderTarget===!0?Q.texture.colorSpace:Cn,map:Ae,matcap:Be,envMap:ne,envMapMode:ne&&L.mapping,envMapCubeUVHeight:W,aoMap:U,lightMap:P,bumpMap:Z,normalMap:ce,displacementMap:m&&pe,emissiveMap:he,normalMapObjectSpace:ce&&C.normalMapType===r0t,normalMapTangentSpace:ce&&C.normalMapType===py,metalnessMap:ae,roughnessMap:Me,anisotropy:Re,anisotropyMap:me,clearcoat:ge,clearcoatMap:j,clearcoatNormalMap:ie,clearcoatRoughnessMap:Ce,iridescence:D,iridescenceMap:we,iridescenceThicknessMap:ke,sheen:N,sheenColorMap:Ke,sheenRoughnessMap:lt,specularMap:Fe,specularColorMap:Mt,specularIntensityMap:tt,transmission:K,transmissionMap:nt,thicknessMap:ze,gradientMap:je,opaque:C.transparent===!1&&C.blending===ra,alphaMap:mt,alphaTest:J,alphaHash:Qe,combine:C.combine,mapUv:Ae&&f(C.map.channel),aoMapUv:U&&f(C.aoMap.channel),lightMapUv:P&&f(C.lightMap.channel),bumpMapUv:Z&&f(C.bumpMap.channel),normalMapUv:ce&&f(C.normalMap.channel),displacementMapUv:pe&&f(C.displacementMap.channel),emissiveMapUv:he&&f(C.emissiveMap.channel),metalnessMapUv:ae&&f(C.metalnessMap.channel),roughnessMapUv:Me&&f(C.roughnessMap.channel),anisotropyMapUv:me&&f(C.anisotropyMap.channel),clearcoatMapUv:j&&f(C.clearcoatMap.channel),clearcoatNormalMapUv:ie&&f(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ce&&f(C.clearcoatRoughnessMap.channel),iridescenceMapUv:we&&f(C.iridescenceMap.channel),iridescenceThicknessMapUv:ke&&f(C.iridescenceThicknessMap.channel),sheenColorMapUv:Ke&&f(C.sheenColorMap.channel),sheenRoughnessMapUv:lt&&f(C.sheenRoughnessMap.channel),specularMapUv:Fe&&f(C.specularMap.channel),specularColorMapUv:Mt&&f(C.specularColorMap.channel),specularIntensityMapUv:tt&&f(C.specularIntensityMap.channel),transmissionMapUv:nt&&f(C.transmissionMap.channel),thicknessMapUv:ze&&f(C.thicknessMap.channel),alphaMapUv:mt&&f(C.alphaMap.channel),vertexTangents:!!H.attributes.tangent&&(ce||Re),vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!H.attributes.color&&H.attributes.color.itemSize===4,vertexUv1s:Ie,vertexUv2s:He,vertexUv3s:dt,pointsUvs:ee.isPoints===!0&&!!H.attributes.uv&&(Ae||mt),fog:!!I,useFog:C.fog===!0,fogExp2:I&&I.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:_,skinning:ee.isSkinnedMesh===!0,morphTargets:H.morphAttributes.position!==void 0,morphNormals:H.morphAttributes.normal!==void 0,morphColors:H.morphAttributes.color!==void 0,morphTargetsCount:ye,morphTextureStride:xe,numDirLights:M.directional.length,numPointLights:M.point.length,numSpotLights:M.spot.length,numSpotLightMaps:M.spotLightMap.length,numRectAreaLights:M.rectArea.length,numHemiLights:M.hemi.length,numDirLightShadows:M.directionalShadowMap.length,numPointLightShadows:M.pointShadowMap.length,numSpotLightShadows:M.spotShadowMap.length,numSpotLightShadowsWithMaps:M.numSpotLightShadowsWithMaps,numLightProbes:M.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:C.dithering,shadowMapEnabled:n.shadowMap.enabled&&G.length>0,shadowMapType:n.shadowMap.type,toneMapping:Nt,useLegacyLights:n._useLegacyLights,decodeVideoTexture:Ae&&C.map.isVideoTexture===!0&&Pt.getTransfer(C.map.colorSpace)===jt,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===ei,flipSided:C.side===Jn,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionDerivatives:Ve&&C.extensions.derivatives===!0,extensionFragDepth:Ve&&C.extensions.fragDepth===!0,extensionDrawBuffers:Ve&&C.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ve&&C.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:u||s.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||s.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||s.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:s.has("KHR_parallel_shader_compile"),customProgramCacheKey:C.customProgramCacheKey()}}function y(C){const M=[];if(C.shaderID?M.push(C.shaderID):(M.push(C.customVertexShaderID),M.push(C.customFragmentShaderID)),C.defines!==void 0)for(const G in C.defines)M.push(G),M.push(C.defines[G]);return C.isRawShaderMaterial===!1&&(E(M,C),v(M,C),M.push(n.outputColorSpace)),M.push(C.customProgramCacheKey),M.join()}function E(C,M){C.push(M.precision),C.push(M.outputColorSpace),C.push(M.envMapMode),C.push(M.envMapCubeUVHeight),C.push(M.mapUv),C.push(M.alphaMapUv),C.push(M.lightMapUv),C.push(M.aoMapUv),C.push(M.bumpMapUv),C.push(M.normalMapUv),C.push(M.displacementMapUv),C.push(M.emissiveMapUv),C.push(M.metalnessMapUv),C.push(M.roughnessMapUv),C.push(M.anisotropyMapUv),C.push(M.clearcoatMapUv),C.push(M.clearcoatNormalMapUv),C.push(M.clearcoatRoughnessMapUv),C.push(M.iridescenceMapUv),C.push(M.iridescenceThicknessMapUv),C.push(M.sheenColorMapUv),C.push(M.sheenRoughnessMapUv),C.push(M.specularMapUv),C.push(M.specularColorMapUv),C.push(M.specularIntensityMapUv),C.push(M.transmissionMapUv),C.push(M.thicknessMapUv),C.push(M.combine),C.push(M.fogExp2),C.push(M.sizeAttenuation),C.push(M.morphTargetsCount),C.push(M.morphAttributeCount),C.push(M.numDirLights),C.push(M.numPointLights),C.push(M.numSpotLights),C.push(M.numSpotLightMaps),C.push(M.numHemiLights),C.push(M.numRectAreaLights),C.push(M.numDirLightShadows),C.push(M.numPointLightShadows),C.push(M.numSpotLightShadows),C.push(M.numSpotLightShadowsWithMaps),C.push(M.numLightProbes),C.push(M.shadowMapType),C.push(M.toneMapping),C.push(M.numClippingPlanes),C.push(M.numClipIntersection),C.push(M.depthPacking)}function v(C,M){a.disableAll(),M.isWebGL2&&a.enable(0),M.supportsVertexTextures&&a.enable(1),M.instancing&&a.enable(2),M.instancingColor&&a.enable(3),M.matcap&&a.enable(4),M.envMap&&a.enable(5),M.normalMapObjectSpace&&a.enable(6),M.normalMapTangentSpace&&a.enable(7),M.clearcoat&&a.enable(8),M.iridescence&&a.enable(9),M.alphaTest&&a.enable(10),M.vertexColors&&a.enable(11),M.vertexAlphas&&a.enable(12),M.vertexUv1s&&a.enable(13),M.vertexUv2s&&a.enable(14),M.vertexUv3s&&a.enable(15),M.vertexTangents&&a.enable(16),M.anisotropy&&a.enable(17),M.alphaHash&&a.enable(18),M.batching&&a.enable(19),C.push(a.mask),a.disableAll(),M.fog&&a.enable(0),M.useFog&&a.enable(1),M.flatShading&&a.enable(2),M.logarithmicDepthBuffer&&a.enable(3),M.skinning&&a.enable(4),M.morphTargets&&a.enable(5),M.morphNormals&&a.enable(6),M.morphColors&&a.enable(7),M.premultipliedAlpha&&a.enable(8),M.shadowMapEnabled&&a.enable(9),M.useLegacyLights&&a.enable(10),M.doubleSided&&a.enable(11),M.flipSided&&a.enable(12),M.useDepthPacking&&a.enable(13),M.dithering&&a.enable(14),M.transmission&&a.enable(15),M.sheen&&a.enable(16),M.opaque&&a.enable(17),M.pointsUvs&&a.enable(18),M.decodeVideoTexture&&a.enable(19),C.push(a.mask)}function S(C){const M=g[C.type];let G;if(M){const V=Js[M];G=$0t.clone(V.uniforms)}else G=C.uniforms;return G}function R(C,M){let G;for(let V=0,ee=d.length;V0?s.push(y):h.transparent===!0?i.push(y):t.push(y)}function c(_,m,h,g,f,b){const y=o(_,m,h,g,f,b);h.transmission>0?s.unshift(y):h.transparent===!0?i.unshift(y):t.unshift(y)}function d(_,m){t.length>1&&t.sort(_||u1t),s.length>1&&s.sort(m||Cw),i.length>1&&i.sort(m||Cw)}function u(){for(let _=e,m=n.length;_=r.length?(o=new ww,r.push(o)):o=r[i],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function f1t(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new re,color:new pt};break;case"SpotLight":t={position:new re,direction:new re,color:new pt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new re,color:new pt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new re,skyColor:new pt,groundColor:new pt};break;case"RectAreaLight":t={color:new pt,position:new re,halfWidth:new re,halfHeight:new re};break}return n[e.id]=t,t}}}function _1t(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Rt};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Rt};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Rt,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let m1t=0;function h1t(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function g1t(n,e){const t=new f1t,s=_1t(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let u=0;u<9;u++)i.probe.push(new re);const r=new re,o=new xt,a=new xt;function c(u,_){let m=0,h=0,g=0;for(let V=0;V<9;V++)i.probe[V].set(0,0,0);let f=0,b=0,y=0,E=0,v=0,S=0,R=0,w=0,A=0,O=0,C=0;u.sort(h1t);const M=_===!0?Math.PI:1;for(let V=0,ee=u.length;V0&&(e.isWebGL2||n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=$e.LTC_FLOAT_1,i.rectAreaLTC2=$e.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=$e.LTC_HALF_1,i.rectAreaLTC2=$e.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=m,i.ambient[1]=h,i.ambient[2]=g;const G=i.hash;(G.directionalLength!==f||G.pointLength!==b||G.spotLength!==y||G.rectAreaLength!==E||G.hemiLength!==v||G.numDirectionalShadows!==S||G.numPointShadows!==R||G.numSpotShadows!==w||G.numSpotMaps!==A||G.numLightProbes!==C)&&(i.directional.length=f,i.spot.length=y,i.rectArea.length=E,i.point.length=b,i.hemi.length=v,i.directionalShadow.length=S,i.directionalShadowMap.length=S,i.pointShadow.length=R,i.pointShadowMap.length=R,i.spotShadow.length=w,i.spotShadowMap.length=w,i.directionalShadowMatrix.length=S,i.pointShadowMatrix.length=R,i.spotLightMatrix.length=w+A-O,i.spotLightMap.length=A,i.numSpotLightShadowsWithMaps=O,i.numLightProbes=C,G.directionalLength=f,G.pointLength=b,G.spotLength=y,G.rectAreaLength=E,G.hemiLength=v,G.numDirectionalShadows=S,G.numPointShadows=R,G.numSpotShadows=w,G.numSpotMaps=A,G.numLightProbes=C,i.version=m1t++)}function d(u,_){let m=0,h=0,g=0,f=0,b=0;const y=_.matrixWorldInverse;for(let E=0,v=u.length;E=a.length?(c=new Rw(n,e),a.push(c)):c=a[o],c}function i(){t=new WeakMap}return{get:s,dispose:i}}class y1t extends zs{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=s0t,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class E1t extends zs{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const v1t=`void main() { +`+W)}else V!==""?console.warn("THREE.WebGLProgram: Program Info Log:",V):(ee===""||I==="")&&(q=!1);q&&(G.diagnostics={runnable:H,programLog:V,vertexShader:{log:ee,prefix:b},fragmentShader:{log:I,prefix:y}})}i.deleteShader(R),i.deleteShader(w),O=new Dd(i,f),C=jSt(i,f)}let O;this.getUniforms=function(){return O===void 0&&A(this),O};let C;this.getAttributes=function(){return C===void 0&&A(this),C};let M=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return M===!1&&(M=i.getProgramParameter(f,VSt)),M},this.destroy=function(){s.releaseStatesOfProgram(this),i.deleteProgram(f),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=zSt++,this.cacheKey=e,this.usedTimes=1,this.program=f,this.vertexShader=R,this.fragmentShader=w,this}let a1t=0;class l1t{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,s=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(s),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const s of t)s.usedTimes--,s.usedTimes===0&&this.shaderCache.delete(s.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let s=t.get(e);return s===void 0&&(s=new Set,t.set(e,s)),s}_getShaderStage(e){const t=this.shaderCache;let s=t.get(e);return s===void 0&&(s=new c1t(e),t.set(e,s)),s}}class c1t{constructor(e){this.id=a1t++,this.code=e,this.usedTimes=0}}function d1t(n,e,t,s,i,r,o){const a=new WN,c=new l1t,d=[],u=i.isWebGL2,_=i.logarithmicDepthBuffer,m=i.vertexTextures;let h=i.precision;const g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function f(C){return C===0?"uv":`uv${C}`}function b(C,M,G,V,ee){const I=V.fog,H=ee.geometry,q=C.isMeshStandardMaterial?V.environment:null,L=(C.isMeshStandardMaterial?t:e).get(C.envMap||q),W=L&&L.mapping===fp?L.image.height:null,se=g[C.type];C.precision!==null&&(h=i.getMaxPrecision(C.precision),h!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",h,"instead."));const oe=H.morphAttributes.position||H.morphAttributes.normal||H.morphAttributes.color,ye=oe!==void 0?oe.length:0;let xe=0;H.morphAttributes.position!==void 0&&(xe=1),H.morphAttributes.normal!==void 0&&(xe=2),H.morphAttributes.color!==void 0&&(xe=3);let le,ve,Oe,De;if(se){const wn=Js[se];le=wn.vertexShader,ve=wn.fragmentShader}else le=C.vertexShader,ve=C.fragmentShader,c.update(C),Oe=c.getVertexShaderID(C),De=c.getFragmentShaderID(C);const Q=n.getRenderTarget(),fe=ee.isInstancedMesh===!0,_e=ee.isBatchedMesh===!0,Ae=!!C.map,Be=!!C.matcap,ne=!!L,U=!!C.aoMap,P=!!C.lightMap,Z=!!C.bumpMap,ce=!!C.normalMap,pe=!!C.displacementMap,he=!!C.emissiveMap,ae=!!C.metalnessMap,Me=!!C.roughnessMap,Re=C.anisotropy>0,ge=C.clearcoat>0,D=C.iridescence>0,N=C.sheen>0,K=C.transmission>0,me=Re&&!!C.anisotropyMap,j=ge&&!!C.clearcoatMap,ie=ge&&!!C.clearcoatNormalMap,Ce=ge&&!!C.clearcoatRoughnessMap,we=D&&!!C.iridescenceMap,ke=D&&!!C.iridescenceThicknessMap,Ke=N&&!!C.sheenColorMap,lt=N&&!!C.sheenRoughnessMap,Fe=!!C.specularMap,Mt=!!C.specularColorMap,tt=!!C.specularIntensityMap,nt=K&&!!C.transmissionMap,ze=K&&!!C.thicknessMap,je=!!C.gradientMap,mt=!!C.alphaMap,J=C.alphaTest>0,Qe=!!C.alphaHash,Ve=!!C.extensions,Ie=!!H.attributes.uv1,He=!!H.attributes.uv2,dt=!!H.attributes.uv3;let Nt=gr;return C.toneMapped&&(Q===null||Q.isXRRenderTarget===!0)&&(Nt=n.toneMapping),{isWebGL2:u,shaderID:se,shaderType:C.type,shaderName:C.name,vertexShader:le,fragmentShader:ve,defines:C.defines,customVertexShaderID:Oe,customFragmentShaderID:De,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:h,batching:_e,instancing:fe,instancingColor:fe&&ee.instanceColor!==null,supportsVertexTextures:m,outputColorSpace:Q===null?n.outputColorSpace:Q.isXRRenderTarget===!0?Q.texture.colorSpace:Cn,map:Ae,matcap:Be,envMap:ne,envMapMode:ne&&L.mapping,envMapCubeUVHeight:W,aoMap:U,lightMap:P,bumpMap:Z,normalMap:ce,displacementMap:m&&pe,emissiveMap:he,normalMapObjectSpace:ce&&C.normalMapType===o0t,normalMapTangentSpace:ce&&C.normalMapType===py,metalnessMap:ae,roughnessMap:Me,anisotropy:Re,anisotropyMap:me,clearcoat:ge,clearcoatMap:j,clearcoatNormalMap:ie,clearcoatRoughnessMap:Ce,iridescence:D,iridescenceMap:we,iridescenceThicknessMap:ke,sheen:N,sheenColorMap:Ke,sheenRoughnessMap:lt,specularMap:Fe,specularColorMap:Mt,specularIntensityMap:tt,transmission:K,transmissionMap:nt,thicknessMap:ze,gradientMap:je,opaque:C.transparent===!1&&C.blending===ra,alphaMap:mt,alphaTest:J,alphaHash:Qe,combine:C.combine,mapUv:Ae&&f(C.map.channel),aoMapUv:U&&f(C.aoMap.channel),lightMapUv:P&&f(C.lightMap.channel),bumpMapUv:Z&&f(C.bumpMap.channel),normalMapUv:ce&&f(C.normalMap.channel),displacementMapUv:pe&&f(C.displacementMap.channel),emissiveMapUv:he&&f(C.emissiveMap.channel),metalnessMapUv:ae&&f(C.metalnessMap.channel),roughnessMapUv:Me&&f(C.roughnessMap.channel),anisotropyMapUv:me&&f(C.anisotropyMap.channel),clearcoatMapUv:j&&f(C.clearcoatMap.channel),clearcoatNormalMapUv:ie&&f(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ce&&f(C.clearcoatRoughnessMap.channel),iridescenceMapUv:we&&f(C.iridescenceMap.channel),iridescenceThicknessMapUv:ke&&f(C.iridescenceThicknessMap.channel),sheenColorMapUv:Ke&&f(C.sheenColorMap.channel),sheenRoughnessMapUv:lt&&f(C.sheenRoughnessMap.channel),specularMapUv:Fe&&f(C.specularMap.channel),specularColorMapUv:Mt&&f(C.specularColorMap.channel),specularIntensityMapUv:tt&&f(C.specularIntensityMap.channel),transmissionMapUv:nt&&f(C.transmissionMap.channel),thicknessMapUv:ze&&f(C.thicknessMap.channel),alphaMapUv:mt&&f(C.alphaMap.channel),vertexTangents:!!H.attributes.tangent&&(ce||Re),vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!H.attributes.color&&H.attributes.color.itemSize===4,vertexUv1s:Ie,vertexUv2s:He,vertexUv3s:dt,pointsUvs:ee.isPoints===!0&&!!H.attributes.uv&&(Ae||mt),fog:!!I,useFog:C.fog===!0,fogExp2:I&&I.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:_,skinning:ee.isSkinnedMesh===!0,morphTargets:H.morphAttributes.position!==void 0,morphNormals:H.morphAttributes.normal!==void 0,morphColors:H.morphAttributes.color!==void 0,morphTargetsCount:ye,morphTextureStride:xe,numDirLights:M.directional.length,numPointLights:M.point.length,numSpotLights:M.spot.length,numSpotLightMaps:M.spotLightMap.length,numRectAreaLights:M.rectArea.length,numHemiLights:M.hemi.length,numDirLightShadows:M.directionalShadowMap.length,numPointLightShadows:M.pointShadowMap.length,numSpotLightShadows:M.spotShadowMap.length,numSpotLightShadowsWithMaps:M.numSpotLightShadowsWithMaps,numLightProbes:M.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:C.dithering,shadowMapEnabled:n.shadowMap.enabled&&G.length>0,shadowMapType:n.shadowMap.type,toneMapping:Nt,useLegacyLights:n._useLegacyLights,decodeVideoTexture:Ae&&C.map.isVideoTexture===!0&&Pt.getTransfer(C.map.colorSpace)===jt,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===ei,flipSided:C.side===Jn,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionDerivatives:Ve&&C.extensions.derivatives===!0,extensionFragDepth:Ve&&C.extensions.fragDepth===!0,extensionDrawBuffers:Ve&&C.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ve&&C.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:u||s.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||s.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||s.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:s.has("KHR_parallel_shader_compile"),customProgramCacheKey:C.customProgramCacheKey()}}function y(C){const M=[];if(C.shaderID?M.push(C.shaderID):(M.push(C.customVertexShaderID),M.push(C.customFragmentShaderID)),C.defines!==void 0)for(const G in C.defines)M.push(G),M.push(C.defines[G]);return C.isRawShaderMaterial===!1&&(E(M,C),v(M,C),M.push(n.outputColorSpace)),M.push(C.customProgramCacheKey),M.join()}function E(C,M){C.push(M.precision),C.push(M.outputColorSpace),C.push(M.envMapMode),C.push(M.envMapCubeUVHeight),C.push(M.mapUv),C.push(M.alphaMapUv),C.push(M.lightMapUv),C.push(M.aoMapUv),C.push(M.bumpMapUv),C.push(M.normalMapUv),C.push(M.displacementMapUv),C.push(M.emissiveMapUv),C.push(M.metalnessMapUv),C.push(M.roughnessMapUv),C.push(M.anisotropyMapUv),C.push(M.clearcoatMapUv),C.push(M.clearcoatNormalMapUv),C.push(M.clearcoatRoughnessMapUv),C.push(M.iridescenceMapUv),C.push(M.iridescenceThicknessMapUv),C.push(M.sheenColorMapUv),C.push(M.sheenRoughnessMapUv),C.push(M.specularMapUv),C.push(M.specularColorMapUv),C.push(M.specularIntensityMapUv),C.push(M.transmissionMapUv),C.push(M.thicknessMapUv),C.push(M.combine),C.push(M.fogExp2),C.push(M.sizeAttenuation),C.push(M.morphTargetsCount),C.push(M.morphAttributeCount),C.push(M.numDirLights),C.push(M.numPointLights),C.push(M.numSpotLights),C.push(M.numSpotLightMaps),C.push(M.numHemiLights),C.push(M.numRectAreaLights),C.push(M.numDirLightShadows),C.push(M.numPointLightShadows),C.push(M.numSpotLightShadows),C.push(M.numSpotLightShadowsWithMaps),C.push(M.numLightProbes),C.push(M.shadowMapType),C.push(M.toneMapping),C.push(M.numClippingPlanes),C.push(M.numClipIntersection),C.push(M.depthPacking)}function v(C,M){a.disableAll(),M.isWebGL2&&a.enable(0),M.supportsVertexTextures&&a.enable(1),M.instancing&&a.enable(2),M.instancingColor&&a.enable(3),M.matcap&&a.enable(4),M.envMap&&a.enable(5),M.normalMapObjectSpace&&a.enable(6),M.normalMapTangentSpace&&a.enable(7),M.clearcoat&&a.enable(8),M.iridescence&&a.enable(9),M.alphaTest&&a.enable(10),M.vertexColors&&a.enable(11),M.vertexAlphas&&a.enable(12),M.vertexUv1s&&a.enable(13),M.vertexUv2s&&a.enable(14),M.vertexUv3s&&a.enable(15),M.vertexTangents&&a.enable(16),M.anisotropy&&a.enable(17),M.alphaHash&&a.enable(18),M.batching&&a.enable(19),C.push(a.mask),a.disableAll(),M.fog&&a.enable(0),M.useFog&&a.enable(1),M.flatShading&&a.enable(2),M.logarithmicDepthBuffer&&a.enable(3),M.skinning&&a.enable(4),M.morphTargets&&a.enable(5),M.morphNormals&&a.enable(6),M.morphColors&&a.enable(7),M.premultipliedAlpha&&a.enable(8),M.shadowMapEnabled&&a.enable(9),M.useLegacyLights&&a.enable(10),M.doubleSided&&a.enable(11),M.flipSided&&a.enable(12),M.useDepthPacking&&a.enable(13),M.dithering&&a.enable(14),M.transmission&&a.enable(15),M.sheen&&a.enable(16),M.opaque&&a.enable(17),M.pointsUvs&&a.enable(18),M.decodeVideoTexture&&a.enable(19),C.push(a.mask)}function S(C){const M=g[C.type];let G;if(M){const V=Js[M];G=W0t.clone(V.uniforms)}else G=C.uniforms;return G}function R(C,M){let G;for(let V=0,ee=d.length;V0?s.push(y):h.transparent===!0?i.push(y):t.push(y)}function c(_,m,h,g,f,b){const y=o(_,m,h,g,f,b);h.transmission>0?s.unshift(y):h.transparent===!0?i.unshift(y):t.unshift(y)}function d(_,m){t.length>1&&t.sort(_||p1t),s.length>1&&s.sort(m||Cw),i.length>1&&i.sort(m||Cw)}function u(){for(let _=e,m=n.length;_=r.length?(o=new ww,r.push(o)):o=r[i],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function _1t(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new re,color:new pt};break;case"SpotLight":t={position:new re,direction:new re,color:new pt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new re,color:new pt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new re,skyColor:new pt,groundColor:new pt};break;case"RectAreaLight":t={color:new pt,position:new re,halfWidth:new re,halfHeight:new re};break}return n[e.id]=t,t}}}function m1t(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Rt};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Rt};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Rt,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let h1t=0;function g1t(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function b1t(n,e){const t=new _1t,s=m1t(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let u=0;u<9;u++)i.probe.push(new re);const r=new re,o=new xt,a=new xt;function c(u,_){let m=0,h=0,g=0;for(let V=0;V<9;V++)i.probe[V].set(0,0,0);let f=0,b=0,y=0,E=0,v=0,S=0,R=0,w=0,A=0,O=0,C=0;u.sort(g1t);const M=_===!0?Math.PI:1;for(let V=0,ee=u.length;V0&&(e.isWebGL2||n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=$e.LTC_FLOAT_1,i.rectAreaLTC2=$e.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=$e.LTC_HALF_1,i.rectAreaLTC2=$e.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=m,i.ambient[1]=h,i.ambient[2]=g;const G=i.hash;(G.directionalLength!==f||G.pointLength!==b||G.spotLength!==y||G.rectAreaLength!==E||G.hemiLength!==v||G.numDirectionalShadows!==S||G.numPointShadows!==R||G.numSpotShadows!==w||G.numSpotMaps!==A||G.numLightProbes!==C)&&(i.directional.length=f,i.spot.length=y,i.rectArea.length=E,i.point.length=b,i.hemi.length=v,i.directionalShadow.length=S,i.directionalShadowMap.length=S,i.pointShadow.length=R,i.pointShadowMap.length=R,i.spotShadow.length=w,i.spotShadowMap.length=w,i.directionalShadowMatrix.length=S,i.pointShadowMatrix.length=R,i.spotLightMatrix.length=w+A-O,i.spotLightMap.length=A,i.numSpotLightShadowsWithMaps=O,i.numLightProbes=C,G.directionalLength=f,G.pointLength=b,G.spotLength=y,G.rectAreaLength=E,G.hemiLength=v,G.numDirectionalShadows=S,G.numPointShadows=R,G.numSpotShadows=w,G.numSpotMaps=A,G.numLightProbes=C,i.version=h1t++)}function d(u,_){let m=0,h=0,g=0,f=0,b=0;const y=_.matrixWorldInverse;for(let E=0,v=u.length;E=a.length?(c=new Rw(n,e),a.push(c)):c=a[o],c}function i(){t=new WeakMap}return{get:s,dispose:i}}class E1t extends zs{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=i0t,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class v1t extends zs{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const S1t=`void main() { gl_Position = vec4( position, 1.0 ); -}`,S1t=`uniform sampler2D shadow_pass; +}`,T1t=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3965,12 +3965,12 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function T1t(n,e,t){let s=new my;const i=new Rt,r=new Rt,o=new Wt,a=new y1t({depthPacking:i0t}),c=new E1t,d={},u=t.maxTextureSize,_={[Fi]:Jn,[Jn]:Fi,[ei]:ei},m=new ho({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Rt},radius:{value:4}},vertexShader:v1t,fragmentShader:S1t}),h=m.clone();h.defines.HORIZONTAL_PASS=1;const g=new _i;g.setAttribute("position",new zn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const f=new Vn(g,m),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=NN;let y=this.type;this.render=function(R,w,A){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||R.length===0)return;const O=n.getRenderTarget(),C=n.getActiveCubeFace(),M=n.getActiveMipmapLevel(),G=n.state;G.setBlending(hr),G.buffers.color.setClear(1,1,1,1),G.buffers.depth.setTest(!0),G.setScissorTest(!1);const V=y!==Ci&&this.type===Ci,ee=y===Ci&&this.type!==Ci;for(let I=0,H=R.length;Iu||i.y>u)&&(i.x>u&&(r.x=Math.floor(u/W.x),i.x=r.x*W.x,L.mapSize.x=r.x),i.y>u&&(r.y=Math.floor(u/W.y),i.y=r.y*W.y,L.mapSize.y=r.y)),L.map===null||V===!0||ee===!0){const oe=this.type!==Ci?{minFilter:gn,magFilter:gn}:{};L.map!==null&&L.map.dispose(),L.map=new mo(i.x,i.y,oe),L.map.texture.name=q.name+".shadowMap",L.camera.updateProjectionMatrix()}n.setRenderTarget(L.map),n.clear();const se=L.getViewportCount();for(let oe=0;oe0||w.map&&w.alphaTest>0){const G=C.uuid,V=w.uuid;let ee=d[G];ee===void 0&&(ee={},d[G]=ee);let I=ee[V];I===void 0&&(I=C.clone(),ee[V]=I),C=I}if(C.visible=w.visible,C.wireframe=w.wireframe,O===Ci?C.side=w.shadowSide!==null?w.shadowSide:w.side:C.side=w.shadowSide!==null?w.shadowSide:_[w.side],C.alphaMap=w.alphaMap,C.alphaTest=w.alphaTest,C.map=w.map,C.clipShadows=w.clipShadows,C.clippingPlanes=w.clippingPlanes,C.clipIntersection=w.clipIntersection,C.displacementMap=w.displacementMap,C.displacementScale=w.displacementScale,C.displacementBias=w.displacementBias,C.wireframeLinewidth=w.wireframeLinewidth,C.linewidth=w.linewidth,A.isPointLight===!0&&C.isMeshDistanceMaterial===!0){const G=n.properties.get(C);G.light=A}return C}function S(R,w,A,O,C){if(R.visible===!1)return;if(R.layers.test(w.layers)&&(R.isMesh||R.isLine||R.isPoints)&&(R.castShadow||R.receiveShadow&&C===Ci)&&(!R.frustumCulled||s.intersectsObject(R))){R.modelViewMatrix.multiplyMatrices(A.matrixWorldInverse,R.matrixWorld);const V=e.update(R),ee=R.material;if(Array.isArray(ee)){const I=V.groups;for(let H=0,q=I.length;H=1):oe.indexOf("OpenGL ES")!==-1&&(se=parseFloat(/^OpenGL ES (\d)/.exec(oe)[1]),W=se>=2);let ye=null,xe={};const le=n.getParameter(n.SCISSOR_BOX),ve=n.getParameter(n.VIEWPORT),Oe=new Wt().fromArray(le),De=new Wt().fromArray(ve);function Q(J,Qe,Ve,Ie){const He=new Uint8Array(4),dt=n.createTexture();n.bindTexture(J,dt),n.texParameteri(J,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(J,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let Nt=0;Nt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new WeakMap;let f;const b=new WeakMap;let y=!1;try{y=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function E(D,N){return y?new OffscreenCanvas(D,N):Zl("canvas")}function v(D,N,K,me){let j=1;if((D.width>me||D.height>me)&&(j=me/Math.max(D.width,D.height)),j<1||N===!0)if(typeof HTMLImageElement<"u"&&D instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&D instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&D instanceof ImageBitmap){const ie=N?vu:Math.floor,Ce=ie(j*D.width),we=ie(j*D.height);f===void 0&&(f=E(Ce,we));const ke=K?E(Ce,we):f;return ke.width=Ce,ke.height=we,ke.getContext("2d").drawImage(D,0,0,Ce,we),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+D.width+"x"+D.height+") to ("+Ce+"x"+we+")."),ke}else return"data"in D&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+D.width+"x"+D.height+")."),D;return D}function S(D){return vb(D.width)&&vb(D.height)}function R(D){return a?!1:D.wrapS!==hs||D.wrapT!==hs||D.minFilter!==gn&&D.minFilter!==Kn}function w(D,N){return D.generateMipmaps&&N&&D.minFilter!==gn&&D.minFilter!==Kn}function A(D){n.generateMipmap(D)}function O(D,N,K,me,j=!1){if(a===!1)return N;if(D!==null){if(n[D]!==void 0)return n[D];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+D+"'")}let ie=N;if(N===n.RED&&(K===n.FLOAT&&(ie=n.R32F),K===n.HALF_FLOAT&&(ie=n.R16F),K===n.UNSIGNED_BYTE&&(ie=n.R8)),N===n.RED_INTEGER&&(K===n.UNSIGNED_BYTE&&(ie=n.R8UI),K===n.UNSIGNED_SHORT&&(ie=n.R16UI),K===n.UNSIGNED_INT&&(ie=n.R32UI),K===n.BYTE&&(ie=n.R8I),K===n.SHORT&&(ie=n.R16I),K===n.INT&&(ie=n.R32I)),N===n.RG&&(K===n.FLOAT&&(ie=n.RG32F),K===n.HALF_FLOAT&&(ie=n.RG16F),K===n.UNSIGNED_BYTE&&(ie=n.RG8)),N===n.RGBA){const Ce=j?gu:Pt.getTransfer(me);K===n.FLOAT&&(ie=n.RGBA32F),K===n.HALF_FLOAT&&(ie=n.RGBA16F),K===n.UNSIGNED_BYTE&&(ie=Ce===jt?n.SRGB8_ALPHA8:n.RGBA8),K===n.UNSIGNED_SHORT_4_4_4_4&&(ie=n.RGBA4),K===n.UNSIGNED_SHORT_5_5_5_1&&(ie=n.RGB5_A1)}return(ie===n.R16F||ie===n.R32F||ie===n.RG16F||ie===n.RG32F||ie===n.RGBA16F||ie===n.RGBA32F)&&e.get("EXT_color_buffer_float"),ie}function C(D,N,K){return w(D,K)===!0||D.isFramebufferTexture&&D.minFilter!==gn&&D.minFilter!==Kn?Math.log2(Math.max(N.width,N.height))+1:D.mipmaps!==void 0&&D.mipmaps.length>0?D.mipmaps.length:D.isCompressedTexture&&Array.isArray(D.image)?N.mipmaps.length:1}function M(D){return D===gn||D===gb||D===kd?n.NEAREST:n.LINEAR}function G(D){const N=D.target;N.removeEventListener("dispose",G),ee(N),N.isVideoTexture&&g.delete(N)}function V(D){const N=D.target;N.removeEventListener("dispose",V),H(N)}function ee(D){const N=s.get(D);if(N.__webglInit===void 0)return;const K=D.source,me=b.get(K);if(me){const j=me[N.__cacheKey];j.usedTimes--,j.usedTimes===0&&I(D),Object.keys(me).length===0&&b.delete(K)}s.remove(D)}function I(D){const N=s.get(D);n.deleteTexture(N.__webglTexture);const K=D.source,me=b.get(K);delete me[N.__cacheKey],o.memory.textures--}function H(D){const N=D.texture,K=s.get(D),me=s.get(N);if(me.__webglTexture!==void 0&&(n.deleteTexture(me.__webglTexture),o.memory.textures--),D.depthTexture&&D.depthTexture.dispose(),D.isWebGLCubeRenderTarget)for(let j=0;j<6;j++){if(Array.isArray(K.__webglFramebuffer[j]))for(let ie=0;ie=c&&console.warn("THREE.WebGLTextures: Trying to use "+D+" texture units while this GPU supports only "+c),q+=1,D}function se(D){const N=[];return N.push(D.wrapS),N.push(D.wrapT),N.push(D.wrapR||0),N.push(D.magFilter),N.push(D.minFilter),N.push(D.anisotropy),N.push(D.internalFormat),N.push(D.format),N.push(D.type),N.push(D.generateMipmaps),N.push(D.premultiplyAlpha),N.push(D.flipY),N.push(D.unpackAlignment),N.push(D.colorSpace),N.join()}function oe(D,N){const K=s.get(D);if(D.isVideoTexture&&Re(D),D.isRenderTargetTexture===!1&&D.version>0&&K.__version!==D.version){const me=D.image;if(me===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(me.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{_e(K,D,N);return}}t.bindTexture(n.TEXTURE_2D,K.__webglTexture,n.TEXTURE0+N)}function ye(D,N){const K=s.get(D);if(D.version>0&&K.__version!==D.version){_e(K,D,N);return}t.bindTexture(n.TEXTURE_2D_ARRAY,K.__webglTexture,n.TEXTURE0+N)}function xe(D,N){const K=s.get(D);if(D.version>0&&K.__version!==D.version){_e(K,D,N);return}t.bindTexture(n.TEXTURE_3D,K.__webglTexture,n.TEXTURE0+N)}function le(D,N){const K=s.get(D);if(D.version>0&&K.__version!==D.version){Ae(K,D,N);return}t.bindTexture(n.TEXTURE_CUBE_MAP,K.__webglTexture,n.TEXTURE0+N)}const ve={[va]:n.REPEAT,[hs]:n.CLAMP_TO_EDGE,[hu]:n.MIRRORED_REPEAT},Oe={[gn]:n.NEAREST,[gb]:n.NEAREST_MIPMAP_NEAREST,[kd]:n.NEAREST_MIPMAP_LINEAR,[Kn]:n.LINEAR,[ON]:n.LINEAR_MIPMAP_NEAREST,[_o]:n.LINEAR_MIPMAP_LINEAR},De={[o0t]:n.NEVER,[p0t]:n.ALWAYS,[a0t]:n.LESS,[zN]:n.LEQUAL,[l0t]:n.EQUAL,[u0t]:n.GEQUAL,[c0t]:n.GREATER,[d0t]:n.NOTEQUAL};function Q(D,N,K){if(K?(n.texParameteri(D,n.TEXTURE_WRAP_S,ve[N.wrapS]),n.texParameteri(D,n.TEXTURE_WRAP_T,ve[N.wrapT]),(D===n.TEXTURE_3D||D===n.TEXTURE_2D_ARRAY)&&n.texParameteri(D,n.TEXTURE_WRAP_R,ve[N.wrapR]),n.texParameteri(D,n.TEXTURE_MAG_FILTER,Oe[N.magFilter]),n.texParameteri(D,n.TEXTURE_MIN_FILTER,Oe[N.minFilter])):(n.texParameteri(D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(D===n.TEXTURE_3D||D===n.TEXTURE_2D_ARRAY)&&n.texParameteri(D,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(N.wrapS!==hs||N.wrapT!==hs)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(D,n.TEXTURE_MAG_FILTER,M(N.magFilter)),n.texParameteri(D,n.TEXTURE_MIN_FILTER,M(N.minFilter)),N.minFilter!==gn&&N.minFilter!==Kn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),N.compareFunction&&(n.texParameteri(D,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(D,n.TEXTURE_COMPARE_FUNC,De[N.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const me=e.get("EXT_texture_filter_anisotropic");if(N.magFilter===gn||N.minFilter!==kd&&N.minFilter!==_o||N.type===Mi&&e.has("OES_texture_float_linear")===!1||a===!1&&N.type===Ql&&e.has("OES_texture_half_float_linear")===!1)return;(N.anisotropy>1||s.get(N).__currentAnisotropy)&&(n.texParameterf(D,me.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(N.anisotropy,i.getMaxAnisotropy())),s.get(N).__currentAnisotropy=N.anisotropy)}}function fe(D,N){let K=!1;D.__webglInit===void 0&&(D.__webglInit=!0,N.addEventListener("dispose",G));const me=N.source;let j=b.get(me);j===void 0&&(j={},b.set(me,j));const ie=se(N);if(ie!==D.__cacheKey){j[ie]===void 0&&(j[ie]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,K=!0),j[ie].usedTimes++;const Ce=j[D.__cacheKey];Ce!==void 0&&(j[D.__cacheKey].usedTimes--,Ce.usedTimes===0&&I(N)),D.__cacheKey=ie,D.__webglTexture=j[ie].texture}return K}function _e(D,N,K){let me=n.TEXTURE_2D;(N.isDataArrayTexture||N.isCompressedArrayTexture)&&(me=n.TEXTURE_2D_ARRAY),N.isData3DTexture&&(me=n.TEXTURE_3D);const j=fe(D,N),ie=N.source;t.bindTexture(me,D.__webglTexture,n.TEXTURE0+K);const Ce=s.get(ie);if(ie.version!==Ce.__version||j===!0){t.activeTexture(n.TEXTURE0+K);const we=Pt.getPrimaries(Pt.workingColorSpace),ke=N.colorSpace===bs?null:Pt.getPrimaries(N.colorSpace),Ke=N.colorSpace===bs||we===ke?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,N.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,N.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,N.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ke);const lt=R(N)&&S(N.image)===!1;let Fe=v(N.image,lt,!1,u);Fe=ge(N,Fe);const Mt=S(Fe)||a,tt=r.convert(N.format,N.colorSpace);let nt=r.convert(N.type),ze=O(N.internalFormat,tt,nt,N.colorSpace,N.isVideoTexture);Q(me,N,Mt);let je;const mt=N.mipmaps,J=a&&N.isVideoTexture!==!0&&ze!==BN,Qe=Ce.__version===void 0||j===!0,Ve=C(N,Fe,Mt);if(N.isDepthTexture)ze=n.DEPTH_COMPONENT,a?N.type===Mi?ze=n.DEPTH_COMPONENT32F:N.type===fr?ze=n.DEPTH_COMPONENT24:N.type===no?ze=n.DEPTH24_STENCIL8:ze=n.DEPTH_COMPONENT16:N.type===Mi&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),N.format===so&&ze===n.DEPTH_COMPONENT&&N.type!==uy&&N.type!==fr&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),N.type=fr,nt=r.convert(N.type)),N.format===Sa&&ze===n.DEPTH_COMPONENT&&(ze=n.DEPTH_STENCIL,N.type!==no&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),N.type=no,nt=r.convert(N.type))),Qe&&(J?t.texStorage2D(n.TEXTURE_2D,1,ze,Fe.width,Fe.height):t.texImage2D(n.TEXTURE_2D,0,ze,Fe.width,Fe.height,0,tt,nt,null));else if(N.isDataTexture)if(mt.length>0&&Mt){J&&Qe&&t.texStorage2D(n.TEXTURE_2D,Ve,ze,mt[0].width,mt[0].height);for(let Ie=0,He=mt.length;Ie>=1,He>>=1}}else if(mt.length>0&&Mt){J&&Qe&&t.texStorage2D(n.TEXTURE_2D,Ve,ze,mt[0].width,mt[0].height);for(let Ie=0,He=mt.length;Ie0&&Qe++,t.texStorage2D(n.TEXTURE_CUBE_MAP,Qe,je,Fe[0].width,Fe[0].height));for(let Ie=0;Ie<6;Ie++)if(lt){mt?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0,0,0,Fe[Ie].width,Fe[Ie].height,nt,ze,Fe[Ie].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0,je,Fe[Ie].width,Fe[Ie].height,0,nt,ze,Fe[Ie].data);for(let He=0;He>ie),Fe=Math.max(1,N.height>>ie);j===n.TEXTURE_3D||j===n.TEXTURE_2D_ARRAY?t.texImage3D(j,ie,ke,lt,Fe,N.depth,0,Ce,we,null):t.texImage2D(j,ie,ke,lt,Fe,0,Ce,we,null)}t.bindFramebuffer(n.FRAMEBUFFER,D),Me(N)?m.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,me,j,s.get(K).__webglTexture,0,ae(N)):(j===n.TEXTURE_2D||j>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&j<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,me,j,s.get(K).__webglTexture,ie),t.bindFramebuffer(n.FRAMEBUFFER,null)}function ne(D,N,K){if(n.bindRenderbuffer(n.RENDERBUFFER,D),N.depthBuffer&&!N.stencilBuffer){let me=a===!0?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT16;if(K||Me(N)){const j=N.depthTexture;j&&j.isDepthTexture&&(j.type===Mi?me=n.DEPTH_COMPONENT32F:j.type===fr&&(me=n.DEPTH_COMPONENT24));const ie=ae(N);Me(N)?m.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,ie,me,N.width,N.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,ie,me,N.width,N.height)}else n.renderbufferStorage(n.RENDERBUFFER,me,N.width,N.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,D)}else if(N.depthBuffer&&N.stencilBuffer){const me=ae(N);K&&Me(N)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,me,n.DEPTH24_STENCIL8,N.width,N.height):Me(N)?m.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,me,n.DEPTH24_STENCIL8,N.width,N.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,N.width,N.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,D)}else{const me=N.isWebGLMultipleRenderTargets===!0?N.texture:[N.texture];for(let j=0;j0){K.__webglFramebuffer[we]=[];for(let ke=0;ke0){K.__webglFramebuffer=[];for(let we=0;we0&&Me(D)===!1){const we=ie?N:[N];K.__webglMultisampledFramebuffer=n.createFramebuffer(),K.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,K.__webglMultisampledFramebuffer);for(let ke=0;ke0)for(let ke=0;ke0)for(let ke=0;ke0&&Me(D)===!1){const N=D.isWebGLMultipleRenderTargets?D.texture:[D.texture],K=D.width,me=D.height;let j=n.COLOR_BUFFER_BIT;const ie=[],Ce=D.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,we=s.get(D),ke=D.isWebGLMultipleRenderTargets===!0;if(ke)for(let Ke=0;Ke0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&N.__useRenderToTexture!==!1}function Re(D){const N=o.render.frame;g.get(D)!==N&&(g.set(D,N),D.update())}function ge(D,N){const K=D.colorSpace,me=D.format,j=D.type;return D.isCompressedTexture===!0||D.isVideoTexture===!0||D.format===Eb||K!==Cn&&K!==bs&&(Pt.getTransfer(K)===jt?a===!1?e.has("EXT_sRGB")===!0&&me===gs?(D.format=Eb,D.minFilter=Kn,D.generateMipmaps=!1):N=qN.sRGBToLinear(N):(me!==gs||j!==br)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",K)),N}this.allocateTextureUnit=W,this.resetTextureUnits=L,this.setTexture2D=oe,this.setTexture2DArray=ye,this.setTexture3D=xe,this.setTextureCube=le,this.rebindTextures=Z,this.setupRenderTarget=ce,this.updateRenderTargetMipmap=pe,this.updateMultisampleRenderTarget=he,this.setupDepthRenderbuffer=P,this.setupFrameBufferTexture=Be,this.useMultisampledRTT=Me}function w1t(n,e,t){const s=t.isWebGL2;function i(r,o=bs){let a;const c=Pt.getTransfer(o);if(r===br)return n.UNSIGNED_BYTE;if(r===DN)return n.UNSIGNED_SHORT_4_4_4_4;if(r===LN)return n.UNSIGNED_SHORT_5_5_5_1;if(r===Wbt)return n.BYTE;if(r===Kbt)return n.SHORT;if(r===uy)return n.UNSIGNED_SHORT;if(r===kN)return n.INT;if(r===fr)return n.UNSIGNED_INT;if(r===Mi)return n.FLOAT;if(r===Ql)return s?n.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(r===jbt)return n.ALPHA;if(r===gs)return n.RGBA;if(r===Qbt)return n.LUMINANCE;if(r===Xbt)return n.LUMINANCE_ALPHA;if(r===so)return n.DEPTH_COMPONENT;if(r===Sa)return n.DEPTH_STENCIL;if(r===Eb)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(r===Zbt)return n.RED;if(r===PN)return n.RED_INTEGER;if(r===Jbt)return n.RG;if(r===FN)return n.RG_INTEGER;if(r===UN)return n.RGBA_INTEGER;if(r===qh||r===Yh||r===$h||r===Wh)if(c===jt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(r===qh)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Yh)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===$h)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===Wh)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(r===qh)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Yh)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===$h)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===Wh)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===fC||r===_C||r===mC||r===hC)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(r===fC)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===_C)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===mC)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===hC)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===BN)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(r===gC||r===bC)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(r===gC)return c===jt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(r===bC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===yC||r===EC||r===vC||r===SC||r===TC||r===xC||r===CC||r===wC||r===RC||r===AC||r===MC||r===NC||r===IC||r===OC)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(r===yC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===EC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===vC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===SC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===TC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===xC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===CC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===wC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===RC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===AC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===MC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===NC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===IC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===OC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Kh||r===kC||r===DC)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(r===Kh)return c===jt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===kC)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===DC)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===e0t||r===LC||r===PC||r===FC)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(r===Kh)return a.COMPRESSED_RED_RGTC1_EXT;if(r===LC)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===PC)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===FC)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===no?s?n.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[r]!==void 0?n[r]:null}return{convert:i}}class R1t extends Gn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class jr extends Jt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const A1t={type:"move"};class bg{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new jr,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new jr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new re,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new re),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new jr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new re,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new re),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const s of e.hand.values())this._getHandJoint(t,s)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,s){let i=null,r=null,o=null;const a=this._targetRay,c=this._grip,d=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(d&&e.hand){o=!0;for(const f of e.hand.values()){const b=t.getJointPose(f,s),y=this._getHandJoint(d,f);b!==null&&(y.matrix.fromArray(b.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,y.jointRadius=b.radius),y.visible=b!==null}const u=d.joints["index-finger-tip"],_=d.joints["thumb-tip"],m=u.position.distanceTo(_.position),h=.02,g=.005;d.inputState.pinching&&m>h+g?(d.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!d.inputState.pinching&&m<=h-g&&(d.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,s),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1));a!==null&&(i=t.getPose(e.targetRaySpace,s),i===null&&r!==null&&(i=r),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(A1t)))}return a!==null&&(a.visible=i!==null),c!==null&&(c.visible=r!==null),d!==null&&(d.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const s=new jr;s.matrixAutoUpdate=!1,s.visible=!1,e.joints[t.jointName]=s,e.add(s)}return e.joints[t.jointName]}}class M1t extends Ha{constructor(e,t){super();const s=this;let i=null,r=1,o=null,a="local-floor",c=1,d=null,u=null,_=null,m=null,h=null,g=null;const f=t.getContextAttributes();let b=null,y=null;const E=[],v=[],S=new Rt;let R=null;const w=new Gn;w.layers.enable(1),w.viewport=new Wt;const A=new Gn;A.layers.enable(2),A.viewport=new Wt;const O=[w,A],C=new R1t;C.layers.enable(1),C.layers.enable(2);let M=null,G=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let ve=E[le];return ve===void 0&&(ve=new bg,E[le]=ve),ve.getTargetRaySpace()},this.getControllerGrip=function(le){let ve=E[le];return ve===void 0&&(ve=new bg,E[le]=ve),ve.getGripSpace()},this.getHand=function(le){let ve=E[le];return ve===void 0&&(ve=new bg,E[le]=ve),ve.getHandSpace()};function V(le){const ve=v.indexOf(le.inputSource);if(ve===-1)return;const Oe=E[ve];Oe!==void 0&&(Oe.update(le.inputSource,le.frame,d||o),Oe.dispatchEvent({type:le.type,data:le.inputSource}))}function ee(){i.removeEventListener("select",V),i.removeEventListener("selectstart",V),i.removeEventListener("selectend",V),i.removeEventListener("squeeze",V),i.removeEventListener("squeezestart",V),i.removeEventListener("squeezeend",V),i.removeEventListener("end",ee),i.removeEventListener("inputsourceschange",I);for(let le=0;le=0&&(v[De]=null,E[De].disconnect(Oe))}for(let ve=0;ve=v.length){v.push(Oe),De=fe;break}else if(v[fe]===null){v[fe]=Oe,De=fe;break}if(De===-1)break}const Q=E[De];Q&&Q.connect(Oe)}}const H=new re,q=new re;function L(le,ve,Oe){H.setFromMatrixPosition(ve.matrixWorld),q.setFromMatrixPosition(Oe.matrixWorld);const De=H.distanceTo(q),Q=ve.projectionMatrix.elements,fe=Oe.projectionMatrix.elements,_e=Q[14]/(Q[10]-1),Ae=Q[14]/(Q[10]+1),Be=(Q[9]+1)/Q[5],ne=(Q[9]-1)/Q[5],U=(Q[8]-1)/Q[0],P=(fe[8]+1)/fe[0],Z=_e*U,ce=_e*P,pe=De/(-U+P),he=pe*-U;ve.matrixWorld.decompose(le.position,le.quaternion,le.scale),le.translateX(he),le.translateZ(pe),le.matrixWorld.compose(le.position,le.quaternion,le.scale),le.matrixWorldInverse.copy(le.matrixWorld).invert();const ae=_e+pe,Me=Ae+pe,Re=Z-he,ge=ce+(De-he),D=Be*Ae/Me*ae,N=ne*Ae/Me*ae;le.projectionMatrix.makePerspective(Re,ge,D,N,ae,Me),le.projectionMatrixInverse.copy(le.projectionMatrix).invert()}function W(le,ve){ve===null?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(ve.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(i===null)return;C.near=A.near=w.near=le.near,C.far=A.far=w.far=le.far,(M!==C.near||G!==C.far)&&(i.updateRenderState({depthNear:C.near,depthFar:C.far}),M=C.near,G=C.far);const ve=le.parent,Oe=C.cameras;W(C,ve);for(let De=0;De0&&(b.alphaTest.value=y.alphaTest);const E=e.get(y).envMap;if(E&&(b.envMap.value=E,b.flipEnvMap.value=E.isCubeTexture&&E.isRenderTargetTexture===!1?-1:1,b.reflectivity.value=y.reflectivity,b.ior.value=y.ior,b.refractionRatio.value=y.refractionRatio),y.lightMap){b.lightMap.value=y.lightMap;const v=n._useLegacyLights===!0?Math.PI:1;b.lightMapIntensity.value=y.lightMapIntensity*v,t(y.lightMap,b.lightMapTransform)}y.aoMap&&(b.aoMap.value=y.aoMap,b.aoMapIntensity.value=y.aoMapIntensity,t(y.aoMap,b.aoMapTransform))}function o(b,y){b.diffuse.value.copy(y.color),b.opacity.value=y.opacity,y.map&&(b.map.value=y.map,t(y.map,b.mapTransform))}function a(b,y){b.dashSize.value=y.dashSize,b.totalSize.value=y.dashSize+y.gapSize,b.scale.value=y.scale}function c(b,y,E,v){b.diffuse.value.copy(y.color),b.opacity.value=y.opacity,b.size.value=y.size*E,b.scale.value=v*.5,y.map&&(b.map.value=y.map,t(y.map,b.uvTransform)),y.alphaMap&&(b.alphaMap.value=y.alphaMap,t(y.alphaMap,b.alphaMapTransform)),y.alphaTest>0&&(b.alphaTest.value=y.alphaTest)}function d(b,y){b.diffuse.value.copy(y.color),b.opacity.value=y.opacity,b.rotation.value=y.rotation,y.map&&(b.map.value=y.map,t(y.map,b.mapTransform)),y.alphaMap&&(b.alphaMap.value=y.alphaMap,t(y.alphaMap,b.alphaMapTransform)),y.alphaTest>0&&(b.alphaTest.value=y.alphaTest)}function u(b,y){b.specular.value.copy(y.specular),b.shininess.value=Math.max(y.shininess,1e-4)}function _(b,y){y.gradientMap&&(b.gradientMap.value=y.gradientMap)}function m(b,y){b.metalness.value=y.metalness,y.metalnessMap&&(b.metalnessMap.value=y.metalnessMap,t(y.metalnessMap,b.metalnessMapTransform)),b.roughness.value=y.roughness,y.roughnessMap&&(b.roughnessMap.value=y.roughnessMap,t(y.roughnessMap,b.roughnessMapTransform)),e.get(y).envMap&&(b.envMapIntensity.value=y.envMapIntensity)}function h(b,y,E){b.ior.value=y.ior,y.sheen>0&&(b.sheenColor.value.copy(y.sheenColor).multiplyScalar(y.sheen),b.sheenRoughness.value=y.sheenRoughness,y.sheenColorMap&&(b.sheenColorMap.value=y.sheenColorMap,t(y.sheenColorMap,b.sheenColorMapTransform)),y.sheenRoughnessMap&&(b.sheenRoughnessMap.value=y.sheenRoughnessMap,t(y.sheenRoughnessMap,b.sheenRoughnessMapTransform))),y.clearcoat>0&&(b.clearcoat.value=y.clearcoat,b.clearcoatRoughness.value=y.clearcoatRoughness,y.clearcoatMap&&(b.clearcoatMap.value=y.clearcoatMap,t(y.clearcoatMap,b.clearcoatMapTransform)),y.clearcoatRoughnessMap&&(b.clearcoatRoughnessMap.value=y.clearcoatRoughnessMap,t(y.clearcoatRoughnessMap,b.clearcoatRoughnessMapTransform)),y.clearcoatNormalMap&&(b.clearcoatNormalMap.value=y.clearcoatNormalMap,t(y.clearcoatNormalMap,b.clearcoatNormalMapTransform),b.clearcoatNormalScale.value.copy(y.clearcoatNormalScale),y.side===Jn&&b.clearcoatNormalScale.value.negate())),y.iridescence>0&&(b.iridescence.value=y.iridescence,b.iridescenceIOR.value=y.iridescenceIOR,b.iridescenceThicknessMinimum.value=y.iridescenceThicknessRange[0],b.iridescenceThicknessMaximum.value=y.iridescenceThicknessRange[1],y.iridescenceMap&&(b.iridescenceMap.value=y.iridescenceMap,t(y.iridescenceMap,b.iridescenceMapTransform)),y.iridescenceThicknessMap&&(b.iridescenceThicknessMap.value=y.iridescenceThicknessMap,t(y.iridescenceThicknessMap,b.iridescenceThicknessMapTransform))),y.transmission>0&&(b.transmission.value=y.transmission,b.transmissionSamplerMap.value=E.texture,b.transmissionSamplerSize.value.set(E.width,E.height),y.transmissionMap&&(b.transmissionMap.value=y.transmissionMap,t(y.transmissionMap,b.transmissionMapTransform)),b.thickness.value=y.thickness,y.thicknessMap&&(b.thicknessMap.value=y.thicknessMap,t(y.thicknessMap,b.thicknessMapTransform)),b.attenuationDistance.value=y.attenuationDistance,b.attenuationColor.value.copy(y.attenuationColor)),y.anisotropy>0&&(b.anisotropyVector.value.set(y.anisotropy*Math.cos(y.anisotropyRotation),y.anisotropy*Math.sin(y.anisotropyRotation)),y.anisotropyMap&&(b.anisotropyMap.value=y.anisotropyMap,t(y.anisotropyMap,b.anisotropyMapTransform))),b.specularIntensity.value=y.specularIntensity,b.specularColor.value.copy(y.specularColor),y.specularColorMap&&(b.specularColorMap.value=y.specularColorMap,t(y.specularColorMap,b.specularColorMapTransform)),y.specularIntensityMap&&(b.specularIntensityMap.value=y.specularIntensityMap,t(y.specularIntensityMap,b.specularIntensityMapTransform))}function g(b,y){y.matcap&&(b.matcap.value=y.matcap)}function f(b,y){const E=e.get(y).light;b.referencePosition.value.setFromMatrixPosition(E.matrixWorld),b.nearDistance.value=E.shadow.camera.near,b.farDistance.value=E.shadow.camera.far}return{refreshFogUniforms:s,refreshMaterialUniforms:i}}function I1t(n,e,t,s){let i={},r={},o=[];const a=t.isWebGL2?n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS):0;function c(E,v){const S=v.program;s.uniformBlockBinding(E,S)}function d(E,v){let S=i[E.id];S===void 0&&(g(E),S=u(E),i[E.id]=S,E.addEventListener("dispose",b));const R=v.program;s.updateUBOMapping(E,R);const w=e.render.frame;r[E.id]!==w&&(m(E),r[E.id]=w)}function u(E){const v=_();E.__bindingPointIndex=v;const S=n.createBuffer(),R=E.__size,w=E.usage;return n.bindBuffer(n.UNIFORM_BUFFER,S),n.bufferData(n.UNIFORM_BUFFER,R,w),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,v,S),S}function _(){for(let E=0;E0){w=S%R;const V=R-w;w!==0&&V-M.boundary<0&&(S+=R-w,C.__offset=S)}S+=M.storage}return w=S%R,w>0&&(S+=R-w),E.__size=S,E.__cache={},this}function f(E){const v={boundary:0,storage:0};return typeof E=="number"?(v.boundary=4,v.storage=4):E.isVector2?(v.boundary=8,v.storage=8):E.isVector3||E.isColor?(v.boundary=16,v.storage=12):E.isVector4?(v.boundary=16,v.storage=16):E.isMatrix3?(v.boundary=48,v.storage=48):E.isMatrix4?(v.boundary=64,v.storage=64):E.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",E),v}function b(E){const v=E.target;v.removeEventListener("dispose",b);const S=o.indexOf(v.__bindingPointIndex);o.splice(S,1),n.deleteBuffer(i[v.id]),delete i[v.id],delete r[v.id]}function y(){for(const E in i)n.deleteBuffer(i[E]);o=[],i={},r={}}return{bind:c,update:d,dispose:y}}class aI{constructor(e={}){const{canvas:t=A0t(),context:s=null,depth:i=!0,stencil:r=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:c=!0,preserveDrawingBuffer:d=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:_=!1}=e;this.isWebGLRenderer=!0;let m;s!==null?m=s.getContextAttributes().alpha:m=o;const h=new Uint32Array(4),g=new Int32Array(4);let f=null,b=null;const y=[],E=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=nn,this._useLegacyLights=!1,this.toneMapping=gr,this.toneMappingExposure=1;const v=this;let S=!1,R=0,w=0,A=null,O=-1,C=null;const M=new Wt,G=new Wt;let V=null;const ee=new pt(0);let I=0,H=t.width,q=t.height,L=1,W=null,se=null;const oe=new Wt(0,0,H,q),ye=new Wt(0,0,H,q);let xe=!1;const le=new my;let ve=!1,Oe=!1,De=null;const Q=new xt,fe=new Rt,_e=new re,Ae={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Be(){return A===null?L:1}let ne=s;function U(F,de){for(let Ee=0;Ee{function Xe(){if(Se.forEach(function(it){he.get(it).currentProgram.isReady()&&Se.delete(it)}),Se.size===0){be(F);return}setTimeout(Xe,10)}P.get("KHR_parallel_shader_compile")!==null?Xe():setTimeout(Xe,10)})};let Nt=null;function dn(F){Nt&&Nt(F)}function wn(){Rn.stop()}function qt(){Rn.start()}const Rn=new eI;Rn.setAnimationLoop(dn),typeof self<"u"&&Rn.setContext(self),this.setAnimationLoop=function(F){Nt=F,je.setAnimationLoop(F),F===null?Rn.stop():Rn.start()},je.addEventListener("sessionstart",wn),je.addEventListener("sessionend",qt),this.render=function(F,de){if(de!==void 0&&de.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(S===!0)return;F.matrixWorldAutoUpdate===!0&&F.updateMatrixWorld(),de.parent===null&&de.matrixWorldAutoUpdate===!0&&de.updateMatrixWorld(),je.enabled===!0&&je.isPresenting===!0&&(je.cameraAutoUpdate===!0&&je.updateCamera(de),de=je.getCamera()),F.isScene===!0&&F.onBeforeRender(v,F,de,A),b=ie.get(F,E.length),b.init(),E.push(b),Q.multiplyMatrices(de.projectionMatrix,de.matrixWorldInverse),le.setFromProjectionMatrix(Q),Oe=this.localClippingEnabled,ve=Ce.init(this.clippingPlanes,Oe),f=j.get(F,y.length),f.init(),y.push(f),Is(F,de,0,v.sortObjects),f.finish(),v.sortObjects===!0&&f.sort(W,se),this.info.render.frame++,ve===!0&&Ce.beginShadows();const Ee=b.state.shadowsArray;if(we.render(Ee,F,de),ve===!0&&Ce.endShadows(),this.info.autoReset===!0&&this.info.reset(),ke.render(f,F),b.setupLights(v._useLegacyLights),de.isArrayCamera){const Se=de.cameras;for(let be=0,Xe=Se.length;be0?b=E[E.length-1]:b=null,y.pop(),y.length>0?f=y[y.length-1]:f=null};function Is(F,de,Ee,Se){if(F.visible===!1)return;if(F.layers.test(de.layers)){if(F.isGroup)Ee=F.renderOrder;else if(F.isLOD)F.autoUpdate===!0&&F.update(de);else if(F.isLight)b.pushLight(F),F.castShadow&&b.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||le.intersectsSprite(F)){Se&&_e.setFromMatrixPosition(F.matrixWorld).applyMatrix4(Q);const it=N.update(F),ct=F.material;ct.visible&&f.push(F,it,ct,Ee,_e.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||le.intersectsObject(F))){const it=N.update(F),ct=F.material;if(Se&&(F.boundingSphere!==void 0?(F.boundingSphere===null&&F.computeBoundingSphere(),_e.copy(F.boundingSphere.center)):(it.boundingSphere===null&&it.computeBoundingSphere(),_e.copy(it.boundingSphere.center)),_e.applyMatrix4(F.matrixWorld).applyMatrix4(Q)),Array.isArray(ct)){const ut=it.groups;for(let Et=0,ht=ut.length;Et0&&ky(be,Xe,de,Ee),Se&&ce.viewport(M.copy(Se)),be.length>0&&ja(be,de,Ee),Xe.length>0&&ja(Xe,de,Ee),it.length>0&&ja(it,de,Ee),ce.buffers.depth.setTest(!0),ce.buffers.depth.setMask(!0),ce.buffers.color.setMask(!0),ce.setPolygonOffset(!1)}function ky(F,de,Ee,Se){if((Ee.isScene===!0?Ee.overrideMaterial:null)!==null)return;const Xe=Z.isWebGL2;De===null&&(De=new mo(1,1,{generateMipmaps:!0,type:P.has("EXT_color_buffer_half_float")?Ql:br,minFilter:_o,samples:Xe?4:0})),v.getDrawingBufferSize(fe),Xe?De.setSize(fe.x,fe.y):De.setSize(vu(fe.x),vu(fe.y));const it=v.getRenderTarget();v.setRenderTarget(De),v.getClearColor(ee),I=v.getClearAlpha(),I<1&&v.setClearColor(16777215,.5),v.clear();const ct=v.toneMapping;v.toneMapping=gr,ja(F,Ee,Se),ae.updateMultisampleRenderTarget(De),ae.updateRenderTargetMipmap(De);let ut=!1;for(let Et=0,ht=de.length;Et0),gt=!!Ee.morphAttributes.position,tn=!!Ee.morphAttributes.normal,Yn=!!Ee.morphAttributes.color;let un=gr;Se.toneMapped&&(A===null||A.isXRRenderTarget===!0)&&(un=v.toneMapping);const Ks=Ee.morphAttributes.position||Ee.morphAttributes.normal||Ee.morphAttributes.color,Qt=Ks!==void 0?Ks.length:0,St=he.get(Se),hc=b.state.lights;if(ve===!0&&(Oe===!0||F!==C)){const ts=F===C&&Se.id===O;Ce.setState(Se,F,ts)}let Zt=!1;Se.version===St.__version?(St.needsLights&&St.lightsStateVersion!==hc.state.version||St.outputColorSpace!==ct||be.isBatchedMesh&&St.batching===!1||!be.isBatchedMesh&&St.batching===!0||be.isInstancedMesh&&St.instancing===!1||!be.isInstancedMesh&&St.instancing===!0||be.isSkinnedMesh&&St.skinning===!1||!be.isSkinnedMesh&&St.skinning===!0||be.isInstancedMesh&&St.instancingColor===!0&&be.instanceColor===null||be.isInstancedMesh&&St.instancingColor===!1&&be.instanceColor!==null||St.envMap!==ut||Se.fog===!0&&St.fog!==Xe||St.numClippingPlanes!==void 0&&(St.numClippingPlanes!==Ce.numPlanes||St.numIntersection!==Ce.numIntersection)||St.vertexAlphas!==Et||St.vertexTangents!==ht||St.morphTargets!==gt||St.morphNormals!==tn||St.morphColors!==Yn||St.toneMapping!==un||Z.isWebGL2===!0&&St.morphTargetsCount!==Qt)&&(Zt=!0):(Zt=!0,St.__version=Se.version);let zi=St.currentProgram;Zt===!0&&(zi=Qa(Se,de,be));let Cp=!1,vo=!1,gc=!1;const yn=zi.getUniforms(),Hi=St.uniforms;if(ce.useProgram(zi.program)&&(Cp=!0,vo=!0,gc=!0),Se.id!==O&&(O=Se.id,vo=!0),Cp||C!==F){yn.setValue(ne,"projectionMatrix",F.projectionMatrix),yn.setValue(ne,"viewMatrix",F.matrixWorldInverse);const ts=yn.map.cameraPosition;ts!==void 0&&ts.setValue(ne,_e.setFromMatrixPosition(F.matrixWorld)),Z.logarithmicDepthBuffer&&yn.setValue(ne,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(Se.isMeshPhongMaterial||Se.isMeshToonMaterial||Se.isMeshLambertMaterial||Se.isMeshBasicMaterial||Se.isMeshStandardMaterial||Se.isShaderMaterial)&&yn.setValue(ne,"isOrthographic",F.isOrthographicCamera===!0),C!==F&&(C=F,vo=!0,gc=!0)}if(be.isSkinnedMesh){yn.setOptional(ne,be,"bindMatrix"),yn.setOptional(ne,be,"bindMatrixInverse");const ts=be.skeleton;ts&&(Z.floatVertexTextures?(ts.boneTexture===null&&ts.computeBoneTexture(),yn.setValue(ne,"boneTexture",ts.boneTexture,ae)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}be.isBatchedMesh&&(yn.setOptional(ne,be,"batchingTexture"),yn.setValue(ne,"batchingTexture",be._matricesTexture,ae));const bc=Ee.morphAttributes;if((bc.position!==void 0||bc.normal!==void 0||bc.color!==void 0&&Z.isWebGL2===!0)&&Ke.update(be,Ee,zi),(vo||St.receiveShadow!==be.receiveShadow)&&(St.receiveShadow=be.receiveShadow,yn.setValue(ne,"receiveShadow",be.receiveShadow)),Se.isMeshGouraudMaterial&&Se.envMap!==null&&(Hi.envMap.value=ut,Hi.flipEnvMap.value=ut.isCubeTexture&&ut.isRenderTargetTexture===!1?-1:1),vo&&(yn.setValue(ne,"toneMappingExposure",v.toneMappingExposure),St.needsLights&&Ly(Hi,gc),Xe&&Se.fog===!0&&me.refreshFogUniforms(Hi,Xe),me.refreshMaterialUniforms(Hi,Se,L,q,De),Dd.upload(ne,Tp(St),Hi,ae)),Se.isShaderMaterial&&Se.uniformsNeedUpdate===!0&&(Dd.upload(ne,Tp(St),Hi,ae),Se.uniformsNeedUpdate=!1),Se.isSpriteMaterial&&yn.setValue(ne,"center",be.center),yn.setValue(ne,"modelViewMatrix",be.modelViewMatrix),yn.setValue(ne,"normalMatrix",be.normalMatrix),yn.setValue(ne,"modelMatrix",be.matrixWorld),Se.isShaderMaterial||Se.isRawShaderMaterial){const ts=Se.uniformsGroups;for(let yc=0,Fy=ts.length;yc0&&ae.useMultisampledRTT(F)===!1?be=he.get(F).__webglMultisampledFramebuffer:Array.isArray(ht)?be=ht[Ee]:be=ht,M.copy(F.viewport),G.copy(F.scissor),V=F.scissorTest}else M.copy(oe).multiplyScalar(L).floor(),G.copy(ye).multiplyScalar(L).floor(),V=xe;if(ce.bindFramebuffer(ne.FRAMEBUFFER,be)&&Z.drawBuffers&&Se&&ce.drawBuffers(F,be),ce.viewport(M),ce.scissor(G),ce.setScissorTest(V),Xe){const ut=he.get(F.texture);ne.framebufferTexture2D(ne.FRAMEBUFFER,ne.COLOR_ATTACHMENT0,ne.TEXTURE_CUBE_MAP_POSITIVE_X+de,ut.__webglTexture,Ee)}else if(it){const ut=he.get(F.texture),Et=de||0;ne.framebufferTextureLayer(ne.FRAMEBUFFER,ne.COLOR_ATTACHMENT0,ut.__webglTexture,Ee||0,Et)}O=-1},this.readRenderTargetPixels=function(F,de,Ee,Se,be,Xe,it){if(!(F&&F.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ct=he.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&it!==void 0&&(ct=ct[it]),ct){ce.bindFramebuffer(ne.FRAMEBUFFER,ct);try{const ut=F.texture,Et=ut.format,ht=ut.type;if(Et!==gs&&Mt.convert(Et)!==ne.getParameter(ne.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const gt=ht===Ql&&(P.has("EXT_color_buffer_half_float")||Z.isWebGL2&&P.has("EXT_color_buffer_float"));if(ht!==br&&Mt.convert(ht)!==ne.getParameter(ne.IMPLEMENTATION_COLOR_READ_TYPE)&&!(ht===Mi&&(Z.isWebGL2||P.has("OES_texture_float")||P.has("WEBGL_color_buffer_float")))&&!gt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}de>=0&&de<=F.width-Se&&Ee>=0&&Ee<=F.height-be&&ne.readPixels(de,Ee,Se,be,Mt.convert(Et),Mt.convert(ht),Xe)}finally{const ut=A!==null?he.get(A).__webglFramebuffer:null;ce.bindFramebuffer(ne.FRAMEBUFFER,ut)}}},this.copyFramebufferToTexture=function(F,de,Ee=0){const Se=Math.pow(2,-Ee),be=Math.floor(de.image.width*Se),Xe=Math.floor(de.image.height*Se);ae.setTexture2D(de,0),ne.copyTexSubImage2D(ne.TEXTURE_2D,Ee,0,0,F.x,F.y,be,Xe),ce.unbindTexture()},this.copyTextureToTexture=function(F,de,Ee,Se=0){const be=de.image.width,Xe=de.image.height,it=Mt.convert(Ee.format),ct=Mt.convert(Ee.type);ae.setTexture2D(Ee,0),ne.pixelStorei(ne.UNPACK_FLIP_Y_WEBGL,Ee.flipY),ne.pixelStorei(ne.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ee.premultiplyAlpha),ne.pixelStorei(ne.UNPACK_ALIGNMENT,Ee.unpackAlignment),de.isDataTexture?ne.texSubImage2D(ne.TEXTURE_2D,Se,F.x,F.y,be,Xe,it,ct,de.image.data):de.isCompressedTexture?ne.compressedTexSubImage2D(ne.TEXTURE_2D,Se,F.x,F.y,de.mipmaps[0].width,de.mipmaps[0].height,it,de.mipmaps[0].data):ne.texSubImage2D(ne.TEXTURE_2D,Se,F.x,F.y,it,ct,de.image),Se===0&&Ee.generateMipmaps&&ne.generateMipmap(ne.TEXTURE_2D),ce.unbindTexture()},this.copyTextureToTexture3D=function(F,de,Ee,Se,be=0){if(v.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Xe=F.max.x-F.min.x+1,it=F.max.y-F.min.y+1,ct=F.max.z-F.min.z+1,ut=Mt.convert(Se.format),Et=Mt.convert(Se.type);let ht;if(Se.isData3DTexture)ae.setTexture3D(Se,0),ht=ne.TEXTURE_3D;else if(Se.isDataArrayTexture)ae.setTexture2DArray(Se,0),ht=ne.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}ne.pixelStorei(ne.UNPACK_FLIP_Y_WEBGL,Se.flipY),ne.pixelStorei(ne.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Se.premultiplyAlpha),ne.pixelStorei(ne.UNPACK_ALIGNMENT,Se.unpackAlignment);const gt=ne.getParameter(ne.UNPACK_ROW_LENGTH),tn=ne.getParameter(ne.UNPACK_IMAGE_HEIGHT),Yn=ne.getParameter(ne.UNPACK_SKIP_PIXELS),un=ne.getParameter(ne.UNPACK_SKIP_ROWS),Ks=ne.getParameter(ne.UNPACK_SKIP_IMAGES),Qt=Ee.isCompressedTexture?Ee.mipmaps[0]:Ee.image;ne.pixelStorei(ne.UNPACK_ROW_LENGTH,Qt.width),ne.pixelStorei(ne.UNPACK_IMAGE_HEIGHT,Qt.height),ne.pixelStorei(ne.UNPACK_SKIP_PIXELS,F.min.x),ne.pixelStorei(ne.UNPACK_SKIP_ROWS,F.min.y),ne.pixelStorei(ne.UNPACK_SKIP_IMAGES,F.min.z),Ee.isDataTexture||Ee.isData3DTexture?ne.texSubImage3D(ht,be,de.x,de.y,de.z,Xe,it,ct,ut,Et,Qt.data):Ee.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ne.compressedTexSubImage3D(ht,be,de.x,de.y,de.z,Xe,it,ct,ut,Qt.data)):ne.texSubImage3D(ht,be,de.x,de.y,de.z,Xe,it,ct,ut,Et,Qt),ne.pixelStorei(ne.UNPACK_ROW_LENGTH,gt),ne.pixelStorei(ne.UNPACK_IMAGE_HEIGHT,tn),ne.pixelStorei(ne.UNPACK_SKIP_PIXELS,Yn),ne.pixelStorei(ne.UNPACK_SKIP_ROWS,un),ne.pixelStorei(ne.UNPACK_SKIP_IMAGES,Ks),be===0&&Se.generateMipmaps&&ne.generateMipmap(ht),ce.unbindTexture()},this.initTexture=function(F){F.isCubeTexture?ae.setTextureCube(F,0):F.isData3DTexture?ae.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?ae.setTexture2DArray(F,0):ae.setTexture2D(F,0),ce.unbindTexture()},this.resetState=function(){R=0,w=0,A=null,ce.reset(),tt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ni}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===fy?"display-p3":"srgb",t.unpackColorSpace=Pt.workingColorSpace===_p?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===nn?io:VN}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===io?nn:Cn}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class O1t extends aI{}O1t.prototype.isWebGL1Renderer=!0;class k1t extends Jt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class D1t{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=yb,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Vs()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,s){e*=this.stride,s*=t.stride;for(let i=0,r=this.stride;ic)continue;m.applyMatrix4(this.matrixWorld);const O=e.ray.origin.distanceTo(m);Oe.far||t.push({distance:O,point:_.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else{const y=Math.max(0,o.start),E=Math.min(b.count,o.start+o.count);for(let v=y,S=E-1;vc)continue;m.applyMatrix4(this.matrixWorld);const w=e.ray.origin.distanceTo(m);we.far||t.push({distance:w,point:_.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,s=Object.keys(t);if(s.length>0){const i=t[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r0){const i=t[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;ri.far)return;r.push({distance:d,distanceToRay:Math.sqrt(a),point:c,index:e,face:null,object:o})}}class Sy extends zs{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new pt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=py,this.normalScale=new Rt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Vi extends Sy{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Rt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return In(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new pt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new pt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new pt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class Hw extends zs{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new pt(16777215),this.specular=new pt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=py,this.normalScale=new Rt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=dy,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function hd(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function q1t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Y1t(n){function e(i,r){return n[i]-n[r]}const t=n.length,s=new Array(t);for(let i=0;i!==t;++i)s[i]=i;return s.sort(e),s}function qw(n,e,t){const s=n.length,i=new n.constructor(s);for(let r=0,o=0;o!==s;++r){const a=t[r]*e;for(let c=0;c!==e;++c)i[o++]=n[a+c]}return i}function uI(n,e,t,s){let i=1,r=n[0];for(;r!==void 0&&r[s]===void 0;)r=n[i++];if(r===void 0)return;let o=r[s];if(o!==void 0)if(Array.isArray(o))do o=r[s],o!==void 0&&(e.push(r.time),t.push.apply(t,o)),r=n[i++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[s],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=n[i++];while(r!==void 0);else do o=r[s],o!==void 0&&(e.push(r.time),t.push(o)),r=n[i++];while(r!==void 0)}class fc{constructor(e,t,s,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(s),this.sampleValues=t,this.valueSize=s,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let s=this._cachedIndex,i=t[s],r=t[s-1];e:{t:{let o;n:{s:if(!(e=r)){const a=t[1];e=r)break t}o=s,s=0;break n}break e}for(;s>>1;et;)--o;if(++o,r!==0||o!==i){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=s.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const s=this.times,i=this.values,r=s.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const c=s[a];if(typeof c=="number"&&isNaN(c)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,c),e=!1;break}if(o!==null&&o>c){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,c,o),e=!1;break}o=c}if(i!==void 0&&q1t(i))for(let a=0,c=i.length;a!==c;++a){const d=i[a];if(isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,d),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),s=this.getValueSize(),i=this.getInterpolation()===jh,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*s,c=o*s,d=0;d!==s;++d)t[c+d]=t[a+d];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*s)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),s=this.constructor,i=new s(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}mi.prototype.TimeBufferType=Float32Array;mi.prototype.ValueBufferType=Float32Array;mi.prototype.DefaultInterpolation=Ta;class Ya extends mi{}Ya.prototype.ValueTypeName="bool";Ya.prototype.ValueBufferType=Array;Ya.prototype.DefaultInterpolation=Xl;Ya.prototype.InterpolantFactoryMethodLinear=void 0;Ya.prototype.InterpolantFactoryMethodSmooth=void 0;class pI extends mi{}pI.prototype.ValueTypeName="color";class wa extends mi{}wa.prototype.ValueTypeName="number";class j1t extends fc{constructor(e,t,s,i){super(e,t,s,i)}interpolate_(e,t,s,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,c=(s-t)/(i-t);let d=e*a;for(let u=d+a;d!==u;d+=4)Mr.slerpFlat(r,0,o,d-a,o,d,c);return r}}class go extends mi{InterpolantFactoryMethodLinear(e){return new j1t(this.times,this.values,this.getValueSize(),e)}}go.prototype.ValueTypeName="quaternion";go.prototype.DefaultInterpolation=Ta;go.prototype.InterpolantFactoryMethodSmooth=void 0;class $a extends mi{}$a.prototype.ValueTypeName="string";$a.prototype.ValueBufferType=Array;$a.prototype.DefaultInterpolation=Xl;$a.prototype.InterpolantFactoryMethodLinear=void 0;$a.prototype.InterpolantFactoryMethodSmooth=void 0;class Ra extends mi{}Ra.prototype.ValueTypeName="vector";class Q1t{constructor(e,t=-1,s,i=t0t){this.name=e,this.tracks=s,this.duration=t,this.blendMode=i,this.uuid=Vs(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],s=e.tracks,i=1/(e.fps||1);for(let o=0,a=s.length;o!==a;++o)t.push(Z1t(s[o]).scale(i));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],s=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=s.length;r!==o;++r)t.push(mi.toJSON(s[r]));return i}static CreateFromMorphTargetSequence(e,t,s,i){const r=t.length,o=[];for(let a=0;a1){const _=u[1];let m=i[_];m||(i[_]=m=[]),m.push(d)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],t,s));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const s=function(_,m,h,g,f){if(h.length!==0){const b=[],y=[];uI(h,b,y,g),b.length!==0&&f.push(new _(m,b,y))}},i=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let c=e.length||-1;const d=e.hierarchy||[];for(let _=0;_{t&&t(r),this.manager.itemEnd(e)},0),r;if(Ti[e]!==void 0){Ti[e].push({onLoad:t,onProgress:s,onError:i});return}Ti[e]=[],Ti[e].push({onLoad:t,onProgress:s,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,c=this.responseType;fetch(o).then(d=>{if(d.status===200||d.status===0){if(d.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||d.body===void 0||d.body.getReader===void 0)return d;const u=Ti[e],_=d.body.getReader(),m=d.headers.get("Content-Length")||d.headers.get("X-File-Size"),h=m?parseInt(m):0,g=h!==0;let f=0;const b=new ReadableStream({start(y){E();function E(){_.read().then(({done:v,value:S})=>{if(v)y.close();else{f+=S.byteLength;const R=new ProgressEvent("progress",{lengthComputable:g,loaded:f,total:h});for(let w=0,A=u.length;w{switch(c){case"arraybuffer":return d.arrayBuffer();case"blob":return d.blob();case"document":return d.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return d.json();default:if(a===void 0)return d.text();{const _=/charset="?([^;"\s]*)"?/i.exec(a),m=_&&_[1]?_[1].toLowerCase():void 0,h=new TextDecoder(m);return d.arrayBuffer().then(g=>h.decode(g))}}}).then(d=>{Aa.add(e,d);const u=Ti[e];delete Ti[e];for(let _=0,m=u.length;_{const u=Ti[e];if(u===void 0)throw this.manager.itemError(e),d;delete Ti[e];for(let _=0,m=u.length;_{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class nTt extends Wa{constructor(e){super(e)}load(e,t,s,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Aa.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a=Zl("img");function c(){u(),Aa.add(e,this),t&&t(this),r.manager.itemEnd(e)}function d(_){u(),i&&i(_),r.manager.itemError(e),r.manager.itemEnd(e)}function u(){a.removeEventListener("load",c,!1),a.removeEventListener("error",d,!1)}return a.addEventListener("load",c,!1),a.addEventListener("error",d,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class _I extends Wa{constructor(e){super(e)}load(e,t,s,i){const r=new xn,o=new nTt(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,t!==void 0&&t(r)},s,i),r}}class bp extends Jt{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new pt(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}const Sg=new xt,Yw=new re,$w=new re;class Ty{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Rt(512,512),this.map=null,this.mapPass=null,this.matrix=new xt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new my,this._frameExtents=new Rt(1,1),this._viewportCount=1,this._viewports=[new Wt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,s=this.matrix;Yw.setFromMatrixPosition(e.matrixWorld),t.position.copy(Yw),$w.setFromMatrixPosition(e.target.matrixWorld),t.lookAt($w),t.updateMatrixWorld(),Sg.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Sg),s.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),s.multiply(Sg)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class sTt extends Ty{constructor(){super(new Gn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,s=xa*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;(s!==t.fov||i!==t.aspect||r!==t.far)&&(t.fov=s,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class iTt extends bp{constructor(e,t,s=0,i=Math.PI/3,r=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Jt.DEFAULT_UP),this.updateMatrix(),this.target=new Jt,this.distance=s,this.angle=i,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new sTt}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const Ww=new xt,pl=new re,Tg=new re;class rTt extends Ty{constructor(){super(new Gn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Rt(4,2),this._viewportCount=6,this._viewports=[new Wt(2,1,1,1),new Wt(0,1,1,1),new Wt(3,1,1,1),new Wt(1,1,1,1),new Wt(3,0,1,1),new Wt(1,0,1,1)],this._cubeDirections=[new re(1,0,0),new re(-1,0,0),new re(0,0,1),new re(0,0,-1),new re(0,1,0),new re(0,-1,0)],this._cubeUps=[new re(0,1,0),new re(0,1,0),new re(0,1,0),new re(0,1,0),new re(0,0,1),new re(0,0,-1)]}updateMatrices(e,t=0){const s=this.camera,i=this.matrix,r=e.distance||s.far;r!==s.far&&(s.far=r,s.updateProjectionMatrix()),pl.setFromMatrixPosition(e.matrixWorld),s.position.copy(pl),Tg.copy(s.position),Tg.add(this._cubeDirections[t]),s.up.copy(this._cubeUps[t]),s.lookAt(Tg),s.updateMatrixWorld(),i.makeTranslation(-pl.x,-pl.y,-pl.z),Ww.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Ww)}}class oTt extends bp{constructor(e,t,s=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=s,this.decay=i,this.shadow=new rTt}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class aTt extends Ty{constructor(){super(new gy(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class mI extends bp{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Jt.DEFAULT_UP),this.updateMatrix(),this.target=new Jt,this.shadow=new aTt}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class lTt extends bp{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class Dl{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let s=0,i=e.length;s"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,s,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Aa.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(c){Aa.add(e,c),t&&t(c),r.manager.itemEnd(e)}).catch(function(c){i&&i(c),r.manager.itemError(e),r.manager.itemEnd(e)}),r.manager.itemStart(e)}}const xy="\\[\\]\\.:\\/",dTt=new RegExp("["+xy+"]","g"),Cy="[^"+xy+"]",uTt="[^"+xy.replace("\\.","")+"]",pTt=/((?:WC+[\/:])*)/.source.replace("WC",Cy),fTt=/(WCOD+)?/.source.replace("WCOD",uTt),_Tt=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Cy),mTt=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Cy),hTt=new RegExp("^"+pTt+fTt+_Tt+mTt+"$"),gTt=["material","materials","bones","map"];class bTt{constructor(e,t,s){const i=s||Ut.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const s=this._targetGroup.nCachedObjects_,i=this._bindings[s];i!==void 0&&i.getValue(e,t)}setValue(e,t){const s=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=s.length;i!==r;++i)s[i].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,s=e.length;t!==s;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,s=e.length;t!==s;++t)e[t].unbind()}}class Ut{constructor(e,t,s){this.path=t,this.parsedPath=s||Ut.parseTrackName(t),this.node=Ut.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,s){return e&&e.isAnimationObjectGroup?new Ut.Composite(e,t,s):new Ut(e,t,s)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(dTt,"")}static parseTrackName(e){const t=hTt.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const s={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=s.nodeName&&s.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const r=s.nodeName.substring(i+1);gTt.indexOf(r)!==-1&&(s.nodeName=s.nodeName.substring(0,i),s.objectName=r)}if(s.propertyName===null||s.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return s}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const s=e.skeleton.getBoneByName(t);if(s!==void 0)return s}if(e.children){const s=function(r){for(let o=0;o=2.0 are supported."));return}const d=new XTt(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});d.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&a[_]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+_+'".')}}d.setExtensions(o),d.setPlugins(a),d.parse(s,i)}parseAsync(e,t){const s=this;return new Promise(function(i,r){s.parse(e,t,i,r)})}}function ETt(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const wt={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class vTt{constructor(e){this.parser=e,this.name=wt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let s=0,i=t.length;s=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,o)}}class DTt{constructor(e){this.parser=e,this.name=wt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,s=this.parser,i=s.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;const o=r.extensions[t],a=i.images[o.source];let c=s.textureLoader;if(a.uri){const d=s.options.manager.getHandler(a.uri);d!==null&&(c=d)}return this.detectSupport().then(function(d){if(d)return s.loadTextureImage(e,o.source,c);if(i.extensionsRequired&&i.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return s.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class LTt{constructor(e){this.parser=e,this.name=wt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,s=this.parser,i=s.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;const o=r.extensions[t],a=i.images[o.source];let c=s.textureLoader;if(a.uri){const d=s.options.manager.getHandler(a.uri);d!==null&&(c=d)}return this.detectSupport().then(function(d){if(d)return s.loadTextureImage(e,o.source,c);if(i.extensionsRequired&&i.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return s.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class PTt{constructor(e){this.name=wt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,s=t.bufferViews[e];if(s.extensions&&s.extensions[this.name]){const i=s.extensions[this.name],r=this.parser.getDependency("buffer",i.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const c=i.byteOffset||0,d=i.byteLength||0,u=i.count,_=i.byteStride,m=new Uint8Array(a,c,d);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(u,_,m,i.mode,i.filter).then(function(h){return h.buffer}):o.ready.then(function(){const h=new ArrayBuffer(u*_);return o.decodeGltfBuffer(new Uint8Array(h),u,_,m,i.mode,i.filter),h})})}else return null}}class FTt{constructor(e){this.name=wt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,s=t.nodes[e];if(!s.extensions||!s.extensions[this.name]||s.mesh===void 0)return null;const i=t.meshes[s.mesh];for(const d of i.primitives)if(d.mode!==_s.TRIANGLES&&d.mode!==_s.TRIANGLE_STRIP&&d.mode!==_s.TRIANGLE_FAN&&d.mode!==void 0)return null;const o=s.extensions[this.name].attributes,a=[],c={};for(const d in o)a.push(this.parser.getDependency("accessor",o[d]).then(u=>(c[d]=u,c[d])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(d=>{const u=d.pop(),_=u.isGroup?u.children:[u],m=d[0].count,h=[];for(const g of _){const f=new xt,b=new re,y=new Mr,E=new re(1,1,1),v=new G1t(g.geometry,g.material,m);for(let S=0;S0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const QTt=new xt;class XTt{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new ETt,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let s=!1,i=!1,r=-1;typeof navigator<"u"&&(s=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,r=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||s||i&&r<98?this.textureLoader=new _I(this.options.manager):this.textureLoader=new cTt(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new fI(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const s=this,i=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])}).then(function(o){const a={scene:o[0][i.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:i.asset,parser:s,userData:{}};return Ur(r,a,i),dr(a,i),Promise.all(s._invokeAll(function(c){return c.afterRoot&&c.afterRoot(a)})).then(function(){e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],s=this.json.meshes||[];for(let i=0,r=t.length;i{const c=this.associations.get(o);c!=null&&this.associations.set(a,c);for(const[d,u]of o.children.entries())r(u,a.children[d])};return r(s,i),i.name+="_instance_"+e.uses[t]++,i}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let s=0;s=2&&b.setY(C,w[A*c+1]),c>=3&&b.setZ(C,w[A*c+2]),c>=4&&b.setW(C,w[A*c+3]),c>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return b})}loadTexture(e){const t=this.json,s=this.options,r=t.textures[e].source,o=t.images[r];let a=this.textureLoader;if(o.uri){const c=s.manager.getHandler(o.uri);c!==null&&(a=c)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,t,s){const i=this,r=this.json,o=r.textures[e],a=r.images[t],c=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[c])return this.textureCache[c];const d=this.loadImageSource(t,s).then(function(u){u.flipY=!1,u.name=o.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const m=(r.samplers||{})[o.sampler]||{};return u.magFilter=Qw[m.magFilter]||Kn,u.minFilter=Qw[m.minFilter]||_o,u.wrapS=Xw[m.wrapS]||va,u.wrapT=Xw[m.wrapT]||va,i.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[c]=d,d}loadImageSource(e,t){const s=this,i=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(_=>_.clone());const o=i.images[e],a=self.URL||self.webkitURL;let c=o.uri||"",d=!1;if(o.bufferView!==void 0)c=s.getDependency("bufferView",o.bufferView).then(function(_){d=!0;const m=new Blob([_],{type:o.mimeType});return c=a.createObjectURL(m),c});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(c).then(function(_){return new Promise(function(m,h){let g=m;t.isImageBitmapLoader===!0&&(g=function(f){const b=new xn(f);b.needsUpdate=!0,m(b)}),t.load(Dl.resolveURL(_,r.path),g,void 0,h)})}).then(function(_){return d===!0&&a.revokeObjectURL(c),_.userData.mimeType=o.mimeType||jTt(o.uri),_}).catch(function(_){throw console.error("THREE.GLTFLoader: Couldn't load texture",c),_});return this.sourceCache[e]=u,u}assignTexture(e,t,s,i){const r=this;return this.getDependency("texture",s.index).then(function(o){if(!o)return null;if(s.texCoord!==void 0&&s.texCoord>0&&(o=o.clone(),o.channel=s.texCoord),r.extensions[wt.KHR_TEXTURE_TRANSFORM]){const a=s.extensions!==void 0?s.extensions[wt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const c=r.associations.get(o);o=r.extensions[wt.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,c)}}return i!==void 0&&(o.colorSpace=i),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let s=e.material;const i=t.attributes.tangent===void 0,r=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+s.uuid;let c=this.cache.get(a);c||(c=new dI,zs.prototype.copy.call(c,s),c.color.copy(s.color),c.map=s.map,c.sizeAttenuation=!1,this.cache.add(a,c)),s=c}else if(e.isLine){const a="LineBasicMaterial:"+s.uuid;let c=this.cache.get(a);c||(c=new cI,zs.prototype.copy.call(c,s),c.color.copy(s.color),c.map=s.map,this.cache.add(a,c)),s=c}if(i||r||o){let a="ClonedMaterial:"+s.uuid+":";i&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let c=this.cache.get(a);c||(c=s.clone(),r&&(c.vertexColors=!0),o&&(c.flatShading=!0),i&&(c.normalScale&&(c.normalScale.y*=-1),c.clearcoatNormalScale&&(c.clearcoatNormalScale.y*=-1)),this.cache.add(a,c),this.associations.set(c,this.associations.get(s))),s=c}e.material=s}getMaterialType(){return Sy}loadMaterial(e){const t=this,s=this.json,i=this.extensions,r=s.materials[e];let o;const a={},c=r.extensions||{},d=[];if(c[wt.KHR_MATERIALS_UNLIT]){const _=i[wt.KHR_MATERIALS_UNLIT];o=_.getMaterialType(),d.push(_.extendParams(a,r,t))}else{const _=r.pbrMetallicRoughness||{};if(a.color=new pt(1,1,1),a.opacity=1,Array.isArray(_.baseColorFactor)){const m=_.baseColorFactor;a.color.setRGB(m[0],m[1],m[2],Cn),a.opacity=m[3]}_.baseColorTexture!==void 0&&d.push(t.assignTexture(a,"map",_.baseColorTexture,nn)),a.metalness=_.metallicFactor!==void 0?_.metallicFactor:1,a.roughness=_.roughnessFactor!==void 0?_.roughnessFactor:1,_.metallicRoughnessTexture!==void 0&&(d.push(t.assignTexture(a,"metalnessMap",_.metallicRoughnessTexture)),d.push(t.assignTexture(a,"roughnessMap",_.metallicRoughnessTexture))),o=this._invokeOne(function(m){return m.getMaterialType&&m.getMaterialType(e)}),d.push(Promise.all(this._invokeAll(function(m){return m.extendMaterialParams&&m.extendMaterialParams(e,a)})))}r.doubleSided===!0&&(a.side=ei);const u=r.alphaMode||Cg.OPAQUE;if(u===Cg.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===Cg.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==_r&&(d.push(t.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new Rt(1,1),r.normalTexture.scale!==void 0)){const _=r.normalTexture.scale;a.normalScale.set(_,_)}if(r.occlusionTexture!==void 0&&o!==_r&&(d.push(t.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==_r){const _=r.emissiveFactor;a.emissive=new pt().setRGB(_[0],_[1],_[2],Cn)}return r.emissiveTexture!==void 0&&o!==_r&&d.push(t.assignTexture(a,"emissiveMap",r.emissiveTexture,nn)),Promise.all(d).then(function(){const _=new o(a);return r.name&&(_.name=r.name),dr(_,r),t.associations.set(_,{materials:e}),r.extensions&&Ur(i,_,r),_})}createUniqueName(e){const t=Ut.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,s=this.extensions,i=this.primitiveCache;function r(a){return s[wt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(c){return Zw(c,a,t)})}const o=[];for(let a=0,c=e.length;a0&&WTt(y,r),y.name=t.createUniqueName(r.name||"mesh_"+e),dr(y,r),b.extensions&&Ur(i,y,b),t.assignFinalMaterial(y),_.push(y)}for(let h=0,g=_.length;h1?u=new jr:d.length===1?u=d[0]:u=new Jt,u!==d[0])for(let _=0,m=d.length;_{const _=new Map;for(const[m,h]of i.associations)(m instanceof zs||m instanceof xn)&&_.set(m,h);return u.traverse(m=>{const h=i.associations.get(m);h!=null&&_.set(m,h)}),_};return i.associations=d(r),r})}_createAnimationTracks(e,t,s,i,r){const o=[],a=e.name?e.name:e.uuid,c=[];Ji[r.path]===Ji.weights?e.traverse(function(m){m.morphTargetInfluences&&c.push(m.name?m.name:m.uuid)}):c.push(a);let d;switch(Ji[r.path]){case Ji.weights:d=wa;break;case Ji.rotation:d=go;break;case Ji.position:case Ji.scale:d=Ra;break;default:switch(s.itemSize){case 1:d=wa;break;case 2:case 3:default:d=Ra;break}break}const u=i.interpolation!==void 0?qTt[i.interpolation]:Ta,_=this._getArrayFromAccessor(s);for(let m=0,h=c.length;m{Ge.replace()})},stopVideoStream(){this.isVideoActive=!1,this.imageData=null,qe.emit("stop_webcam_video_stream"),Ue(()=>{Ge.replace()})},startDrag(n){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(n){if(this.isDragging){const e=n.clientX-this.dragStart.x,t=n.clientY-this.dragStart.y;this.position.bottom-=t,this.position.right-=e,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ge.replace(),qe.on("video_stream_image",n=>{if(this.isVideoActive){this.imageDataUrl="data:image/jpeg;base64,"+n,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},ext=["src"],txt=["src"],nxt={class:"controls"},sxt={key:2};function ixt(n,e,t,s,i,r){return T(),x("div",{class:"floating-frame bg-white",style:Vt({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=$((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=$((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[l("div",{class:"handle",onMousedown:e[0]||(e[0]=$((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=$((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),i.isVideoActive&&i.imageDataUrl!=null?(T(),x("img",{key:0,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},null,8,ext)):B("",!0),i.isVideoActive&&i.imageDataUrl==null?(T(),x("p",{key:1,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},"Loading. Please wait...",8,txt)):B("",!0),l("div",nxt,[i.isVideoActive?B("",!0):(T(),x("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startVideoStream&&r.startVideoStream(...o))},e[6]||(e[6]=[l("i",{"data-feather":"video"},null,-1)]))),i.isVideoActive?(T(),x("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopVideoStream&&r.stopVideoStream(...o))},e[7]||(e[7]=[l("i",{"data-feather":"video"},null,-1)]))):B("",!0),i.isVideoActive?(T(),x("span",sxt,"FPS: "+Y(i.frameRate),1)):B("",!0)])],36)}const rxt=st(JTt,[["render",ixt]]),oxt={data(){return{isAudioActive:!1,imageDataUrl:null,isDragging:!1,position:{bottom:0,right:0},dragStart:{x:0,y:0},zIndex:0,frameRate:0,frameCount:0,lastFrameTime:Date.now()}},methods:{startAudioStream(){qe.emit("start_audio_stream",()=>{this.isAudioActive=!0}),Ue(()=>{Ge.replace()})},stopAudioStream(){qe.emit("stop_audio_stream",()=>{this.isAudioActive=!1,this.imageDataUrl=null}),Ue(()=>{Ge.replace()})},startDrag(n){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(n){if(this.isDragging){const e=n.clientX-this.dragStart.x,t=n.clientY-this.dragStart.y;this.position.bottom-=t,this.position.right-=e,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ge.replace(),qe.on("update_spectrogram",n=>{if(this.isAudioActive){this.imageDataUrl="data:image/jpeg;base64,"+n,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},axt=["src"],lxt={class:"controls"};function cxt(n,e,t,s,i,r){return T(),x("div",{class:"floating-frame bg-white",style:Vt({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=$((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=$((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[l("div",{class:"handle",onMousedown:e[0]||(e[0]=$((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=$((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),i.isAudioActive&&i.imageDataUrl!=null?(T(),x("img",{key:0,src:i.imageDataUrl,alt:"Spectrogram",width:"300",height:"300"},null,8,axt)):B("",!0),l("div",lxt,[i.isAudioActive?B("",!0):(T(),x("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startAudioStream&&r.startAudioStream(...o))},e[6]||(e[6]=[l("i",{"data-feather":"mic"},null,-1)]))),i.isAudioActive?(T(),x("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopAudioStream&&r.stopAudioStream(...o))},e[7]||(e[7]=[l("i",{"data-feather":"mic"},null,-1)]))):B("",!0)])],36)}const dxt=st(oxt,[["render",cxt]]),uxt={data(){return{activePersonality:null}},props:{personality:{type:Object,default:()=>({})}},components:{VideoFrame:rxt,AudioFrame:dxt},computed:{isReady:{get(){return this.$store.state.ready}}},watch:{"$store.state.mountedPersArr":"updatePersonality","$store.state.config.active_personality_id":"updatePersonality"},async mounted(){for(;this.isReady===!1;)await new Promise(n=>setTimeout(n,100));console.log("Personality:",this.personality),this.initWebGLScene(),this.updatePersonality(),Ue(()=>{Ge.replace()}),this.$refs.video_frame.position={bottom:0,right:0},this.$refs.audio_frame.position={bottom:0,right:100}},beforeDestroy(){},methods:{initWebGLScene(){this.scene=new k1t,this.camera=new Gn(75,window.innerWidth/window.innerHeight,.1,1e3),this.renderer=new aI,this.renderer.setSize(window.innerWidth,window.innerHeight),this.$refs.webglContainer.appendChild(this.renderer.domElement);const n=new yr,e=new Hw({color:65280});this.cube=new Vn(n,e),this.scene.add(this.cube);const t=new lTt(4210752),s=new mI(16777215,.5);s.position.set(0,1,0),this.scene.add(t),this.scene.add(s),this.camera.position.z=5,this.animate()},updatePersonality(){const{mountedPersArr:n,config:e}=this.$store.state;this.activePersonality=n[e.active_personality_id],this.activePersonality.avatar?this.showBoxWithAvatar(this.activePersonality.avatar):this.showDefaultCube(),this.$emit("update:personality",this.activePersonality)},loadScene(n){new yTt().load(n,t=>{this.scene.remove(this.cube),this.cube=t.scene,this.scene.add(this.cube)})},showBoxWithAvatar(n){this.cube&&this.scene.remove(this.cube);const e=new yr,t=new _I().load(n),s=new _r({map:t});this.cube=new Vn(e,s),this.scene.add(this.cube)},showDefaultCube(){this.scene.remove(this.cube);const n=new yr,e=new Hw({color:65280});this.cube=new Vn(n,e),this.scene.add(this.cube)},animate(){requestAnimationFrame(this.animate),this.cube&&(this.cube.rotation.x+=.01,this.cube.rotation.y+=.01),this.renderer.render(this.scene,this.camera)}}},pxt={ref:"webglContainer"},fxt={class:"flex-col y-overflow scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},_xt={key:0,class:"text-center"},mxt={key:1,class:"text-center"},hxt={class:"floating-frame2"},gxt=["innerHTML"];function bxt(n,e,t,s,i,r){const o=Je("VideoFrame"),a=Je("AudioFrame");return T(),x(Le,null,[l("div",pxt,null,512),l("div",fxt,[!i.activePersonality||!i.activePersonality.scene_path?(T(),x("div",_xt," Personality does not have a 3d avatar. ")):B("",!0),!i.activePersonality||!i.activePersonality.avatar||i.activePersonality.avatar===""?(T(),x("div",mxt," Personality does not have an avatar. ")):B("",!0),l("div",hxt,[l("div",{innerHTML:n.htmlContent},null,8,gxt)])]),z(o,{ref:"video_frame"},null,512),z(a,{ref:"audio_frame"},null,512)],64)}const yxt=st(uxt,[["render",bxt]]);let gd;const Ext=new Uint8Array(16);function vxt(){if(!gd&&(gd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gd(Ext)}const En=[];for(let n=0;n<256;++n)En.push((n+256).toString(16).slice(1));function Sxt(n,e=0){return En[n[e+0]]+En[n[e+1]]+En[n[e+2]]+En[n[e+3]]+"-"+En[n[e+4]]+En[n[e+5]]+"-"+En[n[e+6]]+En[n[e+7]]+"-"+En[n[e+8]]+En[n[e+9]]+"-"+En[n[e+10]]+En[n[e+11]]+En[n[e+12]]+En[n[e+13]]+En[n[e+14]]+En[n[e+15]]}const Txt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Jw={randomUUID:Txt};function Di(n,e,t){if(Jw.randomUUID&&!e&&!n)return Jw.randomUUID();n=n||{};const s=n.random||(n.rng||vxt)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Sxt(s)}class ro{constructor(){this.listenerMap=new Map,this._listeners=[],this.proxyMap=new Map,this.proxies=[]}get listeners(){return this._listeners.concat(this.proxies.flatMap(e=>e()))}subscribe(e,t){this.listenerMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. +}`;function x1t(n,e,t){let s=new my;const i=new Rt,r=new Rt,o=new Wt,a=new E1t({depthPacking:r0t}),c=new v1t,d={},u=t.maxTextureSize,_={[Fi]:Jn,[Jn]:Fi,[ei]:ei},m=new ho({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Rt},radius:{value:4}},vertexShader:S1t,fragmentShader:T1t}),h=m.clone();h.defines.HORIZONTAL_PASS=1;const g=new _i;g.setAttribute("position",new zn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const f=new Vn(g,m),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=NN;let y=this.type;this.render=function(R,w,A){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||R.length===0)return;const O=n.getRenderTarget(),C=n.getActiveCubeFace(),M=n.getActiveMipmapLevel(),G=n.state;G.setBlending(hr),G.buffers.color.setClear(1,1,1,1),G.buffers.depth.setTest(!0),G.setScissorTest(!1);const V=y!==Ci&&this.type===Ci,ee=y===Ci&&this.type!==Ci;for(let I=0,H=R.length;Iu||i.y>u)&&(i.x>u&&(r.x=Math.floor(u/W.x),i.x=r.x*W.x,L.mapSize.x=r.x),i.y>u&&(r.y=Math.floor(u/W.y),i.y=r.y*W.y,L.mapSize.y=r.y)),L.map===null||V===!0||ee===!0){const oe=this.type!==Ci?{minFilter:gn,magFilter:gn}:{};L.map!==null&&L.map.dispose(),L.map=new mo(i.x,i.y,oe),L.map.texture.name=q.name+".shadowMap",L.camera.updateProjectionMatrix()}n.setRenderTarget(L.map),n.clear();const se=L.getViewportCount();for(let oe=0;oe0||w.map&&w.alphaTest>0){const G=C.uuid,V=w.uuid;let ee=d[G];ee===void 0&&(ee={},d[G]=ee);let I=ee[V];I===void 0&&(I=C.clone(),ee[V]=I),C=I}if(C.visible=w.visible,C.wireframe=w.wireframe,O===Ci?C.side=w.shadowSide!==null?w.shadowSide:w.side:C.side=w.shadowSide!==null?w.shadowSide:_[w.side],C.alphaMap=w.alphaMap,C.alphaTest=w.alphaTest,C.map=w.map,C.clipShadows=w.clipShadows,C.clippingPlanes=w.clippingPlanes,C.clipIntersection=w.clipIntersection,C.displacementMap=w.displacementMap,C.displacementScale=w.displacementScale,C.displacementBias=w.displacementBias,C.wireframeLinewidth=w.wireframeLinewidth,C.linewidth=w.linewidth,A.isPointLight===!0&&C.isMeshDistanceMaterial===!0){const G=n.properties.get(C);G.light=A}return C}function S(R,w,A,O,C){if(R.visible===!1)return;if(R.layers.test(w.layers)&&(R.isMesh||R.isLine||R.isPoints)&&(R.castShadow||R.receiveShadow&&C===Ci)&&(!R.frustumCulled||s.intersectsObject(R))){R.modelViewMatrix.multiplyMatrices(A.matrixWorldInverse,R.matrixWorld);const V=e.update(R),ee=R.material;if(Array.isArray(ee)){const I=V.groups;for(let H=0,q=I.length;H=1):oe.indexOf("OpenGL ES")!==-1&&(se=parseFloat(/^OpenGL ES (\d)/.exec(oe)[1]),W=se>=2);let ye=null,xe={};const le=n.getParameter(n.SCISSOR_BOX),ve=n.getParameter(n.VIEWPORT),Oe=new Wt().fromArray(le),De=new Wt().fromArray(ve);function Q(J,Qe,Ve,Ie){const He=new Uint8Array(4),dt=n.createTexture();n.bindTexture(J,dt),n.texParameteri(J,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(J,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let Nt=0;Nt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new WeakMap;let f;const b=new WeakMap;let y=!1;try{y=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function E(D,N){return y?new OffscreenCanvas(D,N):Zl("canvas")}function v(D,N,K,me){let j=1;if((D.width>me||D.height>me)&&(j=me/Math.max(D.width,D.height)),j<1||N===!0)if(typeof HTMLImageElement<"u"&&D instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&D instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&D instanceof ImageBitmap){const ie=N?vu:Math.floor,Ce=ie(j*D.width),we=ie(j*D.height);f===void 0&&(f=E(Ce,we));const ke=K?E(Ce,we):f;return ke.width=Ce,ke.height=we,ke.getContext("2d").drawImage(D,0,0,Ce,we),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+D.width+"x"+D.height+") to ("+Ce+"x"+we+")."),ke}else return"data"in D&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+D.width+"x"+D.height+")."),D;return D}function S(D){return vb(D.width)&&vb(D.height)}function R(D){return a?!1:D.wrapS!==hs||D.wrapT!==hs||D.minFilter!==gn&&D.minFilter!==Kn}function w(D,N){return D.generateMipmaps&&N&&D.minFilter!==gn&&D.minFilter!==Kn}function A(D){n.generateMipmap(D)}function O(D,N,K,me,j=!1){if(a===!1)return N;if(D!==null){if(n[D]!==void 0)return n[D];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+D+"'")}let ie=N;if(N===n.RED&&(K===n.FLOAT&&(ie=n.R32F),K===n.HALF_FLOAT&&(ie=n.R16F),K===n.UNSIGNED_BYTE&&(ie=n.R8)),N===n.RED_INTEGER&&(K===n.UNSIGNED_BYTE&&(ie=n.R8UI),K===n.UNSIGNED_SHORT&&(ie=n.R16UI),K===n.UNSIGNED_INT&&(ie=n.R32UI),K===n.BYTE&&(ie=n.R8I),K===n.SHORT&&(ie=n.R16I),K===n.INT&&(ie=n.R32I)),N===n.RG&&(K===n.FLOAT&&(ie=n.RG32F),K===n.HALF_FLOAT&&(ie=n.RG16F),K===n.UNSIGNED_BYTE&&(ie=n.RG8)),N===n.RGBA){const Ce=j?gu:Pt.getTransfer(me);K===n.FLOAT&&(ie=n.RGBA32F),K===n.HALF_FLOAT&&(ie=n.RGBA16F),K===n.UNSIGNED_BYTE&&(ie=Ce===jt?n.SRGB8_ALPHA8:n.RGBA8),K===n.UNSIGNED_SHORT_4_4_4_4&&(ie=n.RGBA4),K===n.UNSIGNED_SHORT_5_5_5_1&&(ie=n.RGB5_A1)}return(ie===n.R16F||ie===n.R32F||ie===n.RG16F||ie===n.RG32F||ie===n.RGBA16F||ie===n.RGBA32F)&&e.get("EXT_color_buffer_float"),ie}function C(D,N,K){return w(D,K)===!0||D.isFramebufferTexture&&D.minFilter!==gn&&D.minFilter!==Kn?Math.log2(Math.max(N.width,N.height))+1:D.mipmaps!==void 0&&D.mipmaps.length>0?D.mipmaps.length:D.isCompressedTexture&&Array.isArray(D.image)?N.mipmaps.length:1}function M(D){return D===gn||D===gb||D===kd?n.NEAREST:n.LINEAR}function G(D){const N=D.target;N.removeEventListener("dispose",G),ee(N),N.isVideoTexture&&g.delete(N)}function V(D){const N=D.target;N.removeEventListener("dispose",V),H(N)}function ee(D){const N=s.get(D);if(N.__webglInit===void 0)return;const K=D.source,me=b.get(K);if(me){const j=me[N.__cacheKey];j.usedTimes--,j.usedTimes===0&&I(D),Object.keys(me).length===0&&b.delete(K)}s.remove(D)}function I(D){const N=s.get(D);n.deleteTexture(N.__webglTexture);const K=D.source,me=b.get(K);delete me[N.__cacheKey],o.memory.textures--}function H(D){const N=D.texture,K=s.get(D),me=s.get(N);if(me.__webglTexture!==void 0&&(n.deleteTexture(me.__webglTexture),o.memory.textures--),D.depthTexture&&D.depthTexture.dispose(),D.isWebGLCubeRenderTarget)for(let j=0;j<6;j++){if(Array.isArray(K.__webglFramebuffer[j]))for(let ie=0;ie=c&&console.warn("THREE.WebGLTextures: Trying to use "+D+" texture units while this GPU supports only "+c),q+=1,D}function se(D){const N=[];return N.push(D.wrapS),N.push(D.wrapT),N.push(D.wrapR||0),N.push(D.magFilter),N.push(D.minFilter),N.push(D.anisotropy),N.push(D.internalFormat),N.push(D.format),N.push(D.type),N.push(D.generateMipmaps),N.push(D.premultiplyAlpha),N.push(D.flipY),N.push(D.unpackAlignment),N.push(D.colorSpace),N.join()}function oe(D,N){const K=s.get(D);if(D.isVideoTexture&&Re(D),D.isRenderTargetTexture===!1&&D.version>0&&K.__version!==D.version){const me=D.image;if(me===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(me.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{_e(K,D,N);return}}t.bindTexture(n.TEXTURE_2D,K.__webglTexture,n.TEXTURE0+N)}function ye(D,N){const K=s.get(D);if(D.version>0&&K.__version!==D.version){_e(K,D,N);return}t.bindTexture(n.TEXTURE_2D_ARRAY,K.__webglTexture,n.TEXTURE0+N)}function xe(D,N){const K=s.get(D);if(D.version>0&&K.__version!==D.version){_e(K,D,N);return}t.bindTexture(n.TEXTURE_3D,K.__webglTexture,n.TEXTURE0+N)}function le(D,N){const K=s.get(D);if(D.version>0&&K.__version!==D.version){Ae(K,D,N);return}t.bindTexture(n.TEXTURE_CUBE_MAP,K.__webglTexture,n.TEXTURE0+N)}const ve={[va]:n.REPEAT,[hs]:n.CLAMP_TO_EDGE,[hu]:n.MIRRORED_REPEAT},Oe={[gn]:n.NEAREST,[gb]:n.NEAREST_MIPMAP_NEAREST,[kd]:n.NEAREST_MIPMAP_LINEAR,[Kn]:n.LINEAR,[ON]:n.LINEAR_MIPMAP_NEAREST,[_o]:n.LINEAR_MIPMAP_LINEAR},De={[a0t]:n.NEVER,[f0t]:n.ALWAYS,[l0t]:n.LESS,[zN]:n.LEQUAL,[c0t]:n.EQUAL,[p0t]:n.GEQUAL,[d0t]:n.GREATER,[u0t]:n.NOTEQUAL};function Q(D,N,K){if(K?(n.texParameteri(D,n.TEXTURE_WRAP_S,ve[N.wrapS]),n.texParameteri(D,n.TEXTURE_WRAP_T,ve[N.wrapT]),(D===n.TEXTURE_3D||D===n.TEXTURE_2D_ARRAY)&&n.texParameteri(D,n.TEXTURE_WRAP_R,ve[N.wrapR]),n.texParameteri(D,n.TEXTURE_MAG_FILTER,Oe[N.magFilter]),n.texParameteri(D,n.TEXTURE_MIN_FILTER,Oe[N.minFilter])):(n.texParameteri(D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(D===n.TEXTURE_3D||D===n.TEXTURE_2D_ARRAY)&&n.texParameteri(D,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(N.wrapS!==hs||N.wrapT!==hs)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(D,n.TEXTURE_MAG_FILTER,M(N.magFilter)),n.texParameteri(D,n.TEXTURE_MIN_FILTER,M(N.minFilter)),N.minFilter!==gn&&N.minFilter!==Kn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),N.compareFunction&&(n.texParameteri(D,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(D,n.TEXTURE_COMPARE_FUNC,De[N.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const me=e.get("EXT_texture_filter_anisotropic");if(N.magFilter===gn||N.minFilter!==kd&&N.minFilter!==_o||N.type===Mi&&e.has("OES_texture_float_linear")===!1||a===!1&&N.type===Ql&&e.has("OES_texture_half_float_linear")===!1)return;(N.anisotropy>1||s.get(N).__currentAnisotropy)&&(n.texParameterf(D,me.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(N.anisotropy,i.getMaxAnisotropy())),s.get(N).__currentAnisotropy=N.anisotropy)}}function fe(D,N){let K=!1;D.__webglInit===void 0&&(D.__webglInit=!0,N.addEventListener("dispose",G));const me=N.source;let j=b.get(me);j===void 0&&(j={},b.set(me,j));const ie=se(N);if(ie!==D.__cacheKey){j[ie]===void 0&&(j[ie]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,K=!0),j[ie].usedTimes++;const Ce=j[D.__cacheKey];Ce!==void 0&&(j[D.__cacheKey].usedTimes--,Ce.usedTimes===0&&I(N)),D.__cacheKey=ie,D.__webglTexture=j[ie].texture}return K}function _e(D,N,K){let me=n.TEXTURE_2D;(N.isDataArrayTexture||N.isCompressedArrayTexture)&&(me=n.TEXTURE_2D_ARRAY),N.isData3DTexture&&(me=n.TEXTURE_3D);const j=fe(D,N),ie=N.source;t.bindTexture(me,D.__webglTexture,n.TEXTURE0+K);const Ce=s.get(ie);if(ie.version!==Ce.__version||j===!0){t.activeTexture(n.TEXTURE0+K);const we=Pt.getPrimaries(Pt.workingColorSpace),ke=N.colorSpace===bs?null:Pt.getPrimaries(N.colorSpace),Ke=N.colorSpace===bs||we===ke?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,N.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,N.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,N.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ke);const lt=R(N)&&S(N.image)===!1;let Fe=v(N.image,lt,!1,u);Fe=ge(N,Fe);const Mt=S(Fe)||a,tt=r.convert(N.format,N.colorSpace);let nt=r.convert(N.type),ze=O(N.internalFormat,tt,nt,N.colorSpace,N.isVideoTexture);Q(me,N,Mt);let je;const mt=N.mipmaps,J=a&&N.isVideoTexture!==!0&&ze!==BN,Qe=Ce.__version===void 0||j===!0,Ve=C(N,Fe,Mt);if(N.isDepthTexture)ze=n.DEPTH_COMPONENT,a?N.type===Mi?ze=n.DEPTH_COMPONENT32F:N.type===fr?ze=n.DEPTH_COMPONENT24:N.type===no?ze=n.DEPTH24_STENCIL8:ze=n.DEPTH_COMPONENT16:N.type===Mi&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),N.format===so&&ze===n.DEPTH_COMPONENT&&N.type!==uy&&N.type!==fr&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),N.type=fr,nt=r.convert(N.type)),N.format===Sa&&ze===n.DEPTH_COMPONENT&&(ze=n.DEPTH_STENCIL,N.type!==no&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),N.type=no,nt=r.convert(N.type))),Qe&&(J?t.texStorage2D(n.TEXTURE_2D,1,ze,Fe.width,Fe.height):t.texImage2D(n.TEXTURE_2D,0,ze,Fe.width,Fe.height,0,tt,nt,null));else if(N.isDataTexture)if(mt.length>0&&Mt){J&&Qe&&t.texStorage2D(n.TEXTURE_2D,Ve,ze,mt[0].width,mt[0].height);for(let Ie=0,He=mt.length;Ie>=1,He>>=1}}else if(mt.length>0&&Mt){J&&Qe&&t.texStorage2D(n.TEXTURE_2D,Ve,ze,mt[0].width,mt[0].height);for(let Ie=0,He=mt.length;Ie0&&Qe++,t.texStorage2D(n.TEXTURE_CUBE_MAP,Qe,je,Fe[0].width,Fe[0].height));for(let Ie=0;Ie<6;Ie++)if(lt){mt?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0,0,0,Fe[Ie].width,Fe[Ie].height,nt,ze,Fe[Ie].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0,je,Fe[Ie].width,Fe[Ie].height,0,nt,ze,Fe[Ie].data);for(let He=0;He>ie),Fe=Math.max(1,N.height>>ie);j===n.TEXTURE_3D||j===n.TEXTURE_2D_ARRAY?t.texImage3D(j,ie,ke,lt,Fe,N.depth,0,Ce,we,null):t.texImage2D(j,ie,ke,lt,Fe,0,Ce,we,null)}t.bindFramebuffer(n.FRAMEBUFFER,D),Me(N)?m.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,me,j,s.get(K).__webglTexture,0,ae(N)):(j===n.TEXTURE_2D||j>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&j<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,me,j,s.get(K).__webglTexture,ie),t.bindFramebuffer(n.FRAMEBUFFER,null)}function ne(D,N,K){if(n.bindRenderbuffer(n.RENDERBUFFER,D),N.depthBuffer&&!N.stencilBuffer){let me=a===!0?n.DEPTH_COMPONENT24:n.DEPTH_COMPONENT16;if(K||Me(N)){const j=N.depthTexture;j&&j.isDepthTexture&&(j.type===Mi?me=n.DEPTH_COMPONENT32F:j.type===fr&&(me=n.DEPTH_COMPONENT24));const ie=ae(N);Me(N)?m.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,ie,me,N.width,N.height):n.renderbufferStorageMultisample(n.RENDERBUFFER,ie,me,N.width,N.height)}else n.renderbufferStorage(n.RENDERBUFFER,me,N.width,N.height);n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,D)}else if(N.depthBuffer&&N.stencilBuffer){const me=ae(N);K&&Me(N)===!1?n.renderbufferStorageMultisample(n.RENDERBUFFER,me,n.DEPTH24_STENCIL8,N.width,N.height):Me(N)?m.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,me,n.DEPTH24_STENCIL8,N.width,N.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,N.width,N.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,D)}else{const me=N.isWebGLMultipleRenderTargets===!0?N.texture:[N.texture];for(let j=0;j0){K.__webglFramebuffer[we]=[];for(let ke=0;ke0){K.__webglFramebuffer=[];for(let we=0;we0&&Me(D)===!1){const we=ie?N:[N];K.__webglMultisampledFramebuffer=n.createFramebuffer(),K.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,K.__webglMultisampledFramebuffer);for(let ke=0;ke0)for(let ke=0;ke0)for(let ke=0;ke0&&Me(D)===!1){const N=D.isWebGLMultipleRenderTargets?D.texture:[D.texture],K=D.width,me=D.height;let j=n.COLOR_BUFFER_BIT;const ie=[],Ce=D.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,we=s.get(D),ke=D.isWebGLMultipleRenderTargets===!0;if(ke)for(let Ke=0;Ke0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&N.__useRenderToTexture!==!1}function Re(D){const N=o.render.frame;g.get(D)!==N&&(g.set(D,N),D.update())}function ge(D,N){const K=D.colorSpace,me=D.format,j=D.type;return D.isCompressedTexture===!0||D.isVideoTexture===!0||D.format===Eb||K!==Cn&&K!==bs&&(Pt.getTransfer(K)===jt?a===!1?e.has("EXT_sRGB")===!0&&me===gs?(D.format=Eb,D.minFilter=Kn,D.generateMipmaps=!1):N=qN.sRGBToLinear(N):(me!==gs||j!==br)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",K)),N}this.allocateTextureUnit=W,this.resetTextureUnits=L,this.setTexture2D=oe,this.setTexture2DArray=ye,this.setTexture3D=xe,this.setTextureCube=le,this.rebindTextures=Z,this.setupRenderTarget=ce,this.updateRenderTargetMipmap=pe,this.updateMultisampleRenderTarget=he,this.setupDepthRenderbuffer=P,this.setupFrameBufferTexture=Be,this.useMultisampledRTT=Me}function R1t(n,e,t){const s=t.isWebGL2;function i(r,o=bs){let a;const c=Pt.getTransfer(o);if(r===br)return n.UNSIGNED_BYTE;if(r===DN)return n.UNSIGNED_SHORT_4_4_4_4;if(r===LN)return n.UNSIGNED_SHORT_5_5_5_1;if(r===Kbt)return n.BYTE;if(r===jbt)return n.SHORT;if(r===uy)return n.UNSIGNED_SHORT;if(r===kN)return n.INT;if(r===fr)return n.UNSIGNED_INT;if(r===Mi)return n.FLOAT;if(r===Ql)return s?n.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(r===Qbt)return n.ALPHA;if(r===gs)return n.RGBA;if(r===Xbt)return n.LUMINANCE;if(r===Zbt)return n.LUMINANCE_ALPHA;if(r===so)return n.DEPTH_COMPONENT;if(r===Sa)return n.DEPTH_STENCIL;if(r===Eb)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(r===Jbt)return n.RED;if(r===PN)return n.RED_INTEGER;if(r===e0t)return n.RG;if(r===FN)return n.RG_INTEGER;if(r===UN)return n.RGBA_INTEGER;if(r===qh||r===Yh||r===$h||r===Wh)if(c===jt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(r===qh)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(r===Yh)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(r===$h)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(r===Wh)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(r===qh)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(r===Yh)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(r===$h)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(r===Wh)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(r===fC||r===_C||r===mC||r===hC)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(r===fC)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(r===_C)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(r===mC)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(r===hC)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(r===BN)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(r===gC||r===bC)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(r===gC)return c===jt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(r===bC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(r===yC||r===EC||r===vC||r===SC||r===TC||r===xC||r===CC||r===wC||r===RC||r===AC||r===MC||r===NC||r===IC||r===OC)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(r===yC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(r===EC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(r===vC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(r===SC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(r===TC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(r===xC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(r===CC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(r===wC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(r===RC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(r===AC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(r===MC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(r===NC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(r===IC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(r===OC)return c===jt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(r===Kh||r===kC||r===DC)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(r===Kh)return c===jt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(r===kC)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(r===DC)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(r===t0t||r===LC||r===PC||r===FC)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(r===Kh)return a.COMPRESSED_RED_RGTC1_EXT;if(r===LC)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(r===PC)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(r===FC)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return r===no?s?n.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[r]!==void 0?n[r]:null}return{convert:i}}class A1t extends Gn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class jr extends Jt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const M1t={type:"move"};class bg{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new jr,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new jr,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new re,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new re),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new jr,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new re,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new re),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const s of e.hand.values())this._getHandJoint(t,s)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,s){let i=null,r=null,o=null;const a=this._targetRay,c=this._grip,d=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(d&&e.hand){o=!0;for(const f of e.hand.values()){const b=t.getJointPose(f,s),y=this._getHandJoint(d,f);b!==null&&(y.matrix.fromArray(b.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.matrixWorldNeedsUpdate=!0,y.jointRadius=b.radius),y.visible=b!==null}const u=d.joints["index-finger-tip"],_=d.joints["thumb-tip"],m=u.position.distanceTo(_.position),h=.02,g=.005;d.inputState.pinching&&m>h+g?(d.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!d.inputState.pinching&&m<=h-g&&(d.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,s),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1));a!==null&&(i=t.getPose(e.targetRaySpace,s),i===null&&r!==null&&(i=r),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(M1t)))}return a!==null&&(a.visible=i!==null),c!==null&&(c.visible=r!==null),d!==null&&(d.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const s=new jr;s.matrixAutoUpdate=!1,s.visible=!1,e.joints[t.jointName]=s,e.add(s)}return e.joints[t.jointName]}}class N1t extends Ha{constructor(e,t){super();const s=this;let i=null,r=1,o=null,a="local-floor",c=1,d=null,u=null,_=null,m=null,h=null,g=null;const f=t.getContextAttributes();let b=null,y=null;const E=[],v=[],S=new Rt;let R=null;const w=new Gn;w.layers.enable(1),w.viewport=new Wt;const A=new Gn;A.layers.enable(2),A.viewport=new Wt;const O=[w,A],C=new A1t;C.layers.enable(1),C.layers.enable(2);let M=null,G=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(le){let ve=E[le];return ve===void 0&&(ve=new bg,E[le]=ve),ve.getTargetRaySpace()},this.getControllerGrip=function(le){let ve=E[le];return ve===void 0&&(ve=new bg,E[le]=ve),ve.getGripSpace()},this.getHand=function(le){let ve=E[le];return ve===void 0&&(ve=new bg,E[le]=ve),ve.getHandSpace()};function V(le){const ve=v.indexOf(le.inputSource);if(ve===-1)return;const Oe=E[ve];Oe!==void 0&&(Oe.update(le.inputSource,le.frame,d||o),Oe.dispatchEvent({type:le.type,data:le.inputSource}))}function ee(){i.removeEventListener("select",V),i.removeEventListener("selectstart",V),i.removeEventListener("selectend",V),i.removeEventListener("squeeze",V),i.removeEventListener("squeezestart",V),i.removeEventListener("squeezeend",V),i.removeEventListener("end",ee),i.removeEventListener("inputsourceschange",I);for(let le=0;le=0&&(v[De]=null,E[De].disconnect(Oe))}for(let ve=0;ve=v.length){v.push(Oe),De=fe;break}else if(v[fe]===null){v[fe]=Oe,De=fe;break}if(De===-1)break}const Q=E[De];Q&&Q.connect(Oe)}}const H=new re,q=new re;function L(le,ve,Oe){H.setFromMatrixPosition(ve.matrixWorld),q.setFromMatrixPosition(Oe.matrixWorld);const De=H.distanceTo(q),Q=ve.projectionMatrix.elements,fe=Oe.projectionMatrix.elements,_e=Q[14]/(Q[10]-1),Ae=Q[14]/(Q[10]+1),Be=(Q[9]+1)/Q[5],ne=(Q[9]-1)/Q[5],U=(Q[8]-1)/Q[0],P=(fe[8]+1)/fe[0],Z=_e*U,ce=_e*P,pe=De/(-U+P),he=pe*-U;ve.matrixWorld.decompose(le.position,le.quaternion,le.scale),le.translateX(he),le.translateZ(pe),le.matrixWorld.compose(le.position,le.quaternion,le.scale),le.matrixWorldInverse.copy(le.matrixWorld).invert();const ae=_e+pe,Me=Ae+pe,Re=Z-he,ge=ce+(De-he),D=Be*Ae/Me*ae,N=ne*Ae/Me*ae;le.projectionMatrix.makePerspective(Re,ge,D,N,ae,Me),le.projectionMatrixInverse.copy(le.projectionMatrix).invert()}function W(le,ve){ve===null?le.matrixWorld.copy(le.matrix):le.matrixWorld.multiplyMatrices(ve.matrixWorld,le.matrix),le.matrixWorldInverse.copy(le.matrixWorld).invert()}this.updateCamera=function(le){if(i===null)return;C.near=A.near=w.near=le.near,C.far=A.far=w.far=le.far,(M!==C.near||G!==C.far)&&(i.updateRenderState({depthNear:C.near,depthFar:C.far}),M=C.near,G=C.far);const ve=le.parent,Oe=C.cameras;W(C,ve);for(let De=0;De0&&(b.alphaTest.value=y.alphaTest);const E=e.get(y).envMap;if(E&&(b.envMap.value=E,b.flipEnvMap.value=E.isCubeTexture&&E.isRenderTargetTexture===!1?-1:1,b.reflectivity.value=y.reflectivity,b.ior.value=y.ior,b.refractionRatio.value=y.refractionRatio),y.lightMap){b.lightMap.value=y.lightMap;const v=n._useLegacyLights===!0?Math.PI:1;b.lightMapIntensity.value=y.lightMapIntensity*v,t(y.lightMap,b.lightMapTransform)}y.aoMap&&(b.aoMap.value=y.aoMap,b.aoMapIntensity.value=y.aoMapIntensity,t(y.aoMap,b.aoMapTransform))}function o(b,y){b.diffuse.value.copy(y.color),b.opacity.value=y.opacity,y.map&&(b.map.value=y.map,t(y.map,b.mapTransform))}function a(b,y){b.dashSize.value=y.dashSize,b.totalSize.value=y.dashSize+y.gapSize,b.scale.value=y.scale}function c(b,y,E,v){b.diffuse.value.copy(y.color),b.opacity.value=y.opacity,b.size.value=y.size*E,b.scale.value=v*.5,y.map&&(b.map.value=y.map,t(y.map,b.uvTransform)),y.alphaMap&&(b.alphaMap.value=y.alphaMap,t(y.alphaMap,b.alphaMapTransform)),y.alphaTest>0&&(b.alphaTest.value=y.alphaTest)}function d(b,y){b.diffuse.value.copy(y.color),b.opacity.value=y.opacity,b.rotation.value=y.rotation,y.map&&(b.map.value=y.map,t(y.map,b.mapTransform)),y.alphaMap&&(b.alphaMap.value=y.alphaMap,t(y.alphaMap,b.alphaMapTransform)),y.alphaTest>0&&(b.alphaTest.value=y.alphaTest)}function u(b,y){b.specular.value.copy(y.specular),b.shininess.value=Math.max(y.shininess,1e-4)}function _(b,y){y.gradientMap&&(b.gradientMap.value=y.gradientMap)}function m(b,y){b.metalness.value=y.metalness,y.metalnessMap&&(b.metalnessMap.value=y.metalnessMap,t(y.metalnessMap,b.metalnessMapTransform)),b.roughness.value=y.roughness,y.roughnessMap&&(b.roughnessMap.value=y.roughnessMap,t(y.roughnessMap,b.roughnessMapTransform)),e.get(y).envMap&&(b.envMapIntensity.value=y.envMapIntensity)}function h(b,y,E){b.ior.value=y.ior,y.sheen>0&&(b.sheenColor.value.copy(y.sheenColor).multiplyScalar(y.sheen),b.sheenRoughness.value=y.sheenRoughness,y.sheenColorMap&&(b.sheenColorMap.value=y.sheenColorMap,t(y.sheenColorMap,b.sheenColorMapTransform)),y.sheenRoughnessMap&&(b.sheenRoughnessMap.value=y.sheenRoughnessMap,t(y.sheenRoughnessMap,b.sheenRoughnessMapTransform))),y.clearcoat>0&&(b.clearcoat.value=y.clearcoat,b.clearcoatRoughness.value=y.clearcoatRoughness,y.clearcoatMap&&(b.clearcoatMap.value=y.clearcoatMap,t(y.clearcoatMap,b.clearcoatMapTransform)),y.clearcoatRoughnessMap&&(b.clearcoatRoughnessMap.value=y.clearcoatRoughnessMap,t(y.clearcoatRoughnessMap,b.clearcoatRoughnessMapTransform)),y.clearcoatNormalMap&&(b.clearcoatNormalMap.value=y.clearcoatNormalMap,t(y.clearcoatNormalMap,b.clearcoatNormalMapTransform),b.clearcoatNormalScale.value.copy(y.clearcoatNormalScale),y.side===Jn&&b.clearcoatNormalScale.value.negate())),y.iridescence>0&&(b.iridescence.value=y.iridescence,b.iridescenceIOR.value=y.iridescenceIOR,b.iridescenceThicknessMinimum.value=y.iridescenceThicknessRange[0],b.iridescenceThicknessMaximum.value=y.iridescenceThicknessRange[1],y.iridescenceMap&&(b.iridescenceMap.value=y.iridescenceMap,t(y.iridescenceMap,b.iridescenceMapTransform)),y.iridescenceThicknessMap&&(b.iridescenceThicknessMap.value=y.iridescenceThicknessMap,t(y.iridescenceThicknessMap,b.iridescenceThicknessMapTransform))),y.transmission>0&&(b.transmission.value=y.transmission,b.transmissionSamplerMap.value=E.texture,b.transmissionSamplerSize.value.set(E.width,E.height),y.transmissionMap&&(b.transmissionMap.value=y.transmissionMap,t(y.transmissionMap,b.transmissionMapTransform)),b.thickness.value=y.thickness,y.thicknessMap&&(b.thicknessMap.value=y.thicknessMap,t(y.thicknessMap,b.thicknessMapTransform)),b.attenuationDistance.value=y.attenuationDistance,b.attenuationColor.value.copy(y.attenuationColor)),y.anisotropy>0&&(b.anisotropyVector.value.set(y.anisotropy*Math.cos(y.anisotropyRotation),y.anisotropy*Math.sin(y.anisotropyRotation)),y.anisotropyMap&&(b.anisotropyMap.value=y.anisotropyMap,t(y.anisotropyMap,b.anisotropyMapTransform))),b.specularIntensity.value=y.specularIntensity,b.specularColor.value.copy(y.specularColor),y.specularColorMap&&(b.specularColorMap.value=y.specularColorMap,t(y.specularColorMap,b.specularColorMapTransform)),y.specularIntensityMap&&(b.specularIntensityMap.value=y.specularIntensityMap,t(y.specularIntensityMap,b.specularIntensityMapTransform))}function g(b,y){y.matcap&&(b.matcap.value=y.matcap)}function f(b,y){const E=e.get(y).light;b.referencePosition.value.setFromMatrixPosition(E.matrixWorld),b.nearDistance.value=E.shadow.camera.near,b.farDistance.value=E.shadow.camera.far}return{refreshFogUniforms:s,refreshMaterialUniforms:i}}function O1t(n,e,t,s){let i={},r={},o=[];const a=t.isWebGL2?n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS):0;function c(E,v){const S=v.program;s.uniformBlockBinding(E,S)}function d(E,v){let S=i[E.id];S===void 0&&(g(E),S=u(E),i[E.id]=S,E.addEventListener("dispose",b));const R=v.program;s.updateUBOMapping(E,R);const w=e.render.frame;r[E.id]!==w&&(m(E),r[E.id]=w)}function u(E){const v=_();E.__bindingPointIndex=v;const S=n.createBuffer(),R=E.__size,w=E.usage;return n.bindBuffer(n.UNIFORM_BUFFER,S),n.bufferData(n.UNIFORM_BUFFER,R,w),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,v,S),S}function _(){for(let E=0;E0){w=S%R;const V=R-w;w!==0&&V-M.boundary<0&&(S+=R-w,C.__offset=S)}S+=M.storage}return w=S%R,w>0&&(S+=R-w),E.__size=S,E.__cache={},this}function f(E){const v={boundary:0,storage:0};return typeof E=="number"?(v.boundary=4,v.storage=4):E.isVector2?(v.boundary=8,v.storage=8):E.isVector3||E.isColor?(v.boundary=16,v.storage=12):E.isVector4?(v.boundary=16,v.storage=16):E.isMatrix3?(v.boundary=48,v.storage=48):E.isMatrix4?(v.boundary=64,v.storage=64):E.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",E),v}function b(E){const v=E.target;v.removeEventListener("dispose",b);const S=o.indexOf(v.__bindingPointIndex);o.splice(S,1),n.deleteBuffer(i[v.id]),delete i[v.id],delete r[v.id]}function y(){for(const E in i)n.deleteBuffer(i[E]);o=[],i={},r={}}return{bind:c,update:d,dispose:y}}class aI{constructor(e={}){const{canvas:t=M0t(),context:s=null,depth:i=!0,stencil:r=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:c=!0,preserveDrawingBuffer:d=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:_=!1}=e;this.isWebGLRenderer=!0;let m;s!==null?m=s.getContextAttributes().alpha:m=o;const h=new Uint32Array(4),g=new Int32Array(4);let f=null,b=null;const y=[],E=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=nn,this._useLegacyLights=!1,this.toneMapping=gr,this.toneMappingExposure=1;const v=this;let S=!1,R=0,w=0,A=null,O=-1,C=null;const M=new Wt,G=new Wt;let V=null;const ee=new pt(0);let I=0,H=t.width,q=t.height,L=1,W=null,se=null;const oe=new Wt(0,0,H,q),ye=new Wt(0,0,H,q);let xe=!1;const le=new my;let ve=!1,Oe=!1,De=null;const Q=new xt,fe=new Rt,_e=new re,Ae={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Be(){return A===null?L:1}let ne=s;function U(F,de){for(let Ee=0;Ee{function Xe(){if(Se.forEach(function(it){he.get(it).currentProgram.isReady()&&Se.delete(it)}),Se.size===0){be(F);return}setTimeout(Xe,10)}P.get("KHR_parallel_shader_compile")!==null?Xe():setTimeout(Xe,10)})};let Nt=null;function dn(F){Nt&&Nt(F)}function wn(){Rn.stop()}function qt(){Rn.start()}const Rn=new eI;Rn.setAnimationLoop(dn),typeof self<"u"&&Rn.setContext(self),this.setAnimationLoop=function(F){Nt=F,je.setAnimationLoop(F),F===null?Rn.stop():Rn.start()},je.addEventListener("sessionstart",wn),je.addEventListener("sessionend",qt),this.render=function(F,de){if(de!==void 0&&de.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(S===!0)return;F.matrixWorldAutoUpdate===!0&&F.updateMatrixWorld(),de.parent===null&&de.matrixWorldAutoUpdate===!0&&de.updateMatrixWorld(),je.enabled===!0&&je.isPresenting===!0&&(je.cameraAutoUpdate===!0&&je.updateCamera(de),de=je.getCamera()),F.isScene===!0&&F.onBeforeRender(v,F,de,A),b=ie.get(F,E.length),b.init(),E.push(b),Q.multiplyMatrices(de.projectionMatrix,de.matrixWorldInverse),le.setFromProjectionMatrix(Q),Oe=this.localClippingEnabled,ve=Ce.init(this.clippingPlanes,Oe),f=j.get(F,y.length),f.init(),y.push(f),Is(F,de,0,v.sortObjects),f.finish(),v.sortObjects===!0&&f.sort(W,se),this.info.render.frame++,ve===!0&&Ce.beginShadows();const Ee=b.state.shadowsArray;if(we.render(Ee,F,de),ve===!0&&Ce.endShadows(),this.info.autoReset===!0&&this.info.reset(),ke.render(f,F),b.setupLights(v._useLegacyLights),de.isArrayCamera){const Se=de.cameras;for(let be=0,Xe=Se.length;be0?b=E[E.length-1]:b=null,y.pop(),y.length>0?f=y[y.length-1]:f=null};function Is(F,de,Ee,Se){if(F.visible===!1)return;if(F.layers.test(de.layers)){if(F.isGroup)Ee=F.renderOrder;else if(F.isLOD)F.autoUpdate===!0&&F.update(de);else if(F.isLight)b.pushLight(F),F.castShadow&&b.pushShadow(F);else if(F.isSprite){if(!F.frustumCulled||le.intersectsSprite(F)){Se&&_e.setFromMatrixPosition(F.matrixWorld).applyMatrix4(Q);const it=N.update(F),ct=F.material;ct.visible&&f.push(F,it,ct,Ee,_e.z,null)}}else if((F.isMesh||F.isLine||F.isPoints)&&(!F.frustumCulled||le.intersectsObject(F))){const it=N.update(F),ct=F.material;if(Se&&(F.boundingSphere!==void 0?(F.boundingSphere===null&&F.computeBoundingSphere(),_e.copy(F.boundingSphere.center)):(it.boundingSphere===null&&it.computeBoundingSphere(),_e.copy(it.boundingSphere.center)),_e.applyMatrix4(F.matrixWorld).applyMatrix4(Q)),Array.isArray(ct)){const ut=it.groups;for(let Et=0,ht=ut.length;Et0&&ky(be,Xe,de,Ee),Se&&ce.viewport(M.copy(Se)),be.length>0&&ja(be,de,Ee),Xe.length>0&&ja(Xe,de,Ee),it.length>0&&ja(it,de,Ee),ce.buffers.depth.setTest(!0),ce.buffers.depth.setMask(!0),ce.buffers.color.setMask(!0),ce.setPolygonOffset(!1)}function ky(F,de,Ee,Se){if((Ee.isScene===!0?Ee.overrideMaterial:null)!==null)return;const Xe=Z.isWebGL2;De===null&&(De=new mo(1,1,{generateMipmaps:!0,type:P.has("EXT_color_buffer_half_float")?Ql:br,minFilter:_o,samples:Xe?4:0})),v.getDrawingBufferSize(fe),Xe?De.setSize(fe.x,fe.y):De.setSize(vu(fe.x),vu(fe.y));const it=v.getRenderTarget();v.setRenderTarget(De),v.getClearColor(ee),I=v.getClearAlpha(),I<1&&v.setClearColor(16777215,.5),v.clear();const ct=v.toneMapping;v.toneMapping=gr,ja(F,Ee,Se),ae.updateMultisampleRenderTarget(De),ae.updateRenderTargetMipmap(De);let ut=!1;for(let Et=0,ht=de.length;Et0),gt=!!Ee.morphAttributes.position,tn=!!Ee.morphAttributes.normal,Yn=!!Ee.morphAttributes.color;let un=gr;Se.toneMapped&&(A===null||A.isXRRenderTarget===!0)&&(un=v.toneMapping);const Ks=Ee.morphAttributes.position||Ee.morphAttributes.normal||Ee.morphAttributes.color,Qt=Ks!==void 0?Ks.length:0,St=he.get(Se),hc=b.state.lights;if(ve===!0&&(Oe===!0||F!==C)){const ts=F===C&&Se.id===O;Ce.setState(Se,F,ts)}let Zt=!1;Se.version===St.__version?(St.needsLights&&St.lightsStateVersion!==hc.state.version||St.outputColorSpace!==ct||be.isBatchedMesh&&St.batching===!1||!be.isBatchedMesh&&St.batching===!0||be.isInstancedMesh&&St.instancing===!1||!be.isInstancedMesh&&St.instancing===!0||be.isSkinnedMesh&&St.skinning===!1||!be.isSkinnedMesh&&St.skinning===!0||be.isInstancedMesh&&St.instancingColor===!0&&be.instanceColor===null||be.isInstancedMesh&&St.instancingColor===!1&&be.instanceColor!==null||St.envMap!==ut||Se.fog===!0&&St.fog!==Xe||St.numClippingPlanes!==void 0&&(St.numClippingPlanes!==Ce.numPlanes||St.numIntersection!==Ce.numIntersection)||St.vertexAlphas!==Et||St.vertexTangents!==ht||St.morphTargets!==gt||St.morphNormals!==tn||St.morphColors!==Yn||St.toneMapping!==un||Z.isWebGL2===!0&&St.morphTargetsCount!==Qt)&&(Zt=!0):(Zt=!0,St.__version=Se.version);let zi=St.currentProgram;Zt===!0&&(zi=Qa(Se,de,be));let Cp=!1,vo=!1,gc=!1;const yn=zi.getUniforms(),Hi=St.uniforms;if(ce.useProgram(zi.program)&&(Cp=!0,vo=!0,gc=!0),Se.id!==O&&(O=Se.id,vo=!0),Cp||C!==F){yn.setValue(ne,"projectionMatrix",F.projectionMatrix),yn.setValue(ne,"viewMatrix",F.matrixWorldInverse);const ts=yn.map.cameraPosition;ts!==void 0&&ts.setValue(ne,_e.setFromMatrixPosition(F.matrixWorld)),Z.logarithmicDepthBuffer&&yn.setValue(ne,"logDepthBufFC",2/(Math.log(F.far+1)/Math.LN2)),(Se.isMeshPhongMaterial||Se.isMeshToonMaterial||Se.isMeshLambertMaterial||Se.isMeshBasicMaterial||Se.isMeshStandardMaterial||Se.isShaderMaterial)&&yn.setValue(ne,"isOrthographic",F.isOrthographicCamera===!0),C!==F&&(C=F,vo=!0,gc=!0)}if(be.isSkinnedMesh){yn.setOptional(ne,be,"bindMatrix"),yn.setOptional(ne,be,"bindMatrixInverse");const ts=be.skeleton;ts&&(Z.floatVertexTextures?(ts.boneTexture===null&&ts.computeBoneTexture(),yn.setValue(ne,"boneTexture",ts.boneTexture,ae)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}be.isBatchedMesh&&(yn.setOptional(ne,be,"batchingTexture"),yn.setValue(ne,"batchingTexture",be._matricesTexture,ae));const bc=Ee.morphAttributes;if((bc.position!==void 0||bc.normal!==void 0||bc.color!==void 0&&Z.isWebGL2===!0)&&Ke.update(be,Ee,zi),(vo||St.receiveShadow!==be.receiveShadow)&&(St.receiveShadow=be.receiveShadow,yn.setValue(ne,"receiveShadow",be.receiveShadow)),Se.isMeshGouraudMaterial&&Se.envMap!==null&&(Hi.envMap.value=ut,Hi.flipEnvMap.value=ut.isCubeTexture&&ut.isRenderTargetTexture===!1?-1:1),vo&&(yn.setValue(ne,"toneMappingExposure",v.toneMappingExposure),St.needsLights&&Ly(Hi,gc),Xe&&Se.fog===!0&&me.refreshFogUniforms(Hi,Xe),me.refreshMaterialUniforms(Hi,Se,L,q,De),Dd.upload(ne,Tp(St),Hi,ae)),Se.isShaderMaterial&&Se.uniformsNeedUpdate===!0&&(Dd.upload(ne,Tp(St),Hi,ae),Se.uniformsNeedUpdate=!1),Se.isSpriteMaterial&&yn.setValue(ne,"center",be.center),yn.setValue(ne,"modelViewMatrix",be.modelViewMatrix),yn.setValue(ne,"normalMatrix",be.normalMatrix),yn.setValue(ne,"modelMatrix",be.matrixWorld),Se.isShaderMaterial||Se.isRawShaderMaterial){const ts=Se.uniformsGroups;for(let yc=0,Fy=ts.length;yc0&&ae.useMultisampledRTT(F)===!1?be=he.get(F).__webglMultisampledFramebuffer:Array.isArray(ht)?be=ht[Ee]:be=ht,M.copy(F.viewport),G.copy(F.scissor),V=F.scissorTest}else M.copy(oe).multiplyScalar(L).floor(),G.copy(ye).multiplyScalar(L).floor(),V=xe;if(ce.bindFramebuffer(ne.FRAMEBUFFER,be)&&Z.drawBuffers&&Se&&ce.drawBuffers(F,be),ce.viewport(M),ce.scissor(G),ce.setScissorTest(V),Xe){const ut=he.get(F.texture);ne.framebufferTexture2D(ne.FRAMEBUFFER,ne.COLOR_ATTACHMENT0,ne.TEXTURE_CUBE_MAP_POSITIVE_X+de,ut.__webglTexture,Ee)}else if(it){const ut=he.get(F.texture),Et=de||0;ne.framebufferTextureLayer(ne.FRAMEBUFFER,ne.COLOR_ATTACHMENT0,ut.__webglTexture,Ee||0,Et)}O=-1},this.readRenderTargetPixels=function(F,de,Ee,Se,be,Xe,it){if(!(F&&F.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ct=he.get(F).__webglFramebuffer;if(F.isWebGLCubeRenderTarget&&it!==void 0&&(ct=ct[it]),ct){ce.bindFramebuffer(ne.FRAMEBUFFER,ct);try{const ut=F.texture,Et=ut.format,ht=ut.type;if(Et!==gs&&Mt.convert(Et)!==ne.getParameter(ne.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const gt=ht===Ql&&(P.has("EXT_color_buffer_half_float")||Z.isWebGL2&&P.has("EXT_color_buffer_float"));if(ht!==br&&Mt.convert(ht)!==ne.getParameter(ne.IMPLEMENTATION_COLOR_READ_TYPE)&&!(ht===Mi&&(Z.isWebGL2||P.has("OES_texture_float")||P.has("WEBGL_color_buffer_float")))&&!gt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}de>=0&&de<=F.width-Se&&Ee>=0&&Ee<=F.height-be&&ne.readPixels(de,Ee,Se,be,Mt.convert(Et),Mt.convert(ht),Xe)}finally{const ut=A!==null?he.get(A).__webglFramebuffer:null;ce.bindFramebuffer(ne.FRAMEBUFFER,ut)}}},this.copyFramebufferToTexture=function(F,de,Ee=0){const Se=Math.pow(2,-Ee),be=Math.floor(de.image.width*Se),Xe=Math.floor(de.image.height*Se);ae.setTexture2D(de,0),ne.copyTexSubImage2D(ne.TEXTURE_2D,Ee,0,0,F.x,F.y,be,Xe),ce.unbindTexture()},this.copyTextureToTexture=function(F,de,Ee,Se=0){const be=de.image.width,Xe=de.image.height,it=Mt.convert(Ee.format),ct=Mt.convert(Ee.type);ae.setTexture2D(Ee,0),ne.pixelStorei(ne.UNPACK_FLIP_Y_WEBGL,Ee.flipY),ne.pixelStorei(ne.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ee.premultiplyAlpha),ne.pixelStorei(ne.UNPACK_ALIGNMENT,Ee.unpackAlignment),de.isDataTexture?ne.texSubImage2D(ne.TEXTURE_2D,Se,F.x,F.y,be,Xe,it,ct,de.image.data):de.isCompressedTexture?ne.compressedTexSubImage2D(ne.TEXTURE_2D,Se,F.x,F.y,de.mipmaps[0].width,de.mipmaps[0].height,it,de.mipmaps[0].data):ne.texSubImage2D(ne.TEXTURE_2D,Se,F.x,F.y,it,ct,de.image),Se===0&&Ee.generateMipmaps&&ne.generateMipmap(ne.TEXTURE_2D),ce.unbindTexture()},this.copyTextureToTexture3D=function(F,de,Ee,Se,be=0){if(v.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Xe=F.max.x-F.min.x+1,it=F.max.y-F.min.y+1,ct=F.max.z-F.min.z+1,ut=Mt.convert(Se.format),Et=Mt.convert(Se.type);let ht;if(Se.isData3DTexture)ae.setTexture3D(Se,0),ht=ne.TEXTURE_3D;else if(Se.isDataArrayTexture)ae.setTexture2DArray(Se,0),ht=ne.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}ne.pixelStorei(ne.UNPACK_FLIP_Y_WEBGL,Se.flipY),ne.pixelStorei(ne.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Se.premultiplyAlpha),ne.pixelStorei(ne.UNPACK_ALIGNMENT,Se.unpackAlignment);const gt=ne.getParameter(ne.UNPACK_ROW_LENGTH),tn=ne.getParameter(ne.UNPACK_IMAGE_HEIGHT),Yn=ne.getParameter(ne.UNPACK_SKIP_PIXELS),un=ne.getParameter(ne.UNPACK_SKIP_ROWS),Ks=ne.getParameter(ne.UNPACK_SKIP_IMAGES),Qt=Ee.isCompressedTexture?Ee.mipmaps[0]:Ee.image;ne.pixelStorei(ne.UNPACK_ROW_LENGTH,Qt.width),ne.pixelStorei(ne.UNPACK_IMAGE_HEIGHT,Qt.height),ne.pixelStorei(ne.UNPACK_SKIP_PIXELS,F.min.x),ne.pixelStorei(ne.UNPACK_SKIP_ROWS,F.min.y),ne.pixelStorei(ne.UNPACK_SKIP_IMAGES,F.min.z),Ee.isDataTexture||Ee.isData3DTexture?ne.texSubImage3D(ht,be,de.x,de.y,de.z,Xe,it,ct,ut,Et,Qt.data):Ee.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ne.compressedTexSubImage3D(ht,be,de.x,de.y,de.z,Xe,it,ct,ut,Qt.data)):ne.texSubImage3D(ht,be,de.x,de.y,de.z,Xe,it,ct,ut,Et,Qt),ne.pixelStorei(ne.UNPACK_ROW_LENGTH,gt),ne.pixelStorei(ne.UNPACK_IMAGE_HEIGHT,tn),ne.pixelStorei(ne.UNPACK_SKIP_PIXELS,Yn),ne.pixelStorei(ne.UNPACK_SKIP_ROWS,un),ne.pixelStorei(ne.UNPACK_SKIP_IMAGES,Ks),be===0&&Se.generateMipmaps&&ne.generateMipmap(ht),ce.unbindTexture()},this.initTexture=function(F){F.isCubeTexture?ae.setTextureCube(F,0):F.isData3DTexture?ae.setTexture3D(F,0):F.isDataArrayTexture||F.isCompressedArrayTexture?ae.setTexture2DArray(F,0):ae.setTexture2D(F,0),ce.unbindTexture()},this.resetState=function(){R=0,w=0,A=null,ce.reset(),tt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Ni}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===fy?"display-p3":"srgb",t.unpackColorSpace=Pt.workingColorSpace===_p?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===nn?io:VN}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===io?nn:Cn}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class k1t extends aI{}k1t.prototype.isWebGL1Renderer=!0;class D1t extends Jt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class L1t{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=yb,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Vs()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn('THREE.InterleavedBuffer: "updateRange" is deprecated and removed in r169. Use "addUpdateRange()" instead.'),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,s){e*=this.stride,s*=t.stride;for(let i=0,r=this.stride;ic)continue;m.applyMatrix4(this.matrixWorld);const O=e.ray.origin.distanceTo(m);Oe.far||t.push({distance:O,point:_.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else{const y=Math.max(0,o.start),E=Math.min(b.count,o.start+o.count);for(let v=y,S=E-1;vc)continue;m.applyMatrix4(this.matrixWorld);const w=e.ray.origin.distanceTo(m);we.far||t.push({distance:w,point:_.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,s=Object.keys(t);if(s.length>0){const i=t[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r0){const i=t[s[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;ri.far)return;r.push({distance:d,distanceToRay:Math.sqrt(a),point:c,index:e,face:null,object:o})}}class Sy extends zs{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new pt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=py,this.normalScale=new Rt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Vi extends Sy{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Rt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return In(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new pt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new pt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new pt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class Hw extends zs{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new pt(16777215),this.specular=new pt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new pt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=py,this.normalScale=new Rt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=dy,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function hd(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function Y1t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function $1t(n){function e(i,r){return n[i]-n[r]}const t=n.length,s=new Array(t);for(let i=0;i!==t;++i)s[i]=i;return s.sort(e),s}function qw(n,e,t){const s=n.length,i=new n.constructor(s);for(let r=0,o=0;o!==s;++r){const a=t[r]*e;for(let c=0;c!==e;++c)i[o++]=n[a+c]}return i}function uI(n,e,t,s){let i=1,r=n[0];for(;r!==void 0&&r[s]===void 0;)r=n[i++];if(r===void 0)return;let o=r[s];if(o!==void 0)if(Array.isArray(o))do o=r[s],o!==void 0&&(e.push(r.time),t.push.apply(t,o)),r=n[i++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[s],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=n[i++];while(r!==void 0);else do o=r[s],o!==void 0&&(e.push(r.time),t.push(o)),r=n[i++];while(r!==void 0)}class fc{constructor(e,t,s,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(s),this.sampleValues=t,this.valueSize=s,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let s=this._cachedIndex,i=t[s],r=t[s-1];e:{t:{let o;n:{s:if(!(e=r)){const a=t[1];e=r)break t}o=s,s=0;break n}break e}for(;s>>1;et;)--o;if(++o,r!==0||o!==i){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=s.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const s=this.times,i=this.values,r=s.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const c=s[a];if(typeof c=="number"&&isNaN(c)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,c),e=!1;break}if(o!==null&&o>c){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,c,o),e=!1;break}o=c}if(i!==void 0&&Y1t(i))for(let a=0,c=i.length;a!==c;++a){const d=i[a];if(isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,d),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),s=this.getValueSize(),i=this.getInterpolation()===jh,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*s,c=o*s,d=0;d!==s;++d)t[c+d]=t[a+d];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*s)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),s=this.constructor,i=new s(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}mi.prototype.TimeBufferType=Float32Array;mi.prototype.ValueBufferType=Float32Array;mi.prototype.DefaultInterpolation=Ta;class Ya extends mi{}Ya.prototype.ValueTypeName="bool";Ya.prototype.ValueBufferType=Array;Ya.prototype.DefaultInterpolation=Xl;Ya.prototype.InterpolantFactoryMethodLinear=void 0;Ya.prototype.InterpolantFactoryMethodSmooth=void 0;class pI extends mi{}pI.prototype.ValueTypeName="color";class wa extends mi{}wa.prototype.ValueTypeName="number";class Q1t extends fc{constructor(e,t,s,i){super(e,t,s,i)}interpolate_(e,t,s,i){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,c=(s-t)/(i-t);let d=e*a;for(let u=d+a;d!==u;d+=4)Mr.slerpFlat(r,0,o,d-a,o,d,c);return r}}class go extends mi{InterpolantFactoryMethodLinear(e){return new Q1t(this.times,this.values,this.getValueSize(),e)}}go.prototype.ValueTypeName="quaternion";go.prototype.DefaultInterpolation=Ta;go.prototype.InterpolantFactoryMethodSmooth=void 0;class $a extends mi{}$a.prototype.ValueTypeName="string";$a.prototype.ValueBufferType=Array;$a.prototype.DefaultInterpolation=Xl;$a.prototype.InterpolantFactoryMethodLinear=void 0;$a.prototype.InterpolantFactoryMethodSmooth=void 0;class Ra extends mi{}Ra.prototype.ValueTypeName="vector";class X1t{constructor(e,t=-1,s,i=n0t){this.name=e,this.tracks=s,this.duration=t,this.blendMode=i,this.uuid=Vs(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],s=e.tracks,i=1/(e.fps||1);for(let o=0,a=s.length;o!==a;++o)t.push(J1t(s[o]).scale(i));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],s=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=s.length;r!==o;++r)t.push(mi.toJSON(s[r]));return i}static CreateFromMorphTargetSequence(e,t,s,i){const r=t.length,o=[];for(let a=0;a1){const _=u[1];let m=i[_];m||(i[_]=m=[]),m.push(d)}}const o=[];for(const a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],t,s));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const s=function(_,m,h,g,f){if(h.length!==0){const b=[],y=[];uI(h,b,y,g),b.length!==0&&f.push(new _(m,b,y))}},i=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let c=e.length||-1;const d=e.hierarchy||[];for(let _=0;_{t&&t(r),this.manager.itemEnd(e)},0),r;if(Ti[e]!==void 0){Ti[e].push({onLoad:t,onProgress:s,onError:i});return}Ti[e]=[],Ti[e].push({onLoad:t,onProgress:s,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,c=this.responseType;fetch(o).then(d=>{if(d.status===200||d.status===0){if(d.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||d.body===void 0||d.body.getReader===void 0)return d;const u=Ti[e],_=d.body.getReader(),m=d.headers.get("Content-Length")||d.headers.get("X-File-Size"),h=m?parseInt(m):0,g=h!==0;let f=0;const b=new ReadableStream({start(y){E();function E(){_.read().then(({done:v,value:S})=>{if(v)y.close();else{f+=S.byteLength;const R=new ProgressEvent("progress",{lengthComputable:g,loaded:f,total:h});for(let w=0,A=u.length;w{switch(c){case"arraybuffer":return d.arrayBuffer();case"blob":return d.blob();case"document":return d.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return d.json();default:if(a===void 0)return d.text();{const _=/charset="?([^;"\s]*)"?/i.exec(a),m=_&&_[1]?_[1].toLowerCase():void 0,h=new TextDecoder(m);return d.arrayBuffer().then(g=>h.decode(g))}}}).then(d=>{Aa.add(e,d);const u=Ti[e];delete Ti[e];for(let _=0,m=u.length;_{const u=Ti[e];if(u===void 0)throw this.manager.itemError(e),d;delete Ti[e];for(let _=0,m=u.length;_{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class sTt extends Wa{constructor(e){super(e)}load(e,t,s,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Aa.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a=Zl("img");function c(){u(),Aa.add(e,this),t&&t(this),r.manager.itemEnd(e)}function d(_){u(),i&&i(_),r.manager.itemError(e),r.manager.itemEnd(e)}function u(){a.removeEventListener("load",c,!1),a.removeEventListener("error",d,!1)}return a.addEventListener("load",c,!1),a.addEventListener("error",d,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class _I extends Wa{constructor(e){super(e)}load(e,t,s,i){const r=new xn,o=new sTt(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,t!==void 0&&t(r)},s,i),r}}class bp extends Jt{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new pt(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}const Sg=new xt,Yw=new re,$w=new re;class Ty{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Rt(512,512),this.map=null,this.mapPass=null,this.matrix=new xt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new my,this._frameExtents=new Rt(1,1),this._viewportCount=1,this._viewports=[new Wt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,s=this.matrix;Yw.setFromMatrixPosition(e.matrixWorld),t.position.copy(Yw),$w.setFromMatrixPosition(e.target.matrixWorld),t.lookAt($w),t.updateMatrixWorld(),Sg.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Sg),s.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),s.multiply(Sg)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class iTt extends Ty{constructor(){super(new Gn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,s=xa*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;(s!==t.fov||i!==t.aspect||r!==t.far)&&(t.fov=s,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class rTt extends bp{constructor(e,t,s=0,i=Math.PI/3,r=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Jt.DEFAULT_UP),this.updateMatrix(),this.target=new Jt,this.distance=s,this.angle=i,this.penumbra=r,this.decay=o,this.map=null,this.shadow=new iTt}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const Ww=new xt,pl=new re,Tg=new re;class oTt extends Ty{constructor(){super(new Gn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Rt(4,2),this._viewportCount=6,this._viewports=[new Wt(2,1,1,1),new Wt(0,1,1,1),new Wt(3,1,1,1),new Wt(1,1,1,1),new Wt(3,0,1,1),new Wt(1,0,1,1)],this._cubeDirections=[new re(1,0,0),new re(-1,0,0),new re(0,0,1),new re(0,0,-1),new re(0,1,0),new re(0,-1,0)],this._cubeUps=[new re(0,1,0),new re(0,1,0),new re(0,1,0),new re(0,1,0),new re(0,0,1),new re(0,0,-1)]}updateMatrices(e,t=0){const s=this.camera,i=this.matrix,r=e.distance||s.far;r!==s.far&&(s.far=r,s.updateProjectionMatrix()),pl.setFromMatrixPosition(e.matrixWorld),s.position.copy(pl),Tg.copy(s.position),Tg.add(this._cubeDirections[t]),s.up.copy(this._cubeUps[t]),s.lookAt(Tg),s.updateMatrixWorld(),i.makeTranslation(-pl.x,-pl.y,-pl.z),Ww.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Ww)}}class aTt extends bp{constructor(e,t,s=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=s,this.decay=i,this.shadow=new oTt}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class lTt extends Ty{constructor(){super(new gy(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class mI extends bp{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Jt.DEFAULT_UP),this.updateMatrix(),this.target=new Jt,this.shadow=new lTt}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class cTt extends bp{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class Dl{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let s=0,i=e.length;s"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,s,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Aa.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(c){Aa.add(e,c),t&&t(c),r.manager.itemEnd(e)}).catch(function(c){i&&i(c),r.manager.itemError(e),r.manager.itemEnd(e)}),r.manager.itemStart(e)}}const xy="\\[\\]\\.:\\/",uTt=new RegExp("["+xy+"]","g"),Cy="[^"+xy+"]",pTt="[^"+xy.replace("\\.","")+"]",fTt=/((?:WC+[\/:])*)/.source.replace("WC",Cy),_Tt=/(WCOD+)?/.source.replace("WCOD",pTt),mTt=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Cy),hTt=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Cy),gTt=new RegExp("^"+fTt+_Tt+mTt+hTt+"$"),bTt=["material","materials","bones","map"];class yTt{constructor(e,t,s){const i=s||Ut.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const s=this._targetGroup.nCachedObjects_,i=this._bindings[s];i!==void 0&&i.getValue(e,t)}setValue(e,t){const s=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=s.length;i!==r;++i)s[i].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,s=e.length;t!==s;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,s=e.length;t!==s;++t)e[t].unbind()}}class Ut{constructor(e,t,s){this.path=t,this.parsedPath=s||Ut.parseTrackName(t),this.node=Ut.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,s){return e&&e.isAnimationObjectGroup?new Ut.Composite(e,t,s):new Ut(e,t,s)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(uTt,"")}static parseTrackName(e){const t=gTt.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const s={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=s.nodeName&&s.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const r=s.nodeName.substring(i+1);bTt.indexOf(r)!==-1&&(s.nodeName=s.nodeName.substring(0,i),s.objectName=r)}if(s.propertyName===null||s.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return s}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const s=e.skeleton.getBoneByName(t);if(s!==void 0)return s}if(e.children){const s=function(r){for(let o=0;o=2.0 are supported."));return}const d=new ZTt(r,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});d.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&a[_]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+_+'".')}}d.setExtensions(o),d.setPlugins(a),d.parse(s,i)}parseAsync(e,t){const s=this;return new Promise(function(i,r){s.parse(e,t,i,r)})}}function vTt(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const wt={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class STt{constructor(e){this.parser=e,this.name=wt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let s=0,i=t.length;s=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,r.source,o)}}class LTt{constructor(e){this.parser=e,this.name=wt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,s=this.parser,i=s.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;const o=r.extensions[t],a=i.images[o.source];let c=s.textureLoader;if(a.uri){const d=s.options.manager.getHandler(a.uri);d!==null&&(c=d)}return this.detectSupport().then(function(d){if(d)return s.loadTextureImage(e,o.source,c);if(i.extensionsRequired&&i.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return s.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class PTt{constructor(e){this.parser=e,this.name=wt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,s=this.parser,i=s.json,r=i.textures[e];if(!r.extensions||!r.extensions[t])return null;const o=r.extensions[t],a=i.images[o.source];let c=s.textureLoader;if(a.uri){const d=s.options.manager.getHandler(a.uri);d!==null&&(c=d)}return this.detectSupport().then(function(d){if(d)return s.loadTextureImage(e,o.source,c);if(i.extensionsRequired&&i.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return s.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class FTt{constructor(e){this.name=wt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,s=t.bufferViews[e];if(s.extensions&&s.extensions[this.name]){const i=s.extensions[this.name],r=this.parser.getDependency("buffer",i.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const c=i.byteOffset||0,d=i.byteLength||0,u=i.count,_=i.byteStride,m=new Uint8Array(a,c,d);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(u,_,m,i.mode,i.filter).then(function(h){return h.buffer}):o.ready.then(function(){const h=new ArrayBuffer(u*_);return o.decodeGltfBuffer(new Uint8Array(h),u,_,m,i.mode,i.filter),h})})}else return null}}class UTt{constructor(e){this.name=wt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,s=t.nodes[e];if(!s.extensions||!s.extensions[this.name]||s.mesh===void 0)return null;const i=t.meshes[s.mesh];for(const d of i.primitives)if(d.mode!==_s.TRIANGLES&&d.mode!==_s.TRIANGLE_STRIP&&d.mode!==_s.TRIANGLE_FAN&&d.mode!==void 0)return null;const o=s.extensions[this.name].attributes,a=[],c={};for(const d in o)a.push(this.parser.getDependency("accessor",o[d]).then(u=>(c[d]=u,c[d])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(d=>{const u=d.pop(),_=u.isGroup?u.children:[u],m=d[0].count,h=[];for(const g of _){const f=new xt,b=new re,y=new Mr,E=new re(1,1,1),v=new V1t(g.geometry,g.material,m);for(let S=0;S0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const XTt=new xt;class ZTt{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new vTt,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let s=!1,i=!1,r=-1;typeof navigator<"u"&&(s=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,r=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||s||i&&r<98?this.textureLoader=new _I(this.options.manager):this.textureLoader=new dTt(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new fI(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const s=this,i=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])}).then(function(o){const a={scene:o[0][i.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:i.asset,parser:s,userData:{}};return Ur(r,a,i),dr(a,i),Promise.all(s._invokeAll(function(c){return c.afterRoot&&c.afterRoot(a)})).then(function(){e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],s=this.json.meshes||[];for(let i=0,r=t.length;i{const c=this.associations.get(o);c!=null&&this.associations.set(a,c);for(const[d,u]of o.children.entries())r(u,a.children[d])};return r(s,i),i.name+="_instance_"+e.uses[t]++,i}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let s=0;s=2&&b.setY(C,w[A*c+1]),c>=3&&b.setZ(C,w[A*c+2]),c>=4&&b.setW(C,w[A*c+3]),c>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return b})}loadTexture(e){const t=this.json,s=this.options,r=t.textures[e].source,o=t.images[r];let a=this.textureLoader;if(o.uri){const c=s.manager.getHandler(o.uri);c!==null&&(a=c)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,t,s){const i=this,r=this.json,o=r.textures[e],a=r.images[t],c=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[c])return this.textureCache[c];const d=this.loadImageSource(t,s).then(function(u){u.flipY=!1,u.name=o.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const m=(r.samplers||{})[o.sampler]||{};return u.magFilter=Qw[m.magFilter]||Kn,u.minFilter=Qw[m.minFilter]||_o,u.wrapS=Xw[m.wrapS]||va,u.wrapT=Xw[m.wrapT]||va,i.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[c]=d,d}loadImageSource(e,t){const s=this,i=this.json,r=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(_=>_.clone());const o=i.images[e],a=self.URL||self.webkitURL;let c=o.uri||"",d=!1;if(o.bufferView!==void 0)c=s.getDependency("bufferView",o.bufferView).then(function(_){d=!0;const m=new Blob([_],{type:o.mimeType});return c=a.createObjectURL(m),c});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(c).then(function(_){return new Promise(function(m,h){let g=m;t.isImageBitmapLoader===!0&&(g=function(f){const b=new xn(f);b.needsUpdate=!0,m(b)}),t.load(Dl.resolveURL(_,r.path),g,void 0,h)})}).then(function(_){return d===!0&&a.revokeObjectURL(c),_.userData.mimeType=o.mimeType||QTt(o.uri),_}).catch(function(_){throw console.error("THREE.GLTFLoader: Couldn't load texture",c),_});return this.sourceCache[e]=u,u}assignTexture(e,t,s,i){const r=this;return this.getDependency("texture",s.index).then(function(o){if(!o)return null;if(s.texCoord!==void 0&&s.texCoord>0&&(o=o.clone(),o.channel=s.texCoord),r.extensions[wt.KHR_TEXTURE_TRANSFORM]){const a=s.extensions!==void 0?s.extensions[wt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const c=r.associations.get(o);o=r.extensions[wt.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,c)}}return i!==void 0&&(o.colorSpace=i),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let s=e.material;const i=t.attributes.tangent===void 0,r=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+s.uuid;let c=this.cache.get(a);c||(c=new dI,zs.prototype.copy.call(c,s),c.color.copy(s.color),c.map=s.map,c.sizeAttenuation=!1,this.cache.add(a,c)),s=c}else if(e.isLine){const a="LineBasicMaterial:"+s.uuid;let c=this.cache.get(a);c||(c=new cI,zs.prototype.copy.call(c,s),c.color.copy(s.color),c.map=s.map,this.cache.add(a,c)),s=c}if(i||r||o){let a="ClonedMaterial:"+s.uuid+":";i&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let c=this.cache.get(a);c||(c=s.clone(),r&&(c.vertexColors=!0),o&&(c.flatShading=!0),i&&(c.normalScale&&(c.normalScale.y*=-1),c.clearcoatNormalScale&&(c.clearcoatNormalScale.y*=-1)),this.cache.add(a,c),this.associations.set(c,this.associations.get(s))),s=c}e.material=s}getMaterialType(){return Sy}loadMaterial(e){const t=this,s=this.json,i=this.extensions,r=s.materials[e];let o;const a={},c=r.extensions||{},d=[];if(c[wt.KHR_MATERIALS_UNLIT]){const _=i[wt.KHR_MATERIALS_UNLIT];o=_.getMaterialType(),d.push(_.extendParams(a,r,t))}else{const _=r.pbrMetallicRoughness||{};if(a.color=new pt(1,1,1),a.opacity=1,Array.isArray(_.baseColorFactor)){const m=_.baseColorFactor;a.color.setRGB(m[0],m[1],m[2],Cn),a.opacity=m[3]}_.baseColorTexture!==void 0&&d.push(t.assignTexture(a,"map",_.baseColorTexture,nn)),a.metalness=_.metallicFactor!==void 0?_.metallicFactor:1,a.roughness=_.roughnessFactor!==void 0?_.roughnessFactor:1,_.metallicRoughnessTexture!==void 0&&(d.push(t.assignTexture(a,"metalnessMap",_.metallicRoughnessTexture)),d.push(t.assignTexture(a,"roughnessMap",_.metallicRoughnessTexture))),o=this._invokeOne(function(m){return m.getMaterialType&&m.getMaterialType(e)}),d.push(Promise.all(this._invokeAll(function(m){return m.extendMaterialParams&&m.extendMaterialParams(e,a)})))}r.doubleSided===!0&&(a.side=ei);const u=r.alphaMode||Cg.OPAQUE;if(u===Cg.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===Cg.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==_r&&(d.push(t.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new Rt(1,1),r.normalTexture.scale!==void 0)){const _=r.normalTexture.scale;a.normalScale.set(_,_)}if(r.occlusionTexture!==void 0&&o!==_r&&(d.push(t.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==_r){const _=r.emissiveFactor;a.emissive=new pt().setRGB(_[0],_[1],_[2],Cn)}return r.emissiveTexture!==void 0&&o!==_r&&d.push(t.assignTexture(a,"emissiveMap",r.emissiveTexture,nn)),Promise.all(d).then(function(){const _=new o(a);return r.name&&(_.name=r.name),dr(_,r),t.associations.set(_,{materials:e}),r.extensions&&Ur(i,_,r),_})}createUniqueName(e){const t=Ut.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,s=this.extensions,i=this.primitiveCache;function r(a){return s[wt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(c){return Zw(c,a,t)})}const o=[];for(let a=0,c=e.length;a0&&KTt(y,r),y.name=t.createUniqueName(r.name||"mesh_"+e),dr(y,r),b.extensions&&Ur(i,y,b),t.assignFinalMaterial(y),_.push(y)}for(let h=0,g=_.length;h1?u=new jr:d.length===1?u=d[0]:u=new Jt,u!==d[0])for(let _=0,m=d.length;_{const _=new Map;for(const[m,h]of i.associations)(m instanceof zs||m instanceof xn)&&_.set(m,h);return u.traverse(m=>{const h=i.associations.get(m);h!=null&&_.set(m,h)}),_};return i.associations=d(r),r})}_createAnimationTracks(e,t,s,i,r){const o=[],a=e.name?e.name:e.uuid,c=[];Ji[r.path]===Ji.weights?e.traverse(function(m){m.morphTargetInfluences&&c.push(m.name?m.name:m.uuid)}):c.push(a);let d;switch(Ji[r.path]){case Ji.weights:d=wa;break;case Ji.rotation:d=go;break;case Ji.position:case Ji.scale:d=Ra;break;default:switch(s.itemSize){case 1:d=wa;break;case 2:case 3:default:d=Ra;break}break}const u=i.interpolation!==void 0?YTt[i.interpolation]:Ta,_=this._getArrayFromAccessor(s);for(let m=0,h=c.length;m{Ge.replace()})},stopVideoStream(){this.isVideoActive=!1,this.imageData=null,qe.emit("stop_webcam_video_stream"),Ue(()=>{Ge.replace()})},startDrag(n){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(n){if(this.isDragging){const e=n.clientX-this.dragStart.x,t=n.clientY-this.dragStart.y;this.position.bottom-=t,this.position.right-=e,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ge.replace(),qe.on("video_stream_image",n=>{if(this.isVideoActive){this.imageDataUrl="data:image/jpeg;base64,"+n,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},txt=["src"],nxt=["src"],sxt={class:"controls"},ixt={key:2};function rxt(n,e,t,s,i,r){return T(),x("div",{class:"floating-frame bg-white",style:Vt({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=$((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=$((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[l("div",{class:"handle",onMousedown:e[0]||(e[0]=$((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=$((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),i.isVideoActive&&i.imageDataUrl!=null?(T(),x("img",{key:0,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},null,8,txt)):B("",!0),i.isVideoActive&&i.imageDataUrl==null?(T(),x("p",{key:1,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},"Loading. Please wait...",8,nxt)):B("",!0),l("div",sxt,[i.isVideoActive?B("",!0):(T(),x("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startVideoStream&&r.startVideoStream(...o))},e[6]||(e[6]=[l("i",{"data-feather":"video"},null,-1)]))),i.isVideoActive?(T(),x("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopVideoStream&&r.stopVideoStream(...o))},e[7]||(e[7]=[l("i",{"data-feather":"video"},null,-1)]))):B("",!0),i.isVideoActive?(T(),x("span",ixt,"FPS: "+Y(i.frameRate),1)):B("",!0)])],36)}const oxt=st(ext,[["render",rxt]]),axt={data(){return{isAudioActive:!1,imageDataUrl:null,isDragging:!1,position:{bottom:0,right:0},dragStart:{x:0,y:0},zIndex:0,frameRate:0,frameCount:0,lastFrameTime:Date.now()}},methods:{startAudioStream(){qe.emit("start_audio_stream",()=>{this.isAudioActive=!0}),Ue(()=>{Ge.replace()})},stopAudioStream(){qe.emit("stop_audio_stream",()=>{this.isAudioActive=!1,this.imageDataUrl=null}),Ue(()=>{Ge.replace()})},startDrag(n){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(n){if(this.isDragging){const e=n.clientX-this.dragStart.x,t=n.clientY-this.dragStart.y;this.position.bottom-=t,this.position.right-=e,this.dragStart.x=n.clientX,this.dragStart.y=n.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ge.replace(),qe.on("update_spectrogram",n=>{if(this.isAudioActive){this.imageDataUrl="data:image/jpeg;base64,"+n,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},lxt=["src"],cxt={class:"controls"};function dxt(n,e,t,s,i,r){return T(),x("div",{class:"floating-frame bg-white",style:Vt({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=$((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[5]||(e[5]=$((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},[l("div",{class:"handle",onMousedown:e[0]||(e[0]=$((...o)=>r.startDrag&&r.startDrag(...o),["stop"])),onMouseup:e[1]||(e[1]=$((...o)=>r.stopDrag&&r.stopDrag(...o),["stop"]))},"Drag Me",32),i.isAudioActive&&i.imageDataUrl!=null?(T(),x("img",{key:0,src:i.imageDataUrl,alt:"Spectrogram",width:"300",height:"300"},null,8,lxt)):B("",!0),l("div",cxt,[i.isAudioActive?B("",!0):(T(),x("button",{key:0,class:"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded",onClick:e[2]||(e[2]=(...o)=>r.startAudioStream&&r.startAudioStream(...o))},e[6]||(e[6]=[l("i",{"data-feather":"mic"},null,-1)]))),i.isAudioActive?(T(),x("button",{key:1,class:"bg-red-500 hover:bg-red-700 text-white font-bold py-2 px-4 rounded",onClick:e[3]||(e[3]=(...o)=>r.stopAudioStream&&r.stopAudioStream(...o))},e[7]||(e[7]=[l("i",{"data-feather":"mic"},null,-1)]))):B("",!0)])],36)}const uxt=st(axt,[["render",dxt]]),pxt={data(){return{activePersonality:null}},props:{personality:{type:Object,default:()=>({})}},components:{VideoFrame:oxt,AudioFrame:uxt},computed:{isReady:{get(){return this.$store.state.ready}}},watch:{"$store.state.mountedPersArr":"updatePersonality","$store.state.config.active_personality_id":"updatePersonality"},async mounted(){for(;this.isReady===!1;)await new Promise(n=>setTimeout(n,100));console.log("Personality:",this.personality),this.initWebGLScene(),this.updatePersonality(),Ue(()=>{Ge.replace()}),this.$refs.video_frame.position={bottom:0,right:0},this.$refs.audio_frame.position={bottom:0,right:100}},beforeDestroy(){},methods:{initWebGLScene(){this.scene=new D1t,this.camera=new Gn(75,window.innerWidth/window.innerHeight,.1,1e3),this.renderer=new aI,this.renderer.setSize(window.innerWidth,window.innerHeight),this.$refs.webglContainer.appendChild(this.renderer.domElement);const n=new yr,e=new Hw({color:65280});this.cube=new Vn(n,e),this.scene.add(this.cube);const t=new cTt(4210752),s=new mI(16777215,.5);s.position.set(0,1,0),this.scene.add(t),this.scene.add(s),this.camera.position.z=5,this.animate()},updatePersonality(){const{mountedPersArr:n,config:e}=this.$store.state;this.activePersonality=n[e.active_personality_id],this.activePersonality.avatar?this.showBoxWithAvatar(this.activePersonality.avatar):this.showDefaultCube(),this.$emit("update:personality",this.activePersonality)},loadScene(n){new ETt().load(n,t=>{this.scene.remove(this.cube),this.cube=t.scene,this.scene.add(this.cube)})},showBoxWithAvatar(n){this.cube&&this.scene.remove(this.cube);const e=new yr,t=new _I().load(n),s=new _r({map:t});this.cube=new Vn(e,s),this.scene.add(this.cube)},showDefaultCube(){this.scene.remove(this.cube);const n=new yr,e=new Hw({color:65280});this.cube=new Vn(n,e),this.scene.add(this.cube)},animate(){requestAnimationFrame(this.animate),this.cube&&(this.cube.rotation.x+=.01,this.cube.rotation.y+=.01),this.renderer.render(this.scene,this.camera)}}},fxt={ref:"webglContainer"},_xt={class:"flex-col y-overflow scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},mxt={key:0,class:"text-center"},hxt={key:1,class:"text-center"},gxt={class:"floating-frame2"},bxt=["innerHTML"];function yxt(n,e,t,s,i,r){const o=Je("VideoFrame"),a=Je("AudioFrame");return T(),x(Le,null,[l("div",fxt,null,512),l("div",_xt,[!i.activePersonality||!i.activePersonality.scene_path?(T(),x("div",mxt," Personality does not have a 3d avatar. ")):B("",!0),!i.activePersonality||!i.activePersonality.avatar||i.activePersonality.avatar===""?(T(),x("div",hxt," Personality does not have an avatar. ")):B("",!0),l("div",gxt,[l("div",{innerHTML:n.htmlContent},null,8,bxt)])]),z(o,{ref:"video_frame"},null,512),z(a,{ref:"audio_frame"},null,512)],64)}const Ext=st(pxt,[["render",yxt]]);let gd;const vxt=new Uint8Array(16);function Sxt(){if(!gd&&(gd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gd(vxt)}const En=[];for(let n=0;n<256;++n)En.push((n+256).toString(16).slice(1));function Txt(n,e=0){return En[n[e+0]]+En[n[e+1]]+En[n[e+2]]+En[n[e+3]]+"-"+En[n[e+4]]+En[n[e+5]]+"-"+En[n[e+6]]+En[n[e+7]]+"-"+En[n[e+8]]+En[n[e+9]]+"-"+En[n[e+10]]+En[n[e+11]]+En[n[e+12]]+En[n[e+13]]+En[n[e+14]]+En[n[e+15]]}const xxt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Jw={randomUUID:xxt};function Di(n,e,t){if(Jw.randomUUID&&!e&&!n)return Jw.randomUUID();n=n||{};const s=n.random||(n.rng||Sxt)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Txt(s)}class ro{constructor(){this.listenerMap=new Map,this._listeners=[],this.proxyMap=new Map,this.proxies=[]}get listeners(){return this._listeners.concat(this.proxies.flatMap(e=>e()))}subscribe(e,t){this.listenerMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. Please check that you don't accidentally use the same token twice to register two different handlers for the same event/hook.`),this.unsubscribe(e)),this.listenerMap.set(e,t),this._listeners.push(t)}unsubscribe(e){if(this.listenerMap.has(e)){const t=this.listenerMap.get(e);this.listenerMap.delete(e);const s=this._listeners.indexOf(t);s>=0&&this._listeners.splice(s,1)}}registerProxy(e,t){this.proxyMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. -Please check that you don't accidentally use the same token twice to register two different proxies for the same event/hook.`),this.unregisterProxy(e)),this.proxyMap.set(e,t),this.proxies.push(t)}unregisterProxy(e){if(!this.proxyMap.has(e))return;const t=this.proxyMap.get(e);this.proxyMap.delete(e);const s=this.proxies.indexOf(t);s>=0&&this.proxies.splice(s,1)}}class Gt extends ro{constructor(e){super(),this.entity=e}emit(e){this.listeners.forEach(t=>t(e,this.entity))}}class kn extends ro{constructor(e){super(),this.entity=e}emit(e){let t=!1;const s=()=>[t=!0];for(const i of Array.from(this.listeners.values()))if(i(e,s,this.entity),t)return{prevented:!0};return{prevented:!1}}}class bI extends ro{execute(e,t){let s=e;for(const i of this.listeners)s=i(s,t);return s}}class cs extends bI{constructor(e){super(),this.entity=e}execute(e){return super.execute(e,this.entity)}}class xxt extends ro{constructor(e){super(),this.entity=e}execute(e){const t=[];for(const s of this.listeners)t.push(s(e,this.entity));return t}}function Xs(){const n=Symbol(),e=new Map,t=new Set,s=(c,d)=>{d instanceof ro&&d.registerProxy(n,()=>{var u,_;return(_=(u=e.get(c))===null||u===void 0?void 0:u.listeners)!==null&&_!==void 0?_:[]})},i=c=>{const d=new ro;e.set(c,d),t.forEach(u=>s(c,u[c]))},r=c=>{t.add(c);for(const d of e.keys())s(d,c[d])},o=c=>{for(const d of e.keys())c[d]instanceof ro&&c[d].unregisterProxy(n);t.delete(c)},a=()=>{t.forEach(c=>o(c)),e.clear()};return new Proxy({},{get(c,d){return d==="addTarget"?r:d==="removeTarget"?o:d==="destroy"?a:typeof d!="string"||d.startsWith("_")?c[d]:(e.has(d)||i(d),e.get(d))}})}class e2{constructor(e,t){if(this.destructed=!1,this.events={destruct:new Gt(this)},!e||!t)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Di(),this.from=e,this.to=t,this.from.connectionCount++,this.to.connectionCount++}destruct(){this.events.destruct.emit(),this.from.connectionCount--,this.to.connectionCount--,this.destructed=!0}}class yI{constructor(e,t){if(!e||!t)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Di(),this.from=e,this.to=t}}function Rb(n,e){return Object.fromEntries(Object.entries(n).map(([t,s])=>[t,e(s)]))}class EI{constructor(){this._title="",this.id=Di(),this.events={loaded:new Gt(this),beforeAddInput:new kn(this),addInput:new Gt(this),beforeRemoveInput:new kn(this),removeInput:new Gt(this),beforeAddOutput:new kn(this),addOutput:new Gt(this),beforeRemoveOutput:new kn(this),removeOutput:new Gt(this),beforeTitleChanged:new kn(this),titleChanged:new Gt(this),update:new Gt(this)},this.hooks={beforeLoad:new cs(this),afterSave:new cs(this)}}get graph(){return this.graphInstance}get title(){return this._title}set title(e){this.events.beforeTitleChanged.emit(e).prevented||(this._title=e,this.events.titleChanged.emit(e))}addInput(e,t){return this.addInterface("input",e,t)}addOutput(e,t){return this.addInterface("output",e,t)}removeInput(e){return this.removeInterface("input",e)}removeOutput(e){return this.removeInterface("output",e)}registerGraph(e){this.graphInstance=e}load(e){this.hooks.beforeLoad.execute(e),this.id=e.id,this._title=e.title,Object.entries(e.inputs).forEach(([t,s])=>{this.inputs[t]&&(this.inputs[t].load(s),this.inputs[t].nodeId=this.id)}),Object.entries(e.outputs).forEach(([t,s])=>{this.outputs[t]&&(this.outputs[t].load(s),this.outputs[t].nodeId=this.id)}),this.events.loaded.emit(this)}save(){const e=Rb(this.inputs,i=>i.save()),t=Rb(this.outputs,i=>i.save()),s={type:this.type,id:this.id,title:this.title,inputs:e,outputs:t};return this.hooks.afterSave.execute(s)}onPlaced(){}onDestroy(){}initializeIo(){Object.entries(this.inputs).forEach(([e,t])=>this.initializeIntf("input",e,t)),Object.entries(this.outputs).forEach(([e,t])=>this.initializeIntf("output",e,t))}initializeIntf(e,t,s){s.isInput=e==="input",s.nodeId=this.id,s.events.setValue.subscribe(this,()=>this.events.update.emit({type:e,name:t,intf:s}))}addInterface(e,t,s){const i=e==="input"?this.events.beforeAddInput:this.events.beforeAddOutput,r=e==="input"?this.events.addInput:this.events.addOutput,o=e==="input"?this.inputs:this.outputs;return i.emit(s).prevented?!1:(o[t]=s,this.initializeIntf(e,t,s),r.emit(s),!0)}removeInterface(e,t){const s=e==="input"?this.events.beforeRemoveInput:this.events.beforeRemoveOutput,i=e==="input"?this.events.removeInput:this.events.removeOutput,r=e==="input"?this.inputs[t]:this.outputs[t];if(!r||s.emit(r).prevented)return!1;if(r.connectionCount>0)if(this.graphInstance)this.graphInstance.connections.filter(a=>a.from===r||a.to===r).forEach(a=>{this.graphInstance.removeConnection(a)});else throw new Error("Interface is connected, but no graph instance is specified. Unable to delete interface");return r.events.setValue.unsubscribe(this),e==="input"?delete this.inputs[t]:delete this.outputs[t],i.emit(r),!0}}let vI=class extends EI{load(e){super.load(e)}save(){return super.save()}};function Ka(n){return class extends vI{constructor(){var e,t;super(),this.type=n.type,this.inputs={},this.outputs={},this.calculate=n.calculate?(s,i)=>n.calculate.call(this,s,i):void 0,this._title=(e=n.title)!==null&&e!==void 0?e:n.type,this.executeFactory("input",n.inputs),this.executeFactory("output",n.outputs),(t=n.onCreate)===null||t===void 0||t.call(this)}onPlaced(){var e;(e=n.onPlaced)===null||e===void 0||e.call(this)}onDestroy(){var e;(e=n.onDestroy)===null||e===void 0||e.call(this)}executeFactory(e,t){Object.keys(t||{}).forEach(s=>{const i=t[s]();e==="input"?this.addInput(s,i):this.addOutput(s,i)})}}}class en{set connectionCount(e){this._connectionCount=e,this.events.setConnectionCount.emit(e)}get connectionCount(){return this._connectionCount}set value(e){this.events.beforeSetValue.emit(e).prevented||(this._value=e,this.events.setValue.emit(e))}get value(){return this._value}constructor(e,t){this.id=Di(),this.nodeId="",this.port=!0,this.hidden=!1,this.events={setConnectionCount:new Gt(this),beforeSetValue:new kn(this),setValue:new Gt(this),updated:new Gt(this)},this.hooks={load:new cs(this),save:new cs(this)},this._connectionCount=0,this.name=e,this._value=t}load(e){this.id=e.id,this.templateId=e.templateId,this.value=e.value,this.hooks.load.execute(e)}save(){const e={id:this.id,templateId:this.templateId,value:this.value};return this.hooks.save.execute(e)}setComponent(e){return this.component=e,this}setPort(e){return this.port=e,this}setHidden(e){return this.hidden=e,this}use(e,...t){return e(this,...t),this}}const Ma="__baklava_SubgraphInputNode",Na="__baklava_SubgraphOutputNode";class SI extends vI{constructor(){super(),this.graphInterfaceId=Di()}onPlaced(){super.onPlaced(),this.initializeIo()}save(){return{...super.save(),graphInterfaceId:this.graphInterfaceId}}load(e){super.load(e),this.graphInterfaceId=e.graphInterfaceId}}class wy extends SI{constructor(){super(...arguments),this.type=Ma,this.inputs={name:new en("Name","Input")},this.outputs={placeholder:new en("Value",void 0)}}static isGraphInputNode(e){return e.type===Ma}}class Ry extends SI{constructor(){super(...arguments),this.type=Na,this.inputs={name:new en("Name","Output"),placeholder:new en("Value",void 0)},this.outputs={output:new en("Output",void 0).setHidden(!0)},this.calculate=({placeholder:e})=>({output:e})}static isGraphOutputNode(e){return e.type===Na}}class _c{get nodes(){return this._nodes}get connections(){return this._connections}get loading(){return this._loading}get destroying(){return this._destroying}get inputs(){return this.nodes.filter(t=>t.type===Ma).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(t=>t.type===Na).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.output.id}))}constructor(e,t){this.id=Di(),this.activeTransactions=0,this._nodes=[],this._connections=[],this._loading=!1,this._destroying=!1,this.events={beforeAddNode:new kn(this),addNode:new Gt(this),beforeRemoveNode:new kn(this),removeNode:new Gt(this),beforeAddConnection:new kn(this),addConnection:new Gt(this),checkConnection:new kn(this),beforeRemoveConnection:new kn(this),removeConnection:new Gt(this)},this.hooks={save:new cs(this),load:new cs(this),checkConnection:new xxt(this)},this.nodeEvents=Xs(),this.nodeHooks=Xs(),this.connectionEvents=Xs(),this.editor=e,this.template=t,e.registerGraph(this)}addNode(e){if(!this.events.beforeAddNode.emit(e).prevented)return this.nodeEvents.addTarget(e.events),this.nodeHooks.addTarget(e.hooks),e.registerGraph(this),this._nodes.push(e),e=this.nodes.find(t=>t.id===e.id),e.onPlaced(),this.events.addNode.emit(e),e}removeNode(e){if(this.nodes.includes(e)){if(this.events.beforeRemoveNode.emit(e).prevented)return;const t=[...Object.values(e.inputs),...Object.values(e.outputs)];this.connections.filter(s=>t.includes(s.from)||t.includes(s.to)).forEach(s=>this.removeConnection(s)),this._nodes.splice(this.nodes.indexOf(e),1),this.events.removeNode.emit(e),e.onDestroy(),this.nodeEvents.removeTarget(e.events),this.nodeHooks.removeTarget(e.hooks)}}addConnection(e,t){const s=this.checkConnection(e,t);if(!s.connectionAllowed||this.events.beforeAddConnection.emit({from:e,to:t}).prevented)return;for(const r of s.connectionsInDanger){const o=this.connections.find(a=>a.id===r.id);o&&this.removeConnection(o)}const i=new e2(s.dummyConnection.from,s.dummyConnection.to);return this.internalAddConnection(i),i}removeConnection(e){if(this.connections.includes(e)){if(this.events.beforeRemoveConnection.emit(e).prevented)return;e.destruct(),this._connections.splice(this.connections.indexOf(e),1),this.events.removeConnection.emit(e),this.connectionEvents.removeTarget(e.events)}}checkConnection(e,t){if(!e||!t)return{connectionAllowed:!1};const s=this.findNodeById(e.nodeId),i=this.findNodeById(t.nodeId);if(s&&i&&s===i)return{connectionAllowed:!1};if(e.isInput&&!t.isInput){const a=e;e=t,t=a}if(e.isInput||!t.isInput)return{connectionAllowed:!1};if(this.connections.some(a=>a.from===e&&a.to===t))return{connectionAllowed:!1};if(this.events.checkConnection.emit({from:e,to:t}).prevented)return{connectionAllowed:!1};const r=this.hooks.checkConnection.execute({from:e,to:t});if(r.some(a=>!a.connectionAllowed))return{connectionAllowed:!1};const o=Array.from(new Set(r.flatMap(a=>a.connectionsInDanger)));return{connectionAllowed:!0,dummyConnection:new yI(e,t),connectionsInDanger:o}}findNodeInterface(e){for(const t of this.nodes){for(const s in t.inputs){const i=t.inputs[s];if(i.id===e)return i}for(const s in t.outputs){const i=t.outputs[s];if(i.id===e)return i}}}findNodeById(e){return this.nodes.find(t=>t.id===e)}load(e){try{this._loading=!0;const t=[];for(let s=this.connections.length-1;s>=0;s--)this.removeConnection(this.connections[s]);for(let s=this.nodes.length-1;s>=0;s--)this.removeNode(this.nodes[s]);this.id=e.id;for(const s of e.nodes){const i=this.editor.nodeTypes.get(s.type);if(!i){t.push(`Node type ${s.type} is not registered`);continue}const r=new i.type;this.addNode(r),r.load(s)}for(const s of e.connections){const i=this.findNodeInterface(s.from),r=this.findNodeInterface(s.to);if(i)if(r){const o=new e2(i,r);o.id=s.id,this.internalAddConnection(o)}else{t.push(`Could not find interface with id ${s.to}`);continue}else{t.push(`Could not find interface with id ${s.from}`);continue}}return this.hooks.load.execute(e),t}finally{this._loading=!1}}save(){const e={id:this.id,nodes:this.nodes.map(t=>t.save()),connections:this.connections.map(t=>({id:t.id,from:t.from.id,to:t.to.id})),inputs:this.inputs,outputs:this.outputs};return this.hooks.save.execute(e)}destroy(){this._destroying=!0;for(const e of this.nodes)this.removeNode(e);this.editor.unregisterGraph(this)}internalAddConnection(e){this.connectionEvents.addTarget(e.events),this._connections.push(e),this.events.addConnection.emit(e)}}const Jl="__baklava_GraphNode-";function Ia(n){return Jl+n.id}const Cxt=["component","connectionCount","events","hidden","hooks","id","isInput","name","nodeId","port","templateId","value"];function wxt(n){return class extends EI{constructor(){super(...arguments),this.type=Ia(n),this.inputs={},this.outputs={},this.template=n,this.calculate=async(t,s)=>{var i;if(!this.subgraph)throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);if(!s.engine||typeof s.engine!="object")throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);const r=s.engine.getInputValues(this.subgraph);for(const c of this.subgraph.inputs)r.set(c.nodeInterfaceId,t[c.id]);const o=await s.engine.runGraph(this.subgraph,r,s.globalValues),a={};for(const c of this.subgraph.outputs)a[c.id]=(i=o.get(c.nodeId))===null||i===void 0?void 0:i.get("output");return a._calculationResults=o,a}}get title(){return this._title}set title(t){this.template.name=t}load(t){if(!this.subgraph)throw new Error("Cannot load a graph node without a graph");if(!this.template)throw new Error("Unable to load graph node without graph template");this.subgraph.load(t.graphState),super.load(t)}save(){if(!this.subgraph)throw new Error("Cannot save a graph node without a graph");return{...super.save(),graphState:this.subgraph.save()}}onPlaced(){this.template.events.updated.subscribe(this,()=>this.initialize()),this.template.events.nameChanged.subscribe(this,t=>{this._title=t}),this.initialize()}onDestroy(){var t;this.template.events.updated.unsubscribe(this),this.template.events.nameChanged.unsubscribe(this),(t=this.subgraph)===null||t===void 0||t.destroy()}initialize(){this.subgraph&&this.subgraph.destroy(),this.subgraph=this.template.createGraph(),this._title=this.template.name,this.updateInterfaces(),this.events.update.emit(null)}updateInterfaces(){if(!this.subgraph)throw new Error("Trying to update interfaces without graph instance");for(const t of this.subgraph.inputs)t.id in this.inputs?this.inputs[t.id].name=t.name:this.addInput(t.id,this.createProxyInterface(t,!0));for(const t of Object.keys(this.inputs))this.subgraph.inputs.some(s=>s.id===t)||this.removeInput(t);for(const t of this.subgraph.outputs)t.id in this.outputs?this.outputs[t.id].name=t.name:this.addOutput(t.id,this.createProxyInterface(t,!1));for(const t of Object.keys(this.outputs))this.subgraph.outputs.some(s=>s.id===t)||this.removeOutput(t);this.addOutput("_calculationResults",new en("_calculationResults",void 0).setHidden(!0))}createProxyInterface(t,s){const i=new en(t.name,void 0);return new Proxy(i,{get:(r,o)=>{var a,c,d;if(Cxt.includes(o)||o in r||typeof o=="string"&&o.startsWith("__v_"))return Reflect.get(r,o);let u;if(s){const h=(a=this.subgraph)===null||a===void 0?void 0:a.nodes.find(g=>wy.isGraphInputNode(g)&&g.graphInterfaceId===t.id);u=h==null?void 0:h.outputs.placeholder.id}else{const h=(c=this.subgraph)===null||c===void 0?void 0:c.nodes.find(g=>Ry.isGraphOutputNode(g)&&g.graphInterfaceId===t.id);u=h==null?void 0:h.inputs.placeholder.id}const _=(d=this.subgraph)===null||d===void 0?void 0:d.connections.find(h=>{var g;return u===((g=s?h.from:h.to)===null||g===void 0?void 0:g.id)}),m=s?_==null?void 0:_.to:_==null?void 0:_.from;if(m)return Reflect.get(m,o)}})}}}class yp{static fromGraph(e,t){return new yp(e.save(),t)}get name(){return this._name}set name(e){this._name=e,this.events.nameChanged.emit(e);const t=this.editor.nodeTypes.get(Ia(this));t&&(t.title=e)}get inputs(){return this.nodes.filter(t=>t.type===Ma).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(t=>t.type===Na).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.output.id}))}constructor(e,t){this.id=Di(),this._name="Subgraph",this.events={nameChanged:new Gt(this),updated:new Gt(this)},this.hooks={beforeLoad:new cs(this),afterSave:new cs(this)},this.editor=t,e.id&&(this.id=e.id),e.name&&(this._name=e.name),this.update(e)}update(e){this.nodes=e.nodes,this.connections=e.connections,this.events.updated.emit()}save(){return{id:this.id,name:this.name,nodes:this.nodes,connections:this.connections,inputs:this.inputs,outputs:this.outputs}}createGraph(e){const t=new Map,s=m=>{const h=Di();return t.set(m,h),h},i=m=>{const h=t.get(m);if(!h)throw new Error(`Unable to create graph from template: Could not map old id ${m} to new id`);return h},r=m=>Rb(m,h=>({id:s(h.id),templateId:h.id,value:h.value})),o=this.nodes.map(m=>({...m,id:s(m.id),inputs:r(m.inputs),outputs:r(m.outputs)})),a=this.connections.map(m=>({id:s(m.id),from:i(m.from),to:i(m.to)})),c=this.inputs.map(m=>({id:m.id,name:m.name,nodeId:i(m.nodeId),nodeInterfaceId:i(m.nodeInterfaceId)})),d=this.outputs.map(m=>({id:m.id,name:m.name,nodeId:i(m.nodeId),nodeInterfaceId:i(m.nodeInterfaceId)})),u={id:Di(),nodes:o,connections:a,inputs:c,outputs:d};return e||(e=new _c(this.editor)),e.load(u).forEach(m=>console.warn(m)),e.template=this,e}}class Rxt{get nodeTypes(){return this._nodeTypes}get graph(){return this._graph}get graphTemplates(){return this._graphTemplates}get graphs(){return this._graphs}get loading(){return this._loading}constructor(){this.events={loaded:new Gt(this),beforeRegisterNodeType:new kn(this),registerNodeType:new Gt(this),beforeUnregisterNodeType:new kn(this),unregisterNodeType:new Gt(this),beforeAddGraphTemplate:new kn(this),addGraphTemplate:new Gt(this),beforeRemoveGraphTemplate:new kn(this),removeGraphTemplate:new Gt(this),registerGraph:new Gt(this),unregisterGraph:new Gt(this)},this.hooks={save:new cs(this),load:new cs(this)},this.graphTemplateEvents=Xs(),this.graphTemplateHooks=Xs(),this.graphEvents=Xs(),this.graphHooks=Xs(),this.nodeEvents=Xs(),this.nodeHooks=Xs(),this.connectionEvents=Xs(),this._graphs=new Set,this._nodeTypes=new Map,this._graph=new _c(this),this._graphTemplates=[],this._loading=!1,this.registerNodeType(wy),this.registerNodeType(Ry)}registerNodeType(e,t){var s,i;if(this.events.beforeRegisterNodeType.emit({type:e,options:t}).prevented)return;const r=new e;this._nodeTypes.set(r.type,{type:e,category:(s=t==null?void 0:t.category)!==null&&s!==void 0?s:"default",title:(i=t==null?void 0:t.title)!==null&&i!==void 0?i:r.title}),this.events.registerNodeType.emit({type:e,options:t})}unregisterNodeType(e){const t=typeof e=="string"?e:new e().type;if(this.nodeTypes.has(t)){if(this.events.beforeUnregisterNodeType.emit(t).prevented)return;this._nodeTypes.delete(t),this.events.unregisterNodeType.emit(t)}}addGraphTemplate(e){if(this.events.beforeAddGraphTemplate.emit(e).prevented)return;this._graphTemplates.push(e),this.graphTemplateEvents.addTarget(e.events),this.graphTemplateHooks.addTarget(e.hooks);const t=wxt(e);this.registerNodeType(t,{category:"Subgraphs",title:e.name}),this.events.addGraphTemplate.emit(e)}removeGraphTemplate(e){if(this.graphTemplates.includes(e)){if(this.events.beforeRemoveGraphTemplate.emit(e).prevented)return;const t=Ia(e);for(const s of[this.graph,...this.graphs.values()]){const i=s.nodes.filter(r=>r.type===t);for(const r of i)s.removeNode(r)}this.unregisterNodeType(t),this._graphTemplates.splice(this._graphTemplates.indexOf(e),1),this.graphTemplateEvents.removeTarget(e.events),this.graphTemplateHooks.removeTarget(e.hooks),this.events.removeGraphTemplate.emit(e)}}registerGraph(e){this.graphEvents.addTarget(e.events),this.graphHooks.addTarget(e.hooks),this.nodeEvents.addTarget(e.nodeEvents),this.nodeHooks.addTarget(e.nodeHooks),this.connectionEvents.addTarget(e.connectionEvents),this.events.registerGraph.emit(e),this._graphs.add(e)}unregisterGraph(e){this.graphEvents.removeTarget(e.events),this.graphHooks.removeTarget(e.hooks),this.nodeEvents.removeTarget(e.nodeEvents),this.nodeHooks.removeTarget(e.nodeHooks),this.connectionEvents.removeTarget(e.connectionEvents),this.events.unregisterGraph.emit(e),this._graphs.delete(e)}load(e){try{for(this._loading=!0,e=this.hooks.load.execute(e);this.graphTemplates.length>0;)this.removeGraphTemplate(this.graphTemplates[0]);e.graphTemplates.forEach(s=>{const i=new yp(s,this);this.addGraphTemplate(i)});const t=this._graph.load(e.graph);return this.events.loaded.emit(),t.forEach(s=>console.warn(s)),t}finally{this._loading=!1}}save(){const e={graph:this.graph.save(),graphTemplates:this.graphTemplates.map(t=>t.save())};return this.hooks.save.execute(e)}}function Axt(n,e){const t=new Map;e.graphs.forEach(s=>{s.nodes.forEach(i=>t.set(i.id,i))}),n.forEach((s,i)=>{const r=t.get(i);r&&s.forEach((o,a)=>{const c=r.outputs[a];c&&(c.value=o)})})}class TI extends Error{constructor(){super("Cycle detected")}}function Mxt(n){return typeof n=="string"}function xI(n,e){const t=new Map,s=new Map,i=new Map;let r,o;if(n instanceof _c)r=n.nodes,o=n.connections;else{if(!e)throw new Error("Invalid argument value: expected array of connections");r=n,o=e}r.forEach(d=>{Object.values(d.inputs).forEach(u=>t.set(u.id,d.id)),Object.values(d.outputs).forEach(u=>t.set(u.id,d.id))}),r.forEach(d=>{const u=o.filter(m=>m.from&&t.get(m.from.id)===d.id),_=new Set(u.map(m=>t.get(m.to.id)).filter(Mxt));s.set(d.id,_),i.set(d,u)});const a=r.slice();o.forEach(d=>{const u=a.findIndex(_=>t.get(d.to.id)===_.id);u>=0&&a.splice(u,1)});const c=[];for(;a.length>0;){const d=a.pop();c.push(d);const u=s.get(d.id);for(;u.size>0;){const _=u.values().next().value;if(u.delete(_),Array.from(s.values()).every(m=>!m.has(_))){const m=r.find(h=>h.id===_);a.push(m)}}}if(Array.from(s.values()).some(d=>d.size>0))throw new TI;return{calculationOrder:c,connectionsFromNode:i,interfaceIdToNodeId:t}}function Nxt(n,e){try{return xI(n,e),!1}catch(t){if(t instanceof TI)return!0;throw t}}var $n;(function(n){n.Running="Running",n.Idle="Idle",n.Paused="Paused",n.Stopped="Stopped"})($n||($n={}));class Ixt{get status(){return this.isRunning?$n.Running:this.internalStatus}constructor(e){this.editor=e,this.events={beforeRun:new kn(this),afterRun:new Gt(this),statusChange:new Gt(this),beforeNodeCalculation:new Gt(this),afterNodeCalculation:new Gt(this)},this.hooks={gatherCalculationData:new cs(this),transferData:new bI},this.recalculateOrder=!0,this.internalStatus=$n.Stopped,this.isRunning=!1,this.editor.nodeEvents.update.subscribe(this,(t,s)=>{s.graph&&!s.graph.loading&&s.graph.activeTransactions===0&&this.internalOnChange(s,t??void 0)}),this.editor.graphEvents.addNode.subscribe(this,(t,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeNode.subscribe(this,(t,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.addConnection.subscribe(this,(t,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeConnection.subscribe(this,(t,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphHooks.checkConnection.subscribe(this,t=>this.checkConnection(t.from,t.to))}start(){this.internalStatus===$n.Stopped&&(this.internalStatus=$n.Idle,this.events.statusChange.emit(this.status))}pause(){this.internalStatus===$n.Idle&&(this.internalStatus=$n.Paused,this.events.statusChange.emit(this.status))}resume(){this.internalStatus===$n.Paused&&(this.internalStatus=$n.Idle,this.events.statusChange.emit(this.status))}stop(){(this.internalStatus===$n.Idle||this.internalStatus===$n.Paused)&&(this.internalStatus=$n.Stopped,this.events.statusChange.emit(this.status))}async runOnce(e,...t){if(this.events.beforeRun.emit(e).prevented)return null;try{this.isRunning=!0,this.events.statusChange.emit(this.status),this.recalculateOrder&&this.calculateOrder();const s=await this.execute(e,...t);return this.events.afterRun.emit(s),s}finally{this.isRunning=!1,this.events.statusChange.emit(this.status)}}checkConnection(e,t){if(e.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,e.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};e=r}if(t.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,t.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};t=r}const s=new yI(e,t);let i=this.editor.graph.connections.slice();return t.allowMultipleConnections||(i=i.filter(r=>r.to!==t)),i.push(s),Nxt(this.editor.graph.nodes,i)?{connectionAllowed:!1,connectionsInDanger:[]}:{connectionAllowed:!0,connectionsInDanger:t.allowMultipleConnections?[]:this.editor.graph.connections.filter(r=>r.to===t)}}calculateOrder(){this.recalculateOrder=!0}async calculateWithoutData(...e){const t=this.hooks.gatherCalculationData.execute(void 0);return await this.runOnce(t,...e)}validateNodeCalculationOutput(e,t){if(typeof t!="object")throw new Error(`Invalid calculation return value from node ${e.id} (type ${e.type})`);Object.keys(e.outputs).forEach(s=>{if(!(s in t))throw new Error(`Calculation return value from node ${e.id} (type ${e.type}) is missing key "${s}"`)})}internalOnChange(e,t){this.internalStatus===$n.Idle&&this.onChange(this.recalculateOrder,e,t)}findInterfaceByTemplateId(e,t){for(const s of e)for(const i of[...Object.values(s.inputs),...Object.values(s.outputs)])if(i.templateId===t)return i;return null}}class Oxt extends Ixt{constructor(e){super(e),this.order=new Map}start(){super.start(),this.recalculateOrder=!0,this.calculateWithoutData()}async runGraph(e,t,s){this.order.has(e.id)||this.order.set(e.id,xI(e));const{calculationOrder:i,connectionsFromNode:r}=this.order.get(e.id),o=new Map;for(const a of i){const c={};Object.entries(a.inputs).forEach(([u,_])=>{c[u]=this.getInterfaceValue(t,_.id)}),this.events.beforeNodeCalculation.emit({inputValues:c,node:a});let d;if(a.calculate)d=await a.calculate(c,{globalValues:s,engine:this});else{d={};for(const[u,_]of Object.entries(a.outputs))d[u]=this.getInterfaceValue(t,_.id)}this.validateNodeCalculationOutput(a,d),this.events.afterNodeCalculation.emit({outputValues:d,node:a}),o.set(a.id,new Map(Object.entries(d))),r.has(a)&&r.get(a).forEach(u=>{var _;const m=(_=Object.entries(a.outputs).find(([,g])=>g.id===u.from.id))===null||_===void 0?void 0:_[0];if(!m)throw new Error(`Could not find key for interface ${u.from.id} +Please check that you don't accidentally use the same token twice to register two different proxies for the same event/hook.`),this.unregisterProxy(e)),this.proxyMap.set(e,t),this.proxies.push(t)}unregisterProxy(e){if(!this.proxyMap.has(e))return;const t=this.proxyMap.get(e);this.proxyMap.delete(e);const s=this.proxies.indexOf(t);s>=0&&this.proxies.splice(s,1)}}class Gt extends ro{constructor(e){super(),this.entity=e}emit(e){this.listeners.forEach(t=>t(e,this.entity))}}class kn extends ro{constructor(e){super(),this.entity=e}emit(e){let t=!1;const s=()=>[t=!0];for(const i of Array.from(this.listeners.values()))if(i(e,s,this.entity),t)return{prevented:!0};return{prevented:!1}}}class bI extends ro{execute(e,t){let s=e;for(const i of this.listeners)s=i(s,t);return s}}class cs extends bI{constructor(e){super(),this.entity=e}execute(e){return super.execute(e,this.entity)}}class Cxt extends ro{constructor(e){super(),this.entity=e}execute(e){const t=[];for(const s of this.listeners)t.push(s(e,this.entity));return t}}function Xs(){const n=Symbol(),e=new Map,t=new Set,s=(c,d)=>{d instanceof ro&&d.registerProxy(n,()=>{var u,_;return(_=(u=e.get(c))===null||u===void 0?void 0:u.listeners)!==null&&_!==void 0?_:[]})},i=c=>{const d=new ro;e.set(c,d),t.forEach(u=>s(c,u[c]))},r=c=>{t.add(c);for(const d of e.keys())s(d,c[d])},o=c=>{for(const d of e.keys())c[d]instanceof ro&&c[d].unregisterProxy(n);t.delete(c)},a=()=>{t.forEach(c=>o(c)),e.clear()};return new Proxy({},{get(c,d){return d==="addTarget"?r:d==="removeTarget"?o:d==="destroy"?a:typeof d!="string"||d.startsWith("_")?c[d]:(e.has(d)||i(d),e.get(d))}})}class e2{constructor(e,t){if(this.destructed=!1,this.events={destruct:new Gt(this)},!e||!t)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Di(),this.from=e,this.to=t,this.from.connectionCount++,this.to.connectionCount++}destruct(){this.events.destruct.emit(),this.from.connectionCount--,this.to.connectionCount--,this.destructed=!0}}class yI{constructor(e,t){if(!e||!t)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Di(),this.from=e,this.to=t}}function Rb(n,e){return Object.fromEntries(Object.entries(n).map(([t,s])=>[t,e(s)]))}class EI{constructor(){this._title="",this.id=Di(),this.events={loaded:new Gt(this),beforeAddInput:new kn(this),addInput:new Gt(this),beforeRemoveInput:new kn(this),removeInput:new Gt(this),beforeAddOutput:new kn(this),addOutput:new Gt(this),beforeRemoveOutput:new kn(this),removeOutput:new Gt(this),beforeTitleChanged:new kn(this),titleChanged:new Gt(this),update:new Gt(this)},this.hooks={beforeLoad:new cs(this),afterSave:new cs(this)}}get graph(){return this.graphInstance}get title(){return this._title}set title(e){this.events.beforeTitleChanged.emit(e).prevented||(this._title=e,this.events.titleChanged.emit(e))}addInput(e,t){return this.addInterface("input",e,t)}addOutput(e,t){return this.addInterface("output",e,t)}removeInput(e){return this.removeInterface("input",e)}removeOutput(e){return this.removeInterface("output",e)}registerGraph(e){this.graphInstance=e}load(e){this.hooks.beforeLoad.execute(e),this.id=e.id,this._title=e.title,Object.entries(e.inputs).forEach(([t,s])=>{this.inputs[t]&&(this.inputs[t].load(s),this.inputs[t].nodeId=this.id)}),Object.entries(e.outputs).forEach(([t,s])=>{this.outputs[t]&&(this.outputs[t].load(s),this.outputs[t].nodeId=this.id)}),this.events.loaded.emit(this)}save(){const e=Rb(this.inputs,i=>i.save()),t=Rb(this.outputs,i=>i.save()),s={type:this.type,id:this.id,title:this.title,inputs:e,outputs:t};return this.hooks.afterSave.execute(s)}onPlaced(){}onDestroy(){}initializeIo(){Object.entries(this.inputs).forEach(([e,t])=>this.initializeIntf("input",e,t)),Object.entries(this.outputs).forEach(([e,t])=>this.initializeIntf("output",e,t))}initializeIntf(e,t,s){s.isInput=e==="input",s.nodeId=this.id,s.events.setValue.subscribe(this,()=>this.events.update.emit({type:e,name:t,intf:s}))}addInterface(e,t,s){const i=e==="input"?this.events.beforeAddInput:this.events.beforeAddOutput,r=e==="input"?this.events.addInput:this.events.addOutput,o=e==="input"?this.inputs:this.outputs;return i.emit(s).prevented?!1:(o[t]=s,this.initializeIntf(e,t,s),r.emit(s),!0)}removeInterface(e,t){const s=e==="input"?this.events.beforeRemoveInput:this.events.beforeRemoveOutput,i=e==="input"?this.events.removeInput:this.events.removeOutput,r=e==="input"?this.inputs[t]:this.outputs[t];if(!r||s.emit(r).prevented)return!1;if(r.connectionCount>0)if(this.graphInstance)this.graphInstance.connections.filter(a=>a.from===r||a.to===r).forEach(a=>{this.graphInstance.removeConnection(a)});else throw new Error("Interface is connected, but no graph instance is specified. Unable to delete interface");return r.events.setValue.unsubscribe(this),e==="input"?delete this.inputs[t]:delete this.outputs[t],i.emit(r),!0}}let vI=class extends EI{load(e){super.load(e)}save(){return super.save()}};function Ka(n){return class extends vI{constructor(){var e,t;super(),this.type=n.type,this.inputs={},this.outputs={},this.calculate=n.calculate?(s,i)=>n.calculate.call(this,s,i):void 0,this._title=(e=n.title)!==null&&e!==void 0?e:n.type,this.executeFactory("input",n.inputs),this.executeFactory("output",n.outputs),(t=n.onCreate)===null||t===void 0||t.call(this)}onPlaced(){var e;(e=n.onPlaced)===null||e===void 0||e.call(this)}onDestroy(){var e;(e=n.onDestroy)===null||e===void 0||e.call(this)}executeFactory(e,t){Object.keys(t||{}).forEach(s=>{const i=t[s]();e==="input"?this.addInput(s,i):this.addOutput(s,i)})}}}class en{set connectionCount(e){this._connectionCount=e,this.events.setConnectionCount.emit(e)}get connectionCount(){return this._connectionCount}set value(e){this.events.beforeSetValue.emit(e).prevented||(this._value=e,this.events.setValue.emit(e))}get value(){return this._value}constructor(e,t){this.id=Di(),this.nodeId="",this.port=!0,this.hidden=!1,this.events={setConnectionCount:new Gt(this),beforeSetValue:new kn(this),setValue:new Gt(this),updated:new Gt(this)},this.hooks={load:new cs(this),save:new cs(this)},this._connectionCount=0,this.name=e,this._value=t}load(e){this.id=e.id,this.templateId=e.templateId,this.value=e.value,this.hooks.load.execute(e)}save(){const e={id:this.id,templateId:this.templateId,value:this.value};return this.hooks.save.execute(e)}setComponent(e){return this.component=e,this}setPort(e){return this.port=e,this}setHidden(e){return this.hidden=e,this}use(e,...t){return e(this,...t),this}}const Ma="__baklava_SubgraphInputNode",Na="__baklava_SubgraphOutputNode";class SI extends vI{constructor(){super(),this.graphInterfaceId=Di()}onPlaced(){super.onPlaced(),this.initializeIo()}save(){return{...super.save(),graphInterfaceId:this.graphInterfaceId}}load(e){super.load(e),this.graphInterfaceId=e.graphInterfaceId}}class wy extends SI{constructor(){super(...arguments),this.type=Ma,this.inputs={name:new en("Name","Input")},this.outputs={placeholder:new en("Value",void 0)}}static isGraphInputNode(e){return e.type===Ma}}class Ry extends SI{constructor(){super(...arguments),this.type=Na,this.inputs={name:new en("Name","Output"),placeholder:new en("Value",void 0)},this.outputs={output:new en("Output",void 0).setHidden(!0)},this.calculate=({placeholder:e})=>({output:e})}static isGraphOutputNode(e){return e.type===Na}}class _c{get nodes(){return this._nodes}get connections(){return this._connections}get loading(){return this._loading}get destroying(){return this._destroying}get inputs(){return this.nodes.filter(t=>t.type===Ma).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(t=>t.type===Na).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.output.id}))}constructor(e,t){this.id=Di(),this.activeTransactions=0,this._nodes=[],this._connections=[],this._loading=!1,this._destroying=!1,this.events={beforeAddNode:new kn(this),addNode:new Gt(this),beforeRemoveNode:new kn(this),removeNode:new Gt(this),beforeAddConnection:new kn(this),addConnection:new Gt(this),checkConnection:new kn(this),beforeRemoveConnection:new kn(this),removeConnection:new Gt(this)},this.hooks={save:new cs(this),load:new cs(this),checkConnection:new Cxt(this)},this.nodeEvents=Xs(),this.nodeHooks=Xs(),this.connectionEvents=Xs(),this.editor=e,this.template=t,e.registerGraph(this)}addNode(e){if(!this.events.beforeAddNode.emit(e).prevented)return this.nodeEvents.addTarget(e.events),this.nodeHooks.addTarget(e.hooks),e.registerGraph(this),this._nodes.push(e),e=this.nodes.find(t=>t.id===e.id),e.onPlaced(),this.events.addNode.emit(e),e}removeNode(e){if(this.nodes.includes(e)){if(this.events.beforeRemoveNode.emit(e).prevented)return;const t=[...Object.values(e.inputs),...Object.values(e.outputs)];this.connections.filter(s=>t.includes(s.from)||t.includes(s.to)).forEach(s=>this.removeConnection(s)),this._nodes.splice(this.nodes.indexOf(e),1),this.events.removeNode.emit(e),e.onDestroy(),this.nodeEvents.removeTarget(e.events),this.nodeHooks.removeTarget(e.hooks)}}addConnection(e,t){const s=this.checkConnection(e,t);if(!s.connectionAllowed||this.events.beforeAddConnection.emit({from:e,to:t}).prevented)return;for(const r of s.connectionsInDanger){const o=this.connections.find(a=>a.id===r.id);o&&this.removeConnection(o)}const i=new e2(s.dummyConnection.from,s.dummyConnection.to);return this.internalAddConnection(i),i}removeConnection(e){if(this.connections.includes(e)){if(this.events.beforeRemoveConnection.emit(e).prevented)return;e.destruct(),this._connections.splice(this.connections.indexOf(e),1),this.events.removeConnection.emit(e),this.connectionEvents.removeTarget(e.events)}}checkConnection(e,t){if(!e||!t)return{connectionAllowed:!1};const s=this.findNodeById(e.nodeId),i=this.findNodeById(t.nodeId);if(s&&i&&s===i)return{connectionAllowed:!1};if(e.isInput&&!t.isInput){const a=e;e=t,t=a}if(e.isInput||!t.isInput)return{connectionAllowed:!1};if(this.connections.some(a=>a.from===e&&a.to===t))return{connectionAllowed:!1};if(this.events.checkConnection.emit({from:e,to:t}).prevented)return{connectionAllowed:!1};const r=this.hooks.checkConnection.execute({from:e,to:t});if(r.some(a=>!a.connectionAllowed))return{connectionAllowed:!1};const o=Array.from(new Set(r.flatMap(a=>a.connectionsInDanger)));return{connectionAllowed:!0,dummyConnection:new yI(e,t),connectionsInDanger:o}}findNodeInterface(e){for(const t of this.nodes){for(const s in t.inputs){const i=t.inputs[s];if(i.id===e)return i}for(const s in t.outputs){const i=t.outputs[s];if(i.id===e)return i}}}findNodeById(e){return this.nodes.find(t=>t.id===e)}load(e){try{this._loading=!0;const t=[];for(let s=this.connections.length-1;s>=0;s--)this.removeConnection(this.connections[s]);for(let s=this.nodes.length-1;s>=0;s--)this.removeNode(this.nodes[s]);this.id=e.id;for(const s of e.nodes){const i=this.editor.nodeTypes.get(s.type);if(!i){t.push(`Node type ${s.type} is not registered`);continue}const r=new i.type;this.addNode(r),r.load(s)}for(const s of e.connections){const i=this.findNodeInterface(s.from),r=this.findNodeInterface(s.to);if(i)if(r){const o=new e2(i,r);o.id=s.id,this.internalAddConnection(o)}else{t.push(`Could not find interface with id ${s.to}`);continue}else{t.push(`Could not find interface with id ${s.from}`);continue}}return this.hooks.load.execute(e),t}finally{this._loading=!1}}save(){const e={id:this.id,nodes:this.nodes.map(t=>t.save()),connections:this.connections.map(t=>({id:t.id,from:t.from.id,to:t.to.id})),inputs:this.inputs,outputs:this.outputs};return this.hooks.save.execute(e)}destroy(){this._destroying=!0;for(const e of this.nodes)this.removeNode(e);this.editor.unregisterGraph(this)}internalAddConnection(e){this.connectionEvents.addTarget(e.events),this._connections.push(e),this.events.addConnection.emit(e)}}const Jl="__baklava_GraphNode-";function Ia(n){return Jl+n.id}const wxt=["component","connectionCount","events","hidden","hooks","id","isInput","name","nodeId","port","templateId","value"];function Rxt(n){return class extends EI{constructor(){super(...arguments),this.type=Ia(n),this.inputs={},this.outputs={},this.template=n,this.calculate=async(t,s)=>{var i;if(!this.subgraph)throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);if(!s.engine||typeof s.engine!="object")throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);const r=s.engine.getInputValues(this.subgraph);for(const c of this.subgraph.inputs)r.set(c.nodeInterfaceId,t[c.id]);const o=await s.engine.runGraph(this.subgraph,r,s.globalValues),a={};for(const c of this.subgraph.outputs)a[c.id]=(i=o.get(c.nodeId))===null||i===void 0?void 0:i.get("output");return a._calculationResults=o,a}}get title(){return this._title}set title(t){this.template.name=t}load(t){if(!this.subgraph)throw new Error("Cannot load a graph node without a graph");if(!this.template)throw new Error("Unable to load graph node without graph template");this.subgraph.load(t.graphState),super.load(t)}save(){if(!this.subgraph)throw new Error("Cannot save a graph node without a graph");return{...super.save(),graphState:this.subgraph.save()}}onPlaced(){this.template.events.updated.subscribe(this,()=>this.initialize()),this.template.events.nameChanged.subscribe(this,t=>{this._title=t}),this.initialize()}onDestroy(){var t;this.template.events.updated.unsubscribe(this),this.template.events.nameChanged.unsubscribe(this),(t=this.subgraph)===null||t===void 0||t.destroy()}initialize(){this.subgraph&&this.subgraph.destroy(),this.subgraph=this.template.createGraph(),this._title=this.template.name,this.updateInterfaces(),this.events.update.emit(null)}updateInterfaces(){if(!this.subgraph)throw new Error("Trying to update interfaces without graph instance");for(const t of this.subgraph.inputs)t.id in this.inputs?this.inputs[t.id].name=t.name:this.addInput(t.id,this.createProxyInterface(t,!0));for(const t of Object.keys(this.inputs))this.subgraph.inputs.some(s=>s.id===t)||this.removeInput(t);for(const t of this.subgraph.outputs)t.id in this.outputs?this.outputs[t.id].name=t.name:this.addOutput(t.id,this.createProxyInterface(t,!1));for(const t of Object.keys(this.outputs))this.subgraph.outputs.some(s=>s.id===t)||this.removeOutput(t);this.addOutput("_calculationResults",new en("_calculationResults",void 0).setHidden(!0))}createProxyInterface(t,s){const i=new en(t.name,void 0);return new Proxy(i,{get:(r,o)=>{var a,c,d;if(wxt.includes(o)||o in r||typeof o=="string"&&o.startsWith("__v_"))return Reflect.get(r,o);let u;if(s){const h=(a=this.subgraph)===null||a===void 0?void 0:a.nodes.find(g=>wy.isGraphInputNode(g)&&g.graphInterfaceId===t.id);u=h==null?void 0:h.outputs.placeholder.id}else{const h=(c=this.subgraph)===null||c===void 0?void 0:c.nodes.find(g=>Ry.isGraphOutputNode(g)&&g.graphInterfaceId===t.id);u=h==null?void 0:h.inputs.placeholder.id}const _=(d=this.subgraph)===null||d===void 0?void 0:d.connections.find(h=>{var g;return u===((g=s?h.from:h.to)===null||g===void 0?void 0:g.id)}),m=s?_==null?void 0:_.to:_==null?void 0:_.from;if(m)return Reflect.get(m,o)}})}}}class yp{static fromGraph(e,t){return new yp(e.save(),t)}get name(){return this._name}set name(e){this._name=e,this.events.nameChanged.emit(e);const t=this.editor.nodeTypes.get(Ia(this));t&&(t.title=e)}get inputs(){return this.nodes.filter(t=>t.type===Ma).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(t=>t.type===Na).map(t=>({id:t.graphInterfaceId,name:t.inputs.name.value,nodeId:t.id,nodeInterfaceId:t.outputs.output.id}))}constructor(e,t){this.id=Di(),this._name="Subgraph",this.events={nameChanged:new Gt(this),updated:new Gt(this)},this.hooks={beforeLoad:new cs(this),afterSave:new cs(this)},this.editor=t,e.id&&(this.id=e.id),e.name&&(this._name=e.name),this.update(e)}update(e){this.nodes=e.nodes,this.connections=e.connections,this.events.updated.emit()}save(){return{id:this.id,name:this.name,nodes:this.nodes,connections:this.connections,inputs:this.inputs,outputs:this.outputs}}createGraph(e){const t=new Map,s=m=>{const h=Di();return t.set(m,h),h},i=m=>{const h=t.get(m);if(!h)throw new Error(`Unable to create graph from template: Could not map old id ${m} to new id`);return h},r=m=>Rb(m,h=>({id:s(h.id),templateId:h.id,value:h.value})),o=this.nodes.map(m=>({...m,id:s(m.id),inputs:r(m.inputs),outputs:r(m.outputs)})),a=this.connections.map(m=>({id:s(m.id),from:i(m.from),to:i(m.to)})),c=this.inputs.map(m=>({id:m.id,name:m.name,nodeId:i(m.nodeId),nodeInterfaceId:i(m.nodeInterfaceId)})),d=this.outputs.map(m=>({id:m.id,name:m.name,nodeId:i(m.nodeId),nodeInterfaceId:i(m.nodeInterfaceId)})),u={id:Di(),nodes:o,connections:a,inputs:c,outputs:d};return e||(e=new _c(this.editor)),e.load(u).forEach(m=>console.warn(m)),e.template=this,e}}class Axt{get nodeTypes(){return this._nodeTypes}get graph(){return this._graph}get graphTemplates(){return this._graphTemplates}get graphs(){return this._graphs}get loading(){return this._loading}constructor(){this.events={loaded:new Gt(this),beforeRegisterNodeType:new kn(this),registerNodeType:new Gt(this),beforeUnregisterNodeType:new kn(this),unregisterNodeType:new Gt(this),beforeAddGraphTemplate:new kn(this),addGraphTemplate:new Gt(this),beforeRemoveGraphTemplate:new kn(this),removeGraphTemplate:new Gt(this),registerGraph:new Gt(this),unregisterGraph:new Gt(this)},this.hooks={save:new cs(this),load:new cs(this)},this.graphTemplateEvents=Xs(),this.graphTemplateHooks=Xs(),this.graphEvents=Xs(),this.graphHooks=Xs(),this.nodeEvents=Xs(),this.nodeHooks=Xs(),this.connectionEvents=Xs(),this._graphs=new Set,this._nodeTypes=new Map,this._graph=new _c(this),this._graphTemplates=[],this._loading=!1,this.registerNodeType(wy),this.registerNodeType(Ry)}registerNodeType(e,t){var s,i;if(this.events.beforeRegisterNodeType.emit({type:e,options:t}).prevented)return;const r=new e;this._nodeTypes.set(r.type,{type:e,category:(s=t==null?void 0:t.category)!==null&&s!==void 0?s:"default",title:(i=t==null?void 0:t.title)!==null&&i!==void 0?i:r.title}),this.events.registerNodeType.emit({type:e,options:t})}unregisterNodeType(e){const t=typeof e=="string"?e:new e().type;if(this.nodeTypes.has(t)){if(this.events.beforeUnregisterNodeType.emit(t).prevented)return;this._nodeTypes.delete(t),this.events.unregisterNodeType.emit(t)}}addGraphTemplate(e){if(this.events.beforeAddGraphTemplate.emit(e).prevented)return;this._graphTemplates.push(e),this.graphTemplateEvents.addTarget(e.events),this.graphTemplateHooks.addTarget(e.hooks);const t=Rxt(e);this.registerNodeType(t,{category:"Subgraphs",title:e.name}),this.events.addGraphTemplate.emit(e)}removeGraphTemplate(e){if(this.graphTemplates.includes(e)){if(this.events.beforeRemoveGraphTemplate.emit(e).prevented)return;const t=Ia(e);for(const s of[this.graph,...this.graphs.values()]){const i=s.nodes.filter(r=>r.type===t);for(const r of i)s.removeNode(r)}this.unregisterNodeType(t),this._graphTemplates.splice(this._graphTemplates.indexOf(e),1),this.graphTemplateEvents.removeTarget(e.events),this.graphTemplateHooks.removeTarget(e.hooks),this.events.removeGraphTemplate.emit(e)}}registerGraph(e){this.graphEvents.addTarget(e.events),this.graphHooks.addTarget(e.hooks),this.nodeEvents.addTarget(e.nodeEvents),this.nodeHooks.addTarget(e.nodeHooks),this.connectionEvents.addTarget(e.connectionEvents),this.events.registerGraph.emit(e),this._graphs.add(e)}unregisterGraph(e){this.graphEvents.removeTarget(e.events),this.graphHooks.removeTarget(e.hooks),this.nodeEvents.removeTarget(e.nodeEvents),this.nodeHooks.removeTarget(e.nodeHooks),this.connectionEvents.removeTarget(e.connectionEvents),this.events.unregisterGraph.emit(e),this._graphs.delete(e)}load(e){try{for(this._loading=!0,e=this.hooks.load.execute(e);this.graphTemplates.length>0;)this.removeGraphTemplate(this.graphTemplates[0]);e.graphTemplates.forEach(s=>{const i=new yp(s,this);this.addGraphTemplate(i)});const t=this._graph.load(e.graph);return this.events.loaded.emit(),t.forEach(s=>console.warn(s)),t}finally{this._loading=!1}}save(){const e={graph:this.graph.save(),graphTemplates:this.graphTemplates.map(t=>t.save())};return this.hooks.save.execute(e)}}function Mxt(n,e){const t=new Map;e.graphs.forEach(s=>{s.nodes.forEach(i=>t.set(i.id,i))}),n.forEach((s,i)=>{const r=t.get(i);r&&s.forEach((o,a)=>{const c=r.outputs[a];c&&(c.value=o)})})}class TI extends Error{constructor(){super("Cycle detected")}}function Nxt(n){return typeof n=="string"}function xI(n,e){const t=new Map,s=new Map,i=new Map;let r,o;if(n instanceof _c)r=n.nodes,o=n.connections;else{if(!e)throw new Error("Invalid argument value: expected array of connections");r=n,o=e}r.forEach(d=>{Object.values(d.inputs).forEach(u=>t.set(u.id,d.id)),Object.values(d.outputs).forEach(u=>t.set(u.id,d.id))}),r.forEach(d=>{const u=o.filter(m=>m.from&&t.get(m.from.id)===d.id),_=new Set(u.map(m=>t.get(m.to.id)).filter(Nxt));s.set(d.id,_),i.set(d,u)});const a=r.slice();o.forEach(d=>{const u=a.findIndex(_=>t.get(d.to.id)===_.id);u>=0&&a.splice(u,1)});const c=[];for(;a.length>0;){const d=a.pop();c.push(d);const u=s.get(d.id);for(;u.size>0;){const _=u.values().next().value;if(u.delete(_),Array.from(s.values()).every(m=>!m.has(_))){const m=r.find(h=>h.id===_);a.push(m)}}}if(Array.from(s.values()).some(d=>d.size>0))throw new TI;return{calculationOrder:c,connectionsFromNode:i,interfaceIdToNodeId:t}}function Ixt(n,e){try{return xI(n,e),!1}catch(t){if(t instanceof TI)return!0;throw t}}var $n;(function(n){n.Running="Running",n.Idle="Idle",n.Paused="Paused",n.Stopped="Stopped"})($n||($n={}));class Oxt{get status(){return this.isRunning?$n.Running:this.internalStatus}constructor(e){this.editor=e,this.events={beforeRun:new kn(this),afterRun:new Gt(this),statusChange:new Gt(this),beforeNodeCalculation:new Gt(this),afterNodeCalculation:new Gt(this)},this.hooks={gatherCalculationData:new cs(this),transferData:new bI},this.recalculateOrder=!0,this.internalStatus=$n.Stopped,this.isRunning=!1,this.editor.nodeEvents.update.subscribe(this,(t,s)=>{s.graph&&!s.graph.loading&&s.graph.activeTransactions===0&&this.internalOnChange(s,t??void 0)}),this.editor.graphEvents.addNode.subscribe(this,(t,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeNode.subscribe(this,(t,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.addConnection.subscribe(this,(t,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeConnection.subscribe(this,(t,s)=>{this.recalculateOrder=!0,!s.loading&&s.activeTransactions===0&&this.internalOnChange()}),this.editor.graphHooks.checkConnection.subscribe(this,t=>this.checkConnection(t.from,t.to))}start(){this.internalStatus===$n.Stopped&&(this.internalStatus=$n.Idle,this.events.statusChange.emit(this.status))}pause(){this.internalStatus===$n.Idle&&(this.internalStatus=$n.Paused,this.events.statusChange.emit(this.status))}resume(){this.internalStatus===$n.Paused&&(this.internalStatus=$n.Idle,this.events.statusChange.emit(this.status))}stop(){(this.internalStatus===$n.Idle||this.internalStatus===$n.Paused)&&(this.internalStatus=$n.Stopped,this.events.statusChange.emit(this.status))}async runOnce(e,...t){if(this.events.beforeRun.emit(e).prevented)return null;try{this.isRunning=!0,this.events.statusChange.emit(this.status),this.recalculateOrder&&this.calculateOrder();const s=await this.execute(e,...t);return this.events.afterRun.emit(s),s}finally{this.isRunning=!1,this.events.statusChange.emit(this.status)}}checkConnection(e,t){if(e.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,e.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};e=r}if(t.templateId){const r=this.findInterfaceByTemplateId(this.editor.graph.nodes,t.templateId);if(!r)return{connectionAllowed:!0,connectionsInDanger:[]};t=r}const s=new yI(e,t);let i=this.editor.graph.connections.slice();return t.allowMultipleConnections||(i=i.filter(r=>r.to!==t)),i.push(s),Ixt(this.editor.graph.nodes,i)?{connectionAllowed:!1,connectionsInDanger:[]}:{connectionAllowed:!0,connectionsInDanger:t.allowMultipleConnections?[]:this.editor.graph.connections.filter(r=>r.to===t)}}calculateOrder(){this.recalculateOrder=!0}async calculateWithoutData(...e){const t=this.hooks.gatherCalculationData.execute(void 0);return await this.runOnce(t,...e)}validateNodeCalculationOutput(e,t){if(typeof t!="object")throw new Error(`Invalid calculation return value from node ${e.id} (type ${e.type})`);Object.keys(e.outputs).forEach(s=>{if(!(s in t))throw new Error(`Calculation return value from node ${e.id} (type ${e.type}) is missing key "${s}"`)})}internalOnChange(e,t){this.internalStatus===$n.Idle&&this.onChange(this.recalculateOrder,e,t)}findInterfaceByTemplateId(e,t){for(const s of e)for(const i of[...Object.values(s.inputs),...Object.values(s.outputs)])if(i.templateId===t)return i;return null}}class kxt extends Oxt{constructor(e){super(e),this.order=new Map}start(){super.start(),this.recalculateOrder=!0,this.calculateWithoutData()}async runGraph(e,t,s){this.order.has(e.id)||this.order.set(e.id,xI(e));const{calculationOrder:i,connectionsFromNode:r}=this.order.get(e.id),o=new Map;for(const a of i){const c={};Object.entries(a.inputs).forEach(([u,_])=>{c[u]=this.getInterfaceValue(t,_.id)}),this.events.beforeNodeCalculation.emit({inputValues:c,node:a});let d;if(a.calculate)d=await a.calculate(c,{globalValues:s,engine:this});else{d={};for(const[u,_]of Object.entries(a.outputs))d[u]=this.getInterfaceValue(t,_.id)}this.validateNodeCalculationOutput(a,d),this.events.afterNodeCalculation.emit({outputValues:d,node:a}),o.set(a.id,new Map(Object.entries(d))),r.has(a)&&r.get(a).forEach(u=>{var _;const m=(_=Object.entries(a.outputs).find(([,g])=>g.id===u.from.id))===null||_===void 0?void 0:_[0];if(!m)throw new Error(`Could not find key for interface ${u.from.id} This is likely a Baklava internal issue. Please report it on GitHub.`);const h=this.hooks.transferData.execute(d[m],u);u.to.allowMultipleConnections?t.has(u.to.id)?t.get(u.to.id).push(h):t.set(u.to.id,[h]):t.set(u.to.id,h)})}return o}async execute(e){this.recalculateOrder&&(this.order.clear(),this.recalculateOrder=!1);const t=this.getInputValues(this.editor.graph);return await this.runGraph(this.editor.graph,t,e)}getInputValues(e){const t=new Map;for(const s of e.nodes)Object.values(s.inputs).forEach(i=>{i.connectionCount===0&&t.set(i.id,i.value)}),s.calculate||Object.values(s.outputs).forEach(i=>{t.set(i.id,i.value)});return t}onChange(e){this.recalculateOrder=e||this.recalculateOrder,this.calculateWithoutData()}getInterfaceValue(e,t){if(!e.has(t))throw new Error(`Could not find value for interface ${t} -This is likely a Baklava internal issue. Please report it on GitHub.`);return e.get(t)}}const kxt=["INPUT","TEXTAREA","SELECT"];function CI(n){return kxt.includes(n.tagName)}let Ab=null;function Dxt(n){Ab=n}function ds(){if(!Ab)throw new Error("providePlugin() must be called before usePlugin()");return{viewModel:Ab}}function Ns(){const{viewModel:n}=ds();return{graph:Bd(n.value,"displayedGraph"),switchGraph:n.value.switchGraph}}function wI(n){const{graph:e}=Ns(),t=ot(null),s=ot(null);return{dragging:et(()=>!!t.value),onPointerDown:c=>{t.value={x:c.pageX,y:c.pageY},s.value={x:n.value.x,y:n.value.y}},onPointerMove:c=>{if(t.value){const d=c.pageX-t.value.x,u=c.pageY-t.value.y;n.value.x=s.value.x+d/e.value.scaling,n.value.y=s.value.y+u/e.value.scaling}},onPointerUp:()=>{t.value=null,s.value=null}}}function RI(n,e,t){if(!e.template)return!1;if(Ia(e.template)===t)return!0;const s=n.graphTemplates.find(r=>Ia(r)===t);return s?s.nodes.filter(r=>r.type.startsWith(Jl)).some(r=>RI(n,e,r.type)):!1}function AI(n){return et(()=>{const e=Array.from(n.value.editor.nodeTypes.entries()),t=new Set(e.map(([,i])=>i.category)),s=[];for(const i of t.values()){let r=e.filter(([,o])=>o.category===i);n.value.displayedGraph.template?r=r.filter(([o])=>!RI(n.value.editor,n.value.displayedGraph,o)):r=r.filter(([o])=>![Ma,Na].includes(o)),r.length>0&&s.push({name:i,nodeTypes:Object.fromEntries(r)})}return s.sort((i,r)=>i.name==="default"?-1:r.name==="default"||i.name>r.name?1:-1),s})}function MI(){const{graph:n}=Ns();return{transform:(t,s)=>{const i=t/n.value.scaling-n.value.panning.x,r=s/n.value.scaling-n.value.panning.y;return[i,r]}}}function Lxt(){const{graph:n}=Ns();let e=[],t=-1,s={x:0,y:0};const i=et(()=>n.value.panning),r=wI(i),o=et(()=>({"transform-origin":"0 0",transform:`scale(${n.value.scaling}) translate(${n.value.panning.x}px, ${n.value.panning.y}px)`})),a=(h,g,f)=>{const b=[h/n.value.scaling-n.value.panning.x,g/n.value.scaling-n.value.panning.y],y=[h/f-n.value.panning.x,g/f-n.value.panning.y],E=[y[0]-b[0],y[1]-b[1]];n.value.panning.x+=E[0],n.value.panning.y+=E[1],n.value.scaling=f},c=h=>{h.preventDefault();let g=h.deltaY;h.deltaMode===1&&(g*=32);const f=n.value.scaling*(1-g/3e3);a(h.offsetX,h.offsetY,f)},d=()=>({ax:e[0].clientX,ay:e[0].clientY,bx:e[1].clientX,by:e[1].clientY});return{styles:o,...r,onPointerDown:h=>{if(e.push(h),r.onPointerDown(h),e.length===2){const{ax:g,ay:f,bx:b,by:y}=d();s={x:g+(b-g)/2,y:f+(y-f)/2}}},onPointerMove:h=>{for(let g=0;g0){const R=n.value.scaling*(1+(S-t)/500);a(s.x,s.y,R)}t=S}else r.onPointerMove(h)},onPointerUp:h=>{e=e.filter(g=>g.pointerId!==h.pointerId),t=-1,r.onPointerUp()},onMouseWheel:c}}var ys=(n=>(n[n.NONE=0]="NONE",n[n.ALLOWED=1]="ALLOWED",n[n.FORBIDDEN=2]="FORBIDDEN",n))(ys||{});const NI=Symbol();function Pxt(){const{graph:n}=Ns(),e=ot(null),t=ot(null),s=a=>{e.value&&(e.value.mx=a.offsetX/n.value.scaling-n.value.panning.x,e.value.my=a.offsetY/n.value.scaling-n.value.panning.y)},i=()=>{if(t.value){if(e.value)return;const a=n.value.connections.find(c=>c.to===t.value);t.value.isInput&&a?(e.value={status:ys.NONE,from:a.from},n.value.removeConnection(a)):e.value={status:ys.NONE,from:t.value},e.value.mx=void 0,e.value.my=void 0}},r=()=>{if(e.value&&t.value){if(e.value.from===t.value)return;n.value.addConnection(e.value.from,e.value.to)}e.value=null},o=a=>{if(t.value=a??null,a&&e.value){e.value.to=a;const c=n.value.checkConnection(e.value.from,e.value.to);if(e.value.status=c.connectionAllowed?ys.ALLOWED:ys.FORBIDDEN,c.connectionAllowed){const d=c.connectionsInDanger.map(u=>u.id);n.value.connections.forEach(u=>{d.includes(u.id)&&(u.isInDanger=!0)})}}else!a&&e.value&&(e.value.to=void 0,e.value.status=ys.NONE,n.value.connections.forEach(c=>{c.isInDanger=!1}))};return na(NI,{temporaryConnection:e,hoveredOver:o}),{temporaryConnection:e,onMouseMove:s,onMouseDown:i,onMouseUp:r,hoveredOver:o}}function Fxt(n){const e=ot(!1),t=ot(0),s=ot(0),i=AI(n),{transform:r}=MI(),o=et(()=>{let u=[];const _={};for(const h of i.value){const g=Object.entries(h.nodeTypes).map(([f,b])=>({label:b.title,value:"addNode:"+f}));h.name==="default"?u=g:_[h.name]=g}const m=[...Object.entries(_).map(([h,g])=>({label:h,submenu:g}))];return m.length>0&&u.length>0&&m.push({isDivider:!0}),m.push(...u),m}),a=et(()=>n.value.settings.contextMenu.additionalItems.length===0?o.value:[{label:"Add node",submenu:o.value},...n.value.settings.contextMenu.additionalItems.map(u=>"isDivider"in u||"submenu"in u?u:{label:u.label,value:"command:"+u.command,disabled:!n.value.commandHandler.canExecuteCommand(u.command)})]);function c(u){const _=u.target;if(!(_ instanceof Element)||CI(_))return;u.preventDefault(),e.value=!0;const m=_.getBoundingClientRect(),g=_.closest(".baklava-editor").getBoundingClientRect();t.value=m.x+u.offsetX-g.x,s.value=m.y+u.offsetY-g.y}function d(u){if(u.startsWith("addNode:")){const _=u.substring(8),m=n.value.editor.nodeTypes.get(_);if(!m)return;const h=Hn(new m.type);n.value.displayedGraph.addNode(h);const[g,f]=r(t.value,s.value);h.position.x=g,h.position.y=f}else if(u.startsWith("command:")){const _=u.substring(8);n.value.commandHandler.canExecuteCommand(_)&&n.value.commandHandler.executeCommand(_)}}return{show:e,x:t,y:s,items:a,open:c,onClick:d}}const Ld="START_SELECTION_BOX";function Uxt(n){const{viewModel:e}=ds(),{graph:t}=Ns(),s=et(()=>t.value.nodes),i=ot(!1),r=ot(!1),o=ot([0,0]),a=ot([0,0]);Tn(e,()=>{e.value.commandHandler.hasCommand(Ld)||(e.value.commandHandler.registerCommand(Ld,{canExecute:()=>!0,execute(){i.value=!0}}),e.value.commandHandler.registerHotkey(["b"],Ld))},{immediate:!0});function c(y){return[y.clientX-n.value.getBoundingClientRect().left,y.clientY-n.value.getBoundingClientRect().top]}function d(y){return i.value?(r.value=!0,i.value=!1,o.value=c(y),a.value=c(y),document.addEventListener("pointermove",u),document.addEventListener("pointerup",_),!0):!1}function u(y){o.value=c(y)}function _(y){document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",_),o.value=c(y),r.value=!1;const E=m();for(const v of E)e.value.displayedGraph.selectedNodes.push(v)}function m(){const y=h(),v=document.querySelector(".baklava-editor").getBoundingClientRect();return s.value.filter(S=>{const R=g(S,v);return f(y,R)})}function h(){return{left:Math.min(o.value[0],a.value[0]),top:Math.min(o.value[1],a.value[1]),right:Math.max(o.value[0],a.value[0]),bottom:Math.max(o.value[1],a.value[1])}}function g(y,E){const v=document.getElementById(y.id),S=v?v.getBoundingClientRect():{x:0,y:0,width:0,height:0},R=S.x-E.left,w=S.y-E.top;return{left:R,top:w,right:R+S.width,bottom:w+S.height}}function f(y,E){return y.leftE.left&&y.topE.top}function b(){return{width:Math.abs(a.value[0]-o.value[0])+"px",height:Math.abs(a.value[1]-o.value[1])+"px",left:(a.value[0]>o.value[0]?o.value[0]:a.value[0])+"px",top:(a.value[1]>o.value[1]?o.value[1]:a.value[1])+"px"}}return Hn({startSelection:i,isSelecting:r,start:o,end:a,onPointerDown:d,getStyles:b})}const Bxt=cn({setup(){const{viewModel:n}=ds(),{graph:e}=Ns();return{styles:et(()=>{const s=n.value.settings.background,i=e.value.panning.x*e.value.scaling,r=e.value.panning.y*e.value.scaling,o=e.value.scaling*s.gridSize,a=o/s.gridDivision,c=`${o}px ${o}px, ${o}px ${o}px`,d=e.value.scaling>s.subGridVisibleThreshold?`, ${a}px ${a}px, ${a}px ${a}px`:"";return{backgroundPosition:`left ${i}px top ${r}px`,backgroundSize:`${c} ${d}`}})}}}),sn=(n,e)=>{const t=n.__vccOpts||n;for(const[s,i]of e)t[s]=i;return t};function Gxt(n,e,t,s,i,r){return T(),x("div",{class:"background",style:Vt(n.styles)},null,4)}const Vxt=sn(Bxt,[["render",Gxt]]);function zxt(n){return E2()?(_O(n),!0):!1}function Ay(n){return typeof n=="function"?n():bt(n)}const II=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Hxt=Object.prototype.toString,qxt=n=>Hxt.call(n)==="[object Object]",Pd=()=>{},Yxt=$xt();function $xt(){var n,e;return II&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Wxt(n,e,t=!1){return e.reduce((s,i)=>(i in n&&(!t||n[i]!==void 0)&&(s[i]=n[i]),s),{})}function Kxt(n,e={}){if(!pn(n))return HO(n);const t=Array.isArray(n.value)?Array.from({length:n.value.length}):{};for(const s in n.value)t[s]=zO(()=>({get(){return n.value[s]},set(i){var r;if((r=Ay(e.replaceRef))!=null?r:!0)if(Array.isArray(n.value)){const a=[...n.value];a[s]=i,n.value=a}else{const a={...n.value,[s]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(n.value)),n.value=a}else n.value[s]=i}}));return t}function bl(n){var e;const t=Ay(n);return(e=t==null?void 0:t.$el)!=null?e:t}const My=II?window:void 0;function Ll(...n){let e,t,s,i;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,s,i]=n,e=My):[e,t,s,i]=n,!e)return Pd;Array.isArray(t)||(t=[t]),Array.isArray(s)||(s=[s]);const r=[],o=()=>{r.forEach(u=>u()),r.length=0},a=(u,_,m,h)=>(u.addEventListener(_,m,h),()=>u.removeEventListener(_,m,h)),c=Tn(()=>[bl(e),Ay(i)],([u,_])=>{if(o(),!u)return;const m=qxt(_)?{..._}:_;r.push(...t.flatMap(h=>s.map(g=>a(u,h,g,m))))},{immediate:!0,flush:"post"}),d=()=>{c(),o()};return zxt(d),d}let t2=!1;function OI(n,e,t={}){const{window:s=My,ignore:i=[],capture:r=!0,detectIframe:o=!1}=t;if(!s)return Pd;Yxt&&!t2&&(t2=!0,Array.from(s.document.body.children).forEach(m=>m.addEventListener("click",Pd)),s.document.documentElement.addEventListener("click",Pd));let a=!0;const c=m=>i.some(h=>{if(typeof h=="string")return Array.from(s.document.querySelectorAll(h)).some(g=>g===m.target||m.composedPath().includes(g));{const g=bl(h);return g&&(m.target===g||m.composedPath().includes(g))}}),u=[Ll(s,"click",m=>{const h=bl(n);if(!(!h||h===m.target||m.composedPath().includes(h))){if(m.detail===0&&(a=!c(m)),!a){a=!0;return}e(m)}},{passive:!0,capture:r}),Ll(s,"pointerdown",m=>{const h=bl(n);a=!c(m)&&!!(h&&!m.composedPath().includes(h))},{passive:!0}),o&&Ll(s,"blur",m=>{setTimeout(()=>{var h;const g=bl(n);((h=s.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(g!=null&&g.contains(s.document.activeElement))&&e(m)},0)})].filter(Boolean);return()=>u.forEach(m=>m())}const kI={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},jxt=Object.keys(kI);function Qxt(n={}){const{target:e=My}=n,t=ot(!1),s=ot(n.initialValue||{});Object.assign(s.value,kI,s.value);const i=r=>{t.value=!0,!(n.pointerTypes&&!n.pointerTypes.includes(r.pointerType))&&(s.value=Wxt(r,jxt,!1))};if(e){const r={passive:!0};Ll(e,["pointerdown","pointermove","pointerup"],i,r),Ll(e,"pointerleave",()=>t.value=!1,r)}return{...Kxt(s),isInside:t}}const Xxt=["onMouseenter","onMouseleave","onClick"],Zxt={class:"flex-fill"},Jxt={key:0,class:"__submenu-icon",style:{"line-height":"1em"}},eCt=l("svg",{width:"13",height:"13",viewBox:"-60 120 250 250"},[l("path",{d:"M160.875 279.5625 L70.875 369.5625 L70.875 189.5625 L160.875 279.5625 Z",stroke:"none",fill:"white"})],-1),tCt=[eCt],Ny=cn({__name:"ContextMenu",props:{modelValue:{type:Boolean},items:{},x:{default:0},y:{default:0},isNested:{type:Boolean,default:!1},isFlipped:{default:()=>({x:!1,y:!1})},flippable:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(n,{emit:e}){const t=n,s=e;let i=null;const r=ot(null),o=ot(-1),a=ot(0),c=ot({x:!1,y:!1}),d=et(()=>t.flippable&&(c.value.x||t.isFlipped.x)),u=et(()=>t.flippable&&(c.value.y||t.isFlipped.y)),_=et(()=>{const E={};return t.isNested||(E.top=(u.value?t.y-a.value:t.y)+"px",E.left=t.x+"px"),E}),m=et(()=>({"--flipped-x":d.value,"--flipped-y":u.value,"--nested":t.isNested})),h=et(()=>t.items.map(E=>({...E,hover:!1})));Tn([()=>t.y,()=>t.items],()=>{var E,v,S,R;a.value=t.items.length*30;const w=((v=(E=r.value)==null?void 0:E.parentElement)==null?void 0:v.offsetWidth)??0,A=((R=(S=r.value)==null?void 0:S.parentElement)==null?void 0:R.offsetHeight)??0;c.value.x=!t.isNested&&t.x>w*.75,c.value.y=!t.isNested&&t.y+a.value>A-20}),OI(r,()=>{t.modelValue&&s("update:modelValue",!1)});const g=E=>{!E.submenu&&E.value&&(s("click",E.value),s("update:modelValue",!1))},f=E=>{s("click",E),o.value=-1,t.isNested||s("update:modelValue",!1)},b=(E,v)=>{t.items[v].submenu&&(o.value=v,i!==null&&(clearTimeout(i),i=null))},y=(E,v)=>{t.items[v].submenu&&(i=window.setTimeout(()=>{o.value=-1,i=null},200))};return(E,v)=>{const S=Je("ContextMenu",!0);return T(),at(Bs,{name:"slide-fade"},{default:Ne(()=>[k(l("div",{ref_key:"el",ref:r,class:Pe(["baklava-context-menu",m.value]),style:Vt(_.value)},[(T(!0),x(Le,null,We(h.value,(R,w)=>(T(),x(Le,null,[R.isDivider?(T(),x("div",{key:`d-${w}`,class:"divider"})):(T(),x("div",{key:`i-${w}`,class:Pe(["item",{submenu:!!R.submenu,"--disabled":!!R.disabled}]),onMouseenter:A=>b(A,w),onMouseleave:A=>y(A,w),onClick:$(A=>g(R),["stop","prevent"])},[l("div",Zxt,Y(R.label),1),R.submenu?(T(),x("div",Jxt,tCt)):B("",!0),R.submenu?(T(),at(S,{key:1,"model-value":o.value===w,items:R.submenu,"is-nested":!0,"is-flipped":{x:d.value,y:u.value},flippable:E.flippable,onClick:f},null,8,["model-value","items","is-flipped","flippable"])):B("",!0)],42,Xxt))],64))),256))],6),[[_t,E.modelValue]])]),_:1})}}}),nCt={},sCt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},iCt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),rCt=l("circle",{cx:"12",cy:"12",r:"1"},null,-1),oCt=l("circle",{cx:"12",cy:"19",r:"1"},null,-1),aCt=l("circle",{cx:"12",cy:"5",r:"1"},null,-1),lCt=[iCt,rCt,oCt,aCt];function cCt(n,e){return T(),x("svg",sCt,lCt)}const DI=sn(nCt,[["render",cCt]]),dCt=["id"],uCt={key:0,class:"__tooltip"},pCt={key:2,class:"align-middle"},n2=cn({__name:"NodeInterface",props:{node:{},intf:{}},setup(n){const e=(b,y=100)=>{const E=typeof(b==null?void 0:b.toString)=="function"?String(b):"";return E.length>y?E.slice(0,y)+"...":E},t=n,{viewModel:s}=ds(),{hoveredOver:i,temporaryConnection:r}=Ts(NI),o=ot(null),a=et(()=>t.intf.connectionCount>0),c=ot(!1),d=et(()=>s.value.settings.displayValueOnHover&&c.value),u=et(()=>({"--input":t.intf.isInput,"--output":!t.intf.isInput,"--connected":a.value})),_=et(()=>t.intf.component&&(!t.intf.isInput||!t.intf.port||t.intf.connectionCount===0)),m=()=>{c.value=!0,i(t.intf)},h=()=>{c.value=!1,i(void 0)},g=()=>{o.value&&s.value.hooks.renderInterface.execute({intf:t.intf,el:o.value})},f=()=>{const b=s.value.displayedGraph.sidebar;b.nodeId=t.node.id,b.optionName=t.intf.name,b.visible=!0};return di(g),nc(g),(b,y)=>{var E;return T(),x("div",{id:b.intf.id,ref_key:"el",ref:o,class:Pe(["baklava-node-interface",u.value])},[b.intf.port?(T(),x("div",{key:0,class:Pe(["__port",{"--selected":((E=bt(r))==null?void 0:E.from)===b.intf}]),onPointerover:m,onPointerout:h},[on(b.$slots,"portTooltip",{showTooltip:d.value},()=>[d.value===!0?(T(),x("span",uCt,Y(e(b.intf.value)),1)):B("",!0)])],34)):B("",!0),_.value?(T(),at(Pu(b.intf.component),{key:1,modelValue:b.intf.value,"onUpdate:modelValue":y[0]||(y[0]=v=>b.intf.value=v),node:b.node,intf:b.intf,onOpenSidebar:f},null,40,["modelValue","node","intf"])):(T(),x("span",pCt,Y(b.intf.name),1))],10,dCt)}}}),fCt=["id","data-node-type"],_Ct={class:"__title-label"},mCt={class:"__menu"},hCt={class:"__outputs"},gCt={class:"__inputs"},bCt=cn({__name:"Node",props:{node:{},selected:{type:Boolean,default:!1},dragging:{type:Boolean}},emits:["select","start-drag"],setup(n,{emit:e}){const t=n,s=e,{viewModel:i}=ds(),{graph:r,switchGraph:o}=Ns(),a=ot(null),c=ot(!1),d=ot(""),u=ot(null),_=ot(!1),m=ot(!1),h=et(()=>{const V=[{value:"rename",label:"Rename"},{value:"delete",label:"Delete"}];return t.node.type.startsWith(Jl)&&V.push({value:"editSubgraph",label:"Edit Subgraph"}),V}),g=et(()=>({"--selected":t.selected,"--dragging":t.dragging,"--two-column":!!t.node.twoColumn})),f=et(()=>({"--reverse-y":t.node.reverseY??i.value.settings.nodes.reverseY})),b=et(()=>{var V,ee;return{top:`${((V=t.node.position)==null?void 0:V.y)??0}px`,left:`${((ee=t.node.position)==null?void 0:ee.x)??0}px`,"--width":`${t.node.width??i.value.settings.nodes.defaultWidth}px`}}),y=et(()=>Object.values(t.node.inputs).filter(V=>!V.hidden)),E=et(()=>Object.values(t.node.outputs).filter(V=>!V.hidden)),v=()=>{s("select")},S=V=>{t.selected||v(),s("start-drag",V)},R=()=>{m.value=!0},w=async V=>{var ee;switch(V){case"delete":r.value.removeNode(t.node);break;case"rename":d.value=t.node.title,c.value=!0,await Ue(),(ee=u.value)==null||ee.focus();break;case"editSubgraph":o(t.node.template);break}},A=()=>{t.node.title=d.value,c.value=!1},O=()=>{a.value&&i.value.hooks.renderNode.execute({node:t.node,el:a.value})},C=V=>{_.value=!0,V.preventDefault()},M=V=>{if(!_.value)return;const ee=t.node.width+V.movementX/r.value.scaling,I=i.value.settings.nodes.minWidth,H=i.value.settings.nodes.maxWidth;t.node.width=Math.max(I,Math.min(H,ee))},G=()=>{_.value=!1};return di(()=>{O(),window.addEventListener("mousemove",M),window.addEventListener("mouseup",G)}),nc(O),La(()=>{window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",G)}),(V,ee)=>(T(),x("div",{id:V.node.id,ref_key:"el",ref:a,class:Pe(["baklava-node",g.value]),style:Vt(b.value),"data-node-type":V.node.type,onPointerdown:v},[bt(i).settings.nodes.resizable?(T(),x("div",{key:0,class:"__resize-handle",onMousedown:C},null,32)):B("",!0),on(V.$slots,"title",{},()=>[l("div",{class:"__title",onPointerdown:$(S,["self","stop"])},[c.value?k((T(),x("input",{key:1,ref_key:"renameInputEl",ref:u,"onUpdate:modelValue":ee[1]||(ee[1]=I=>d.value=I),type:"text",class:"baklava-input",placeholder:"Node Name",onBlur:A,onKeydown:qn(A,["enter"])},null,544)),[[ue,d.value]]):(T(),x(Le,{key:0},[l("div",_Ct,Y(V.node.title),1),l("div",mCt,[z(DI,{class:"--clickable",onClick:R}),z(bt(Ny),{modelValue:m.value,"onUpdate:modelValue":ee[0]||(ee[0]=I=>m.value=I),x:0,y:0,items:h.value,onClick:w},null,8,["modelValue","items"])])],64))],32)]),on(V.$slots,"content",{},()=>[l("div",{class:Pe(["__content",f.value]),onKeydown:ee[2]||(ee[2]=qn($(()=>{},["stop"]),["delete"]))},[l("div",hCt,[(T(!0),x(Le,null,We(E.value,I=>on(V.$slots,"nodeInterface",{key:I.id,type:"output",node:V.node,intf:I},()=>[z(n2,{node:V.node,intf:I},null,8,["node","intf"])])),128))]),l("div",gCt,[(T(!0),x(Le,null,We(y.value,I=>on(V.$slots,"nodeInterface",{key:I.id,type:"input",node:V.node,intf:I},()=>[z(n2,{node:V.node,intf:I},null,8,["node","intf"])])),128))])],34)])],46,fCt))}}),yCt=cn({props:{x1:{type:Number,required:!0},y1:{type:Number,required:!0},x2:{type:Number,required:!0},y2:{type:Number,required:!0},state:{type:Number,default:ys.NONE},isTemporary:{type:Boolean,default:!1}},setup(n){const{viewModel:e}=ds(),{graph:t}=Ns(),s=(o,a)=>{const c=(o+t.value.panning.x)*t.value.scaling,d=(a+t.value.panning.y)*t.value.scaling;return[c,d]},i=et(()=>{const[o,a]=s(n.x1,n.y1),[c,d]=s(n.x2,n.y2);if(e.value.settings.useStraightConnections)return`M ${o} ${a} L ${c} ${d}`;{const u=.3*Math.abs(o-c);return`M ${o} ${a} C ${o+u} ${a}, ${c-u} ${d}, ${c} ${d}`}}),r=et(()=>({"--temporary":n.isTemporary,"--allowed":n.state===ys.ALLOWED,"--forbidden":n.state===ys.FORBIDDEN}));return{d:i,classes:r}}}),ECt=["d"];function vCt(n,e,t,s,i,r){return T(),x("path",{class:Pe(["baklava-connection",n.classes]),d:n.d},null,10,ECt)}const LI=sn(yCt,[["render",vCt]]);function SCt(n){return document.getElementById(n.id)}function Oa(n){const e=document.getElementById(n.id),t=e==null?void 0:e.getElementsByClassName("__port");return{node:(e==null?void 0:e.closest(".baklava-node"))??null,interface:e,port:t&&t.length>0?t[0]:null}}const TCt=cn({components:{"connection-view":LI},props:{connection:{type:Object,required:!0}},setup(n){const{graph:e}=Ns();let t;const s=ot({x1:0,y1:0,x2:0,y2:0}),i=et(()=>n.connection.isInDanger?ys.FORBIDDEN:ys.NONE),r=et(()=>{var d;return(d=e.value.findNodeById(n.connection.from.nodeId))==null?void 0:d.position}),o=et(()=>{var d;return(d=e.value.findNodeById(n.connection.to.nodeId))==null?void 0:d.position}),a=d=>d.node&&d.interface&&d.port?[d.node.offsetLeft+d.interface.offsetLeft+d.port.offsetLeft+d.port.clientWidth/2,d.node.offsetTop+d.interface.offsetTop+d.port.offsetTop+d.port.clientHeight/2]:[0,0],c=()=>{const d=Oa(n.connection.from),u=Oa(n.connection.to);d.node&&u.node&&(t||(t=new ResizeObserver(()=>{c()}),t.observe(d.node),t.observe(u.node)));const[_,m]=a(d),[h,g]=a(u);s.value={x1:_,y1:m,x2:h,y2:g}};return di(async()=>{await Ue(),c()}),La(()=>{t&&t.disconnect()}),Tn([r,o],()=>c(),{deep:!0}),{d:s,state:i}}});function xCt(n,e,t,s,i,r){const o=Je("connection-view");return T(),at(o,{x1:n.d.x1,y1:n.d.y1,x2:n.d.x2,y2:n.d.y2,state:n.state},null,8,["x1","y1","x2","y2","state"])}const CCt=sn(TCt,[["render",xCt]]);function Su(n){return n.node&&n.interface&&n.port?[n.node.offsetLeft+n.interface.offsetLeft+n.port.offsetLeft+n.port.clientWidth/2,n.node.offsetTop+n.interface.offsetTop+n.port.offsetTop+n.port.clientHeight/2]:[0,0]}const wCt=cn({components:{"connection-view":LI},props:{connection:{type:Object,required:!0}},setup(n){const e=et(()=>n.connection?n.connection.status:ys.NONE);return{d:et(()=>{if(!n.connection)return{input:[0,0],output:[0,0]};const s=Su(Oa(n.connection.from)),i=n.connection.to?Su(Oa(n.connection.to)):[n.connection.mx||s[0],n.connection.my||s[1]];return n.connection.from.isInput?{input:i,output:s}:{input:s,output:i}}),status:e}}});function RCt(n,e,t,s,i,r){const o=Je("connection-view");return T(),at(o,{x1:n.d.input[0],y1:n.d.input[1],x2:n.d.output[0],y2:n.d.output[1],state:n.status,"is-temporary":""},null,8,["x1","y1","x2","y2","state"])}const ACt=sn(wCt,[["render",RCt]]),MCt=cn({setup(){const{viewModel:n}=ds(),{graph:e}=Ns(),t=ot(null),s=Bd(n.value.settings.sidebar,"width"),i=et(()=>n.value.settings.sidebar.resizable),r=et(()=>{const _=e.value.sidebar.nodeId;return e.value.nodes.find(m=>m.id===_)}),o=et(()=>({width:`${s.value}px`})),a=et(()=>r.value?[...Object.values(r.value.inputs),...Object.values(r.value.outputs)].filter(m=>m.displayInSidebar&&m.component):[]),c=()=>{e.value.sidebar.visible=!1},d=()=>{window.addEventListener("mousemove",u),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",u)},{once:!0})},u=_=>{var m,h;const g=((h=(m=t.value)==null?void 0:m.parentElement)==null?void 0:h.getBoundingClientRect().width)??500;let f=s.value-_.movementX;f<300?f=300:f>.9*g&&(f=.9*g),s.value=f};return{el:t,graph:e,resizable:i,node:r,styles:o,displayedInterfaces:a,startResize:d,close:c}}}),NCt={class:"__header"},ICt={class:"__node-name"};function OCt(n,e,t,s,i,r){return T(),x("div",{ref:"el",class:Pe(["baklava-sidebar",{"--open":n.graph.sidebar.visible}]),style:Vt(n.styles)},[n.resizable?(T(),x("div",{key:0,class:"__resizer",onMousedown:e[0]||(e[0]=(...o)=>n.startResize&&n.startResize(...o))},null,32)):B("",!0),l("div",NCt,[l("button",{tabindex:"-1",class:"__close",onClick:e[1]||(e[1]=(...o)=>n.close&&n.close(...o))},"×"),l("div",ICt,[l("b",null,Y(n.node?n.node.title:""),1)])]),(T(!0),x(Le,null,We(n.displayedInterfaces,o=>(T(),x("div",{key:o.id,class:"__interface"},[(T(),at(Pu(o.component),{modelValue:o.value,"onUpdate:modelValue":a=>o.value=a,node:n.node,intf:o},null,8,["modelValue","onUpdate:modelValue","node","intf"]))]))),128))],6)}const kCt=sn(MCt,[["render",OCt]]),DCt=cn({__name:"Minimap",setup(n){const{viewModel:e}=ds(),{graph:t}=Ns(),s=ot(null),i=ot(!1);let r,o=!1,a={x1:0,y1:0,x2:0,y2:0},c;const d=()=>{var w,A;if(!r)return;r.canvas.width=s.value.offsetWidth,r.canvas.height=s.value.offsetHeight;const O=new Map,C=new Map;for(const I of t.value.nodes){const H=SCt(I),q=(H==null?void 0:H.offsetWidth)??0,L=(H==null?void 0:H.offsetHeight)??0,W=((w=I.position)==null?void 0:w.x)??0,se=((A=I.position)==null?void 0:A.y)??0;O.set(I,{x1:W,y1:se,x2:W+q,y2:se+L}),C.set(I,H)}const M={x1:Number.MAX_SAFE_INTEGER,y1:Number.MAX_SAFE_INTEGER,x2:Number.MIN_SAFE_INTEGER,y2:Number.MIN_SAFE_INTEGER};for(const I of O.values())I.x1M.x2&&(M.x2=I.x2),I.y2>M.y2&&(M.y2=I.y2);const G=50;M.x1-=G,M.y1-=G,M.x2+=G,M.y2+=G,a=M;const V=r.canvas.width/r.canvas.height,ee=(a.x2-a.x1)/(a.y2-a.y1);if(V>ee){const I=(V-ee)*(a.y2-a.y1)*.5;a.x1-=I,a.x2+=I}else{const I=a.x2-a.x1,H=a.y2-a.y1,q=(I-V*H)/V*.5;a.y1-=q,a.y2+=q}r.clearRect(0,0,r.canvas.width,r.canvas.height),r.strokeStyle="white";for(const I of t.value.connections){const[H,q]=Su(Oa(I.from)),[L,W]=Su(Oa(I.to)),[se,oe]=u(H,q),[ye,xe]=u(L,W);if(r.beginPath(),r.moveTo(se,oe),e.value.settings.useStraightConnections)r.lineTo(ye,xe);else{const le=.3*Math.abs(se-ye);r.bezierCurveTo(se+le,oe,ye-le,xe,ye,xe)}r.stroke()}r.strokeStyle="lightgray";for(const[I,H]of O.entries()){const[q,L]=u(H.x1,H.y1),[W,se]=u(H.x2,H.y2);r.fillStyle=m(C.get(I)),r.beginPath(),r.rect(q,L,W-q,se-L),r.fill(),r.stroke()}if(i.value){const I=g(),[H,q]=u(I.x1,I.y1),[L,W]=u(I.x2,I.y2);r.fillStyle="rgba(255, 255, 255, 0.2)",r.fillRect(H,q,L-H,W-q)}},u=(w,A)=>[(w-a.x1)/(a.x2-a.x1)*r.canvas.width,(A-a.y1)/(a.y2-a.y1)*r.canvas.height],_=(w,A)=>[w*(a.x2-a.x1)/r.canvas.width+a.x1,A*(a.y2-a.y1)/r.canvas.height+a.y1],m=w=>{if(w){const A=w.querySelector(".__content");if(A){const C=h(A);if(C)return C}const O=h(w);if(O)return O}return"gray"},h=w=>{const A=getComputedStyle(w).backgroundColor;if(A&&A!=="rgba(0, 0, 0, 0)")return A},g=()=>{const w=s.value.parentElement.offsetWidth,A=s.value.parentElement.offsetHeight,O=w/t.value.scaling-t.value.panning.x,C=A/t.value.scaling-t.value.panning.y;return{x1:-t.value.panning.x,y1:-t.value.panning.y,x2:O,y2:C}},f=w=>{w.button===0&&(o=!0,b(w))},b=w=>{if(o){const[A,O]=_(w.offsetX,w.offsetY),C=g(),M=(C.x2-C.x1)/2,G=(C.y2-C.y1)/2;t.value.panning.x=-(A-M),t.value.panning.y=-(O-G)}},y=()=>{o=!1},E=()=>{i.value=!0},v=()=>{i.value=!1,y()};Tn([i,t.value.panning,()=>t.value.scaling,()=>t.value.connections.length],()=>{d()});const S=et(()=>t.value.nodes.map(w=>w.position)),R=et(()=>t.value.nodes.map(w=>w.width));return Tn([S,R],()=>{d()},{deep:!0}),di(()=>{r=s.value.getContext("2d"),r.imageSmoothingQuality="high",d(),c=setInterval(d,500)}),La(()=>{clearInterval(c)}),(w,A)=>(T(),x("canvas",{ref_key:"canvas",ref:s,class:"baklava-minimap",onMouseenter:E,onMouseleave:v,onMousedown:$(f,["self"]),onMousemove:$(b,["self"]),onMouseup:y,onContextmenu:A[0]||(A[0]=$(()=>{},["stop","prevent"]))},null,544))}}),LCt=cn({components:{ContextMenu:Ny,VerticalDots:DI},props:{type:{type:String,required:!0},title:{type:String,required:!0}},setup(n){const{viewModel:e}=ds(),{switchGraph:t}=Ns(),s=ot(!1),i=et(()=>n.type.startsWith(Jl));return{showContextMenu:s,hasContextMenu:i,contextMenuItems:[{label:"Edit Subgraph",value:"editSubgraph"},{label:"Delete Subgraph",value:"deleteSubgraph"}],openContextMenu:()=>{s.value=!0},onContextMenuClick:c=>{const d=n.type.substring(Jl.length),u=e.value.editor.graphTemplates.find(_=>_.id===d);if(u)switch(c){case"editSubgraph":t(u);break;case"deleteSubgraph":e.value.editor.removeGraphTemplate(u);break}}}}}),PCt=["data-node-type"],FCt={class:"__title"},UCt={class:"__title-label"},BCt={key:0,class:"__menu"};function GCt(n,e,t,s,i,r){const o=Je("vertical-dots"),a=Je("context-menu");return T(),x("div",{class:"baklava-node --palette","data-node-type":n.type},[l("div",FCt,[l("div",UCt,Y(n.title),1),n.hasContextMenu?(T(),x("div",BCt,[z(o,{class:"--clickable",onPointerdown:e[0]||(e[0]=$(()=>{},["stop","prevent"])),onClick:$(n.openContextMenu,["stop","prevent"])},null,8,["onClick"]),z(a,{modelValue:n.showContextMenu,"onUpdate:modelValue":e[1]||(e[1]=c=>n.showContextMenu=c),x:-100,y:0,items:n.contextMenuItems,onClick:n.onContextMenuClick,onPointerdown:e[2]||(e[2]=$(()=>{},["stop","prevent"]))},null,8,["modelValue","items","onClick"])])):B("",!0)])],8,PCt)}const s2=sn(LCt,[["render",GCt]]),VCt={key:0},zCt=cn({__name:"NodePalette",setup(n){const{viewModel:e}=ds(),{x:t,y:s}=Qxt(),{transform:i}=MI(),r=AI(e),o=Ts("editorEl"),a=ot(null),c=et(()=>{if(!a.value||!(o!=null&&o.value))return{};const{left:u,top:_}=o.value.getBoundingClientRect();return{top:`${s.value-_}px`,left:`${t.value-u}px`}}),d=(u,_)=>{a.value={type:u,nodeInformation:_};const m=()=>{const h=Hn(new _.type);e.value.displayedGraph.addNode(h);const g=o.value.getBoundingClientRect(),[f,b]=i(t.value-g.left,s.value-g.top);h.position.x=f,h.position.y=b,a.value=null,document.removeEventListener("pointerup",m)};document.addEventListener("pointerup",m)};return(u,_)=>(T(),x(Le,null,[l("div",{class:"baklava-node-palette",onContextmenu:_[0]||(_[0]=$(()=>{},["stop","prevent"]))},[(T(!0),x(Le,null,We(bt(r),m=>(T(),x("section",{key:m.name},[m.name!=="default"?(T(),x("h1",VCt,Y(m.name),1)):B("",!0),(T(!0),x(Le,null,We(m.nodeTypes,(h,g)=>(T(),at(s2,{key:g,type:g,title:h.title,onPointerdown:f=>d(g,h)},null,8,["type","title","onPointerdown"]))),128))]))),128))],32),z(Bs,{name:"fade"},{default:Ne(()=>[a.value?(T(),x("div",{key:0,class:"baklava-dragged-node",style:Vt(c.value)},[z(s2,{type:a.value.type,title:a.value.nodeInformation.title},null,8,["type","title"])],4)):B("",!0)]),_:1})],64))}});let bd;const HCt=new Uint8Array(16);function qCt(){if(!bd&&(bd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bd(HCt)}const vn=[];for(let n=0;n<256;++n)vn.push((n+256).toString(16).slice(1));function YCt(n,e=0){return vn[n[e+0]]+vn[n[e+1]]+vn[n[e+2]]+vn[n[e+3]]+"-"+vn[n[e+4]]+vn[n[e+5]]+"-"+vn[n[e+6]]+vn[n[e+7]]+"-"+vn[n[e+8]]+vn[n[e+9]]+"-"+vn[n[e+10]]+vn[n[e+11]]+vn[n[e+12]]+vn[n[e+13]]+vn[n[e+14]]+vn[n[e+15]]}const $Ct=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),i2={randomUUID:$Ct};function Tu(n,e,t){if(i2.randomUUID&&!e&&!n)return i2.randomUUID();n=n||{};const s=n.random||(n.rng||qCt)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,YCt(s)}const ec="SAVE_SUBGRAPH";function WCt(n,e){const t=()=>{const s=n.value;if(!s.template)throw new Error("Graph template property not set");s.template.update(s.save()),s.template.panning=s.panning,s.template.scaling=s.scaling};e.registerCommand(ec,{canExecute:()=>{var s;return n.value!==((s=n.value.editor)==null?void 0:s.graph)},execute:t})}const KCt={},jCt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},QCt=l("polyline",{points:"6 9 12 15 18 9"},null,-1),XCt=[QCt];function ZCt(n,e){return T(),x("svg",jCt,XCt)}const JCt=sn(KCt,[["render",ZCt]]),ewt=cn({components:{"i-arrow":JCt},props:{intf:{type:Object,required:!0}},setup(n){const e=ot(null),t=ot(!1),s=et(()=>n.intf.items.find(o=>typeof o=="string"?o===n.intf.value:o.value===n.intf.value)),i=et(()=>s.value?typeof s.value=="string"?s.value:s.value.text:""),r=o=>{n.intf.value=typeof o=="string"?o:o.value};return OI(e,()=>{t.value=!1}),{el:e,open:t,selectedItem:s,selectedText:i,setSelected:r}}}),twt=["title"],nwt={class:"__selected"},swt={class:"__text"},iwt={class:"__icon"},rwt={class:"__dropdown"},owt={class:"item --header"},awt=["onClick"];function lwt(n,e,t,s,i,r){const o=Je("i-arrow");return T(),x("div",{ref:"el",class:Pe(["baklava-select",{"--open":n.open}]),title:n.intf.name,onClick:e[0]||(e[0]=a=>n.open=!n.open)},[l("div",nwt,[l("div",swt,Y(n.selectedText),1),l("div",iwt,[z(o)])]),z(Bs,{name:"slide-fade"},{default:Ne(()=>[k(l("div",rwt,[l("div",owt,Y(n.intf.name),1),(T(!0),x(Le,null,We(n.intf.items,(a,c)=>(T(),x("div",{key:c,class:Pe(["item",{"--active":a===n.selectedItem}]),onClick:d=>n.setSelected(a)},Y(typeof a=="string"?a:a.text),11,awt))),128))],512),[[_t,n.open]])]),_:1})],10,twt)}const cwt=sn(ewt,[["render",lwt]]);class dwt extends en{constructor(e,t,s){super(e,t),this.component=Ou(cwt),this.items=s}}const uwt=cn({props:{intf:{type:Object,required:!0}}});function pwt(n,e,t,s,i,r){return T(),x("div",null,Y(n.intf.value),1)}const fwt=sn(uwt,[["render",pwt]]);class _wt extends en{constructor(e,t){super(e,t),this.component=Ou(fwt),this.setPort(!1)}}const mwt=cn({props:{intf:{type:Object,required:!0},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(n,{emit:e}){return{v:et({get:()=>n.modelValue,set:s=>{e("update:modelValue",s)}})}}}),hwt=["placeholder","title"];function gwt(n,e,t,s,i,r){return T(),x("div",null,[k(l("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>n.v=o),type:"text",class:"baklava-input",placeholder:n.intf.name,title:n.intf.name},null,8,hwt),[[ue,n.v]])])}const bwt=sn(mwt,[["render",gwt]]);class mc extends en{constructor(){super(...arguments),this.component=Ou(bwt)}}class PI extends wy{constructor(){super(...arguments),this._title="Subgraph Input",this.inputs={name:new mc("Name","Input").setPort(!1)},this.outputs={placeholder:new en("Connection",void 0)}}}class FI extends Ry{constructor(){super(...arguments),this._title="Subgraph Output",this.inputs={name:new mc("Name","Output").setPort(!1),placeholder:new en("Connection",void 0)},this.outputs={output:new en("Output",void 0).setHidden(!0)}}}const UI="CREATE_SUBGRAPH",r2=[Ma,Na];function ywt(n,e,t){const s=()=>n.value.selectedNodes.filter(r=>!r2.includes(r.type)).length>0,i=()=>{const{viewModel:r}=ds(),o=n.value,a=n.value.editor;if(o.selectedNodes.length===0)return;const c=o.selectedNodes.filter(C=>!r2.includes(C.type)),d=c.flatMap(C=>Object.values(C.inputs)),u=c.flatMap(C=>Object.values(C.outputs)),_=o.connections.filter(C=>!u.includes(C.from)&&d.includes(C.to)),m=o.connections.filter(C=>u.includes(C.from)&&!d.includes(C.to)),h=o.connections.filter(C=>u.includes(C.from)&&d.includes(C.to)),g=c.map(C=>C.save()),f=h.map(C=>({id:C.id,from:C.from.id,to:C.to.id})),b=new Map,{xLeft:y,xRight:E,yTop:v}=Ewt(c);for(const[C,M]of _.entries()){const G=new PI;G.inputs.name.value=M.to.name,g.push({...G.save(),position:{x:E-r.value.settings.nodes.defaultWidth-100,y:v+C*200}}),f.push({id:Tu(),from:G.outputs.placeholder.id,to:M.to.id}),b.set(M.to.id,G.graphInterfaceId)}for(const[C,M]of m.entries()){const G=new FI;G.inputs.name.value=M.from.name,g.push({...G.save(),position:{x:y+100,y:v+C*200}}),f.push({id:Tu(),from:M.from.id,to:G.inputs.placeholder.id}),b.set(M.from.id,G.graphInterfaceId)}const S=Hn(new yp({connections:f,nodes:g,inputs:[],outputs:[]},a));a.addGraphTemplate(S);const R=a.nodeTypes.get(Ia(S));if(!R)throw new Error("Unable to create subgraph: Could not find corresponding graph node type");o.activeTransactions++;const w=Hn(new R.type);o.addNode(w);const A=Math.round(c.map(C=>C.position.x).reduce((C,M)=>C+M,0)/c.length),O=Math.round(c.map(C=>C.position.y).reduce((C,M)=>C+M,0)/c.length);w.position.x=A,w.position.y=O,_.forEach(C=>{o.removeConnection(C),o.addConnection(C.from,w.inputs[b.get(C.to.id)])}),m.forEach(C=>{o.removeConnection(C),o.addConnection(w.outputs[b.get(C.from.id)],C.to)}),c.forEach(C=>o.removeNode(C)),o.activeTransactions--,e.canExecuteCommand(ec)&&e.executeCommand(ec),t(S),n.value.panning={...o.panning},n.value.scaling=o.scaling};e.registerCommand(UI,{canExecute:s,execute:i})}function Ewt(n){const e=n.reduce((i,r)=>{const o=r.position.x;return o{const o=r.position.y;return o{const o=r.position.x+r.width;return o>i?o:i},-1/0),xRight:e,yTop:t}}class o2{constructor(e,t){this.type=e,e==="addNode"?this.nodeId=t:this.nodeState=t}undo(e){this.type==="addNode"?this.removeNode(e):this.addNode(e)}redo(e){this.type==="addNode"&&this.nodeState?this.addNode(e):this.type==="removeNode"&&this.nodeId&&this.removeNode(e)}addNode(e){const t=e.editor.nodeTypes.get(this.nodeState.type);if(!t)return;const s=new t.type;e.addNode(s),s.load(this.nodeState),this.nodeId=s.id}removeNode(e){const t=e.nodes.find(s=>s.id===this.nodeId);t&&(this.nodeState=t.save(),e.removeNode(t))}}class a2{constructor(e,t){if(this.type=e,e==="addConnection")this.connectionId=t;else{const s=t;this.connectionState={id:s.id,from:s.from.id,to:s.to.id}}}undo(e){this.type==="addConnection"?this.removeConnection(e):this.addConnection(e)}redo(e){this.type==="addConnection"&&this.connectionState?this.addConnection(e):this.type==="removeConnection"&&this.connectionId&&this.removeConnection(e)}addConnection(e){const t=e.findNodeInterface(this.connectionState.from),s=e.findNodeInterface(this.connectionState.to);if(!t||!s)return;const i=e.addConnection(t,s);i&&(i.id=this.connectionState.id),this.connectionId=i==null?void 0:i.id}removeConnection(e){const t=e.connections.find(s=>s.id===this.connectionId);t&&(this.connectionState={id:t.id,from:t.from.id,to:t.to.id},e.removeConnection(t))}}class vwt{constructor(e){if(this.type="transaction",e.length===0)throw new Error("Can't create a transaction with no steps");this.steps=e}undo(e){for(let t=this.steps.length-1;t>=0;t--)this.steps[t].undo(e)}redo(e){for(let t=0;t{if(!r.value)if(a.value)c.value.push(b);else for(o.value!==i.value.length-1&&(i.value=i.value.slice(0,o.value+1)),i.value.push(b),o.value++;i.value.length>s.value;)i.value.shift()},u=()=>{a.value=!0},_=()=>{a.value=!1,c.value.length>0&&(d(new vwt(c.value)),c.value=[])},m=()=>i.value.length!==0&&o.value!==-1,h=()=>{m()&&(r.value=!0,i.value[o.value--].undo(n.value),r.value=!1)},g=()=>i.value.length!==0&&o.value{g()&&(r.value=!0,i.value[++o.value].redo(n.value),r.value=!1)};return Tn(n,(b,y)=>{y&&(y.events.addNode.unsubscribe(t),y.events.removeNode.unsubscribe(t),y.events.addConnection.unsubscribe(t),y.events.removeConnection.unsubscribe(t)),b&&(b.events.addNode.subscribe(t,E=>{d(new o2("addNode",E.id))}),b.events.removeNode.subscribe(t,E=>{d(new o2("removeNode",E.save()))}),b.events.addConnection.subscribe(t,E=>{d(new a2("addConnection",E.id))}),b.events.removeConnection.subscribe(t,E=>{d(new a2("removeConnection",E))}))},{immediate:!0}),e.registerCommand(Mb,{canExecute:m,execute:h}),e.registerCommand(Nb,{canExecute:g,execute:f}),e.registerCommand(Iy,{canExecute:()=>!a.value,execute:u}),e.registerCommand(Oy,{canExecute:()=>a.value,execute:_}),e.registerHotkey(["Control","z"],Mb),e.registerHotkey(["Control","y"],Nb),Hn({maxSteps:s})}const Ib="DELETE_NODES";function Twt(n,e){e.registerCommand(Ib,{canExecute:()=>n.value.selectedNodes.length>0,execute(){e.executeCommand(Iy);for(let t=n.value.selectedNodes.length-1;t>=0;t--){const s=n.value.selectedNodes[t];n.value.removeNode(s)}e.executeCommand(Oy)}}),e.registerHotkey(["Delete"],Ib)}const BI="SWITCH_TO_MAIN_GRAPH";function xwt(n,e,t){e.registerCommand(BI,{canExecute:()=>n.value!==n.value.editor.graph,execute:()=>{e.executeCommand(ec),t(n.value.editor.graph)}})}function Cwt(n,e,t){Twt(n,e),ywt(n,e,t),WCt(n,e),xwt(n,e,t)}const Ob="COPY",kb="PASTE",wwt="CLEAR_CLIPBOARD";function Rwt(n,e,t){const s=Symbol("ClipboardToken"),i=ot(""),r=ot(""),o=et(()=>!i.value),a=()=>{i.value="",r.value=""},c=()=>{const _=n.value.selectedNodes.flatMap(h=>[...Object.values(h.inputs),...Object.values(h.outputs)]),m=n.value.connections.filter(h=>_.includes(h.from)||_.includes(h.to)).map(h=>({from:h.from.id,to:h.to.id}));r.value=JSON.stringify(m),i.value=JSON.stringify(n.value.selectedNodes.map(h=>h.save()))},d=(_,m,h)=>{for(const g of _){let f;if((!h||h==="input")&&(f=Object.values(g.inputs).find(b=>b.id===m)),!f&&(!h||h==="output")&&(f=Object.values(g.outputs).find(b=>b.id===m)),f)return f}},u=()=>{if(o.value)return;const _=new Map,m=JSON.parse(i.value),h=JSON.parse(r.value),g=[],f=[],b=n.value;t.executeCommand(Iy);for(const y of m){const E=e.value.nodeTypes.get(y.type);if(!E){console.warn(`Node type ${y.type} not registered`);return}const v=new E.type,S=v.id;g.push(v),v.hooks.beforeLoad.subscribe(s,R=>{const w=R;return w.position&&(w.position.x+=100,w.position.y+=100),v.hooks.beforeLoad.unsubscribe(s),w}),b.addNode(v),v.load({...y,id:S}),v.id=S,_.set(y.id,S);for(const R of Object.values(v.inputs)){const w=Tu();_.set(R.id,w),R.id=w}for(const R of Object.values(v.outputs)){const w=Tu();_.set(R.id,w),R.id=w}}for(const y of h){const E=d(g,_.get(y.from),"output"),v=d(g,_.get(y.to),"input");if(!E||!v)continue;const S=b.addConnection(E,v);S&&f.push(S)}return n.value.selectedNodes=g,t.executeCommand(Oy),{newNodes:g,newConnections:f}};return t.registerCommand(Ob,{canExecute:()=>n.value.selectedNodes.length>0,execute:c}),t.registerHotkey(["Control","c"],Ob),t.registerCommand(kb,{canExecute:()=>!o.value,execute:u}),t.registerHotkey(["Control","v"],kb),t.registerCommand(wwt,{canExecute:()=>!0,execute:a}),Hn({isEmpty:o})}const Awt="OPEN_SIDEBAR";function Mwt(n,e){e.registerCommand(Awt,{execute:t=>{n.value.sidebar.nodeId=t,n.value.sidebar.visible=!0},canExecute:()=>!0})}function Nwt(n,e){Mwt(n,e)}const Iwt={},Owt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},kwt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Dwt=l("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"},null,-1),Lwt=[kwt,Dwt];function Pwt(n,e){return T(),x("svg",Owt,Lwt)}const Fwt=sn(Iwt,[["render",Pwt]]),Uwt={},Bwt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Gwt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Vwt=l("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"},null,-1),zwt=[Gwt,Vwt];function Hwt(n,e){return T(),x("svg",Bwt,zwt)}const qwt=sn(Uwt,[["render",Hwt]]),Ywt={},$wt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Wwt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Kwt=l("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),jwt=l("line",{x1:"5",y1:"12",x2:"11",y2:"18"},null,-1),Qwt=l("line",{x1:"5",y1:"12",x2:"11",y2:"6"},null,-1),Xwt=[Wwt,Kwt,jwt,Qwt];function Zwt(n,e){return T(),x("svg",$wt,Xwt)}const Jwt=sn(Ywt,[["render",Zwt]]),e2t={},t2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},n2t=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),s2t=l("path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},null,-1),i2t=l("rect",{x:"9",y:"3",width:"6",height:"4",rx:"2"},null,-1),r2t=[n2t,s2t,i2t];function o2t(n,e){return T(),x("svg",t2t,r2t)}const a2t=sn(e2t,[["render",o2t]]),l2t={},c2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},d2t=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),u2t=l("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1),p2t=l("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"},null,-1),f2t=[d2t,u2t,p2t];function _2t(n,e){return T(),x("svg",c2t,f2t)}const m2t=sn(l2t,[["render",_2t]]),h2t={},g2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},b2t=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),y2t=l("path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"},null,-1),E2t=l("circle",{cx:"12",cy:"14",r:"2"},null,-1),v2t=l("polyline",{points:"14 4 14 8 8 8 8 4"},null,-1),S2t=[b2t,y2t,E2t,v2t];function T2t(n,e){return T(),x("svg",g2t,S2t)}const x2t=sn(h2t,[["render",T2t]]),C2t={},w2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},R2t=Zr('',6),A2t=[R2t];function M2t(n,e){return T(),x("svg",w2t,A2t)}const N2t=sn(C2t,[["render",M2t]]),I2t={},O2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},k2t=Zr('',18),D2t=[k2t];function L2t(n,e){return T(),x("svg",O2t,D2t)}const P2t=sn(I2t,[["render",L2t]]),F2t={},U2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},B2t=Zr('',6),G2t=[B2t];function V2t(n,e){return T(),x("svg",U2t,G2t)}const z2t=sn(F2t,[["render",V2t]]),H2t=cn({props:{command:{type:String,required:!0},title:{type:String,required:!0},icon:{type:Object,required:!1,default:void 0}},setup(){const{viewModel:n}=ds();return{viewModel:n}}}),q2t=["disabled","title"];function Y2t(n,e,t,s,i,r){return T(),x("button",{class:"baklava-toolbar-entry baklava-toolbar-button",disabled:!n.viewModel.commandHandler.canExecuteCommand(n.command),title:n.title,onClick:e[0]||(e[0]=o=>n.viewModel.commandHandler.executeCommand(n.command))},[n.icon?(T(),at(Pu(n.icon),{key:0})):(T(),x(Le,{key:1},[Ze(Y(n.title),1)],64))],8,q2t)}const $2t=sn(H2t,[["render",Y2t]]),W2t=cn({components:{ToolbarButton:$2t},setup(){const{viewModel:n}=ds();return{isSubgraph:et(()=>n.value.displayedGraph!==n.value.editor.graph),commands:[{command:Ob,title:"Copy",icon:m2t},{command:kb,title:"Paste",icon:a2t},{command:Ib,title:"Delete selected nodes",icon:z2t},{command:Mb,title:"Undo",icon:Fwt},{command:Nb,title:"Redo",icon:qwt},{command:Ld,title:"Box Select",icon:P2t},{command:UI,title:"Create Subgraph",icon:N2t}],subgraphCommands:[{command:ec,title:"Save Subgraph",icon:x2t},{command:BI,title:"Back to Main Graph",icon:Jwt}]}}});function K2t(n,e,t,s,i,r){const o=Je("toolbar-button");return T(),x("div",{class:"baklava-toolbar",onContextmenu:e[0]||(e[0]=$(()=>{},["stop","prevent"]))},[(T(!0),x(Le,null,We(n.commands,a=>(T(),at(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)),n.isSubgraph?(T(!0),x(Le,{key:0},We(n.subgraphCommands,a=>(T(),at(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)):B("",!0)],32)}const j2t=sn(W2t,[["render",K2t]]),Q2t={class:"connections-container"},X2t=cn({__name:"Editor",props:{viewModel:{}},setup(n){const e=n,t=Symbol("EditorToken"),s=Bd(e,"viewModel");Dxt(s);const i=ot(null);na("editorEl",i);const r=et(()=>e.viewModel.displayedGraph.nodes),o=et(()=>e.viewModel.displayedGraph.nodes.map(O=>wI(Bd(O,"position")))),a=et(()=>e.viewModel.displayedGraph.connections),c=et(()=>e.viewModel.displayedGraph.selectedNodes),d=Lxt(),u=Pxt(),_=Fxt(s),m=Uxt(i),h=et(()=>({...d.styles.value})),g=ot(0);e.viewModel.editor.hooks.load.subscribe(t,O=>(g.value++,O));const f=O=>{d.onPointerMove(O),u.onMouseMove(O)},b=O=>{if(O.button===0){if(m.onPointerDown(O))return;O.target===i.value&&(R(),d.onPointerDown(O)),u.onMouseDown()}},y=O=>{d.onPointerUp(O),u.onMouseUp()},E=O=>{O.key==="Tab"&&O.preventDefault(),e.viewModel.commandHandler.handleKeyDown(O)},v=O=>{e.viewModel.commandHandler.handleKeyUp(O)},S=O=>{["Control","Shift"].some(C=>e.viewModel.commandHandler.pressedKeys.includes(C))||R(),e.viewModel.displayedGraph.selectedNodes.push(O)},R=()=>{e.viewModel.displayedGraph.selectedNodes=[]},w=O=>{for(const C of e.viewModel.displayedGraph.selectedNodes){const M=r.value.indexOf(C),G=o.value[M];G.onPointerDown(O),document.addEventListener("pointermove",G.onPointerMove)}document.addEventListener("pointerup",A)},A=()=>{for(const O of e.viewModel.displayedGraph.selectedNodes){const C=r.value.indexOf(O),M=o.value[C];M.onPointerUp(),document.removeEventListener("pointermove",M.onPointerMove)}document.removeEventListener("pointerup",A)};return(O,C)=>(T(),x("div",{ref_key:"el",ref:i,tabindex:"-1",class:Pe(["baklava-editor",{"baklava-ignore-mouse":!!bt(u).temporaryConnection.value||bt(d).dragging.value,"--temporary-connection":!!bt(u).temporaryConnection.value,"--start-selection-box":bt(m).startSelection}]),onPointermove:$(f,["self"]),onPointerdown:b,onPointerup:y,onWheel:C[1]||(C[1]=$((...M)=>bt(d).onMouseWheel&&bt(d).onMouseWheel(...M),["self"])),onKeydown:E,onKeyup:v,onContextmenu:C[2]||(C[2]=(...M)=>bt(_).open&&bt(_).open(...M))},[on(O.$slots,"background",{},()=>[z(Vxt)]),on(O.$slots,"toolbar",{},()=>[O.viewModel.settings.toolbar.enabled?(T(),at(j2t,{key:0})):B("",!0)]),on(O.$slots,"palette",{},()=>[O.viewModel.settings.palette.enabled?(T(),at(zCt,{key:0})):B("",!0)]),(T(),x("svg",Q2t,[(T(!0),x(Le,null,We(a.value,M=>(T(),x("g",{key:M.id+g.value.toString()},[on(O.$slots,"connection",{connection:M},()=>[z(CCt,{connection:M},null,8,["connection"])])]))),128)),on(O.$slots,"temporaryConnection",{temporaryConnection:bt(u).temporaryConnection.value},()=>[bt(u).temporaryConnection.value?(T(),at(ACt,{key:0,connection:bt(u).temporaryConnection.value},null,8,["connection"])):B("",!0)])])),l("div",{class:"node-container",style:Vt(h.value)},[z(Oi,{name:"fade"},{default:Ne(()=>[(T(!0),x(Le,null,We(r.value,(M,G)=>on(O.$slots,"node",{key:M.id+g.value.toString(),node:M,selected:c.value.includes(M),dragging:o.value[G].dragging.value,onSelect:V=>S(M),onStartDrag:w},()=>[z(bCt,{node:M,selected:c.value.includes(M),dragging:o.value[G].dragging.value,onSelect:V=>S(M),onStartDrag:w},null,8,["node","selected","dragging","onSelect"])])),128))]),_:3})],4),on(O.$slots,"sidebar",{},()=>[O.viewModel.settings.sidebar.enabled?(T(),at(kCt,{key:0})):B("",!0)]),on(O.$slots,"minimap",{},()=>[O.viewModel.settings.enableMinimap?(T(),at(DCt,{key:0})):B("",!0)]),on(O.$slots,"contextMenu",{contextMenu:bt(_)},()=>[O.viewModel.settings.contextMenu.enabled?(T(),at(Ny,{key:0,modelValue:bt(_).show.value,"onUpdate:modelValue":C[0]||(C[0]=M=>bt(_).show.value=M),items:bt(_).items.value,x:bt(_).x.value,y:bt(_).y.value,onClick:bt(_).onClick},null,8,["modelValue","items","x","y","onClick"])):B("",!0)]),bt(m).isSelecting?(T(),x("div",{key:0,class:"selection-box",style:Vt(bt(m).getStyles())},null,4)):B("",!0)],34))}});function Z2t(n){const e=ot([]),t=ot([]);return{pressedKeys:e,handleKeyDown:o=>{e.value.includes(o.key)||e.value.push(o.key),!(document.activeElement&&CI(document.activeElement))&&t.value.forEach(a=>{var c,d;a.keys.every(u=>e.value.includes(u))&&((c=a.options)!=null&&c.preventDefault&&o.preventDefault(),(d=a.options)!=null&&d.stopPropagation&&o.stopPropagation(),n(a.commandName))})},handleKeyUp:o=>{const a=e.value.indexOf(o.key);a>=0&&e.value.splice(a,1)},registerHotkey:(o,a,c)=>{t.value.push({keys:o,commandName:a,options:c})}}}const J2t=()=>{const n=ot(new Map),e=o=>n.value.has(o),t=(o,a)=>{if(n.value.has(o))throw new Error(`Command "${o}" already exists`);n.value.set(o,a)},s=(o,a=!1,...c)=>{if(!n.value.has(o)){if(a)throw new Error(`[CommandHandler] Command ${o} not registered`);return}return n.value.get(o).execute(...c)},i=(o,a=!1,...c)=>{if(!n.value.has(o)){if(a)throw new Error(`[CommandHandler] Command ${o} not registered`);return!1}return n.value.get(o).canExecute(c)},r=Z2t(s);return Hn({hasCommand:e,registerCommand:t,executeCommand:s,canExecuteCommand:i,...r})},eRt=n=>!(n instanceof _c);function tRt(n,e){return{switchGraph:s=>{let i;if(eRt(s))i=new _c(n.value),s.createGraph(i);else{if(s!==n.value.graph)throw new Error("Can only switch using 'Graph' instance when it is the root graph. Otherwise a 'GraphTemplate' must be used.");i=s}e.value&&e.value!==n.value.graph&&e.value.destroy(),i.panning=i.panning??s.panning??{x:0,y:0},i.scaling=i.scaling??s.scaling??1,i.selectedNodes=i.selectedNodes??[],i.sidebar=i.sidebar??{visible:!1,nodeId:"",optionName:""},e.value=i}}}function nRt(n,e){n.position=n.position??{x:0,y:0},n.disablePointerEvents=!1,n.twoColumn=n.twoColumn??!1,n.width=n.width??e.defaultWidth}const sRt=()=>({useStraightConnections:!1,enableMinimap:!1,toolbar:{enabled:!0},palette:{enabled:!0},background:{gridSize:100,gridDivision:5,subGridVisibleThreshold:.6},sidebar:{enabled:!0,width:300,resizable:!0},displayValueOnHover:!1,nodes:{defaultWidth:200,maxWidth:320,minWidth:150,resizable:!1,reverseY:!1},contextMenu:{enabled:!0,additionalItems:[]}});function iRt(n){const e=ot(new Rxt),t=Symbol("ViewModelToken"),s=ot(null),i=FO(s),{switchGraph:r}=tRt(e,s),o=et(()=>i.value&&i.value!==e.value.graph),a=Hn(sRt()),c=J2t(),d=Swt(i,c),u=Rwt(i,e,c),_={renderNode:new cs(null),renderInterface:new cs(null)};return Cwt(i,c,r),Nwt(i,c),Tn(e,(m,h)=>{h&&(h.events.registerGraph.unsubscribe(t),h.graphEvents.beforeAddNode.unsubscribe(t),m.nodeHooks.beforeLoad.unsubscribe(t),m.nodeHooks.afterSave.unsubscribe(t),m.graphTemplateHooks.beforeLoad.unsubscribe(t),m.graphTemplateHooks.afterSave.unsubscribe(t),m.graph.hooks.load.unsubscribe(t),m.graph.hooks.save.unsubscribe(t)),m&&(m.nodeHooks.beforeLoad.subscribe(t,(g,f)=>(f.position=g.position??{x:0,y:0},f.width=g.width??a.nodes.defaultWidth,f.twoColumn=g.twoColumn??!1,g)),m.nodeHooks.afterSave.subscribe(t,(g,f)=>(g.position=f.position,g.width=f.width,g.twoColumn=f.twoColumn,g)),m.graphTemplateHooks.beforeLoad.subscribe(t,(g,f)=>(f.panning=g.panning,f.scaling=g.scaling,g)),m.graphTemplateHooks.afterSave.subscribe(t,(g,f)=>(g.panning=f.panning,g.scaling=f.scaling,g)),m.graph.hooks.load.subscribe(t,(g,f)=>(f.panning=g.panning,f.scaling=g.scaling,g)),m.graph.hooks.save.subscribe(t,(g,f)=>(g.panning=f.panning,g.scaling=f.scaling,g)),m.graphEvents.beforeAddNode.subscribe(t,g=>nRt(g,{defaultWidth:a.nodes.defaultWidth})),e.value.registerNodeType(PI,{category:"Subgraphs"}),e.value.registerNodeType(FI,{category:"Subgraphs"}),r(m.graph))},{immediate:!0}),Hn({editor:e,displayedGraph:i,isSubgraph:o,settings:a,commandHandler:c,history:d,clipboard:u,hooks:_,switchGraph:r})}const rRt=Ka({type:"PersonalityNode",title:"Personality",inputs:{request:()=>new en("Request",""),agent_name:()=>new dwt("Personality","",Ps.state.config.personalities).setPort(!1)},outputs:{response:()=>new en("Response","")},async calculate({request:n}){console.log(Ps.state.config.personalities);let e="";try{e=(await te.post("/generate",{params:{text:n}})).data}catch(t){console.error(t)}return{display:e,response:e}}}),oRt=Ka({type:"RAGNode",title:"RAG",inputs:{request:()=>new en("Prompt",""),document_path:()=>new mc("Document path","").setPort(!1)},outputs:{prompt:()=>new en("Prompt with Data","")},async calculate({request:n,document_path:e}){let t="";try{t=(await te.get("/rag",{params:{text:n,doc_path:e}})).data}catch(s){console.error(s)}return{response:t}}}),l2=Ka({type:"Task",title:"Task",inputs:{description:()=>new mc("Task description","").setPort(!1)},outputs:{prompt:()=>new en("Prompt")},calculate({description:n}){return{prompt:n}}}),c2=Ka({type:"TextDisplayNode",title:"TextDisplay",inputs:{text2display:()=>new en("Input","")},outputs:{response:()=>new _wt("Text","")},async calculate({request:n}){}}),d2=Ka({type:"LLMNode",title:"LLM",inputs:{request:()=>new en("Request","")},outputs:{response:()=>new en("Response","")},async calculate({request:n}){console.log(Ps.state.config.personalities);let e="";try{e=(await te.post("/generate",{params:{text:n}})).data}catch(t){console.error(t)}return{display:e,response:e}}}),aRt=Ka({type:"MultichoiceNode",title:"Multichoice",inputs:{question:()=>new en("Question",""),outputs:()=>new mc("choices, one per line","","").setPort(!1)},outputs:{response:()=>new en("Response","")}}),lRt=cn({components:{"baklava-editor":X2t},setup(){const n=iRt(),e=new Oxt(n.editor);n.editor.registerNodeType(rRt),n.editor.registerNodeType(l2),n.editor.registerNodeType(oRt),n.editor.registerNodeType(c2),n.editor.registerNodeType(d2),n.editor.registerNodeType(aRt);const t=Symbol();e.events.afterRun.subscribe(t,a=>{e.pause(),Axt(a,n.editor),e.resume()}),e.start();function s(a,c,d){const u=new a;return n.displayedGraph.addNode(u),u.position.x=c,u.position.y=d,u}const i=s(l2,300,140),r=s(d2,550,140),o=s(c2,850,140);return n.displayedGraph.addConnection(i.outputs.prompt,r.inputs.request),n.displayedGraph.addConnection(r.outputs.response,o.inputs.text2display),{baklava:n,saveGraph:()=>{const a=e.export();localStorage.setItem("myGraph",JSON.stringify(a))},loadGraph:()=>{const a=JSON.parse(localStorage.getItem("myGraph"));e.import(a)}}}}),cRt={style:{width:"100vw",height:"100vh"}};function dRt(n,e,t,s,i,r){const o=Je("baklava-editor");return T(),x("div",cRt,[z(o,{"view-model":n.baklava},null,8,["view-model"]),l("button",{onClick:e[0]||(e[0]=(...a)=>n.saveGraph&&n.saveGraph(...a))},"Save Graph"),l("button",{onClick:e[1]||(e[1]=(...a)=>n.loadGraph&&n.loadGraph(...a))},"Load Graph")])}const uRt=st(lRt,[["render",dRt]]),pRt={},fRt={style:{width:"100vw",height:"100vh"}},_Rt=["src"];function mRt(n,e,t,s,i,r){return T(),x("div",fRt,[l("iframe",{src:n.$store.state.config.comfyui_base_url,class:"m-0 p-0 w-full h-full"},null,8,_Rt)])}const hRt=st(pRt,[["render",mRt]]),gRt={},bRt={style:{width:"100vw",height:"100vh"}},yRt=["src"];function ERt(n,e,t,s,i,r){return T(),x("div",bRt,[l("iframe",{src:n.$store.state.config.sd_base_url,class:"m-0 p-0 w-full h-full"},null,8,yRt)])}const vRt=st(gRt,[["render",ERt]]),SRt={name:"AppCard",props:{app:{type:Object,required:!0},isFavorite:{type:Boolean,default:!1}},methods:{formatDate(n){const e={year:"numeric",month:"short",day:"numeric"};return new Date(n).toLocaleDateString(void 0,e)}}},TRt={class:"app-card flex flex-col h-full"},xRt={class:"flex-grow"},CRt={class:"flex items-center mb-4"},wRt=["src"],RRt={class:"font-bold text-xl text-gray-800"},ARt={class:"text-sm text-gray-600"},MRt={class:"text-sm text-gray-600"},NRt={class:"text-sm text-gray-600"},IRt={class:"text-sm text-gray-600"},ORt={class:"text-sm text-gray-600"},kRt={class:"mb-4"},DRt={class:"text-sm text-gray-600 h-20 overflow-y-auto"},LRt={class:"text-sm text-gray-600 mb-2"},PRt={key:0,class:"mb-4"},FRt={class:"text-xs text-gray-500 italic h-16 overflow-y-auto"},URt={class:"mt-auto pt-4 border-t"},BRt={class:"flex justify-between items-center flex-wrap"},GRt=["title"],VRt=["fill"];function zRt(n,e,t,s,i,r){return T(),x("div",TRt,[l("div",xRt,[l("div",CRt,[l("img",{src:t.app.icon,alt:"App Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4"},null,8,wRt),l("div",null,[l("h3",RRt,Y(t.app.name),1),l("p",ARt,"Author: "+Y(t.app.author),1),l("p",MRt,"Version: "+Y(t.app.version),1),l("p",NRt,"Category: "+Y(t.app.category),1),l("p",IRt,"Creation date: "+Y(r.formatDate(t.app.creation_date)),1),l("p",ORt,"Last update: "+Y(r.formatDate(t.app.last_update_date)),1),l("p",{class:Pe(["text-sm",t.app.is_public?"text-green-600":"text-orange-600"])},Y(t.app.is_public?"Public App":"Local App"),3)])]),l("div",kRt,[e[10]||(e[10]=l("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),l("p",DRt,Y(t.app.description),1)]),l("p",LRt,"AI Model: "+Y(t.app.model_name),1),t.app.disclaimer&&t.app.disclaimer.trim()!==""?(T(),x("div",PRt,[e[11]||(e[11]=l("h4",{class:"font-semibold mb-1 text-gray-700"},"Disclaimer:",-1)),l("p",FRt,Y(t.app.disclaimer),1)])):B("",!0)]),l("div",URt,[l("div",BRt,[l("button",{onClick:e[0]||(e[0]=$(o=>n.$emit("toggle-favorite",t.app.name),["stop"])),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:t.isFavorite?"Remove from favorites":"Add to favorites"},[(T(),x("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:t.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[12]||(e[12]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"},null,-1)]),8,VRt))],8,GRt),t.app.installed?(T(),x("button",{key:0,onClick:e[1]||(e[1]=$(o=>n.$emit("uninstall",t.app.folder_name),["stop"])),class:"text-red-500 hover:text-red-600 transition duration-300 ease-in-out",title:"Uninstall"},e[13]||(e[13]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]))):t.app.existsInFolder?(T(),x("button",{key:1,onClick:e[2]||(e[2]=$(o=>n.$emit("delete",t.app.name),["stop"])),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:"Delete"},e[14]||(e[14]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]))):(T(),x("button",{key:2,onClick:e[3]||(e[3]=$(o=>n.$emit("install",t.app.folder_name),["stop"])),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Install"},e[15]||(e[15]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)]))),t.app.installed?(T(),x("button",{key:3,onClick:e[4]||(e[4]=$(o=>n.$emit("edit",t.app),["stop"])),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Edit"},e[16]||(e[16]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)]))):B("",!0),l("button",{onClick:e[5]||(e[5]=$(o=>n.$emit("download",t.app.folder_name),["stop"])),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Download"},e[17]||(e[17]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)])),t.app.has_readme?(T(),x("button",{key:4,onClick:e[6]||(e[6]=$(o=>n.$emit("help",t.app),["stop"])),class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out",title:"Help"},e[18]||(e[18]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M12 21a9 9 0 100-18 9 9 0 000 18z"})],-1)]))):B("",!0),t.app.installed?(T(),x("button",{key:5,onClick:e[7]||(e[7]=$(o=>n.$emit("open",t.app),["stop"])),class:"text-indigo-500 hover:text-indigo-600 transition duration-300 ease-in-out",title:"Open"},e[19]||(e[19]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1)]))):B("",!0),t.app.has_server&&t.app.installed?(T(),x("button",{key:6,onClick:e[8]||(e[8]=$(o=>n.$emit("start-server",t.app.folder_name),["stop"])),class:"text-teal-500 hover:text-teal-600 transition duration-300 ease-in-out",title:"Start Server"},e[20]||(e[20]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M12 5l7 7-7 7"})],-1)]))):B("",!0),t.app.has_update?(T(),x("button",{key:7,onClick:e[9]||(e[9]=$(o=>n.$emit("install",t.app.folder_name),["stop"])),class:"relative text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out animate-pulse",title:"Update Available"},e[21]||(e[21]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),l("span",{class:"absolute top-0 right-0 inline-flex items-center justify-center px-2 py-1 text-xs font-bold leading-none text-red-100 transform translate-x-1/2 -translate-y-1/2 bg-red-600 rounded-full"},"!",-1)]))):B("",!0)])])])}const HRt=st(SRt,[["render",zRt],["__scopeId","data-v-ae134649"]]),qRt={components:{AppCard:HRt},data(){return{apps:[],githubApps:[],favorites:[],selectedCategory:"all",selectedApp:null,appCode:"",loading:!1,message:"",successMessage:!0,searchQuery:"",selectedFile:null,isUploading:!1,error:"",sortBy:"update",sortOrder:"desc",showOnlyInstalled:!1,showOnlyUnInstalled:!1}},computed:{currentCategoryName(){return this.selectedCategory==="all"?"All Apps":this.selectedCategory},combinedApps(){this.apps.map(e=>e.name);const n=new Map(this.apps.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{n.has(e.name)||n.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(n.values())},categories(){return[...new Set(this.combinedApps.map(n=>n.category))]},filteredApps(){return this.combinedApps.filter(n=>{const e=n.name.toLowerCase().includes(this.searchQuery.toLowerCase())||n.description.toLowerCase().includes(this.searchQuery.toLowerCase())||n.author.toLowerCase().includes(this.searchQuery.toLowerCase()),t=this.selectedCategory==="all"||n.category===this.selectedCategory,s=this.showOnlyInstalled&&n.installed||this.showOnlyUnInstalled&&!n.installed||!this.showOnlyInstalled&&!this.showOnlyUnInstalled;return e&&t&&s})},sortedAndFilteredApps(){return[...this.filteredApps].sort((n,e)=>{let t=0;switch(this.sortBy){case"name":t=n.name.localeCompare(e.name);break;case"author":t=n.author.localeCompare(e.author);break;case"date":t=this.getDateValue(n.creation_date)-this.getDateValue(e.creation_date);break;case"update":t=this.getDateValue(n.last_update_date)-this.getDateValue(e.last_update_date);break}return this.sortOrder==="asc"?t:-t})},favoriteApps(){return this.combinedApps.filter(n=>this.favorites.includes(n.appName))}},methods:{getDateValue(n){if(!n)return 0;const e=new Date(n);return isNaN(e.getTime())?0:e.getTime()},toggleSortOrder(){this.sortOrder=this.sortOrder==="asc"?"desc":"asc"},toggleFavorite(n){console.log("Toggling favorite"),console.log(n);const e=this.favorites.indexOf(n);e===-1?this.favorites.push(n):this.favorites.splice(e,1),this.saveFavoritesToLocalStorage()},saveFavoritesToLocalStorage(){localStorage.setItem("appZooFavorites",JSON.stringify(this.favorites))},loadFavoritesFromLocalStorage(){const n=localStorage.getItem("appZooFavorites");console.log("savedFavorites",n),n&&(this.favorites=JSON.parse(n))},startServer(n){const e={client_id:this.$store.state.client_id,app_name:n};this.$store.state.messageBox.showBlockingMessage(`Loading server. -This may take some time the first time as some libraries need to be installed.`),te.post("/apps/start_server",e).then(t=>{this.$store.state.messageBox.hideMessage(),console.log("Server start initiated:",t.data.message),this.$notify({type:"success",title:"Server Starting",text:t.data.message})}).catch(t=>{var s,i;this.$store.state.messageBox.hideMessage(),console.error("Error starting server:",t),this.$notify({type:"error",title:"Server Start Failed",text:((i=(s=t.response)==null?void 0:s.data)==null?void 0:i.detail)||"An error occurred while starting the server"})})},triggerFileInput(){this.$refs.fileInput.click()},onFileSelected(n){this.selectedFile=n.target.files[0],this.message="",this.error="",this.uploadApp()},async uploadApp(){var e,t;if(!this.selectedFile){this.error="Please select a file to upload.";return}this.isUploading=!0,this.message="",this.error="";const n=new FormData;n.append("file",this.selectedFile),n.append("client_id",this.$store.state.client_id);try{const s=await te.post("/upload_app",n,{headers:{"Content-Type":"multipart/form-data"}});this.message=s.data.message,this.$refs.fileInput.value="",this.selectedFile=null}catch(s){console.error("Error uploading app:",s),this.error=((t=(e=s.response)==null?void 0:e.data)==null?void 0:t.detail)||"Failed to upload the app. Please try again."}finally{this.isUploading=!1}},async fetchApps(){this.loading=!0;try{const n=await te.get("/apps");this.apps=n.data,this.showMessage("Refresh successful!",!0)}catch{this.showMessage("Failed to refresh apps.",!1)}finally{this.loading=!1}},async openAppsFolder(){this.loading=!0;try{console.log("opening apps folder");const n=await te.post("/show_apps_folder",{client_id:this.$store.state.client_id})}catch{this.showMessage("Failed to open apps folder.",!1)}finally{this.loading=!1}},async fetchGithubApps(){this.loading=!0;try{const n=await te.get("/github/apps");this.githubApps=n.data.apps,await this.fetchApps()}catch{this.showMessage("Failed to refresh GitHub apps.",!1)}finally{this.loading=!1}},async handleAppClick(n){if(n.installed){this.selectedApp=n;const e=await te.get(`/apps/${n.folder_name}/README.md`);this.appCode=kt(e.data)}else this.showMessage(`Please install ${n.folder_name} to view its code.`,!1)},backToZoo(){this.selectedApp=null,this.appCode=""},async installApp(n){this.loading=!0,this.$store.state.messageBox.showBlockingMessage(`Installing app ${n}`);try{await te.post(`/install/${n}`,{client_id:this.$store.state.client_id}),this.showMessage("Installation succeeded!",!0)}catch{this.showMessage("Installation failed.",!1)}finally{this.loading=!1,this.fetchApps(),this.fetchGithubApps(),this.$store.state.messageBox.hideMessage()}},async uninstallApp(n){this.loading=!0;try{await te.post(`/uninstall/${n}`,{client_id:this.$store.state.client_id}),this.showMessage("Uninstallation succeeded!",!0)}catch{this.showMessage("Uninstallation failed.",!1)}finally{this.loading=!1,this.fetchApps()}},async deleteApp(n){this.loading=!0;try{await te.post(`/delete/${n}`,{client_id:this.$store.state.client_id}),this.showMessage("Deletion succeeded!",!0)}catch{this.showMessage("Deletion failed.",!1)}finally{this.loading=!1,this.fetchApps()}},async editApp(n){this.loading=!0;try{const e=await te.post("/open_app_in_vscode",{client_id:this.$store.state.client_id,app_name:n.folder_name});this.showMessage(e.data.message,!0)}catch{this.showMessage("Failed to open folder in VSCode.",!1)}finally{this.loading=!1}},async downloadApp(n){this.isLoading=!0,this.error=null;try{const e=await te.post("/download_app",{client_id:this.$store.state.client_id,app_name:n},{responseType:"arraybuffer"}),t=e.headers["content-disposition"],s=t&&t.match(/filename="?(.+)"?/i),i=s?s[1]:"app.zip",r=new Blob([e.data],{type:"application/zip"}),o=window.URL.createObjectURL(r),a=document.createElement("a");a.style.display="none",a.href=o,a.download=i,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(o),document.body.removeChild(a)}catch(e){console.error("Error downloading app:",e),this.error="Failed to download the app. Please try again."}finally{this.isLoading=!1}},openApp(n){n.installed?window.open(`/apps/${n.folder_name}/index.html?client_id=${this.$store.state.client_id}`,"_blank"):this.showMessage(`Please install ${n.name} before opening.`,!1)},showMessage(n,e){this.message=n,this.successMessage=e,setTimeout(()=>{this.message=""},3e3)}},mounted(){this.fetchGithubApps(),this.loadFavoritesFromLocalStorage()}},YRt={class:"app-zoo background-color w-full p-6 pt-12 min-h-screen overflow-y-auto"},$Rt={class:"panels-color shadow-lg rounded-lg p-4 max-w-4xl mx-auto mb-8"},WRt={class:"flex flex-wrap items-center justify-between gap-4"},KRt={class:"flex items-center space-x-4"},jRt=["disabled"],QRt={key:0},XRt={key:1,class:"error"},ZRt={class:"relative flex-grow max-w-md"},JRt={class:"flex items-center space-x-4"},eAt=["value"],tAt={class:"flex items-center space-x-4"},nAt={for:"installed-only",class:"font-semibold"},sAt={for:"installed-only",class:"font-semibold"},iAt={class:"flex items-center space-x-4"},rAt={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},oAt={key:1,class:"pb-20"},aAt={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-8"},lAt={class:"text-2xl font-bold mb-4"},cAt={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"},dAt={key:2,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},uAt={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},pAt={class:"flex justify-between items-center mb-4"},fAt={class:"text-2xl font-bold"},_At=["srcdoc"],mAt={key:1,class:"text-center text-red-500"};function hAt(n,e,t,s,i,r){const o=Je("app-card");return T(),x("div",YRt,[l("nav",$Rt,[l("div",WRt,[l("div",KRt,[l("button",{onClick:e[0]||(e[0]=(...a)=>r.fetchGithubApps&&r.fetchGithubApps(...a)),class:"btn btn-primary","aria-label":"Refresh apps from GitHub"},e[11]||(e[11]=[l("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),Ze(" Refresh ")])),l("button",{onClick:e[1]||(e[1]=(...a)=>r.openAppsFolder&&r.openAppsFolder(...a)),class:"btn btn-secondary","aria-label":"Open apps folder"},e[12]||(e[12]=[l("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z"})],-1),Ze(" Open Folder ")])),l("input",{type:"file",onChange:e[2]||(e[2]=(...a)=>r.onFileSelected&&r.onFileSelected(...a)),accept:".zip",ref:"fileInput",style:{display:"none"}},null,544),l("button",{onClick:e[3]||(e[3]=(...a)=>r.triggerFileInput&&r.triggerFileInput(...a)),disabled:i.isUploading,class:"btn-secondary text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Upload App"},Y(i.isUploading?"Uploading...":"Upload App"),9,jRt)]),i.message?(T(),x("p",QRt,Y(i.message),1)):B("",!0),i.error?(T(),x("p",XRt,Y(i.error),1)):B("",!0),l("div",ZRt,[k(l("input",{"onUpdate:modelValue":e[4]||(e[4]=a=>i.searchQuery=a),placeholder:"Search apps...",class:"w-full border-b-2 border-gray-300 px-4 py-2 pl-10 focus:outline-none focus:border-blue-500 transition duration-300 ease-in-out","aria-label":"Search apps"},null,512),[[ue,i.searchQuery]]),e[13]||(e[13]=l("svg",{class:"w-5 h-5 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),l("div",JRt,[e[15]||(e[15]=l("label",{for:"category-select",class:"font-semibold"},"Category:",-1)),k(l("select",{id:"category-select","onUpdate:modelValue":e[5]||(e[5]=a=>i.selectedCategory=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},[e[14]||(e[14]=l("option",{value:"all"},"All Categories",-1)),(T(!0),x(Le,null,We(r.categories,a=>(T(),x("option",{key:a,value:a},Y(a),9,eAt))),128))],512),[[Ot,i.selectedCategory]])]),l("div",tAt,[l("label",nAt,[k(l("input",{id:"installed-only",type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=a=>i.showOnlyInstalled=a),class:"mr-2"},null,512),[[Ye,i.showOnlyInstalled]]),e[16]||(e[16]=Ze(" Show only installed apps "))]),l("label",sAt,[k(l("input",{id:"uninstalled-only",type:"checkbox","onUpdate:modelValue":e[7]||(e[7]=a=>i.showOnlyUnInstalled=a),class:"mr-2"},null,512),[[Ye,i.showOnlyUnInstalled]]),e[17]||(e[17]=Ze(" Show only non installed apps "))])]),l("div",iAt,[e[19]||(e[19]=l("label",{for:"sort-select",class:"font-semibold"},"Sort by:",-1)),k(l("select",{id:"sort-select","onUpdate:modelValue":e[8]||(e[8]=a=>i.sortBy=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},e[18]||(e[18]=[l("option",{value:"name"},"Name",-1),l("option",{value:"author"},"Author",-1),l("option",{value:"date"},"Creation Date",-1),l("option",{value:"update"},"Last Update",-1)]),512),[[Ot,i.sortBy]]),l("button",{onClick:e[9]||(e[9]=(...a)=>r.toggleSortOrder&&r.toggleSortOrder(...a)),class:"btn btn-secondary"},Y(i.sortOrder==="asc"?"↑":"↓"),1)])])]),i.loading?(T(),x("div",rAt,e[20]||(e[20]=[l("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1),l("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)]))):(T(),x("div",oAt,[e[21]||(e[21]=l("h2",{class:"text-2xl font-bold mb-4"},"Favorite Apps",-1)),l("div",aAt,[(T(!0),x(Le,null,We(r.favoriteApps,a=>(T(),at(o,{key:a.appName,app:a,onToggleFavorite:r.toggleFavorite,onInstall:r.installApp,onUninstall:r.uninstallApp,onDelete:r.deleteApp,onEdit:r.editApp,onDownload:r.downloadApp,onHelp:r.handleAppClick,onOpen:r.openApp,onStartServer:r.startServer},null,8,["app","onToggleFavorite","onInstall","onUninstall","onDelete","onEdit","onDownload","onHelp","onOpen","onStartServer"]))),128))]),l("h2",lAt,Y(r.currentCategoryName)+" ("+Y(r.sortedAndFilteredApps.length)+")",1),l("div",cAt,[(T(!0),x(Le,null,We(r.sortedAndFilteredApps,a=>(T(),at(o,{key:a.name,app:a,onToggleFavorite:r.toggleFavorite,onInstall:r.installApp,onUninstall:r.uninstallApp,onDelete:r.deleteApp,onEdit:r.editApp,onDownload:r.downloadApp,onHelp:r.handleAppClick,onOpen:r.openApp,onStartServer:r.startServer},null,8,["app","onToggleFavorite","onInstall","onUninstall","onDelete","onEdit","onDownload","onHelp","onOpen","onStartServer"]))),128))])])),i.selectedApp?(T(),x("div",dAt,[l("div",uAt,[l("div",pAt,[l("h2",fAt,Y(i.selectedApp.name),1),l("button",{onClick:e[10]||(e[10]=(...a)=>r.backToZoo&&r.backToZoo(...a)),class:"bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded-lg transition duration-300 ease-in-out"},"Close")]),i.appCode?(T(),x("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,_At)):(T(),x("p",mAt,"Please install this app to view its code."))])])):B("",!0),i.message?(T(),x("div",{key:3,class:Pe(["fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-md",{"bg-green-100 text-green-800":i.successMessage,"bg-red-100 text-red-800":!i.successMessage}])},Y(i.message),3)):B("",!0)])}const gAt=st(qRt,[["render",hAt]]),bAt={components:{PersonalityEntry:cN},data(){return{personalities:[],githubApps:[],favorites:[],selectedCategory:"all",selectedApp:null,appCode:"",loading:!1,message:"",successMessage:!0,searchQuery:"",selectedFile:null,isUploading:!1,error:"",sortBy:"name",sortOrder:"asc"}},computed:{currentCategoryName(){return this.selectedCategory=="all"?"All Personalities":this.selectedCategory},configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},combinedApps(){this.personalities.map(e=>e.name);const n=new Map(this.personalities.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{n.has(e.name)||n.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(n.values())},categories(){return[...new Set(this.combinedApps.map(n=>n.category))].sort((n,e)=>n.localeCompare(e))},filteredApps(){return this.combinedApps.filter(n=>{const e=n.name.toLowerCase().includes(this.searchQuery.toLowerCase())||n.author.toLowerCase().includes(this.searchQuery.toLowerCase())||n.description.toLowerCase().includes(this.searchQuery.toLowerCase()),t=this.selectedCategory==="all"||n.category===this.selectedCategory;return e&&t})},sortedAndFilteredPersonalities(){return[...this.filteredApps].sort((n,e)=>{let t=0;switch(this.sortBy){case"name":t=n.name.localeCompare(e.name);break;case"author":t=n.author.localeCompare(e.author);break;case"date":t=this.getDateValue(n.creation_date)-this.getDateValue(e.creation_date);break;case"update":t=this.getDateValue(n.last_update_date)-this.getDateValue(e.last_update_date);break}return this.sortOrder==="asc"?t:-t})},favoriteApps(){return this.combinedApps.filter(n=>this.favorites.includes(n.uid))}},methods:{getDateValue(n){if(!n)return 0;const e=new Date(n);return isNaN(e.getTime())?0:e.getTime()},async onPersonalitySelected(n){if(console.log("on pers",n),this.isLoading&&this.$store.state.toast.showToast("Loading... please wait",4,!1),this.isLoading=!0,console.log("selecting ",n),n){if(n.selected){this.$store.state.toast.showToast("Personality already selected",4,!0),this.isLoading=!1;return}let e=n.language==null?n.full_path:n.full_path+":"+n.language;if(console.log("pth",e),n.isMounted&&this.configFile.personalities.includes(e)){const t=await this.select_personality(n);console.log("pers is mounted",t),t&&t.status&&t.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: +This is likely a Baklava internal issue. Please report it on GitHub.`);return e.get(t)}}const Dxt=["INPUT","TEXTAREA","SELECT"];function CI(n){return Dxt.includes(n.tagName)}let Ab=null;function Lxt(n){Ab=n}function ds(){if(!Ab)throw new Error("providePlugin() must be called before usePlugin()");return{viewModel:Ab}}function Ns(){const{viewModel:n}=ds();return{graph:Bd(n.value,"displayedGraph"),switchGraph:n.value.switchGraph}}function wI(n){const{graph:e}=Ns(),t=ot(null),s=ot(null);return{dragging:et(()=>!!t.value),onPointerDown:c=>{t.value={x:c.pageX,y:c.pageY},s.value={x:n.value.x,y:n.value.y}},onPointerMove:c=>{if(t.value){const d=c.pageX-t.value.x,u=c.pageY-t.value.y;n.value.x=s.value.x+d/e.value.scaling,n.value.y=s.value.y+u/e.value.scaling}},onPointerUp:()=>{t.value=null,s.value=null}}}function RI(n,e,t){if(!e.template)return!1;if(Ia(e.template)===t)return!0;const s=n.graphTemplates.find(r=>Ia(r)===t);return s?s.nodes.filter(r=>r.type.startsWith(Jl)).some(r=>RI(n,e,r.type)):!1}function AI(n){return et(()=>{const e=Array.from(n.value.editor.nodeTypes.entries()),t=new Set(e.map(([,i])=>i.category)),s=[];for(const i of t.values()){let r=e.filter(([,o])=>o.category===i);n.value.displayedGraph.template?r=r.filter(([o])=>!RI(n.value.editor,n.value.displayedGraph,o)):r=r.filter(([o])=>![Ma,Na].includes(o)),r.length>0&&s.push({name:i,nodeTypes:Object.fromEntries(r)})}return s.sort((i,r)=>i.name==="default"?-1:r.name==="default"||i.name>r.name?1:-1),s})}function MI(){const{graph:n}=Ns();return{transform:(t,s)=>{const i=t/n.value.scaling-n.value.panning.x,r=s/n.value.scaling-n.value.panning.y;return[i,r]}}}function Pxt(){const{graph:n}=Ns();let e=[],t=-1,s={x:0,y:0};const i=et(()=>n.value.panning),r=wI(i),o=et(()=>({"transform-origin":"0 0",transform:`scale(${n.value.scaling}) translate(${n.value.panning.x}px, ${n.value.panning.y}px)`})),a=(h,g,f)=>{const b=[h/n.value.scaling-n.value.panning.x,g/n.value.scaling-n.value.panning.y],y=[h/f-n.value.panning.x,g/f-n.value.panning.y],E=[y[0]-b[0],y[1]-b[1]];n.value.panning.x+=E[0],n.value.panning.y+=E[1],n.value.scaling=f},c=h=>{h.preventDefault();let g=h.deltaY;h.deltaMode===1&&(g*=32);const f=n.value.scaling*(1-g/3e3);a(h.offsetX,h.offsetY,f)},d=()=>({ax:e[0].clientX,ay:e[0].clientY,bx:e[1].clientX,by:e[1].clientY});return{styles:o,...r,onPointerDown:h=>{if(e.push(h),r.onPointerDown(h),e.length===2){const{ax:g,ay:f,bx:b,by:y}=d();s={x:g+(b-g)/2,y:f+(y-f)/2}}},onPointerMove:h=>{for(let g=0;g0){const R=n.value.scaling*(1+(S-t)/500);a(s.x,s.y,R)}t=S}else r.onPointerMove(h)},onPointerUp:h=>{e=e.filter(g=>g.pointerId!==h.pointerId),t=-1,r.onPointerUp()},onMouseWheel:c}}var ys=(n=>(n[n.NONE=0]="NONE",n[n.ALLOWED=1]="ALLOWED",n[n.FORBIDDEN=2]="FORBIDDEN",n))(ys||{});const NI=Symbol();function Fxt(){const{graph:n}=Ns(),e=ot(null),t=ot(null),s=a=>{e.value&&(e.value.mx=a.offsetX/n.value.scaling-n.value.panning.x,e.value.my=a.offsetY/n.value.scaling-n.value.panning.y)},i=()=>{if(t.value){if(e.value)return;const a=n.value.connections.find(c=>c.to===t.value);t.value.isInput&&a?(e.value={status:ys.NONE,from:a.from},n.value.removeConnection(a)):e.value={status:ys.NONE,from:t.value},e.value.mx=void 0,e.value.my=void 0}},r=()=>{if(e.value&&t.value){if(e.value.from===t.value)return;n.value.addConnection(e.value.from,e.value.to)}e.value=null},o=a=>{if(t.value=a??null,a&&e.value){e.value.to=a;const c=n.value.checkConnection(e.value.from,e.value.to);if(e.value.status=c.connectionAllowed?ys.ALLOWED:ys.FORBIDDEN,c.connectionAllowed){const d=c.connectionsInDanger.map(u=>u.id);n.value.connections.forEach(u=>{d.includes(u.id)&&(u.isInDanger=!0)})}}else!a&&e.value&&(e.value.to=void 0,e.value.status=ys.NONE,n.value.connections.forEach(c=>{c.isInDanger=!1}))};return na(NI,{temporaryConnection:e,hoveredOver:o}),{temporaryConnection:e,onMouseMove:s,onMouseDown:i,onMouseUp:r,hoveredOver:o}}function Uxt(n){const e=ot(!1),t=ot(0),s=ot(0),i=AI(n),{transform:r}=MI(),o=et(()=>{let u=[];const _={};for(const h of i.value){const g=Object.entries(h.nodeTypes).map(([f,b])=>({label:b.title,value:"addNode:"+f}));h.name==="default"?u=g:_[h.name]=g}const m=[...Object.entries(_).map(([h,g])=>({label:h,submenu:g}))];return m.length>0&&u.length>0&&m.push({isDivider:!0}),m.push(...u),m}),a=et(()=>n.value.settings.contextMenu.additionalItems.length===0?o.value:[{label:"Add node",submenu:o.value},...n.value.settings.contextMenu.additionalItems.map(u=>"isDivider"in u||"submenu"in u?u:{label:u.label,value:"command:"+u.command,disabled:!n.value.commandHandler.canExecuteCommand(u.command)})]);function c(u){const _=u.target;if(!(_ instanceof Element)||CI(_))return;u.preventDefault(),e.value=!0;const m=_.getBoundingClientRect(),g=_.closest(".baklava-editor").getBoundingClientRect();t.value=m.x+u.offsetX-g.x,s.value=m.y+u.offsetY-g.y}function d(u){if(u.startsWith("addNode:")){const _=u.substring(8),m=n.value.editor.nodeTypes.get(_);if(!m)return;const h=Hn(new m.type);n.value.displayedGraph.addNode(h);const[g,f]=r(t.value,s.value);h.position.x=g,h.position.y=f}else if(u.startsWith("command:")){const _=u.substring(8);n.value.commandHandler.canExecuteCommand(_)&&n.value.commandHandler.executeCommand(_)}}return{show:e,x:t,y:s,items:a,open:c,onClick:d}}const Ld="START_SELECTION_BOX";function Bxt(n){const{viewModel:e}=ds(),{graph:t}=Ns(),s=et(()=>t.value.nodes),i=ot(!1),r=ot(!1),o=ot([0,0]),a=ot([0,0]);Tn(e,()=>{e.value.commandHandler.hasCommand(Ld)||(e.value.commandHandler.registerCommand(Ld,{canExecute:()=>!0,execute(){i.value=!0}}),e.value.commandHandler.registerHotkey(["b"],Ld))},{immediate:!0});function c(y){return[y.clientX-n.value.getBoundingClientRect().left,y.clientY-n.value.getBoundingClientRect().top]}function d(y){return i.value?(r.value=!0,i.value=!1,o.value=c(y),a.value=c(y),document.addEventListener("pointermove",u),document.addEventListener("pointerup",_),!0):!1}function u(y){o.value=c(y)}function _(y){document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",_),o.value=c(y),r.value=!1;const E=m();for(const v of E)e.value.displayedGraph.selectedNodes.push(v)}function m(){const y=h(),v=document.querySelector(".baklava-editor").getBoundingClientRect();return s.value.filter(S=>{const R=g(S,v);return f(y,R)})}function h(){return{left:Math.min(o.value[0],a.value[0]),top:Math.min(o.value[1],a.value[1]),right:Math.max(o.value[0],a.value[0]),bottom:Math.max(o.value[1],a.value[1])}}function g(y,E){const v=document.getElementById(y.id),S=v?v.getBoundingClientRect():{x:0,y:0,width:0,height:0},R=S.x-E.left,w=S.y-E.top;return{left:R,top:w,right:R+S.width,bottom:w+S.height}}function f(y,E){return y.leftE.left&&y.topE.top}function b(){return{width:Math.abs(a.value[0]-o.value[0])+"px",height:Math.abs(a.value[1]-o.value[1])+"px",left:(a.value[0]>o.value[0]?o.value[0]:a.value[0])+"px",top:(a.value[1]>o.value[1]?o.value[1]:a.value[1])+"px"}}return Hn({startSelection:i,isSelecting:r,start:o,end:a,onPointerDown:d,getStyles:b})}const Gxt=cn({setup(){const{viewModel:n}=ds(),{graph:e}=Ns();return{styles:et(()=>{const s=n.value.settings.background,i=e.value.panning.x*e.value.scaling,r=e.value.panning.y*e.value.scaling,o=e.value.scaling*s.gridSize,a=o/s.gridDivision,c=`${o}px ${o}px, ${o}px ${o}px`,d=e.value.scaling>s.subGridVisibleThreshold?`, ${a}px ${a}px, ${a}px ${a}px`:"";return{backgroundPosition:`left ${i}px top ${r}px`,backgroundSize:`${c} ${d}`}})}}}),sn=(n,e)=>{const t=n.__vccOpts||n;for(const[s,i]of e)t[s]=i;return t};function Vxt(n,e,t,s,i,r){return T(),x("div",{class:"background",style:Vt(n.styles)},null,4)}const zxt=sn(Gxt,[["render",Vxt]]);function Hxt(n){return E2()?(_O(n),!0):!1}function Ay(n){return typeof n=="function"?n():bt(n)}const II=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const qxt=Object.prototype.toString,Yxt=n=>qxt.call(n)==="[object Object]",Pd=()=>{},$xt=Wxt();function Wxt(){var n,e;return II&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Kxt(n,e,t=!1){return e.reduce((s,i)=>(i in n&&(!t||n[i]!==void 0)&&(s[i]=n[i]),s),{})}function jxt(n,e={}){if(!pn(n))return HO(n);const t=Array.isArray(n.value)?Array.from({length:n.value.length}):{};for(const s in n.value)t[s]=zO(()=>({get(){return n.value[s]},set(i){var r;if((r=Ay(e.replaceRef))!=null?r:!0)if(Array.isArray(n.value)){const a=[...n.value];a[s]=i,n.value=a}else{const a={...n.value,[s]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(n.value)),n.value=a}else n.value[s]=i}}));return t}function bl(n){var e;const t=Ay(n);return(e=t==null?void 0:t.$el)!=null?e:t}const My=II?window:void 0;function Ll(...n){let e,t,s,i;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,s,i]=n,e=My):[e,t,s,i]=n,!e)return Pd;Array.isArray(t)||(t=[t]),Array.isArray(s)||(s=[s]);const r=[],o=()=>{r.forEach(u=>u()),r.length=0},a=(u,_,m,h)=>(u.addEventListener(_,m,h),()=>u.removeEventListener(_,m,h)),c=Tn(()=>[bl(e),Ay(i)],([u,_])=>{if(o(),!u)return;const m=Yxt(_)?{..._}:_;r.push(...t.flatMap(h=>s.map(g=>a(u,h,g,m))))},{immediate:!0,flush:"post"}),d=()=>{c(),o()};return Hxt(d),d}let t2=!1;function OI(n,e,t={}){const{window:s=My,ignore:i=[],capture:r=!0,detectIframe:o=!1}=t;if(!s)return Pd;$xt&&!t2&&(t2=!0,Array.from(s.document.body.children).forEach(m=>m.addEventListener("click",Pd)),s.document.documentElement.addEventListener("click",Pd));let a=!0;const c=m=>i.some(h=>{if(typeof h=="string")return Array.from(s.document.querySelectorAll(h)).some(g=>g===m.target||m.composedPath().includes(g));{const g=bl(h);return g&&(m.target===g||m.composedPath().includes(g))}}),u=[Ll(s,"click",m=>{const h=bl(n);if(!(!h||h===m.target||m.composedPath().includes(h))){if(m.detail===0&&(a=!c(m)),!a){a=!0;return}e(m)}},{passive:!0,capture:r}),Ll(s,"pointerdown",m=>{const h=bl(n);a=!c(m)&&!!(h&&!m.composedPath().includes(h))},{passive:!0}),o&&Ll(s,"blur",m=>{setTimeout(()=>{var h;const g=bl(n);((h=s.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(g!=null&&g.contains(s.document.activeElement))&&e(m)},0)})].filter(Boolean);return()=>u.forEach(m=>m())}const kI={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},Qxt=Object.keys(kI);function Xxt(n={}){const{target:e=My}=n,t=ot(!1),s=ot(n.initialValue||{});Object.assign(s.value,kI,s.value);const i=r=>{t.value=!0,!(n.pointerTypes&&!n.pointerTypes.includes(r.pointerType))&&(s.value=Kxt(r,Qxt,!1))};if(e){const r={passive:!0};Ll(e,["pointerdown","pointermove","pointerup"],i,r),Ll(e,"pointerleave",()=>t.value=!1,r)}return{...jxt(s),isInside:t}}const Zxt=["onMouseenter","onMouseleave","onClick"],Jxt={class:"flex-fill"},eCt={key:0,class:"__submenu-icon",style:{"line-height":"1em"}},tCt=l("svg",{width:"13",height:"13",viewBox:"-60 120 250 250"},[l("path",{d:"M160.875 279.5625 L70.875 369.5625 L70.875 189.5625 L160.875 279.5625 Z",stroke:"none",fill:"white"})],-1),nCt=[tCt],Ny=cn({__name:"ContextMenu",props:{modelValue:{type:Boolean},items:{},x:{default:0},y:{default:0},isNested:{type:Boolean,default:!1},isFlipped:{default:()=>({x:!1,y:!1})},flippable:{type:Boolean,default:!1}},emits:["update:modelValue","click"],setup(n,{emit:e}){const t=n,s=e;let i=null;const r=ot(null),o=ot(-1),a=ot(0),c=ot({x:!1,y:!1}),d=et(()=>t.flippable&&(c.value.x||t.isFlipped.x)),u=et(()=>t.flippable&&(c.value.y||t.isFlipped.y)),_=et(()=>{const E={};return t.isNested||(E.top=(u.value?t.y-a.value:t.y)+"px",E.left=t.x+"px"),E}),m=et(()=>({"--flipped-x":d.value,"--flipped-y":u.value,"--nested":t.isNested})),h=et(()=>t.items.map(E=>({...E,hover:!1})));Tn([()=>t.y,()=>t.items],()=>{var E,v,S,R;a.value=t.items.length*30;const w=((v=(E=r.value)==null?void 0:E.parentElement)==null?void 0:v.offsetWidth)??0,A=((R=(S=r.value)==null?void 0:S.parentElement)==null?void 0:R.offsetHeight)??0;c.value.x=!t.isNested&&t.x>w*.75,c.value.y=!t.isNested&&t.y+a.value>A-20}),OI(r,()=>{t.modelValue&&s("update:modelValue",!1)});const g=E=>{!E.submenu&&E.value&&(s("click",E.value),s("update:modelValue",!1))},f=E=>{s("click",E),o.value=-1,t.isNested||s("update:modelValue",!1)},b=(E,v)=>{t.items[v].submenu&&(o.value=v,i!==null&&(clearTimeout(i),i=null))},y=(E,v)=>{t.items[v].submenu&&(i=window.setTimeout(()=>{o.value=-1,i=null},200))};return(E,v)=>{const S=Je("ContextMenu",!0);return T(),at(Bs,{name:"slide-fade"},{default:Ne(()=>[k(l("div",{ref_key:"el",ref:r,class:Pe(["baklava-context-menu",m.value]),style:Vt(_.value)},[(T(!0),x(Le,null,We(h.value,(R,w)=>(T(),x(Le,null,[R.isDivider?(T(),x("div",{key:`d-${w}`,class:"divider"})):(T(),x("div",{key:`i-${w}`,class:Pe(["item",{submenu:!!R.submenu,"--disabled":!!R.disabled}]),onMouseenter:A=>b(A,w),onMouseleave:A=>y(A,w),onClick:$(A=>g(R),["stop","prevent"])},[l("div",Jxt,Y(R.label),1),R.submenu?(T(),x("div",eCt,nCt)):B("",!0),R.submenu?(T(),at(S,{key:1,"model-value":o.value===w,items:R.submenu,"is-nested":!0,"is-flipped":{x:d.value,y:u.value},flippable:E.flippable,onClick:f},null,8,["model-value","items","is-flipped","flippable"])):B("",!0)],42,Zxt))],64))),256))],6),[[_t,E.modelValue]])]),_:1})}}}),sCt={},iCt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"16",height:"16",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},rCt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),oCt=l("circle",{cx:"12",cy:"12",r:"1"},null,-1),aCt=l("circle",{cx:"12",cy:"19",r:"1"},null,-1),lCt=l("circle",{cx:"12",cy:"5",r:"1"},null,-1),cCt=[rCt,oCt,aCt,lCt];function dCt(n,e){return T(),x("svg",iCt,cCt)}const DI=sn(sCt,[["render",dCt]]),uCt=["id"],pCt={key:0,class:"__tooltip"},fCt={key:2,class:"align-middle"},n2=cn({__name:"NodeInterface",props:{node:{},intf:{}},setup(n){const e=(b,y=100)=>{const E=typeof(b==null?void 0:b.toString)=="function"?String(b):"";return E.length>y?E.slice(0,y)+"...":E},t=n,{viewModel:s}=ds(),{hoveredOver:i,temporaryConnection:r}=Ts(NI),o=ot(null),a=et(()=>t.intf.connectionCount>0),c=ot(!1),d=et(()=>s.value.settings.displayValueOnHover&&c.value),u=et(()=>({"--input":t.intf.isInput,"--output":!t.intf.isInput,"--connected":a.value})),_=et(()=>t.intf.component&&(!t.intf.isInput||!t.intf.port||t.intf.connectionCount===0)),m=()=>{c.value=!0,i(t.intf)},h=()=>{c.value=!1,i(void 0)},g=()=>{o.value&&s.value.hooks.renderInterface.execute({intf:t.intf,el:o.value})},f=()=>{const b=s.value.displayedGraph.sidebar;b.nodeId=t.node.id,b.optionName=t.intf.name,b.visible=!0};return di(g),nc(g),(b,y)=>{var E;return T(),x("div",{id:b.intf.id,ref_key:"el",ref:o,class:Pe(["baklava-node-interface",u.value])},[b.intf.port?(T(),x("div",{key:0,class:Pe(["__port",{"--selected":((E=bt(r))==null?void 0:E.from)===b.intf}]),onPointerover:m,onPointerout:h},[on(b.$slots,"portTooltip",{showTooltip:d.value},()=>[d.value===!0?(T(),x("span",pCt,Y(e(b.intf.value)),1)):B("",!0)])],34)):B("",!0),_.value?(T(),at(Pu(b.intf.component),{key:1,modelValue:b.intf.value,"onUpdate:modelValue":y[0]||(y[0]=v=>b.intf.value=v),node:b.node,intf:b.intf,onOpenSidebar:f},null,40,["modelValue","node","intf"])):(T(),x("span",fCt,Y(b.intf.name),1))],10,uCt)}}}),_Ct=["id","data-node-type"],mCt={class:"__title-label"},hCt={class:"__menu"},gCt={class:"__outputs"},bCt={class:"__inputs"},yCt=cn({__name:"Node",props:{node:{},selected:{type:Boolean,default:!1},dragging:{type:Boolean}},emits:["select","start-drag"],setup(n,{emit:e}){const t=n,s=e,{viewModel:i}=ds(),{graph:r,switchGraph:o}=Ns(),a=ot(null),c=ot(!1),d=ot(""),u=ot(null),_=ot(!1),m=ot(!1),h=et(()=>{const V=[{value:"rename",label:"Rename"},{value:"delete",label:"Delete"}];return t.node.type.startsWith(Jl)&&V.push({value:"editSubgraph",label:"Edit Subgraph"}),V}),g=et(()=>({"--selected":t.selected,"--dragging":t.dragging,"--two-column":!!t.node.twoColumn})),f=et(()=>({"--reverse-y":t.node.reverseY??i.value.settings.nodes.reverseY})),b=et(()=>{var V,ee;return{top:`${((V=t.node.position)==null?void 0:V.y)??0}px`,left:`${((ee=t.node.position)==null?void 0:ee.x)??0}px`,"--width":`${t.node.width??i.value.settings.nodes.defaultWidth}px`}}),y=et(()=>Object.values(t.node.inputs).filter(V=>!V.hidden)),E=et(()=>Object.values(t.node.outputs).filter(V=>!V.hidden)),v=()=>{s("select")},S=V=>{t.selected||v(),s("start-drag",V)},R=()=>{m.value=!0},w=async V=>{var ee;switch(V){case"delete":r.value.removeNode(t.node);break;case"rename":d.value=t.node.title,c.value=!0,await Ue(),(ee=u.value)==null||ee.focus();break;case"editSubgraph":o(t.node.template);break}},A=()=>{t.node.title=d.value,c.value=!1},O=()=>{a.value&&i.value.hooks.renderNode.execute({node:t.node,el:a.value})},C=V=>{_.value=!0,V.preventDefault()},M=V=>{if(!_.value)return;const ee=t.node.width+V.movementX/r.value.scaling,I=i.value.settings.nodes.minWidth,H=i.value.settings.nodes.maxWidth;t.node.width=Math.max(I,Math.min(H,ee))},G=()=>{_.value=!1};return di(()=>{O(),window.addEventListener("mousemove",M),window.addEventListener("mouseup",G)}),nc(O),La(()=>{window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",G)}),(V,ee)=>(T(),x("div",{id:V.node.id,ref_key:"el",ref:a,class:Pe(["baklava-node",g.value]),style:Vt(b.value),"data-node-type":V.node.type,onPointerdown:v},[bt(i).settings.nodes.resizable?(T(),x("div",{key:0,class:"__resize-handle",onMousedown:C},null,32)):B("",!0),on(V.$slots,"title",{},()=>[l("div",{class:"__title",onPointerdown:$(S,["self","stop"])},[c.value?k((T(),x("input",{key:1,ref_key:"renameInputEl",ref:u,"onUpdate:modelValue":ee[1]||(ee[1]=I=>d.value=I),type:"text",class:"baklava-input",placeholder:"Node Name",onBlur:A,onKeydown:qn(A,["enter"])},null,544)),[[ue,d.value]]):(T(),x(Le,{key:0},[l("div",mCt,Y(V.node.title),1),l("div",hCt,[z(DI,{class:"--clickable",onClick:R}),z(bt(Ny),{modelValue:m.value,"onUpdate:modelValue":ee[0]||(ee[0]=I=>m.value=I),x:0,y:0,items:h.value,onClick:w},null,8,["modelValue","items"])])],64))],32)]),on(V.$slots,"content",{},()=>[l("div",{class:Pe(["__content",f.value]),onKeydown:ee[2]||(ee[2]=qn($(()=>{},["stop"]),["delete"]))},[l("div",gCt,[(T(!0),x(Le,null,We(E.value,I=>on(V.$slots,"nodeInterface",{key:I.id,type:"output",node:V.node,intf:I},()=>[z(n2,{node:V.node,intf:I},null,8,["node","intf"])])),128))]),l("div",bCt,[(T(!0),x(Le,null,We(y.value,I=>on(V.$slots,"nodeInterface",{key:I.id,type:"input",node:V.node,intf:I},()=>[z(n2,{node:V.node,intf:I},null,8,["node","intf"])])),128))])],34)])],46,_Ct))}}),ECt=cn({props:{x1:{type:Number,required:!0},y1:{type:Number,required:!0},x2:{type:Number,required:!0},y2:{type:Number,required:!0},state:{type:Number,default:ys.NONE},isTemporary:{type:Boolean,default:!1}},setup(n){const{viewModel:e}=ds(),{graph:t}=Ns(),s=(o,a)=>{const c=(o+t.value.panning.x)*t.value.scaling,d=(a+t.value.panning.y)*t.value.scaling;return[c,d]},i=et(()=>{const[o,a]=s(n.x1,n.y1),[c,d]=s(n.x2,n.y2);if(e.value.settings.useStraightConnections)return`M ${o} ${a} L ${c} ${d}`;{const u=.3*Math.abs(o-c);return`M ${o} ${a} C ${o+u} ${a}, ${c-u} ${d}, ${c} ${d}`}}),r=et(()=>({"--temporary":n.isTemporary,"--allowed":n.state===ys.ALLOWED,"--forbidden":n.state===ys.FORBIDDEN}));return{d:i,classes:r}}}),vCt=["d"];function SCt(n,e,t,s,i,r){return T(),x("path",{class:Pe(["baklava-connection",n.classes]),d:n.d},null,10,vCt)}const LI=sn(ECt,[["render",SCt]]);function TCt(n){return document.getElementById(n.id)}function Oa(n){const e=document.getElementById(n.id),t=e==null?void 0:e.getElementsByClassName("__port");return{node:(e==null?void 0:e.closest(".baklava-node"))??null,interface:e,port:t&&t.length>0?t[0]:null}}const xCt=cn({components:{"connection-view":LI},props:{connection:{type:Object,required:!0}},setup(n){const{graph:e}=Ns();let t;const s=ot({x1:0,y1:0,x2:0,y2:0}),i=et(()=>n.connection.isInDanger?ys.FORBIDDEN:ys.NONE),r=et(()=>{var d;return(d=e.value.findNodeById(n.connection.from.nodeId))==null?void 0:d.position}),o=et(()=>{var d;return(d=e.value.findNodeById(n.connection.to.nodeId))==null?void 0:d.position}),a=d=>d.node&&d.interface&&d.port?[d.node.offsetLeft+d.interface.offsetLeft+d.port.offsetLeft+d.port.clientWidth/2,d.node.offsetTop+d.interface.offsetTop+d.port.offsetTop+d.port.clientHeight/2]:[0,0],c=()=>{const d=Oa(n.connection.from),u=Oa(n.connection.to);d.node&&u.node&&(t||(t=new ResizeObserver(()=>{c()}),t.observe(d.node),t.observe(u.node)));const[_,m]=a(d),[h,g]=a(u);s.value={x1:_,y1:m,x2:h,y2:g}};return di(async()=>{await Ue(),c()}),La(()=>{t&&t.disconnect()}),Tn([r,o],()=>c(),{deep:!0}),{d:s,state:i}}});function CCt(n,e,t,s,i,r){const o=Je("connection-view");return T(),at(o,{x1:n.d.x1,y1:n.d.y1,x2:n.d.x2,y2:n.d.y2,state:n.state},null,8,["x1","y1","x2","y2","state"])}const wCt=sn(xCt,[["render",CCt]]);function Su(n){return n.node&&n.interface&&n.port?[n.node.offsetLeft+n.interface.offsetLeft+n.port.offsetLeft+n.port.clientWidth/2,n.node.offsetTop+n.interface.offsetTop+n.port.offsetTop+n.port.clientHeight/2]:[0,0]}const RCt=cn({components:{"connection-view":LI},props:{connection:{type:Object,required:!0}},setup(n){const e=et(()=>n.connection?n.connection.status:ys.NONE);return{d:et(()=>{if(!n.connection)return{input:[0,0],output:[0,0]};const s=Su(Oa(n.connection.from)),i=n.connection.to?Su(Oa(n.connection.to)):[n.connection.mx||s[0],n.connection.my||s[1]];return n.connection.from.isInput?{input:i,output:s}:{input:s,output:i}}),status:e}}});function ACt(n,e,t,s,i,r){const o=Je("connection-view");return T(),at(o,{x1:n.d.input[0],y1:n.d.input[1],x2:n.d.output[0],y2:n.d.output[1],state:n.status,"is-temporary":""},null,8,["x1","y1","x2","y2","state"])}const MCt=sn(RCt,[["render",ACt]]),NCt=cn({setup(){const{viewModel:n}=ds(),{graph:e}=Ns(),t=ot(null),s=Bd(n.value.settings.sidebar,"width"),i=et(()=>n.value.settings.sidebar.resizable),r=et(()=>{const _=e.value.sidebar.nodeId;return e.value.nodes.find(m=>m.id===_)}),o=et(()=>({width:`${s.value}px`})),a=et(()=>r.value?[...Object.values(r.value.inputs),...Object.values(r.value.outputs)].filter(m=>m.displayInSidebar&&m.component):[]),c=()=>{e.value.sidebar.visible=!1},d=()=>{window.addEventListener("mousemove",u),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",u)},{once:!0})},u=_=>{var m,h;const g=((h=(m=t.value)==null?void 0:m.parentElement)==null?void 0:h.getBoundingClientRect().width)??500;let f=s.value-_.movementX;f<300?f=300:f>.9*g&&(f=.9*g),s.value=f};return{el:t,graph:e,resizable:i,node:r,styles:o,displayedInterfaces:a,startResize:d,close:c}}}),ICt={class:"__header"},OCt={class:"__node-name"};function kCt(n,e,t,s,i,r){return T(),x("div",{ref:"el",class:Pe(["baklava-sidebar",{"--open":n.graph.sidebar.visible}]),style:Vt(n.styles)},[n.resizable?(T(),x("div",{key:0,class:"__resizer",onMousedown:e[0]||(e[0]=(...o)=>n.startResize&&n.startResize(...o))},null,32)):B("",!0),l("div",ICt,[l("button",{tabindex:"-1",class:"__close",onClick:e[1]||(e[1]=(...o)=>n.close&&n.close(...o))},"×"),l("div",OCt,[l("b",null,Y(n.node?n.node.title:""),1)])]),(T(!0),x(Le,null,We(n.displayedInterfaces,o=>(T(),x("div",{key:o.id,class:"__interface"},[(T(),at(Pu(o.component),{modelValue:o.value,"onUpdate:modelValue":a=>o.value=a,node:n.node,intf:o},null,8,["modelValue","onUpdate:modelValue","node","intf"]))]))),128))],6)}const DCt=sn(NCt,[["render",kCt]]),LCt=cn({__name:"Minimap",setup(n){const{viewModel:e}=ds(),{graph:t}=Ns(),s=ot(null),i=ot(!1);let r,o=!1,a={x1:0,y1:0,x2:0,y2:0},c;const d=()=>{var w,A;if(!r)return;r.canvas.width=s.value.offsetWidth,r.canvas.height=s.value.offsetHeight;const O=new Map,C=new Map;for(const I of t.value.nodes){const H=TCt(I),q=(H==null?void 0:H.offsetWidth)??0,L=(H==null?void 0:H.offsetHeight)??0,W=((w=I.position)==null?void 0:w.x)??0,se=((A=I.position)==null?void 0:A.y)??0;O.set(I,{x1:W,y1:se,x2:W+q,y2:se+L}),C.set(I,H)}const M={x1:Number.MAX_SAFE_INTEGER,y1:Number.MAX_SAFE_INTEGER,x2:Number.MIN_SAFE_INTEGER,y2:Number.MIN_SAFE_INTEGER};for(const I of O.values())I.x1M.x2&&(M.x2=I.x2),I.y2>M.y2&&(M.y2=I.y2);const G=50;M.x1-=G,M.y1-=G,M.x2+=G,M.y2+=G,a=M;const V=r.canvas.width/r.canvas.height,ee=(a.x2-a.x1)/(a.y2-a.y1);if(V>ee){const I=(V-ee)*(a.y2-a.y1)*.5;a.x1-=I,a.x2+=I}else{const I=a.x2-a.x1,H=a.y2-a.y1,q=(I-V*H)/V*.5;a.y1-=q,a.y2+=q}r.clearRect(0,0,r.canvas.width,r.canvas.height),r.strokeStyle="white";for(const I of t.value.connections){const[H,q]=Su(Oa(I.from)),[L,W]=Su(Oa(I.to)),[se,oe]=u(H,q),[ye,xe]=u(L,W);if(r.beginPath(),r.moveTo(se,oe),e.value.settings.useStraightConnections)r.lineTo(ye,xe);else{const le=.3*Math.abs(se-ye);r.bezierCurveTo(se+le,oe,ye-le,xe,ye,xe)}r.stroke()}r.strokeStyle="lightgray";for(const[I,H]of O.entries()){const[q,L]=u(H.x1,H.y1),[W,se]=u(H.x2,H.y2);r.fillStyle=m(C.get(I)),r.beginPath(),r.rect(q,L,W-q,se-L),r.fill(),r.stroke()}if(i.value){const I=g(),[H,q]=u(I.x1,I.y1),[L,W]=u(I.x2,I.y2);r.fillStyle="rgba(255, 255, 255, 0.2)",r.fillRect(H,q,L-H,W-q)}},u=(w,A)=>[(w-a.x1)/(a.x2-a.x1)*r.canvas.width,(A-a.y1)/(a.y2-a.y1)*r.canvas.height],_=(w,A)=>[w*(a.x2-a.x1)/r.canvas.width+a.x1,A*(a.y2-a.y1)/r.canvas.height+a.y1],m=w=>{if(w){const A=w.querySelector(".__content");if(A){const C=h(A);if(C)return C}const O=h(w);if(O)return O}return"gray"},h=w=>{const A=getComputedStyle(w).backgroundColor;if(A&&A!=="rgba(0, 0, 0, 0)")return A},g=()=>{const w=s.value.parentElement.offsetWidth,A=s.value.parentElement.offsetHeight,O=w/t.value.scaling-t.value.panning.x,C=A/t.value.scaling-t.value.panning.y;return{x1:-t.value.panning.x,y1:-t.value.panning.y,x2:O,y2:C}},f=w=>{w.button===0&&(o=!0,b(w))},b=w=>{if(o){const[A,O]=_(w.offsetX,w.offsetY),C=g(),M=(C.x2-C.x1)/2,G=(C.y2-C.y1)/2;t.value.panning.x=-(A-M),t.value.panning.y=-(O-G)}},y=()=>{o=!1},E=()=>{i.value=!0},v=()=>{i.value=!1,y()};Tn([i,t.value.panning,()=>t.value.scaling,()=>t.value.connections.length],()=>{d()});const S=et(()=>t.value.nodes.map(w=>w.position)),R=et(()=>t.value.nodes.map(w=>w.width));return Tn([S,R],()=>{d()},{deep:!0}),di(()=>{r=s.value.getContext("2d"),r.imageSmoothingQuality="high",d(),c=setInterval(d,500)}),La(()=>{clearInterval(c)}),(w,A)=>(T(),x("canvas",{ref_key:"canvas",ref:s,class:"baklava-minimap",onMouseenter:E,onMouseleave:v,onMousedown:$(f,["self"]),onMousemove:$(b,["self"]),onMouseup:y,onContextmenu:A[0]||(A[0]=$(()=>{},["stop","prevent"]))},null,544))}}),PCt=cn({components:{ContextMenu:Ny,VerticalDots:DI},props:{type:{type:String,required:!0},title:{type:String,required:!0}},setup(n){const{viewModel:e}=ds(),{switchGraph:t}=Ns(),s=ot(!1),i=et(()=>n.type.startsWith(Jl));return{showContextMenu:s,hasContextMenu:i,contextMenuItems:[{label:"Edit Subgraph",value:"editSubgraph"},{label:"Delete Subgraph",value:"deleteSubgraph"}],openContextMenu:()=>{s.value=!0},onContextMenuClick:c=>{const d=n.type.substring(Jl.length),u=e.value.editor.graphTemplates.find(_=>_.id===d);if(u)switch(c){case"editSubgraph":t(u);break;case"deleteSubgraph":e.value.editor.removeGraphTemplate(u);break}}}}}),FCt=["data-node-type"],UCt={class:"__title"},BCt={class:"__title-label"},GCt={key:0,class:"__menu"};function VCt(n,e,t,s,i,r){const o=Je("vertical-dots"),a=Je("context-menu");return T(),x("div",{class:"baklava-node --palette","data-node-type":n.type},[l("div",UCt,[l("div",BCt,Y(n.title),1),n.hasContextMenu?(T(),x("div",GCt,[z(o,{class:"--clickable",onPointerdown:e[0]||(e[0]=$(()=>{},["stop","prevent"])),onClick:$(n.openContextMenu,["stop","prevent"])},null,8,["onClick"]),z(a,{modelValue:n.showContextMenu,"onUpdate:modelValue":e[1]||(e[1]=c=>n.showContextMenu=c),x:-100,y:0,items:n.contextMenuItems,onClick:n.onContextMenuClick,onPointerdown:e[2]||(e[2]=$(()=>{},["stop","prevent"]))},null,8,["modelValue","items","onClick"])])):B("",!0)])],8,FCt)}const s2=sn(PCt,[["render",VCt]]),zCt={key:0},HCt=cn({__name:"NodePalette",setup(n){const{viewModel:e}=ds(),{x:t,y:s}=Xxt(),{transform:i}=MI(),r=AI(e),o=Ts("editorEl"),a=ot(null),c=et(()=>{if(!a.value||!(o!=null&&o.value))return{};const{left:u,top:_}=o.value.getBoundingClientRect();return{top:`${s.value-_}px`,left:`${t.value-u}px`}}),d=(u,_)=>{a.value={type:u,nodeInformation:_};const m=()=>{const h=Hn(new _.type);e.value.displayedGraph.addNode(h);const g=o.value.getBoundingClientRect(),[f,b]=i(t.value-g.left,s.value-g.top);h.position.x=f,h.position.y=b,a.value=null,document.removeEventListener("pointerup",m)};document.addEventListener("pointerup",m)};return(u,_)=>(T(),x(Le,null,[l("div",{class:"baklava-node-palette",onContextmenu:_[0]||(_[0]=$(()=>{},["stop","prevent"]))},[(T(!0),x(Le,null,We(bt(r),m=>(T(),x("section",{key:m.name},[m.name!=="default"?(T(),x("h1",zCt,Y(m.name),1)):B("",!0),(T(!0),x(Le,null,We(m.nodeTypes,(h,g)=>(T(),at(s2,{key:g,type:g,title:h.title,onPointerdown:f=>d(g,h)},null,8,["type","title","onPointerdown"]))),128))]))),128))],32),z(Bs,{name:"fade"},{default:Ne(()=>[a.value?(T(),x("div",{key:0,class:"baklava-dragged-node",style:Vt(c.value)},[z(s2,{type:a.value.type,title:a.value.nodeInformation.title},null,8,["type","title"])],4)):B("",!0)]),_:1})],64))}});let bd;const qCt=new Uint8Array(16);function YCt(){if(!bd&&(bd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bd(qCt)}const vn=[];for(let n=0;n<256;++n)vn.push((n+256).toString(16).slice(1));function $Ct(n,e=0){return vn[n[e+0]]+vn[n[e+1]]+vn[n[e+2]]+vn[n[e+3]]+"-"+vn[n[e+4]]+vn[n[e+5]]+"-"+vn[n[e+6]]+vn[n[e+7]]+"-"+vn[n[e+8]]+vn[n[e+9]]+"-"+vn[n[e+10]]+vn[n[e+11]]+vn[n[e+12]]+vn[n[e+13]]+vn[n[e+14]]+vn[n[e+15]]}const WCt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),i2={randomUUID:WCt};function Tu(n,e,t){if(i2.randomUUID&&!e&&!n)return i2.randomUUID();n=n||{};const s=n.random||(n.rng||YCt)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,$Ct(s)}const ec="SAVE_SUBGRAPH";function KCt(n,e){const t=()=>{const s=n.value;if(!s.template)throw new Error("Graph template property not set");s.template.update(s.save()),s.template.panning=s.panning,s.template.scaling=s.scaling};e.registerCommand(ec,{canExecute:()=>{var s;return n.value!==((s=n.value.editor)==null?void 0:s.graph)},execute:t})}const jCt={},QCt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},XCt=l("polyline",{points:"6 9 12 15 18 9"},null,-1),ZCt=[XCt];function JCt(n,e){return T(),x("svg",QCt,ZCt)}const ewt=sn(jCt,[["render",JCt]]),twt=cn({components:{"i-arrow":ewt},props:{intf:{type:Object,required:!0}},setup(n){const e=ot(null),t=ot(!1),s=et(()=>n.intf.items.find(o=>typeof o=="string"?o===n.intf.value:o.value===n.intf.value)),i=et(()=>s.value?typeof s.value=="string"?s.value:s.value.text:""),r=o=>{n.intf.value=typeof o=="string"?o:o.value};return OI(e,()=>{t.value=!1}),{el:e,open:t,selectedItem:s,selectedText:i,setSelected:r}}}),nwt=["title"],swt={class:"__selected"},iwt={class:"__text"},rwt={class:"__icon"},owt={class:"__dropdown"},awt={class:"item --header"},lwt=["onClick"];function cwt(n,e,t,s,i,r){const o=Je("i-arrow");return T(),x("div",{ref:"el",class:Pe(["baklava-select",{"--open":n.open}]),title:n.intf.name,onClick:e[0]||(e[0]=a=>n.open=!n.open)},[l("div",swt,[l("div",iwt,Y(n.selectedText),1),l("div",rwt,[z(o)])]),z(Bs,{name:"slide-fade"},{default:Ne(()=>[k(l("div",owt,[l("div",awt,Y(n.intf.name),1),(T(!0),x(Le,null,We(n.intf.items,(a,c)=>(T(),x("div",{key:c,class:Pe(["item",{"--active":a===n.selectedItem}]),onClick:d=>n.setSelected(a)},Y(typeof a=="string"?a:a.text),11,lwt))),128))],512),[[_t,n.open]])]),_:1})],10,nwt)}const dwt=sn(twt,[["render",cwt]]);class uwt extends en{constructor(e,t,s){super(e,t),this.component=Ou(dwt),this.items=s}}const pwt=cn({props:{intf:{type:Object,required:!0}}});function fwt(n,e,t,s,i,r){return T(),x("div",null,Y(n.intf.value),1)}const _wt=sn(pwt,[["render",fwt]]);class mwt extends en{constructor(e,t){super(e,t),this.component=Ou(_wt),this.setPort(!1)}}const hwt=cn({props:{intf:{type:Object,required:!0},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(n,{emit:e}){return{v:et({get:()=>n.modelValue,set:s=>{e("update:modelValue",s)}})}}}),gwt=["placeholder","title"];function bwt(n,e,t,s,i,r){return T(),x("div",null,[k(l("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>n.v=o),type:"text",class:"baklava-input",placeholder:n.intf.name,title:n.intf.name},null,8,gwt),[[ue,n.v]])])}const ywt=sn(hwt,[["render",bwt]]);class mc extends en{constructor(){super(...arguments),this.component=Ou(ywt)}}class PI extends wy{constructor(){super(...arguments),this._title="Subgraph Input",this.inputs={name:new mc("Name","Input").setPort(!1)},this.outputs={placeholder:new en("Connection",void 0)}}}class FI extends Ry{constructor(){super(...arguments),this._title="Subgraph Output",this.inputs={name:new mc("Name","Output").setPort(!1),placeholder:new en("Connection",void 0)},this.outputs={output:new en("Output",void 0).setHidden(!0)}}}const UI="CREATE_SUBGRAPH",r2=[Ma,Na];function Ewt(n,e,t){const s=()=>n.value.selectedNodes.filter(r=>!r2.includes(r.type)).length>0,i=()=>{const{viewModel:r}=ds(),o=n.value,a=n.value.editor;if(o.selectedNodes.length===0)return;const c=o.selectedNodes.filter(C=>!r2.includes(C.type)),d=c.flatMap(C=>Object.values(C.inputs)),u=c.flatMap(C=>Object.values(C.outputs)),_=o.connections.filter(C=>!u.includes(C.from)&&d.includes(C.to)),m=o.connections.filter(C=>u.includes(C.from)&&!d.includes(C.to)),h=o.connections.filter(C=>u.includes(C.from)&&d.includes(C.to)),g=c.map(C=>C.save()),f=h.map(C=>({id:C.id,from:C.from.id,to:C.to.id})),b=new Map,{xLeft:y,xRight:E,yTop:v}=vwt(c);for(const[C,M]of _.entries()){const G=new PI;G.inputs.name.value=M.to.name,g.push({...G.save(),position:{x:E-r.value.settings.nodes.defaultWidth-100,y:v+C*200}}),f.push({id:Tu(),from:G.outputs.placeholder.id,to:M.to.id}),b.set(M.to.id,G.graphInterfaceId)}for(const[C,M]of m.entries()){const G=new FI;G.inputs.name.value=M.from.name,g.push({...G.save(),position:{x:y+100,y:v+C*200}}),f.push({id:Tu(),from:M.from.id,to:G.inputs.placeholder.id}),b.set(M.from.id,G.graphInterfaceId)}const S=Hn(new yp({connections:f,nodes:g,inputs:[],outputs:[]},a));a.addGraphTemplate(S);const R=a.nodeTypes.get(Ia(S));if(!R)throw new Error("Unable to create subgraph: Could not find corresponding graph node type");o.activeTransactions++;const w=Hn(new R.type);o.addNode(w);const A=Math.round(c.map(C=>C.position.x).reduce((C,M)=>C+M,0)/c.length),O=Math.round(c.map(C=>C.position.y).reduce((C,M)=>C+M,0)/c.length);w.position.x=A,w.position.y=O,_.forEach(C=>{o.removeConnection(C),o.addConnection(C.from,w.inputs[b.get(C.to.id)])}),m.forEach(C=>{o.removeConnection(C),o.addConnection(w.outputs[b.get(C.from.id)],C.to)}),c.forEach(C=>o.removeNode(C)),o.activeTransactions--,e.canExecuteCommand(ec)&&e.executeCommand(ec),t(S),n.value.panning={...o.panning},n.value.scaling=o.scaling};e.registerCommand(UI,{canExecute:s,execute:i})}function vwt(n){const e=n.reduce((i,r)=>{const o=r.position.x;return o{const o=r.position.y;return o{const o=r.position.x+r.width;return o>i?o:i},-1/0),xRight:e,yTop:t}}class o2{constructor(e,t){this.type=e,e==="addNode"?this.nodeId=t:this.nodeState=t}undo(e){this.type==="addNode"?this.removeNode(e):this.addNode(e)}redo(e){this.type==="addNode"&&this.nodeState?this.addNode(e):this.type==="removeNode"&&this.nodeId&&this.removeNode(e)}addNode(e){const t=e.editor.nodeTypes.get(this.nodeState.type);if(!t)return;const s=new t.type;e.addNode(s),s.load(this.nodeState),this.nodeId=s.id}removeNode(e){const t=e.nodes.find(s=>s.id===this.nodeId);t&&(this.nodeState=t.save(),e.removeNode(t))}}class a2{constructor(e,t){if(this.type=e,e==="addConnection")this.connectionId=t;else{const s=t;this.connectionState={id:s.id,from:s.from.id,to:s.to.id}}}undo(e){this.type==="addConnection"?this.removeConnection(e):this.addConnection(e)}redo(e){this.type==="addConnection"&&this.connectionState?this.addConnection(e):this.type==="removeConnection"&&this.connectionId&&this.removeConnection(e)}addConnection(e){const t=e.findNodeInterface(this.connectionState.from),s=e.findNodeInterface(this.connectionState.to);if(!t||!s)return;const i=e.addConnection(t,s);i&&(i.id=this.connectionState.id),this.connectionId=i==null?void 0:i.id}removeConnection(e){const t=e.connections.find(s=>s.id===this.connectionId);t&&(this.connectionState={id:t.id,from:t.from.id,to:t.to.id},e.removeConnection(t))}}class Swt{constructor(e){if(this.type="transaction",e.length===0)throw new Error("Can't create a transaction with no steps");this.steps=e}undo(e){for(let t=this.steps.length-1;t>=0;t--)this.steps[t].undo(e)}redo(e){for(let t=0;t{if(!r.value)if(a.value)c.value.push(b);else for(o.value!==i.value.length-1&&(i.value=i.value.slice(0,o.value+1)),i.value.push(b),o.value++;i.value.length>s.value;)i.value.shift()},u=()=>{a.value=!0},_=()=>{a.value=!1,c.value.length>0&&(d(new Swt(c.value)),c.value=[])},m=()=>i.value.length!==0&&o.value!==-1,h=()=>{m()&&(r.value=!0,i.value[o.value--].undo(n.value),r.value=!1)},g=()=>i.value.length!==0&&o.value{g()&&(r.value=!0,i.value[++o.value].redo(n.value),r.value=!1)};return Tn(n,(b,y)=>{y&&(y.events.addNode.unsubscribe(t),y.events.removeNode.unsubscribe(t),y.events.addConnection.unsubscribe(t),y.events.removeConnection.unsubscribe(t)),b&&(b.events.addNode.subscribe(t,E=>{d(new o2("addNode",E.id))}),b.events.removeNode.subscribe(t,E=>{d(new o2("removeNode",E.save()))}),b.events.addConnection.subscribe(t,E=>{d(new a2("addConnection",E.id))}),b.events.removeConnection.subscribe(t,E=>{d(new a2("removeConnection",E))}))},{immediate:!0}),e.registerCommand(Mb,{canExecute:m,execute:h}),e.registerCommand(Nb,{canExecute:g,execute:f}),e.registerCommand(Iy,{canExecute:()=>!a.value,execute:u}),e.registerCommand(Oy,{canExecute:()=>a.value,execute:_}),e.registerHotkey(["Control","z"],Mb),e.registerHotkey(["Control","y"],Nb),Hn({maxSteps:s})}const Ib="DELETE_NODES";function xwt(n,e){e.registerCommand(Ib,{canExecute:()=>n.value.selectedNodes.length>0,execute(){e.executeCommand(Iy);for(let t=n.value.selectedNodes.length-1;t>=0;t--){const s=n.value.selectedNodes[t];n.value.removeNode(s)}e.executeCommand(Oy)}}),e.registerHotkey(["Delete"],Ib)}const BI="SWITCH_TO_MAIN_GRAPH";function Cwt(n,e,t){e.registerCommand(BI,{canExecute:()=>n.value!==n.value.editor.graph,execute:()=>{e.executeCommand(ec),t(n.value.editor.graph)}})}function wwt(n,e,t){xwt(n,e),Ewt(n,e,t),KCt(n,e),Cwt(n,e,t)}const Ob="COPY",kb="PASTE",Rwt="CLEAR_CLIPBOARD";function Awt(n,e,t){const s=Symbol("ClipboardToken"),i=ot(""),r=ot(""),o=et(()=>!i.value),a=()=>{i.value="",r.value=""},c=()=>{const _=n.value.selectedNodes.flatMap(h=>[...Object.values(h.inputs),...Object.values(h.outputs)]),m=n.value.connections.filter(h=>_.includes(h.from)||_.includes(h.to)).map(h=>({from:h.from.id,to:h.to.id}));r.value=JSON.stringify(m),i.value=JSON.stringify(n.value.selectedNodes.map(h=>h.save()))},d=(_,m,h)=>{for(const g of _){let f;if((!h||h==="input")&&(f=Object.values(g.inputs).find(b=>b.id===m)),!f&&(!h||h==="output")&&(f=Object.values(g.outputs).find(b=>b.id===m)),f)return f}},u=()=>{if(o.value)return;const _=new Map,m=JSON.parse(i.value),h=JSON.parse(r.value),g=[],f=[],b=n.value;t.executeCommand(Iy);for(const y of m){const E=e.value.nodeTypes.get(y.type);if(!E){console.warn(`Node type ${y.type} not registered`);return}const v=new E.type,S=v.id;g.push(v),v.hooks.beforeLoad.subscribe(s,R=>{const w=R;return w.position&&(w.position.x+=100,w.position.y+=100),v.hooks.beforeLoad.unsubscribe(s),w}),b.addNode(v),v.load({...y,id:S}),v.id=S,_.set(y.id,S);for(const R of Object.values(v.inputs)){const w=Tu();_.set(R.id,w),R.id=w}for(const R of Object.values(v.outputs)){const w=Tu();_.set(R.id,w),R.id=w}}for(const y of h){const E=d(g,_.get(y.from),"output"),v=d(g,_.get(y.to),"input");if(!E||!v)continue;const S=b.addConnection(E,v);S&&f.push(S)}return n.value.selectedNodes=g,t.executeCommand(Oy),{newNodes:g,newConnections:f}};return t.registerCommand(Ob,{canExecute:()=>n.value.selectedNodes.length>0,execute:c}),t.registerHotkey(["Control","c"],Ob),t.registerCommand(kb,{canExecute:()=>!o.value,execute:u}),t.registerHotkey(["Control","v"],kb),t.registerCommand(Rwt,{canExecute:()=>!0,execute:a}),Hn({isEmpty:o})}const Mwt="OPEN_SIDEBAR";function Nwt(n,e){e.registerCommand(Mwt,{execute:t=>{n.value.sidebar.nodeId=t,n.value.sidebar.visible=!0},canExecute:()=>!0})}function Iwt(n,e){Nwt(n,e)}const Owt={},kwt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Dwt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Lwt=l("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"},null,-1),Pwt=[Dwt,Lwt];function Fwt(n,e){return T(),x("svg",kwt,Pwt)}const Uwt=sn(Owt,[["render",Fwt]]),Bwt={},Gwt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Vwt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),zwt=l("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"},null,-1),Hwt=[Vwt,zwt];function qwt(n,e){return T(),x("svg",Gwt,Hwt)}const Ywt=sn(Bwt,[["render",qwt]]),$wt={},Wwt={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},Kwt=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),jwt=l("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),Qwt=l("line",{x1:"5",y1:"12",x2:"11",y2:"18"},null,-1),Xwt=l("line",{x1:"5",y1:"12",x2:"11",y2:"6"},null,-1),Zwt=[Kwt,jwt,Qwt,Xwt];function Jwt(n,e){return T(),x("svg",Wwt,Zwt)}const e2t=sn($wt,[["render",Jwt]]),t2t={},n2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},s2t=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),i2t=l("path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},null,-1),r2t=l("rect",{x:"9",y:"3",width:"6",height:"4",rx:"2"},null,-1),o2t=[s2t,i2t,r2t];function a2t(n,e){return T(),x("svg",n2t,o2t)}const l2t=sn(t2t,[["render",a2t]]),c2t={},d2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},u2t=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),p2t=l("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1),f2t=l("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"},null,-1),_2t=[u2t,p2t,f2t];function m2t(n,e){return T(),x("svg",d2t,_2t)}const h2t=sn(c2t,[["render",m2t]]),g2t={},b2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},y2t=l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),E2t=l("path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"},null,-1),v2t=l("circle",{cx:"12",cy:"14",r:"2"},null,-1),S2t=l("polyline",{points:"14 4 14 8 8 8 8 4"},null,-1),T2t=[y2t,E2t,v2t,S2t];function x2t(n,e){return T(),x("svg",b2t,T2t)}const C2t=sn(g2t,[["render",x2t]]),w2t={},R2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},A2t=Zr('',6),M2t=[A2t];function N2t(n,e){return T(),x("svg",R2t,M2t)}const I2t=sn(w2t,[["render",N2t]]),O2t={},k2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},D2t=Zr('',18),L2t=[D2t];function P2t(n,e){return T(),x("svg",k2t,L2t)}const F2t=sn(O2t,[["render",P2t]]),U2t={},B2t={xmlns:"http://www.w3.org/2000/svg",class:"baklava-icon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},G2t=Zr('',6),V2t=[G2t];function z2t(n,e){return T(),x("svg",B2t,V2t)}const H2t=sn(U2t,[["render",z2t]]),q2t=cn({props:{command:{type:String,required:!0},title:{type:String,required:!0},icon:{type:Object,required:!1,default:void 0}},setup(){const{viewModel:n}=ds();return{viewModel:n}}}),Y2t=["disabled","title"];function $2t(n,e,t,s,i,r){return T(),x("button",{class:"baklava-toolbar-entry baklava-toolbar-button",disabled:!n.viewModel.commandHandler.canExecuteCommand(n.command),title:n.title,onClick:e[0]||(e[0]=o=>n.viewModel.commandHandler.executeCommand(n.command))},[n.icon?(T(),at(Pu(n.icon),{key:0})):(T(),x(Le,{key:1},[Ze(Y(n.title),1)],64))],8,Y2t)}const W2t=sn(q2t,[["render",$2t]]),K2t=cn({components:{ToolbarButton:W2t},setup(){const{viewModel:n}=ds();return{isSubgraph:et(()=>n.value.displayedGraph!==n.value.editor.graph),commands:[{command:Ob,title:"Copy",icon:h2t},{command:kb,title:"Paste",icon:l2t},{command:Ib,title:"Delete selected nodes",icon:H2t},{command:Mb,title:"Undo",icon:Uwt},{command:Nb,title:"Redo",icon:Ywt},{command:Ld,title:"Box Select",icon:F2t},{command:UI,title:"Create Subgraph",icon:I2t}],subgraphCommands:[{command:ec,title:"Save Subgraph",icon:C2t},{command:BI,title:"Back to Main Graph",icon:e2t}]}}});function j2t(n,e,t,s,i,r){const o=Je("toolbar-button");return T(),x("div",{class:"baklava-toolbar",onContextmenu:e[0]||(e[0]=$(()=>{},["stop","prevent"]))},[(T(!0),x(Le,null,We(n.commands,a=>(T(),at(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)),n.isSubgraph?(T(!0),x(Le,{key:0},We(n.subgraphCommands,a=>(T(),at(o,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)):B("",!0)],32)}const Q2t=sn(K2t,[["render",j2t]]),X2t={class:"connections-container"},Z2t=cn({__name:"Editor",props:{viewModel:{}},setup(n){const e=n,t=Symbol("EditorToken"),s=Bd(e,"viewModel");Lxt(s);const i=ot(null);na("editorEl",i);const r=et(()=>e.viewModel.displayedGraph.nodes),o=et(()=>e.viewModel.displayedGraph.nodes.map(O=>wI(Bd(O,"position")))),a=et(()=>e.viewModel.displayedGraph.connections),c=et(()=>e.viewModel.displayedGraph.selectedNodes),d=Pxt(),u=Fxt(),_=Uxt(s),m=Bxt(i),h=et(()=>({...d.styles.value})),g=ot(0);e.viewModel.editor.hooks.load.subscribe(t,O=>(g.value++,O));const f=O=>{d.onPointerMove(O),u.onMouseMove(O)},b=O=>{if(O.button===0){if(m.onPointerDown(O))return;O.target===i.value&&(R(),d.onPointerDown(O)),u.onMouseDown()}},y=O=>{d.onPointerUp(O),u.onMouseUp()},E=O=>{O.key==="Tab"&&O.preventDefault(),e.viewModel.commandHandler.handleKeyDown(O)},v=O=>{e.viewModel.commandHandler.handleKeyUp(O)},S=O=>{["Control","Shift"].some(C=>e.viewModel.commandHandler.pressedKeys.includes(C))||R(),e.viewModel.displayedGraph.selectedNodes.push(O)},R=()=>{e.viewModel.displayedGraph.selectedNodes=[]},w=O=>{for(const C of e.viewModel.displayedGraph.selectedNodes){const M=r.value.indexOf(C),G=o.value[M];G.onPointerDown(O),document.addEventListener("pointermove",G.onPointerMove)}document.addEventListener("pointerup",A)},A=()=>{for(const O of e.viewModel.displayedGraph.selectedNodes){const C=r.value.indexOf(O),M=o.value[C];M.onPointerUp(),document.removeEventListener("pointermove",M.onPointerMove)}document.removeEventListener("pointerup",A)};return(O,C)=>(T(),x("div",{ref_key:"el",ref:i,tabindex:"-1",class:Pe(["baklava-editor",{"baklava-ignore-mouse":!!bt(u).temporaryConnection.value||bt(d).dragging.value,"--temporary-connection":!!bt(u).temporaryConnection.value,"--start-selection-box":bt(m).startSelection}]),onPointermove:$(f,["self"]),onPointerdown:b,onPointerup:y,onWheel:C[1]||(C[1]=$((...M)=>bt(d).onMouseWheel&&bt(d).onMouseWheel(...M),["self"])),onKeydown:E,onKeyup:v,onContextmenu:C[2]||(C[2]=(...M)=>bt(_).open&&bt(_).open(...M))},[on(O.$slots,"background",{},()=>[z(zxt)]),on(O.$slots,"toolbar",{},()=>[O.viewModel.settings.toolbar.enabled?(T(),at(Q2t,{key:0})):B("",!0)]),on(O.$slots,"palette",{},()=>[O.viewModel.settings.palette.enabled?(T(),at(HCt,{key:0})):B("",!0)]),(T(),x("svg",X2t,[(T(!0),x(Le,null,We(a.value,M=>(T(),x("g",{key:M.id+g.value.toString()},[on(O.$slots,"connection",{connection:M},()=>[z(wCt,{connection:M},null,8,["connection"])])]))),128)),on(O.$slots,"temporaryConnection",{temporaryConnection:bt(u).temporaryConnection.value},()=>[bt(u).temporaryConnection.value?(T(),at(MCt,{key:0,connection:bt(u).temporaryConnection.value},null,8,["connection"])):B("",!0)])])),l("div",{class:"node-container",style:Vt(h.value)},[z(Oi,{name:"fade"},{default:Ne(()=>[(T(!0),x(Le,null,We(r.value,(M,G)=>on(O.$slots,"node",{key:M.id+g.value.toString(),node:M,selected:c.value.includes(M),dragging:o.value[G].dragging.value,onSelect:V=>S(M),onStartDrag:w},()=>[z(yCt,{node:M,selected:c.value.includes(M),dragging:o.value[G].dragging.value,onSelect:V=>S(M),onStartDrag:w},null,8,["node","selected","dragging","onSelect"])])),128))]),_:3})],4),on(O.$slots,"sidebar",{},()=>[O.viewModel.settings.sidebar.enabled?(T(),at(DCt,{key:0})):B("",!0)]),on(O.$slots,"minimap",{},()=>[O.viewModel.settings.enableMinimap?(T(),at(LCt,{key:0})):B("",!0)]),on(O.$slots,"contextMenu",{contextMenu:bt(_)},()=>[O.viewModel.settings.contextMenu.enabled?(T(),at(Ny,{key:0,modelValue:bt(_).show.value,"onUpdate:modelValue":C[0]||(C[0]=M=>bt(_).show.value=M),items:bt(_).items.value,x:bt(_).x.value,y:bt(_).y.value,onClick:bt(_).onClick},null,8,["modelValue","items","x","y","onClick"])):B("",!0)]),bt(m).isSelecting?(T(),x("div",{key:0,class:"selection-box",style:Vt(bt(m).getStyles())},null,4)):B("",!0)],34))}});function J2t(n){const e=ot([]),t=ot([]);return{pressedKeys:e,handleKeyDown:o=>{e.value.includes(o.key)||e.value.push(o.key),!(document.activeElement&&CI(document.activeElement))&&t.value.forEach(a=>{var c,d;a.keys.every(u=>e.value.includes(u))&&((c=a.options)!=null&&c.preventDefault&&o.preventDefault(),(d=a.options)!=null&&d.stopPropagation&&o.stopPropagation(),n(a.commandName))})},handleKeyUp:o=>{const a=e.value.indexOf(o.key);a>=0&&e.value.splice(a,1)},registerHotkey:(o,a,c)=>{t.value.push({keys:o,commandName:a,options:c})}}}const eRt=()=>{const n=ot(new Map),e=o=>n.value.has(o),t=(o,a)=>{if(n.value.has(o))throw new Error(`Command "${o}" already exists`);n.value.set(o,a)},s=(o,a=!1,...c)=>{if(!n.value.has(o)){if(a)throw new Error(`[CommandHandler] Command ${o} not registered`);return}return n.value.get(o).execute(...c)},i=(o,a=!1,...c)=>{if(!n.value.has(o)){if(a)throw new Error(`[CommandHandler] Command ${o} not registered`);return!1}return n.value.get(o).canExecute(c)},r=J2t(s);return Hn({hasCommand:e,registerCommand:t,executeCommand:s,canExecuteCommand:i,...r})},tRt=n=>!(n instanceof _c);function nRt(n,e){return{switchGraph:s=>{let i;if(tRt(s))i=new _c(n.value),s.createGraph(i);else{if(s!==n.value.graph)throw new Error("Can only switch using 'Graph' instance when it is the root graph. Otherwise a 'GraphTemplate' must be used.");i=s}e.value&&e.value!==n.value.graph&&e.value.destroy(),i.panning=i.panning??s.panning??{x:0,y:0},i.scaling=i.scaling??s.scaling??1,i.selectedNodes=i.selectedNodes??[],i.sidebar=i.sidebar??{visible:!1,nodeId:"",optionName:""},e.value=i}}}function sRt(n,e){n.position=n.position??{x:0,y:0},n.disablePointerEvents=!1,n.twoColumn=n.twoColumn??!1,n.width=n.width??e.defaultWidth}const iRt=()=>({useStraightConnections:!1,enableMinimap:!1,toolbar:{enabled:!0},palette:{enabled:!0},background:{gridSize:100,gridDivision:5,subGridVisibleThreshold:.6},sidebar:{enabled:!0,width:300,resizable:!0},displayValueOnHover:!1,nodes:{defaultWidth:200,maxWidth:320,minWidth:150,resizable:!1,reverseY:!1},contextMenu:{enabled:!0,additionalItems:[]}});function rRt(n){const e=ot(new Axt),t=Symbol("ViewModelToken"),s=ot(null),i=FO(s),{switchGraph:r}=nRt(e,s),o=et(()=>i.value&&i.value!==e.value.graph),a=Hn(iRt()),c=eRt(),d=Twt(i,c),u=Awt(i,e,c),_={renderNode:new cs(null),renderInterface:new cs(null)};return wwt(i,c,r),Iwt(i,c),Tn(e,(m,h)=>{h&&(h.events.registerGraph.unsubscribe(t),h.graphEvents.beforeAddNode.unsubscribe(t),m.nodeHooks.beforeLoad.unsubscribe(t),m.nodeHooks.afterSave.unsubscribe(t),m.graphTemplateHooks.beforeLoad.unsubscribe(t),m.graphTemplateHooks.afterSave.unsubscribe(t),m.graph.hooks.load.unsubscribe(t),m.graph.hooks.save.unsubscribe(t)),m&&(m.nodeHooks.beforeLoad.subscribe(t,(g,f)=>(f.position=g.position??{x:0,y:0},f.width=g.width??a.nodes.defaultWidth,f.twoColumn=g.twoColumn??!1,g)),m.nodeHooks.afterSave.subscribe(t,(g,f)=>(g.position=f.position,g.width=f.width,g.twoColumn=f.twoColumn,g)),m.graphTemplateHooks.beforeLoad.subscribe(t,(g,f)=>(f.panning=g.panning,f.scaling=g.scaling,g)),m.graphTemplateHooks.afterSave.subscribe(t,(g,f)=>(g.panning=f.panning,g.scaling=f.scaling,g)),m.graph.hooks.load.subscribe(t,(g,f)=>(f.panning=g.panning,f.scaling=g.scaling,g)),m.graph.hooks.save.subscribe(t,(g,f)=>(g.panning=f.panning,g.scaling=f.scaling,g)),m.graphEvents.beforeAddNode.subscribe(t,g=>sRt(g,{defaultWidth:a.nodes.defaultWidth})),e.value.registerNodeType(PI,{category:"Subgraphs"}),e.value.registerNodeType(FI,{category:"Subgraphs"}),r(m.graph))},{immediate:!0}),Hn({editor:e,displayedGraph:i,isSubgraph:o,settings:a,commandHandler:c,history:d,clipboard:u,hooks:_,switchGraph:r})}const oRt=Ka({type:"PersonalityNode",title:"Personality",inputs:{request:()=>new en("Request",""),agent_name:()=>new uwt("Personality","",Ps.state.config.personalities).setPort(!1)},outputs:{response:()=>new en("Response","")},async calculate({request:n}){console.log(Ps.state.config.personalities);let e="";try{e=(await te.post("/generate",{params:{text:n}})).data}catch(t){console.error(t)}return{display:e,response:e}}}),aRt=Ka({type:"RAGNode",title:"RAG",inputs:{request:()=>new en("Prompt",""),document_path:()=>new mc("Document path","").setPort(!1)},outputs:{prompt:()=>new en("Prompt with Data","")},async calculate({request:n,document_path:e}){let t="";try{t=(await te.get("/rag",{params:{text:n,doc_path:e}})).data}catch(s){console.error(s)}return{response:t}}}),l2=Ka({type:"Task",title:"Task",inputs:{description:()=>new mc("Task description","").setPort(!1)},outputs:{prompt:()=>new en("Prompt")},calculate({description:n}){return{prompt:n}}}),c2=Ka({type:"TextDisplayNode",title:"TextDisplay",inputs:{text2display:()=>new en("Input","")},outputs:{response:()=>new mwt("Text","")},async calculate({request:n}){}}),d2=Ka({type:"LLMNode",title:"LLM",inputs:{request:()=>new en("Request","")},outputs:{response:()=>new en("Response","")},async calculate({request:n}){console.log(Ps.state.config.personalities);let e="";try{e=(await te.post("/generate",{params:{text:n}})).data}catch(t){console.error(t)}return{display:e,response:e}}}),lRt=Ka({type:"MultichoiceNode",title:"Multichoice",inputs:{question:()=>new en("Question",""),outputs:()=>new mc("choices, one per line","","").setPort(!1)},outputs:{response:()=>new en("Response","")}}),cRt=cn({components:{"baklava-editor":Z2t},setup(){const n=rRt(),e=new kxt(n.editor);n.editor.registerNodeType(oRt),n.editor.registerNodeType(l2),n.editor.registerNodeType(aRt),n.editor.registerNodeType(c2),n.editor.registerNodeType(d2),n.editor.registerNodeType(lRt);const t=Symbol();e.events.afterRun.subscribe(t,a=>{e.pause(),Mxt(a,n.editor),e.resume()}),e.start();function s(a,c,d){const u=new a;return n.displayedGraph.addNode(u),u.position.x=c,u.position.y=d,u}const i=s(l2,300,140),r=s(d2,550,140),o=s(c2,850,140);return n.displayedGraph.addConnection(i.outputs.prompt,r.inputs.request),n.displayedGraph.addConnection(r.outputs.response,o.inputs.text2display),{baklava:n,saveGraph:()=>{const a=e.export();localStorage.setItem("myGraph",JSON.stringify(a))},loadGraph:()=>{const a=JSON.parse(localStorage.getItem("myGraph"));e.import(a)}}}}),dRt={style:{width:"100vw",height:"100vh"}};function uRt(n,e,t,s,i,r){const o=Je("baklava-editor");return T(),x("div",dRt,[z(o,{"view-model":n.baklava},null,8,["view-model"]),l("button",{onClick:e[0]||(e[0]=(...a)=>n.saveGraph&&n.saveGraph(...a))},"Save Graph"),l("button",{onClick:e[1]||(e[1]=(...a)=>n.loadGraph&&n.loadGraph(...a))},"Load Graph")])}const pRt=st(cRt,[["render",uRt]]),fRt={},_Rt={style:{width:"100vw",height:"100vh"}},mRt=["src"];function hRt(n,e,t,s,i,r){return T(),x("div",_Rt,[l("iframe",{src:n.$store.state.config.comfyui_base_url,class:"m-0 p-0 w-full h-full"},null,8,mRt)])}const gRt=st(fRt,[["render",hRt]]),bRt={},yRt={style:{width:"100vw",height:"100vh"}},ERt=["src"];function vRt(n,e,t,s,i,r){return T(),x("div",yRt,[l("iframe",{src:n.$store.state.config.sd_base_url,class:"m-0 p-0 w-full h-full"},null,8,ERt)])}const SRt=st(bRt,[["render",vRt]]),TRt={name:"AppCard",props:{app:{type:Object,required:!0},isFavorite:{type:Boolean,default:!1}},methods:{formatDate(n){const e={year:"numeric",month:"short",day:"numeric"};return new Date(n).toLocaleDateString(void 0,e)}}},xRt={class:"app-card flex flex-col h-full"},CRt={class:"flex-grow"},wRt={class:"flex items-center mb-4"},RRt=["src"],ARt={class:"font-bold text-xl text-gray-800"},MRt={class:"text-sm text-gray-600"},NRt={class:"text-sm text-gray-600"},IRt={class:"text-sm text-gray-600"},ORt={class:"text-sm text-gray-600"},kRt={class:"text-sm text-gray-600"},DRt={class:"mb-4"},LRt={class:"text-sm text-gray-600 h-20 overflow-y-auto"},PRt={class:"text-sm text-gray-600 mb-2"},FRt={key:0,class:"mb-4"},URt={class:"text-xs text-gray-500 italic h-16 overflow-y-auto"},BRt={class:"mt-auto pt-4 border-t"},GRt={class:"flex justify-between items-center flex-wrap"},VRt=["title"],zRt=["fill"];function HRt(n,e,t,s,i,r){return T(),x("div",xRt,[l("div",CRt,[l("div",wRt,[l("img",{src:t.app.icon,alt:"App Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4"},null,8,RRt),l("div",null,[l("h3",ARt,Y(t.app.name),1),l("p",MRt,"Author: "+Y(t.app.author),1),l("p",NRt,"Version: "+Y(t.app.version),1),l("p",IRt,"Category: "+Y(t.app.category),1),l("p",ORt,"Creation date: "+Y(r.formatDate(t.app.creation_date)),1),l("p",kRt,"Last update: "+Y(r.formatDate(t.app.last_update_date)),1),l("p",{class:Pe(["text-sm",t.app.is_public?"text-green-600":"text-orange-600"])},Y(t.app.is_public?"Public App":"Local App"),3)])]),l("div",DRt,[e[10]||(e[10]=l("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),l("p",LRt,Y(t.app.description),1)]),l("p",PRt,"AI Model: "+Y(t.app.model_name),1),t.app.disclaimer&&t.app.disclaimer.trim()!==""?(T(),x("div",FRt,[e[11]||(e[11]=l("h4",{class:"font-semibold mb-1 text-gray-700"},"Disclaimer:",-1)),l("p",URt,Y(t.app.disclaimer),1)])):B("",!0)]),l("div",BRt,[l("div",GRt,[l("button",{onClick:e[0]||(e[0]=$(o=>n.$emit("toggle-favorite",t.app.name),["stop"])),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:t.isFavorite?"Remove from favorites":"Add to favorites"},[(T(),x("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:t.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[12]||(e[12]=[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z"},null,-1)]),8,zRt))],8,VRt),t.app.installed?(T(),x("button",{key:0,onClick:e[1]||(e[1]=$(o=>n.$emit("uninstall",t.app.folder_name),["stop"])),class:"text-red-500 hover:text-red-600 transition duration-300 ease-in-out",title:"Uninstall"},e[13]||(e[13]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]))):t.app.existsInFolder?(T(),x("button",{key:1,onClick:e[2]||(e[2]=$(o=>n.$emit("delete",t.app.name),["stop"])),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:"Delete"},e[14]||(e[14]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]))):(T(),x("button",{key:2,onClick:e[3]||(e[3]=$(o=>n.$emit("install",t.app.folder_name),["stop"])),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Install"},e[15]||(e[15]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)]))),t.app.installed?(T(),x("button",{key:3,onClick:e[4]||(e[4]=$(o=>n.$emit("edit",t.app),["stop"])),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Edit"},e[16]||(e[16]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)]))):B("",!0),l("button",{onClick:e[5]||(e[5]=$(o=>n.$emit("download",t.app.folder_name),["stop"])),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Download"},e[17]||(e[17]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)])),t.app.has_readme?(T(),x("button",{key:4,onClick:e[6]||(e[6]=$(o=>n.$emit("help",t.app),["stop"])),class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out",title:"Help"},e[18]||(e[18]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M12 21a9 9 0 100-18 9 9 0 000 18z"})],-1)]))):B("",!0),t.app.installed?(T(),x("button",{key:5,onClick:e[7]||(e[7]=$(o=>n.$emit("open",t.app),["stop"])),class:"text-indigo-500 hover:text-indigo-600 transition duration-300 ease-in-out",title:"Open"},e[19]||(e[19]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})],-1)]))):B("",!0),t.app.has_server&&t.app.installed?(T(),x("button",{key:6,onClick:e[8]||(e[8]=$(o=>n.$emit("start-server",t.app.folder_name),["stop"])),class:"text-teal-500 hover:text-teal-600 transition duration-300 ease-in-out",title:"Start Server"},e[20]||(e[20]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M12 5l7 7-7 7"})],-1)]))):B("",!0),t.app.has_update?(T(),x("button",{key:7,onClick:e[9]||(e[9]=$(o=>n.$emit("install",t.app.folder_name),["stop"])),class:"relative text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out animate-pulse",title:"Update Available"},e[21]||(e[21]=[l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),l("span",{class:"absolute top-0 right-0 inline-flex items-center justify-center px-2 py-1 text-xs font-bold leading-none text-red-100 transform translate-x-1/2 -translate-y-1/2 bg-red-600 rounded-full"},"!",-1)]))):B("",!0)])])])}const qRt=st(TRt,[["render",HRt],["__scopeId","data-v-ae134649"]]),YRt={components:{AppCard:qRt},data(){return{apps:[],githubApps:[],favorites:[],selectedCategory:"all",selectedApp:null,appCode:"",loading:!1,message:"",successMessage:!0,searchQuery:"",selectedFile:null,isUploading:!1,error:"",sortBy:"update",sortOrder:"desc",showOnlyInstalled:!1,showOnlyUnInstalled:!1}},computed:{currentCategoryName(){return this.selectedCategory==="all"?"All Apps":this.selectedCategory},combinedApps(){this.apps.map(e=>e.name);const n=new Map(this.apps.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{n.has(e.name)||n.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(n.values())},categories(){return[...new Set(this.combinedApps.map(n=>n.category))]},filteredApps(){return this.combinedApps.filter(n=>{const e=n.name.toLowerCase().includes(this.searchQuery.toLowerCase())||n.description.toLowerCase().includes(this.searchQuery.toLowerCase())||n.author.toLowerCase().includes(this.searchQuery.toLowerCase()),t=this.selectedCategory==="all"||n.category===this.selectedCategory,s=this.showOnlyInstalled&&n.installed||this.showOnlyUnInstalled&&!n.installed||!this.showOnlyInstalled&&!this.showOnlyUnInstalled;return e&&t&&s})},sortedAndFilteredApps(){return[...this.filteredApps].sort((n,e)=>{let t=0;switch(this.sortBy){case"name":t=n.name.localeCompare(e.name);break;case"author":t=n.author.localeCompare(e.author);break;case"date":t=this.getDateValue(n.creation_date)-this.getDateValue(e.creation_date);break;case"update":t=this.getDateValue(n.last_update_date)-this.getDateValue(e.last_update_date);break}return this.sortOrder==="asc"?t:-t})},favoriteApps(){return this.combinedApps.filter(n=>this.favorites.includes(n.appName))}},methods:{getDateValue(n){if(!n)return 0;const e=new Date(n);return isNaN(e.getTime())?0:e.getTime()},toggleSortOrder(){this.sortOrder=this.sortOrder==="asc"?"desc":"asc"},toggleFavorite(n){console.log("Toggling favorite"),console.log(n);const e=this.favorites.indexOf(n);e===-1?this.favorites.push(n):this.favorites.splice(e,1),this.saveFavoritesToLocalStorage()},saveFavoritesToLocalStorage(){localStorage.setItem("appZooFavorites",JSON.stringify(this.favorites))},loadFavoritesFromLocalStorage(){const n=localStorage.getItem("appZooFavorites");console.log("savedFavorites",n),n&&(this.favorites=JSON.parse(n))},startServer(n){const e={client_id:this.$store.state.client_id,app_name:n};this.$store.state.messageBox.showBlockingMessage(`Loading server. +This may take some time the first time as some libraries need to be installed.`),te.post("/apps/start_server",e).then(t=>{this.$store.state.messageBox.hideMessage(),console.log("Server start initiated:",t.data.message),this.$notify({type:"success",title:"Server Starting",text:t.data.message})}).catch(t=>{var s,i;this.$store.state.messageBox.hideMessage(),console.error("Error starting server:",t),this.$notify({type:"error",title:"Server Start Failed",text:((i=(s=t.response)==null?void 0:s.data)==null?void 0:i.detail)||"An error occurred while starting the server"})})},triggerFileInput(){this.$refs.fileInput.click()},onFileSelected(n){this.selectedFile=n.target.files[0],this.message="",this.error="",this.uploadApp()},async uploadApp(){var e,t;if(!this.selectedFile){this.error="Please select a file to upload.";return}this.isUploading=!0,this.message="",this.error="";const n=new FormData;n.append("file",this.selectedFile),n.append("client_id",this.$store.state.client_id);try{const s=await te.post("/upload_app",n,{headers:{"Content-Type":"multipart/form-data"}});this.message=s.data.message,this.$refs.fileInput.value="",this.selectedFile=null}catch(s){console.error("Error uploading app:",s),this.error=((t=(e=s.response)==null?void 0:e.data)==null?void 0:t.detail)||"Failed to upload the app. Please try again."}finally{this.isUploading=!1}},async fetchApps(){this.loading=!0;try{const n=await te.get("/apps");this.apps=n.data,this.showMessage("Refresh successful!",!0)}catch{this.showMessage("Failed to refresh apps.",!1)}finally{this.loading=!1}},async openAppsFolder(){this.loading=!0;try{console.log("opening apps folder");const n=await te.post("/show_apps_folder",{client_id:this.$store.state.client_id})}catch{this.showMessage("Failed to open apps folder.",!1)}finally{this.loading=!1}},async fetchGithubApps(){this.loading=!0;try{const n=await te.get("/github/apps");this.githubApps=n.data.apps,await this.fetchApps()}catch{this.showMessage("Failed to refresh GitHub apps.",!1)}finally{this.loading=!1}},async handleAppClick(n){if(n.installed){this.selectedApp=n;const e=await te.get(`/apps/${n.folder_name}/README.md`);this.appCode=kt(e.data)}else this.showMessage(`Please install ${n.folder_name} to view its code.`,!1)},backToZoo(){this.selectedApp=null,this.appCode=""},async installApp(n){this.loading=!0,this.$store.state.messageBox.showBlockingMessage(`Installing app ${n}`);try{await te.post(`/install/${n}`,{client_id:this.$store.state.client_id}),this.showMessage("Installation succeeded!",!0)}catch{this.showMessage("Installation failed.",!1)}finally{this.loading=!1,this.fetchApps(),this.fetchGithubApps(),this.$store.state.messageBox.hideMessage()}},async uninstallApp(n){this.loading=!0;try{await te.post(`/uninstall/${n}`,{client_id:this.$store.state.client_id}),this.showMessage("Uninstallation succeeded!",!0)}catch{this.showMessage("Uninstallation failed.",!1)}finally{this.loading=!1,this.fetchApps()}},async deleteApp(n){this.loading=!0;try{await te.post(`/delete/${n}`,{client_id:this.$store.state.client_id}),this.showMessage("Deletion succeeded!",!0)}catch{this.showMessage("Deletion failed.",!1)}finally{this.loading=!1,this.fetchApps()}},async editApp(n){this.loading=!0;try{const e=await te.post("/open_app_in_vscode",{client_id:this.$store.state.client_id,app_name:n.folder_name});this.showMessage(e.data.message,!0)}catch{this.showMessage("Failed to open folder in VSCode.",!1)}finally{this.loading=!1}},async downloadApp(n){this.isLoading=!0,this.error=null;try{const e=await te.post("/download_app",{client_id:this.$store.state.client_id,app_name:n},{responseType:"arraybuffer"}),t=e.headers["content-disposition"],s=t&&t.match(/filename="?(.+)"?/i),i=s?s[1]:"app.zip",r=new Blob([e.data],{type:"application/zip"}),o=window.URL.createObjectURL(r),a=document.createElement("a");a.style.display="none",a.href=o,a.download=i,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(o),document.body.removeChild(a)}catch(e){console.error("Error downloading app:",e),this.error="Failed to download the app. Please try again."}finally{this.isLoading=!1}},openApp(n){n.installed?window.open(`/apps/${n.folder_name}/index.html?client_id=${this.$store.state.client_id}`,"_blank"):this.showMessage(`Please install ${n.name} before opening.`,!1)},showMessage(n,e){this.message=n,this.successMessage=e,setTimeout(()=>{this.message=""},3e3)}},mounted(){this.fetchGithubApps(),this.loadFavoritesFromLocalStorage()}},$Rt={class:"app-zoo background-color w-full p-6 pt-12 min-h-screen overflow-y-auto"},WRt={class:"panels-color shadow-lg rounded-lg p-4 max-w-4xl mx-auto mb-8"},KRt={class:"flex flex-wrap items-center justify-between gap-4"},jRt={class:"flex items-center space-x-4"},QRt=["disabled"],XRt={key:0},ZRt={key:1,class:"error"},JRt={class:"relative flex-grow max-w-md"},eAt={class:"flex items-center space-x-4"},tAt=["value"],nAt={class:"flex items-center space-x-4"},sAt={for:"installed-only",class:"font-semibold"},iAt={for:"installed-only",class:"font-semibold"},rAt={class:"flex items-center space-x-4"},oAt={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},aAt={key:1,class:"pb-20"},lAt={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-8"},cAt={class:"text-2xl font-bold mb-4"},dAt={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"},uAt={key:2,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},pAt={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},fAt={class:"flex justify-between items-center mb-4"},_At={class:"text-2xl font-bold"},mAt=["srcdoc"],hAt={key:1,class:"text-center text-red-500"};function gAt(n,e,t,s,i,r){const o=Je("app-card");return T(),x("div",$Rt,[l("nav",WRt,[l("div",KRt,[l("div",jRt,[l("button",{onClick:e[0]||(e[0]=(...a)=>r.fetchGithubApps&&r.fetchGithubApps(...a)),class:"btn btn-primary","aria-label":"Refresh apps from GitHub"},e[11]||(e[11]=[l("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})],-1),Ze(" Refresh ")])),l("button",{onClick:e[1]||(e[1]=(...a)=>r.openAppsFolder&&r.openAppsFolder(...a)),class:"btn btn-secondary","aria-label":"Open apps folder"},e[12]||(e[12]=[l("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 19a2 2 0 01-2-2V7a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1M5 19h14a2 2 0 002-2v-5a2 2 0 00-2-2H9a2 2 0 00-2 2v5a2 2 0 01-2 2z"})],-1),Ze(" Open Folder ")])),l("input",{type:"file",onChange:e[2]||(e[2]=(...a)=>r.onFileSelected&&r.onFileSelected(...a)),accept:".zip",ref:"fileInput",style:{display:"none"}},null,544),l("button",{onClick:e[3]||(e[3]=(...a)=>r.triggerFileInput&&r.triggerFileInput(...a)),disabled:i.isUploading,class:"btn-secondary text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Upload App"},Y(i.isUploading?"Uploading...":"Upload App"),9,QRt)]),i.message?(T(),x("p",XRt,Y(i.message),1)):B("",!0),i.error?(T(),x("p",ZRt,Y(i.error),1)):B("",!0),l("div",JRt,[k(l("input",{"onUpdate:modelValue":e[4]||(e[4]=a=>i.searchQuery=a),placeholder:"Search apps...",class:"w-full border-b-2 border-gray-300 px-4 py-2 pl-10 focus:outline-none focus:border-blue-500 transition duration-300 ease-in-out","aria-label":"Search apps"},null,512),[[ue,i.searchQuery]]),e[13]||(e[13]=l("svg",{class:"w-5 h-5 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),l("div",eAt,[e[15]||(e[15]=l("label",{for:"category-select",class:"font-semibold"},"Category:",-1)),k(l("select",{id:"category-select","onUpdate:modelValue":e[5]||(e[5]=a=>i.selectedCategory=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},[e[14]||(e[14]=l("option",{value:"all"},"All Categories",-1)),(T(!0),x(Le,null,We(r.categories,a=>(T(),x("option",{key:a,value:a},Y(a),9,tAt))),128))],512),[[Ot,i.selectedCategory]])]),l("div",nAt,[l("label",sAt,[k(l("input",{id:"installed-only",type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=a=>i.showOnlyInstalled=a),class:"mr-2"},null,512),[[Ye,i.showOnlyInstalled]]),e[16]||(e[16]=Ze(" Show only installed apps "))]),l("label",iAt,[k(l("input",{id:"uninstalled-only",type:"checkbox","onUpdate:modelValue":e[7]||(e[7]=a=>i.showOnlyUnInstalled=a),class:"mr-2"},null,512),[[Ye,i.showOnlyUnInstalled]]),e[17]||(e[17]=Ze(" Show only non installed apps "))])]),l("div",rAt,[e[19]||(e[19]=l("label",{for:"sort-select",class:"font-semibold"},"Sort by:",-1)),k(l("select",{id:"sort-select","onUpdate:modelValue":e[8]||(e[8]=a=>i.sortBy=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},e[18]||(e[18]=[l("option",{value:"name"},"Name",-1),l("option",{value:"author"},"Author",-1),l("option",{value:"date"},"Creation Date",-1),l("option",{value:"update"},"Last Update",-1)]),512),[[Ot,i.sortBy]]),l("button",{onClick:e[9]||(e[9]=(...a)=>r.toggleSortOrder&&r.toggleSortOrder(...a)),class:"btn btn-secondary"},Y(i.sortOrder==="asc"?"↑":"↓"),1)])])]),i.loading?(T(),x("div",oAt,e[20]||(e[20]=[l("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1),l("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)]))):(T(),x("div",aAt,[e[21]||(e[21]=l("h2",{class:"text-2xl font-bold mb-4"},"Favorite Apps",-1)),l("div",lAt,[(T(!0),x(Le,null,We(r.favoriteApps,a=>(T(),at(o,{key:a.appName,app:a,onToggleFavorite:r.toggleFavorite,onInstall:r.installApp,onUninstall:r.uninstallApp,onDelete:r.deleteApp,onEdit:r.editApp,onDownload:r.downloadApp,onHelp:r.handleAppClick,onOpen:r.openApp,onStartServer:r.startServer},null,8,["app","onToggleFavorite","onInstall","onUninstall","onDelete","onEdit","onDownload","onHelp","onOpen","onStartServer"]))),128))]),l("h2",cAt,Y(r.currentCategoryName)+" ("+Y(r.sortedAndFilteredApps.length)+")",1),l("div",dAt,[(T(!0),x(Le,null,We(r.sortedAndFilteredApps,a=>(T(),at(o,{key:a.name,app:a,onToggleFavorite:r.toggleFavorite,onInstall:r.installApp,onUninstall:r.uninstallApp,onDelete:r.deleteApp,onEdit:r.editApp,onDownload:r.downloadApp,onHelp:r.handleAppClick,onOpen:r.openApp,onStartServer:r.startServer},null,8,["app","onToggleFavorite","onInstall","onUninstall","onDelete","onEdit","onDownload","onHelp","onOpen","onStartServer"]))),128))])])),i.selectedApp?(T(),x("div",uAt,[l("div",pAt,[l("div",fAt,[l("h2",_At,Y(i.selectedApp.name),1),l("button",{onClick:e[10]||(e[10]=(...a)=>r.backToZoo&&r.backToZoo(...a)),class:"bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded-lg transition duration-300 ease-in-out"},"Close")]),i.appCode?(T(),x("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,mAt)):(T(),x("p",hAt,"Please install this app to view its code."))])])):B("",!0),i.message?(T(),x("div",{key:3,class:Pe(["fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-md",{"bg-green-100 text-green-800":i.successMessage,"bg-red-100 text-red-800":!i.successMessage}])},Y(i.message),3)):B("",!0)])}const bAt=st(YRt,[["render",gAt]]),yAt={components:{PersonalityEntry:cN},data(){return{personalities:[],githubApps:[],favorites:[],selectedCategory:"all",selectedApp:null,appCode:"",loading:!1,message:"",successMessage:!0,searchQuery:"",selectedFile:null,isUploading:!1,error:"",sortBy:"name",sortOrder:"asc"}},computed:{currentCategoryName(){return this.selectedCategory=="all"?"All Personalities":this.selectedCategory},configFile:{get(){return this.$store.state.config},set(n){this.$store.commit("setConfig",n)}},combinedApps(){this.personalities.map(e=>e.name);const n=new Map(this.personalities.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{n.has(e.name)||n.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(n.values())},categories(){return[...new Set(this.combinedApps.map(n=>n.category))].sort((n,e)=>n.localeCompare(e))},filteredApps(){return this.combinedApps.filter(n=>{const e=n.name.toLowerCase().includes(this.searchQuery.toLowerCase())||n.author.toLowerCase().includes(this.searchQuery.toLowerCase())||n.description.toLowerCase().includes(this.searchQuery.toLowerCase()),t=this.selectedCategory==="all"||n.category===this.selectedCategory;return e&&t})},sortedAndFilteredPersonalities(){return[...this.filteredApps].sort((n,e)=>{let t=0;switch(this.sortBy){case"name":t=n.name.localeCompare(e.name);break;case"author":t=n.author.localeCompare(e.author);break;case"date":t=this.getDateValue(n.creation_date)-this.getDateValue(e.creation_date);break;case"update":t=this.getDateValue(n.last_update_date)-this.getDateValue(e.last_update_date);break}return this.sortOrder==="asc"?t:-t})},favoriteApps(){return this.combinedApps.filter(n=>this.favorites.includes(n.uid))}},methods:{getDateValue(n){if(!n)return 0;const e=new Date(n);return isNaN(e.getTime())?0:e.getTime()},async onPersonalitySelected(n){if(console.log("on pers",n),this.isLoading&&this.$store.state.toast.showToast("Loading... please wait",4,!1),this.isLoading=!0,console.log("selecting ",n),n){if(n.selected){this.$store.state.toast.showToast("Personality already selected",4,!0),this.isLoading=!1;return}let e=n.language==null?n.full_path:n.full_path+":"+n.language;if(console.log("pth",e),n.isMounted&&this.configFile.personalities.includes(e)){const t=await this.select_personality(n);console.log("pers is mounted",t),t&&t.status&&t.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: `+n.name,4,!0):this.$store.state.toast.showToast(`Error on select personality: `+n.name,4,!1),this.isLoading=!1}else console.log("mounting pers"),this.mountPersonality(n);Ue(()=>{feather.replace()})}},onModelSelected(n){if(this.isLoading){this.$store.state.toast.showToast("Loading... please wait",4,!1);return}n&&(n.isInstalled?this.update_model(n.model.name).then(e=>{console.log("update_model",e),this.configFile.model_name=n.model.name,e.status?(this.$store.state.toast.showToast(`Selected model: `+n.name,4,!0),Ue(()=>{feather.replace(),this.is_loading_zoo=!1}),this.updateModelsZoo(),this.api_get_req("get_model_status").then(t=>{this.$store.commit("setIsModelOk",t)})):(this.$store.state.toast.showToast(`Couldn't select model: @@ -3990,4 +3990,4 @@ You have the freedom to give, sell, or keep the personas you create for yourself The possibilities are endless, they are now yours to mold and customize as you see fit.`),this.$store.dispatch("refreshPersonalitiesZoo")):this.$store.state.toast.showToast(`Personality couldn't be copied to the custom personalities folder: Verify that the personality is not already copied there.`,4,!1)}).catch(e=>{this.$store.state.toast.showToast(`Personality couldn't be copied to the custom personalities folder: `,4,!1),console.error(e)})},async remountPersonality(n){await this.unmountPersonality(n),await this.mountPersonality(n)},onPersonalityReinstall(n){console.log("on reinstall ",n),this.isLoading=!0,console.log("Personality path:",n.personality.path),te.post("/reinstall_personality",{client_id:this.$store.state.client_id,name:n.personality.path},{headers:this.posts_headers}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this.$store.state.toast.showToast("Personality reinstalled successfully!",4,!0):this.$store.state.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not reinstall personality -`+e.message,4,!1),{status:!1}))},async handleOpenFolder(n){await te.post("/open_personality_folder",{client_id:this.$store.state.client_id,personality_folder:n.personality.folder})},showMessage(n,e){this.message=n,this.successMessage=e,setTimeout(()=>{this.message=""},3e3)},loadPersonalities(){this.loading=!0,setTimeout(()=>{this.personalities=this.$store.state.personalities,this.loading=!1},500)}},mounted(){this.loadFavoritesFromLocalStorage(),this.loading=!0,setTimeout(()=>{this.personalities=this.$store.state.personalities,this.loading=!1},500)}},yAt={class:"app-zoo mb-100 pb-100 pt-12 background-color w-full p-6 overflow-y-auto h-screen scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},EAt={class:"panels-color shadow-lg rounded-lg p-4 max-w-4xl mx-auto mb-8"},vAt={class:"flex flex-wrap items-center justify-between gap-4"},SAt={key:0},TAt={key:1,class:"error"},xAt={class:"relative flex-grow max-w-md"},CAt={class:"flex items-center space-x-4"},wAt=["value"],RAt={class:"flex items-center space-x-4"},AAt={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},MAt={key:1},NAt={class:"container mx-auto px-4 flex flex-column pb-20"},IAt={key:0},OAt={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"},kAt={class:"container mx-auto px-4 flex flex-column pb-20"},DAt={class:"text-2xl font-bold my-8"},LAt={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"},PAt={key:2,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 overflow-y-auto"},FAt={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},UAt={class:"flex justify-between items-center mb-4"},BAt={class:"text-2xl font-bold"},GAt=["srcdoc"],VAt={key:1,class:"text-center text-red-500"};function zAt(n,e,t,s,i,r){const o=Je("personality-entry");return T(),x("div",yAt,[l("nav",EAt,[l("div",vAt,[i.message?(T(),x("p",SAt,Y(i.message),1)):B("",!0),i.error?(T(),x("p",TAt,Y(i.error),1)):B("",!0),l("div",xAt,[k(l("input",{"onUpdate:modelValue":e[0]||(e[0]=a=>i.searchQuery=a),placeholder:"Search personalities...",class:"w-full border-b-2 border-gray-300 px-4 py-2 pl-10 focus:outline-none focus:border-blue-500 transition duration-300 ease-in-out","aria-label":"Search personalities"},null,512),[[ue,i.searchQuery]]),e[5]||(e[5]=l("svg",{class:"w-5 h-5 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),l("div",CAt,[e[7]||(e[7]=l("label",{for:"category-select",class:"font-semibold"},"Category:",-1)),k(l("select",{id:"category-select","onUpdate:modelValue":e[1]||(e[1]=a=>i.selectedCategory=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},[e[6]||(e[6]=l("option",{value:"all"},"All Categories",-1)),(T(!0),x(Le,null,We(r.categories,a=>(T(),x("option",{key:a,value:a},Y(a),9,wAt))),128))],512),[[Ot,i.selectedCategory]])]),l("div",RAt,[e[9]||(e[9]=l("label",{for:"sort-select",class:"font-semibold"},"Sort by:",-1)),k(l("select",{id:"sort-select","onUpdate:modelValue":e[2]||(e[2]=a=>i.sortBy=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},e[8]||(e[8]=[l("option",{value:"name"},"Name",-1),l("option",{value:"author"},"Author",-1),l("option",{value:"date"},"Creation Date",-1),l("option",{value:"update"},"Last Update",-1)]),512),[[Ot,i.sortBy]]),l("button",{onClick:e[3]||(e[3]=(...a)=>r.toggleSortOrder&&r.toggleSortOrder(...a)),class:"btn btn-secondary"},Y(i.sortOrder==="asc"?"↑":"↓"),1)])])]),i.loading?(T(),x("div",AAt,e[10]||(e[10]=[l("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1),l("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)]))):(T(),x("div",MAt,[l("div",NAt,[r.favoriteApps.length>0&&!i.searchQuery?(T(),x("div",IAt,[e[11]||(e[11]=l("h2",{class:"text-2xl font-bold my-8"},"Favorite Apps",-1)),l("div",OAt,[(T(!0),x(Le,null,We(r.favoriteApps,a=>(T(),at(o,{ref_for:!0,ref:"personalitiesZoo",key:a.uid,personality:a,select_language:!0,full_path:a.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(c=>c===a.full_path||c===a.full_path+":"+a.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":n.onSettingsPersonality,"on-copy-personality-name":n.onCopyPersonalityName,"on-copy-to_custom":n.onCopyToCustom,"on-open-folder":r.handleOpenFolder,"on-toggle-favorite":r.toggleFavorite},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder","on-toggle-favorite"]))),128))])])):B("",!0)]),l("div",kAt,[l("h2",DAt,Y(r.currentCategoryName)+" ("+Y(r.sortedAndFilteredPersonalities.length)+")",1),l("div",LAt,[(T(!0),x(Le,null,We(r.sortedAndFilteredPersonalities,a=>(T(),at(o,{ref_for:!0,ref:"personalitiesZoo",key:a.uid,personality:a,select_language:!0,full_path:a.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(c=>c===a.full_path||c===a.full_path+":"+a.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":n.onSettingsPersonality,"on-copy-personality-name":n.onCopyPersonalityName,"on-copy-to_custom":n.onCopyToCustom,"on-open-folder":r.handleOpenFolder,"toggle-favorite":r.toggleFavorite},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder","toggle-favorite"]))),128))])])])),i.selectedApp?(T(),x("div",PAt,[l("div",FAt,[l("div",UAt,[l("h2",BAt,Y(i.selectedApp.name),1),l("button",{onClick:e[4]||(e[4]=(...a)=>n.backToZoo&&n.backToZoo(...a)),class:"bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded-lg transition duration-300 ease-in-out"},"Close")]),i.appCode?(T(),x("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,GAt)):(T(),x("p",VAt,"Please install this app to view its code."))])])):B("",!0),i.message?(T(),x("div",{key:3,class:Pe(["fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-md",{"bg-green-100 text-green-800":i.successMessage,"bg-red-100 text-red-800":!i.successMessage}])},Y(i.message),3)):B("",!0),e[12]||(e[12]=l("div",{class:"h-20"},null,-1))])}const HAt=st(bAt,[["render",zAt],["__scopeId","data-v-f8c39e0b"]]),qAt=z3({history:E3("/"),routes:[{path:"/apps_view/",name:"AppsZoo",component:gAt},{path:"/personalities_view/",name:"PersonalitiesZoo",component:HAt},{path:"/auto_sd_view/",name:"AutoSD",component:vRt},{path:"/comfyui_view/",name:"ComfyUI",component:hRt},{path:"/playground/",name:"playground",component:Ket},{path:"/extensions/",name:"extensions",component:stt},{path:"/help_view/",name:"help_view",component:Wtt},{path:"/settings/",name:"settings",component:npt},{path:"/training/",name:"training",component:mpt},{path:"/quantizing/",name:"quantizing",component:vpt},{path:"/",name:"discussions",component:pbt},{path:"/interactive/",name:"interactive",component:yxt},{path:"/nodes/",name:"nodes",component:uRt}]}),Ep=PD(MXe);function YAt(n){const e={};for(const t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}const Ps=cL({state(){return{theme_vars:{lollms_title:"LoLLMS",falling_object:"L",activate_dropping_animation:!1,lollms_welcome_short_message:"Welcome to LoLLMS WebUI",lollms_welcome_message:"Embark on a journey through the realm of advanced AI with LoLLMS, your ultimate companion for intelligent conversations and multimodal interactions. Unleash the power of large language models and explore new frontiers in artificial intelligence."},personalities_ready:!1,is_rt_on:!1,language:"english",languages:[],currentTheme:"",personality_editor:null,showPersonalityEditor:!1,selectedPersonality:null,currentPersonConfig:{ai_name:"",ai_author:"",ai_category:"",ai_language:"",ai_description:"",ai_conditionning:"",ai_disclaimer:"",ai_icon:null},posts_headers:{accept:"application/json","Content-Type":"application/json"},client_id:"",leftPanelCollapsed:!1,rightPanelCollapsed:!0,view_mode:localStorage.getItem("lollms_webui_view_mode")||"compact",yesNoDialog:null,universalForm:null,toast:null,news:null,messageBox:null,api_get_req:null,api_post_req:null,startSpeechRecognition:null,ready:!1,loading_infos:"",loading_progress:0,version:"unknown",settingsChanged:!1,isConnected:!1,isModelOk:!1,isGenerating:!1,config:null,mountedPers:null,mountedPersArr:[],bindingsZoo:[],modelsArr:[],selectedModel:null,personalities:[],diskUsage:null,ramUsage:null,vramUsage:null,modelsZoo:[],installedModels:[],installedBindings:[],currentModel:null,currentBinding:null,databases:[]}},mutations:{updatePersonality(n,e){const t=n.personalities.findIndex(s=>s.full_path===e.full_path);t!==-1?n.personalities[t]=e:console.log("Can't uipdate personality beceause it was Not found:",e.full_path)},setThemeVars(n,e){n.theme_vars=e},setLeftPanelCollapsed(n,e){n.leftPanelCollapsed=e,console.log(`Saving the status of left panel to ${e}`),localStorage.setItem("lollms_webui_left_panel_collapsed",e)},setRightPanelCollapsed(n,e){n.rightPanelCollapsed=e,console.log(`Saving the status of right panel to ${e}`),localStorage.setItem("lollms_webui_right_panel_collapsed",e)},setViewMode(n,e){n.view_mode=e,localStorage.setItem("lollms_webui_view_mode",e)},setpersonalitiesReady(n,e){n.personalities_ready=e},setisRTOn(n,e){n.is_rt_on=e},setLanguages(n,e){n.languages=e},setLanguage(n,e){n.language=e},setIsReady(n,e){n.ready=e},setIsConnected(n,e){n.isConnected=e},setIsModelOk(n,e){n.isModelOk=e},setIsGenerating(n,e){n.isGenerating=e},setConfig(n,e){n.config=e},setPersonalities(n,e){n.personalities=e},setMountedPers(n,e){n.mountedPers=e},setMountedPersArr(n,e){n.mountedPersArr=e},setbindingsZoo(n,e){n.bindingsZoo=e},setModelsArr(n,e){n.modelsArr=e},setselectedModel(n,e){n.selectedModel=e},setDiskUsage(n,e){n.diskUsage=e},setRamUsage(n,e){n.ramUsage=e},setVramUsage(n,e){n.vramUsage=e},setModelsZoo(n,e){n.modelsZoo=e},setCurrentBinding(n,e){n.currentBinding=e},setCurrentModel(n,e){n.currentModel=e},setDatabases(n,e){n.databases=e},setTheme(n){this.currentTheme=n}},getters:{getThemeVars(n){return n.theme_vars},getLeftPanelCollapsed(n){return n.leftPanelCollapsed},getRightPanelCollapsed(n){return n.rightPanelCollapsed},getViewMode(n){return n.view_mode},getpersonalitiesReady(n){return n.personalities_ready},getisRTOn(n){return n.is_rt_on},getLanguages(n){return n.languages},getLanguage(n){return n.language},getIsConnected(n){return n.isConnected},getIsModelOk(n){return n.isModelOk},getIsGenerating(n){return n.isGenerating},getConfig(n){return n.config},getPersonalities(n){return n.personalities},getMountedPersArr(n){return n.mountedPersArr},getMountedPers(n){return n.mountedPers},getbindingsZoo(n){return n.bindingsZoo},getModelsArr(n){return n.modelsArr},getDiskUsage(n){return n.diskUsage},getRamUsage(n){return n.ramUsage},getVramUsage(n){return n.vramUsage},getDatabasesList(n){return n.databases},getModelsZoo(n){return n.modelsZoo},getCyrrentBinding(n){return n.currentBinding},getCurrentModel(n){return n.currentModel}},actions:{async getVersion(){try{let n=await te.get("/get_lollms_webui_version",{});n&&(this.state.version=n.data)}catch{console.error("Coudln't get version")}},async refreshConfig({commit:n}){console.log("Fetching configuration");try{console.log("Fetching configuration with client id: ",this.state.client_id);const e=await GI("get_config",this.state.client_id);e.active_personality_id<0&&(e.active_personality_id=0);let t=e.personalities[e.active_personality_id].split("/");e.personality_category=t[0],e.personality_folder=t[1],console.log("Recovered config"),console.log(e),console.log("Committing config"),console.log(e),console.log(this.state.config),n("setConfig",e)}catch(e){console.log(e.message,"refreshConfig")}},async refreshDatabase({commit:n}){let e=await js("list_databases");console.log("databases:",e),n("setDatabases",e)},async fetchisRTOn({commit:n}){const t=(await te.get("/is_rt_on")).data.status;n("setisRTOn",t)},async fetchLanguages({commit:n}){console.log("get_personality_languages_list",this.state.client_id);const e=await te.post("/get_personality_languages_list",{client_id:this.state.client_id});console.log("response",e);const t=e.data;console.log("languages",t),n("setLanguages",t)},async fetchLanguage({commit:n}){console.log("get_personality_language",this.state.client_id);const e=await te.post("/get_personality_language",{client_id:this.state.client_id});console.log("response",e);const t=e.data;console.log("language",t),n("setLanguage",t)},async changeLanguage({commit:n},e){console.log("Changing language to ",e);let t=await te.post("/set_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),t=await te.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",t);const s=t.data;console.log("languages",s),n("setLanguages",s),t=await te.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",t);const i=t.data;console.log("language",i),n("setLanguage",i),await this.dispatch("refreshMountedPersonalities"),console.log("Language changed successfully:",i)},async deleteLanguage({commit:n},e){console.log("Deleting ",e);let t=await te.post("/del_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),t=await te.post("/get_personality_languages_list",{client_id:this.state.client_id});const s=t.data;n("setLanguages",s),t=await te.post("/get_personality_language",{client_id:this.state.client_id});const i=t.data;n("setLanguage",i)},async refreshPersonalitiesZoo({commit:n}){let e=[];const t=await js("get_all_personalities"),s=Object.keys(t);for(let i=0;i{let d=!1;for(const _ of this.state.config.personalities)_.includes(r+"/"+c.folder)&&(d=!0);let u={};return u=c,u.category=r,u.full_path=r+"/"+c.folder,u.isMounted=d,u});e.length==0?e=a:e=e.concat(a)}e.sort((i,r)=>i.name.localeCompare(r.name)),n("setPersonalities",e),console.log("Done loading personalities")},refreshMountedPersonalities({commit:n}){this.state.config.active_personality_id<0&&(this.state.config.active_personality_id=0);let e=[];const t=[];for(let i=0;ia.full_path==r);if(o>=0){let a=YAt(this.state.personalities[o]);a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(c=>c.full_path=="generic/lollms")])}else t.push(i),console.log("Couldn't load personality : ",r)}for(let i=t.length-1;i>=0;i--)this.state.config.personalities.splice(t[i],1),this.state.config.active_personality_id>t[i]&&(this.state.config.active_personality_id-=1);n("setMountedPersArr",e);const s=this.state.personalities[this.state.personalities.findIndex(i=>i.full_path==this.state.config.personalities[this.state.config.active_personality_id])];console.log("Setting current mounted personality: ",s),this.state.mountedPers=s},async refreshBindings({commit:n}){let e=await js("list_bindings");console.log("Loaded bindings zoo :",e),this.state.installedBindings=e.filter(s=>s.installed),console.log("Loaded bindings zoo ",this.state.installedBindings),n("setbindingsZoo",e);const t=e.findIndex(s=>s.name==this.state.config.binding_name);t!=-1&&n("setCurrentBinding",e[t])},async refreshModelsZoo({commit:n}){const t=(await te.get("/get_available_models")).data;n("setModelsZoo",t)},async refreshModelStatus({commit:n}){let e=await js("get_model_status");n("setIsModelOk",e.status)},async refreshModels({commit:n}){let e=await js("list_models"),t=await js("get_active_model");t!=null&&n("setselectedModel",t.model),n("setModelsArr",e),this.state.modelsZoo.map(i=>{i.isInstalled=e.includes(i.name)}),this.state.installedModels=this.state.modelsZoo.filter(i=>i.isInstalled);const s=this.state.modelsZoo.findIndex(i=>i.name==this.state.config.model_name);s!=-1&&n("setCurrentModel",this.state.modelsZoo[s])},async refreshDiskUsage({commit:n}){this.state.diskUsage=await js("disk_usage")},async refreshRamUsage({commit:n}){this.state.ramUsage=await js("ram_usage")},async refreshVramUsage({commit:n}){const e=await js("vram_usage"),t=[];if(e.nb_gpus>0){for(let i=0;i{this.message=""},3e3)},loadPersonalities(){this.loading=!0,setTimeout(()=>{this.personalities=this.$store.state.personalities,this.loading=!1},500)}},mounted(){this.loadFavoritesFromLocalStorage(),this.loading=!0,setTimeout(()=>{this.personalities=this.$store.state.personalities,this.loading=!1},500)}},EAt={class:"app-zoo mb-100 pb-100 pt-12 background-color w-full p-6 overflow-y-auto h-screen scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},vAt={class:"panels-color shadow-lg rounded-lg p-4 max-w-4xl mx-auto mb-8"},SAt={class:"flex flex-wrap items-center justify-between gap-4"},TAt={key:0},xAt={key:1,class:"error"},CAt={class:"relative flex-grow max-w-md"},wAt={class:"flex items-center space-x-4"},RAt=["value"],AAt={class:"flex items-center space-x-4"},MAt={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},NAt={key:1},IAt={class:"container mx-auto px-4 flex flex-column pb-20"},OAt={key:0},kAt={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"},DAt={class:"container mx-auto px-4 flex flex-column pb-20"},LAt={class:"text-2xl font-bold my-8"},PAt={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"},FAt={key:2,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 overflow-y-auto"},UAt={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},BAt={class:"flex justify-between items-center mb-4"},GAt={class:"text-2xl font-bold"},VAt=["srcdoc"],zAt={key:1,class:"text-center text-red-500"};function HAt(n,e,t,s,i,r){const o=Je("personality-entry");return T(),x("div",EAt,[l("nav",vAt,[l("div",SAt,[i.message?(T(),x("p",TAt,Y(i.message),1)):B("",!0),i.error?(T(),x("p",xAt,Y(i.error),1)):B("",!0),l("div",CAt,[k(l("input",{"onUpdate:modelValue":e[0]||(e[0]=a=>i.searchQuery=a),placeholder:"Search personalities...",class:"w-full border-b-2 border-gray-300 px-4 py-2 pl-10 focus:outline-none focus:border-blue-500 transition duration-300 ease-in-out","aria-label":"Search personalities"},null,512),[[ue,i.searchQuery]]),e[5]||(e[5]=l("svg",{class:"w-5 h-5 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))]),l("div",wAt,[e[7]||(e[7]=l("label",{for:"category-select",class:"font-semibold"},"Category:",-1)),k(l("select",{id:"category-select","onUpdate:modelValue":e[1]||(e[1]=a=>i.selectedCategory=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},[e[6]||(e[6]=l("option",{value:"all"},"All Categories",-1)),(T(!0),x(Le,null,We(r.categories,a=>(T(),x("option",{key:a,value:a},Y(a),9,RAt))),128))],512),[[Ot,i.selectedCategory]])]),l("div",AAt,[e[9]||(e[9]=l("label",{for:"sort-select",class:"font-semibold"},"Sort by:",-1)),k(l("select",{id:"sort-select","onUpdate:modelValue":e[2]||(e[2]=a=>i.sortBy=a),class:"border-2 border-gray-300 rounded-md px-2 py-1"},e[8]||(e[8]=[l("option",{value:"name"},"Name",-1),l("option",{value:"author"},"Author",-1),l("option",{value:"date"},"Creation Date",-1),l("option",{value:"update"},"Last Update",-1)]),512),[[Ot,i.sortBy]]),l("button",{onClick:e[3]||(e[3]=(...a)=>r.toggleSortOrder&&r.toggleSortOrder(...a)),class:"btn btn-secondary"},Y(i.sortOrder==="asc"?"↑":"↓"),1)])])]),i.loading?(T(),x("div",MAt,e[10]||(e[10]=[l("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1),l("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)]))):(T(),x("div",NAt,[l("div",IAt,[r.favoriteApps.length>0&&!i.searchQuery?(T(),x("div",OAt,[e[11]||(e[11]=l("h2",{class:"text-2xl font-bold my-8"},"Favorite Apps",-1)),l("div",kAt,[(T(!0),x(Le,null,We(r.favoriteApps,a=>(T(),at(o,{ref_for:!0,ref:"personalitiesZoo",key:a.uid,personality:a,select_language:!0,full_path:a.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(c=>c===a.full_path||c===a.full_path+":"+a.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":n.onSettingsPersonality,"on-copy-personality-name":n.onCopyPersonalityName,"on-copy-to_custom":n.onCopyToCustom,"on-open-folder":r.handleOpenFolder,"on-toggle-favorite":r.toggleFavorite},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder","on-toggle-favorite"]))),128))])])):B("",!0)]),l("div",DAt,[l("h2",LAt,Y(r.currentCategoryName)+" ("+Y(r.sortedAndFilteredPersonalities.length)+")",1),l("div",PAt,[(T(!0),x(Le,null,We(r.sortedAndFilteredPersonalities,a=>(T(),at(o,{ref_for:!0,ref:"personalitiesZoo",key:a.uid,personality:a,select_language:!0,full_path:a.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(c=>c===a.full_path||c===a.full_path+":"+a.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":n.onSettingsPersonality,"on-copy-personality-name":n.onCopyPersonalityName,"on-copy-to_custom":n.onCopyToCustom,"on-open-folder":r.handleOpenFolder,"toggle-favorite":r.toggleFavorite},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name","on-copy-to_custom","on-open-folder","toggle-favorite"]))),128))])])])),i.selectedApp?(T(),x("div",FAt,[l("div",UAt,[l("div",BAt,[l("h2",GAt,Y(i.selectedApp.name),1),l("button",{onClick:e[4]||(e[4]=(...a)=>n.backToZoo&&n.backToZoo(...a)),class:"bg-gray-300 hover:bg-gray-400 px-4 py-2 rounded-lg transition duration-300 ease-in-out"},"Close")]),i.appCode?(T(),x("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,VAt)):(T(),x("p",zAt,"Please install this app to view its code."))])])):B("",!0),i.message?(T(),x("div",{key:3,class:Pe(["fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-md",{"bg-green-100 text-green-800":i.successMessage,"bg-red-100 text-red-800":!i.successMessage}])},Y(i.message),3)):B("",!0),e[12]||(e[12]=l("div",{class:"h-20"},null,-1))])}const qAt=st(yAt,[["render",HAt],["__scopeId","data-v-f8c39e0b"]]),YAt=z3({history:E3("/"),routes:[{path:"/apps_view/",name:"AppsZoo",component:bAt},{path:"/personalities_view/",name:"PersonalitiesZoo",component:qAt},{path:"/auto_sd_view/",name:"AutoSD",component:SRt},{path:"/comfyui_view/",name:"ComfyUI",component:gRt},{path:"/playground/",name:"playground",component:Ket},{path:"/extensions/",name:"extensions",component:stt},{path:"/help_view/",name:"help_view",component:Wtt},{path:"/settings/",name:"settings",component:spt},{path:"/training/",name:"training",component:hpt},{path:"/quantizing/",name:"quantizing",component:Spt},{path:"/",name:"discussions",component:fbt},{path:"/interactive/",name:"interactive",component:Ext},{path:"/nodes/",name:"nodes",component:pRt}]}),Ep=PD(MXe);function $At(n){const e={};for(const t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}const Ps=cL({state(){return{theme_vars:{lollms_title:"LoLLMS",falling_object:"L",activate_dropping_animation:!1,lollms_welcome_short_message:"Welcome to LoLLMS WebUI",lollms_welcome_message:"Embark on a journey through the realm of advanced AI with LoLLMS, your ultimate companion for intelligent conversations and multimodal interactions. Unleash the power of large language models and explore new frontiers in artificial intelligence."},personalities_ready:!1,is_rt_on:!1,language:"english",languages:[],currentTheme:"",personality_editor:null,showPersonalityEditor:!1,selectedPersonality:null,currentPersonConfig:{ai_name:"",ai_author:"",ai_category:"",ai_language:"",ai_description:"",ai_conditionning:"",ai_disclaimer:"",ai_icon:null},posts_headers:{accept:"application/json","Content-Type":"application/json"},client_id:"",leftPanelCollapsed:!1,rightPanelCollapsed:!0,view_mode:localStorage.getItem("lollms_webui_view_mode")||"compact",yesNoDialog:null,universalForm:null,toast:null,news:null,messageBox:null,api_get_req:null,api_post_req:null,startSpeechRecognition:null,ready:!1,loading_infos:"",loading_progress:0,version:"unknown",settingsChanged:!1,isConnected:!1,isModelOk:!1,isGenerating:!1,config:null,mountedPers:null,mountedPersArr:[],bindingsZoo:[],modelsArr:[],selectedModel:null,personalities:[],diskUsage:null,ramUsage:null,vramUsage:null,modelsZoo:[],installedModels:[],installedBindings:[],currentModel:null,currentBinding:null,databases:[]}},mutations:{updatePersonality(n,e){const t=n.personalities.findIndex(s=>s.full_path===e.full_path);t!==-1?n.personalities[t]=e:console.log("Can't uipdate personality beceause it was Not found:",e.full_path)},setThemeVars(n,e){n.theme_vars=e},setLeftPanelCollapsed(n,e){n.leftPanelCollapsed=e,console.log(`Saving the status of left panel to ${e}`),localStorage.setItem("lollms_webui_left_panel_collapsed",e)},setRightPanelCollapsed(n,e){n.rightPanelCollapsed=e,console.log(`Saving the status of right panel to ${e}`),localStorage.setItem("lollms_webui_right_panel_collapsed",e)},setViewMode(n,e){n.view_mode=e,localStorage.setItem("lollms_webui_view_mode",e)},setpersonalitiesReady(n,e){n.personalities_ready=e},setisRTOn(n,e){n.is_rt_on=e},setLanguages(n,e){n.languages=e},setLanguage(n,e){n.language=e},setIsReady(n,e){n.ready=e},setIsConnected(n,e){n.isConnected=e},setIsModelOk(n,e){n.isModelOk=e},setIsGenerating(n,e){n.isGenerating=e},setConfig(n,e){n.config=e},setPersonalities(n,e){n.personalities=e},setMountedPers(n,e){n.mountedPers=e},setMountedPersArr(n,e){n.mountedPersArr=e},setbindingsZoo(n,e){n.bindingsZoo=e},setModelsArr(n,e){n.modelsArr=e},setselectedModel(n,e){n.selectedModel=e},setDiskUsage(n,e){n.diskUsage=e},setRamUsage(n,e){n.ramUsage=e},setVramUsage(n,e){n.vramUsage=e},setModelsZoo(n,e){n.modelsZoo=e},setCurrentBinding(n,e){n.currentBinding=e},setCurrentModel(n,e){n.currentModel=e},setDatabases(n,e){n.databases=e},setTheme(n){this.currentTheme=n}},getters:{getThemeVars(n){return n.theme_vars},getLeftPanelCollapsed(n){return n.leftPanelCollapsed},getRightPanelCollapsed(n){return n.rightPanelCollapsed},getViewMode(n){return n.view_mode},getpersonalitiesReady(n){return n.personalities_ready},getisRTOn(n){return n.is_rt_on},getLanguages(n){return n.languages},getLanguage(n){return n.language},getIsConnected(n){return n.isConnected},getIsModelOk(n){return n.isModelOk},getIsGenerating(n){return n.isGenerating},getConfig(n){return n.config},getPersonalities(n){return n.personalities},getMountedPersArr(n){return n.mountedPersArr},getMountedPers(n){return n.mountedPers},getbindingsZoo(n){return n.bindingsZoo},getModelsArr(n){return n.modelsArr},getDiskUsage(n){return n.diskUsage},getRamUsage(n){return n.ramUsage},getVramUsage(n){return n.vramUsage},getDatabasesList(n){return n.databases},getModelsZoo(n){return n.modelsZoo},getCyrrentBinding(n){return n.currentBinding},getCurrentModel(n){return n.currentModel}},actions:{async getVersion(){try{let n=await te.get("/get_lollms_webui_version",{});n&&(this.state.version=n.data)}catch{console.error("Coudln't get version")}},async refreshConfig({commit:n}){console.log("Fetching configuration");try{console.log("Fetching configuration with client id: ",this.state.client_id);const e=await GI("get_config",this.state.client_id);e.active_personality_id<0&&(e.active_personality_id=0);let t=e.personalities[e.active_personality_id].split("/");e.personality_category=t[0],e.personality_folder=t[1],console.log("Recovered config"),console.log(e),console.log("Committing config"),console.log(e),console.log(this.state.config),n("setConfig",e)}catch(e){console.log(e.message,"refreshConfig")}},async refreshDatabase({commit:n}){let e=await js("list_databases");console.log("databases:",e),n("setDatabases",e)},async fetchisRTOn({commit:n}){const t=(await te.get("/is_rt_on")).data.status;n("setisRTOn",t)},async fetchLanguages({commit:n}){console.log("get_personality_languages_list",this.state.client_id);const e=await te.post("/get_personality_languages_list",{client_id:this.state.client_id});console.log("response",e);const t=e.data;console.log("languages",t),n("setLanguages",t)},async fetchLanguage({commit:n}){console.log("get_personality_language",this.state.client_id);const e=await te.post("/get_personality_language",{client_id:this.state.client_id});console.log("response",e);const t=e.data;console.log("language",t),n("setLanguage",t)},async changeLanguage({commit:n},e){console.log("Changing language to ",e);let t=await te.post("/set_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),t=await te.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",t);const s=t.data;console.log("languages",s),n("setLanguages",s),t=await te.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",t);const i=t.data;console.log("language",i),n("setLanguage",i),await this.dispatch("refreshMountedPersonalities"),console.log("Language changed successfully:",i)},async deleteLanguage({commit:n},e){console.log("Deleting ",e);let t=await te.post("/del_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),t=await te.post("/get_personality_languages_list",{client_id:this.state.client_id});const s=t.data;n("setLanguages",s),t=await te.post("/get_personality_language",{client_id:this.state.client_id});const i=t.data;n("setLanguage",i)},async refreshPersonalitiesZoo({commit:n}){let e=[];const t=await js("get_all_personalities"),s=Object.keys(t);for(let i=0;i{let d=!1;for(const _ of this.state.config.personalities)_.includes(r+"/"+c.folder)&&(d=!0);let u={};return u=c,u.category=r,u.full_path=r+"/"+c.folder,u.isMounted=d,u});e.length==0?e=a:e=e.concat(a)}e.sort((i,r)=>i.name.localeCompare(r.name)),n("setPersonalities",e),console.log("Done loading personalities")},refreshMountedPersonalities({commit:n}){this.state.config.active_personality_id<0&&(this.state.config.active_personality_id=0);let e=[];const t=[];for(let i=0;ia.full_path==r);if(o>=0){let a=$At(this.state.personalities[o]);a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(c=>c.full_path=="generic/lollms")])}else t.push(i),console.log("Couldn't load personality : ",r)}for(let i=t.length-1;i>=0;i--)this.state.config.personalities.splice(t[i],1),this.state.config.active_personality_id>t[i]&&(this.state.config.active_personality_id-=1);n("setMountedPersArr",e);const s=this.state.personalities[this.state.personalities.findIndex(i=>i.full_path==this.state.config.personalities[this.state.config.active_personality_id])];console.log("Setting current mounted personality: ",s),this.state.mountedPers=s},async refreshBindings({commit:n}){let e=await js("list_bindings");console.log("Loaded bindings zoo :",e),this.state.installedBindings=e.filter(s=>s.installed),console.log("Loaded bindings zoo ",this.state.installedBindings),n("setbindingsZoo",e);const t=e.findIndex(s=>s.name==this.state.config.binding_name);t!=-1&&n("setCurrentBinding",e[t])},async refreshModelsZoo({commit:n}){const t=(await te.get("/get_available_models")).data;n("setModelsZoo",t)},async refreshModelStatus({commit:n}){let e=await js("get_model_status");n("setIsModelOk",e.status)},async refreshModels({commit:n}){let e=await js("list_models"),t=await js("get_active_model");t!=null&&n("setselectedModel",t.model),n("setModelsArr",e),this.state.modelsZoo.map(i=>{i.isInstalled=e.includes(i.name)}),this.state.installedModels=this.state.modelsZoo.filter(i=>i.isInstalled);const s=this.state.modelsZoo.findIndex(i=>i.name==this.state.config.model_name);s!=-1&&n("setCurrentModel",this.state.modelsZoo[s])},async refreshDiskUsage({commit:n}){this.state.diskUsage=await js("disk_usage")},async refreshRamUsage({commit:n}){this.state.ramUsage=await js("ram_usage")},async refreshVramUsage({commit:n}){const e=await js("vram_usage"),t=[];if(e.nb_gpus>0){for(let i=0;i LoLLMS WebUI - - + +
diff --git a/web/src/views/SettingsView.vue b/web/src/views/SettingsView.vue index 7a0450ca..54e583ea 100644 --- a/web/src/views/SettingsView.vue +++ b/web/src/views/SettingsView.vue @@ -1176,6 +1176,7 @@ +