From 7058e86b1eaba86539c3ca26033389139db81ceb Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Mon, 20 Jan 2025 23:38:26 +0100 Subject: [PATCH] Sync --- app.py | 2 +- lollms_core | 2 +- ...{index-D3RFgJ-r.css => index-CWAle_SQ.css} | 2 +- .../{index-DiGBKYgc.js => index-CX04FRDU.js} | 374 +++++++++--------- web/dist/index.html | 4 +- web/src/views/SettingsView.vue | 124 +++++- 6 files changed, 301 insertions(+), 207 deletions(-) rename web/dist/assets/{index-D3RFgJ-r.css => index-CWAle_SQ.css} (99%) rename web/dist/assets/{index-DiGBKYgc.js => index-CX04FRDU.js} (94%) diff --git a/app.py b/app.py index fd56c273..a4395473 100644 --- a/app.py +++ b/app.py @@ -17,7 +17,7 @@ from lollms.utilities import PackageManager os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE" -expected_ascii_colors_version = "0.5.1" +expected_ascii_colors_version = "0.5.2" print( f"Checking ascii_colors ({expected_ascii_colors_version}) ...", end="", flush=True ) diff --git a/lollms_core b/lollms_core index d2123da3..80b2a395 160000 --- a/lollms_core +++ b/lollms_core @@ -1 +1 @@ -Subproject commit d2123da34acb04598ff4215b8d13bcbcdb12f44c +Subproject commit 80b2a395a862b7ac93f56bf06de37e038dda47bb diff --git a/web/dist/assets/index-D3RFgJ-r.css b/web/dist/assets/index-CWAle_SQ.css similarity index 99% rename from web/dist/assets/index-D3RFgJ-r.css rename to web/dist/assets/index-CWAle_SQ.css index 237caab9..272242aa 100644 --- a/web/dist/assets/index-D3RFgJ-r.css +++ b/web/dist/assets/index-CWAle_SQ.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}.spinner{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.execute-button{display:flex;align-items:center;gap:.5rem}.math{display:inline-block}.mathjax_block{display:block}.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-d8eb826d]{position:fixed;top:0;left:0;right:0;z-index:1000}.topbar[data-v-d8eb826d]{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-d8eb826d]{transform:translateY(-100%)}.topbar-content[data-v-d8eb826d]{display:flex;justify-content:space-between;align-items:center;max-width:1200px;width:100%}.pin-button[data-v-d8eb826d]{background-color:transparent;border:none;cursor:pointer;padding:5px;display:flex;align-items:center;justify-content:center}.pin-button svg[data-v-d8eb826d]{width:24px;height:24px;transition:transform .3s ease}.pin-button:hover svg[data-v-d8eb826d]{transform:scale(1.2)}.placeholder[data-v-d8eb826d]{height:10px}.topbar-container[data-v-d8eb826d]{position:relative;width:100%}.hover-zone[data-v-d8eb826d]{opacity:0}.error[data-v-d8eb826d]{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}.input-field[data-v-d37ef18c]{width:100%;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.5rem .75rem;--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);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.input-field[data-v-d37ef18c]:focus{border-color:transparent;--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-field[data-v-d37ef18c]:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.heartbeat-text[data-v-d37ef18c]{font-size:24px;animation:pulsate-d37ef18c 1.5s infinite}@keyframes pulsate-d37ef18c{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}to{transform:scale(1);opacity:1}}.list-move[data-v-d37ef18c],.list-enter-active[data-v-d37ef18c],.list-leave-active[data-v-d37ef18c]{transition:all .5s ease}.list-enter-from[data-v-d37ef18c]{transform:translatey(-30px)}.list-leave-to[data-v-d37ef18c]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-d37ef18c]{position:absolute}.bounce-enter-active[data-v-d37ef18c]{animation:bounce-in-d37ef18c .5s}.bounce-leave-active[data-v-d37ef18c]{animation:bounce-in-d37ef18c .5s reverse}@keyframes bounce-in-d37ef18c{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-d37ef18c]{background-color:#0ff}.hover[data-v-d37ef18c]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-d37ef18c]{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-cc0f8d41]{position:relative;padding-top:10px}.custom-scrollbar[data-v-cc0f8d41]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-cc0f8d41]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-cc0f8d41]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-cc0f8d41]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}.list-move[data-v-cc0f8d41],.list-enter-active[data-v-cc0f8d41],.list-leave-active[data-v-cc0f8d41]{transition:all .5s ease}.list-enter-from[data-v-cc0f8d41]{transform:translatey(-30px)}.list-leave-to[data-v-cc0f8d41]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-cc0f8d41]{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-85f3dede]{box-shadow:0 0 5px 2px #00ffffb3;animation:glow-85f3dede 1.5s ease-in-out infinite alternate}@keyframes glow-85f3dede{0%{box-shadow:0 0 5px 2px #00ffffb3}to{box-shadow:0 0 20px 2px #00ffffb3}}.personalities-container[data-v-533fa73a]{position:relative}.skills-lib-icon[data-v-533fa73a]{position:absolute;top:-2px;right:-2px;z-index:10;font-size:5px;width:2px;height:2px}.skills-lib-icon i[data-v-533fa73a]{width:2px;height:2px}@keyframes giggle-533fa73a{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-533fa73a]{animation:giggle-533fa73a 1.5s infinite ease-in-out}.custom-scrollbar[data-v-533fa73a]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-533fa73a]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-533fa73a]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-533fa73a]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}@keyframes custom-pulse-533fa73a{0%,to{box-shadow:0 0 #3b82f680}50%{box-shadow:0 0 0 15px #3b82f600}}.animate-pulse[data-v-533fa73a]{animation:custom-pulse-533fa73a 2s infinite}.slide-right-enter-active[data-v-533fa73a],.slide-right-leave-active[data-v-533fa73a]{transition:transform .3s ease}.slide-right-enter[data-v-533fa73a],.slide-right-leave-to[data-v-533fa73a]{transform:translate(-100%)}.slide-left-enter-active[data-v-533fa73a],.slide-left-leave-active[data-v-533fa73a]{transition:transform .3s ease}.slide-left-enter[data-v-533fa73a],.slide-left-leave-to[data-v-533fa73a]{transform:translate(100%)}.fade-and-fly-enter-active[data-v-533fa73a]{animation:fade-and-fly-enter-533fa73a .5s ease}.fade-and-fly-leave-active[data-v-533fa73a]{animation:fade-and-fly-leave-533fa73a .5s ease}@keyframes fade-and-fly-enter-533fa73a{0%{opacity:0;transform:translateY(20px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes fade-and-fly-leave-533fa73a{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-20px) scale(1.2)}}.list-move[data-v-533fa73a],.list-enter-active[data-v-533fa73a],.list-leave-active[data-v-533fa73a]{transition:all .5s ease}.list-enter-from[data-v-533fa73a]{transform:translatey(-30px)}.list-leave-to[data-v-533fa73a]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-533fa73a]{position:absolute}@keyframes float-533fa73a{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}.animate-float[data-v-533fa73a]{animation:float-533fa73a linear infinite}@keyframes star-move-533fa73a{0%{transform:translate(0) rotate(0)}50%{transform:translate(20px,20px) rotate(180deg)}to{transform:translate(0) rotate(360deg)}}.animate-star[data-v-533fa73a]{animation:star-move-533fa73a linear infinite}@keyframes fall-533fa73a{0%{transform:translateY(-20px) rotate(0);opacity:1}to{transform:translateY(calc(100vh + 20px)) rotate(360deg);opacity:0}}.animate-fall[data-v-533fa73a]{animation:fall-533fa73a linear infinite}@keyframes glow-533fa73a{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-533fa73a]{animation:glow-533fa73a 2s ease-in-out infinite}@media (prefers-color-scheme: dark){@keyframes glow-533fa73a{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-533fa73a{0%{transform:translate(-50%) rotate(0)}to{transform:translate(50%) rotate(360deg)}}.animate-roll[data-v-533fa73a]{animation:roll-533fa73a 4s linear infinite}.toolbar[data-v-533fa73a]{position:relative;width:100%}.toolbar-container[data-v-533fa73a]{display:flex;height:2.5rem;align-items:center}.toolbar-button[data-v-533fa73a]{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-533fa73a]:hover{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.menu-container[data-v-533fa73a]{position:relative}.expandable-menu[data-v-533fa73a]{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-533fa73a],.menu-visible[data-v-533fa73a]{display:flex}.menu-item[data-v-533fa73a]{background:none;border:none;cursor:pointer;padding:8px;color:#333;transition:background-color .3s}.menu-item[data-v-533fa73a]:hover{background-color:#f0f0f0}.dot[data-v-533fa73a]{width:10px;height:10px;border-radius:50%}.dot-green[data-v-533fa73a]{background-color:green}.dot-red[data-v-533fa73a]{background-color:red}.animate-pulse[data-v-533fa73a]{animation:pulse-533fa73a 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse-533fa73a{0%,to{opacity:1}50%{opacity:.7}}.logo-container[data-v-533fa73a]{position:relative;width:48px;height:48px}.logo-image[data-v-533fa73a]{width:100%;height:100%;border-radius:50%;-o-object-fit:cover;object-fit:cover}@keyframes bounce-533fa73a{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-533fa73a]{animation:bounce-533fa73a 1s infinite}@keyframes roll-and-bounce-533fa73a{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-533fa73a{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:Inter,Outfit,PTSans,Roboto,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,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:JetBrains Mono,Consolas,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}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\!visible{visibility:visible!important}.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-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.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-12{bottom:-3rem}.-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-0\.5{left:.125rem}.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-0\.5{top:.125rem}.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%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.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}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.-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-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}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.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!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.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-\[300px\]{height:300px}.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-72{max-height:18rem}.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-\[200px\]{min-height:200px}.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-1\/3{width:33.333333%}.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-2\/3{width:66.666667%}.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-\[this-is\\\\\]{width:this-is\\}.w-\[this-is\]{width:this-is}.w-\[weird-and-invalid\]{width:weird-and-invalid}.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-width:24rem}.min-w-\[200px\]{min-width:200px}.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-none{max-width:none}.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}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.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-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))!important}.transform,.transform-cpu{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-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) 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-help{cursor:help}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.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))}.grid-cols-\[200px\,1fr\]{grid-template-columns:200px 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.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-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * 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))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.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-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.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))}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.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-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-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{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.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}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.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-l-2{border-left-width:2px}.border-r{border-right-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-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.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))}.border-b-gray-900{--tw-border-opacity: 1;border-bottom-color:rgb(17 24 39 / var(--tw-border-opacity))}.bg-\[rgb\(255\,0\,0\)\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-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-500{--tw-gradient-to: #0E9F6E 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%}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.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-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.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-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}.pl-5{padding-left:1.25rem}.pl-6{padding-left:1.5rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.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-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.font-mono{font-family:JetBrains Mono,Consolas,monospace}.font-sans{font-family:Inter,Outfit,PTSans,Roboto,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,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}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.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-\[\#336699\]\/\[\.35\]{color:#33669959}.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}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.accent-blue-500{accent-color:#3F83F8}.accent-blue-600{accent-color:#1C64F2}.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}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.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}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--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)}.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-inset{--tw-ring-inset: inset}.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{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px 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-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)}.invert{--tw-invert: invert(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)}.sepia{--tw-sepia: sepia(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)!important}.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)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-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-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-grayscale{--tw-backdrop-grayscale: grayscale(100%);-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-invert{--tw-backdrop-invert: invert(100%);-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-sepia{--tw-backdrop-sepia: sepia(100%);-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)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.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-700{transition-duration:.7s}.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)}.content-\[\'this-is-also-valid\]-weirdly-enough\'\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.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-family:Inter,Outfit,PTSans,Roboto,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,sans-serif;font-size:1rem;line-height:1.5rem;line-height:1.625;letter-spacing:-.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}p:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}@media (min-width: 768px){p{font-size:1.125rem;line-height:1.75rem;line-height:2}}table{border-collapse:collapse;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}table:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}th,td{border-width:1px;--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity));padding:.5rem}th:is(.dark *),td:is(.dark *){--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}tr:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}tr:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}ul,ol{margin-top:1rem;margin-bottom:1rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:1.75rem}ul{margin-left:.5rem;list-style-type:disc}ul>: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))}li{position:relative;padding-left:.5rem}ol{margin-left:.5rem;list-style-type:decimal}ol>: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))}ul ul,ol ol,ul ol,ol ul{margin-top:.5rem;margin-bottom:0;margin-left:1.5rem}li::marker{color:#4b5563}: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))}@media (min-width: 640px){.sm\:container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}.sm\:container{max-width:640px}@media (min-width: 768px){.sm\:container{max-width:768px}}@media (min-width: 1024px){.sm\:container{max-width:1024px}}@media (min-width: 1280px){.sm\:container{max-width:1280px}}@media (min-width: 1536px){.sm\:container{max-width:1536px}}}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:h-5:after{content:var(--tw-content);height:1.25rem}.after\:w-5:after{content:var(--tw-content);width:1.25rem}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:border:after{content:var(--tw-content);border-width:1px}.after\:border-gray-300:after{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.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)}.checked\:translate-x-6:checked{--tw-translate-x: 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))}.checked\:bg-blue-500:checked{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.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\:bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:text-primary{color:var(--color-primary)}.peer:checked~.peer-checked\:after\:translate-x-full:after{content:var(--tw-content);--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))}.peer:checked~.peer-checked\:after\:border-white:after{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.peer:focus~.peer-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)}.peer:focus~.peer-focus\:ring-blue-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.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-blue-500:hover{--tw-border-opacity: 1;border-color:rgb(63 131 248 / 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-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-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-50:hover{--tw-bg-opacity: 1;background-color:rgb(253 242 242 / 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-300:hover{--tw-bg-opacity: 1;background-color:rgb(250 202 21 / 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-green-500:hover{--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)}.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-green-600:hover{--tw-gradient-to: #057A55 var(--tw-gradient-to-position)}.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\:font-bold:hover{font-weight:700}.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\: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}.before\:hover\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\:before\:text-center:hover:before{content:var(--tw-content);text-align:center}.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-green-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(14 159 110 / 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}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\:hover\:text-center:hover:focus{text-align:center}.hover\:focus\:text-center:focus:hover{text-align:center}.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-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)}.peer:focus~.dark\:peer-focus\:ring-blue-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.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))}.dark\:hover\:bg-yellow-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(194 120 3 / 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\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-center{text-align:center}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}.sm\:underline{text-decoration-line:underline}}@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\/3{width:33.333333%}.md\:w-1\/4{width:25%}.md\:w-2\/3{width:66.666667%}.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\:grid-cols-\[300px\,1fr\]{grid-template-columns:300px 1fr}.md\:flex-row{flex-direction:row}.md\:items-start{align-items:flex-start}.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-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)))}.md\:space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * 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\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-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\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.dark\:lg\:hover\:\[paint-order\:markers\]:hover:is(.dark *){paint-order:markers}}@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}.spinner{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.execute-button{display:flex;align-items:center;gap:.5rem}.math{display:inline-block}.mathjax_block{display:block}.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-d8eb826d]{position:fixed;top:0;left:0;right:0;z-index:1000}.topbar[data-v-d8eb826d]{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-d8eb826d]{transform:translateY(-100%)}.topbar-content[data-v-d8eb826d]{display:flex;justify-content:space-between;align-items:center;max-width:1200px;width:100%}.pin-button[data-v-d8eb826d]{background-color:transparent;border:none;cursor:pointer;padding:5px;display:flex;align-items:center;justify-content:center}.pin-button svg[data-v-d8eb826d]{width:24px;height:24px;transition:transform .3s ease}.pin-button:hover svg[data-v-d8eb826d]{transform:scale(1.2)}.placeholder[data-v-d8eb826d]{height:10px}.topbar-container[data-v-d8eb826d]{position:relative;width:100%}.hover-zone[data-v-d8eb826d]{opacity:0}.error[data-v-d8eb826d]{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}.input-field[data-v-845a0c0b]{width:100%;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.5rem .75rem;--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);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.input-field[data-v-845a0c0b]:focus{border-color:transparent;--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-field[data-v-845a0c0b]:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.heartbeat-text[data-v-845a0c0b]{font-size:24px;animation:pulsate-845a0c0b 1.5s infinite}@keyframes pulsate-845a0c0b{0%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}to{transform:scale(1);opacity:1}}.list-move[data-v-845a0c0b],.list-enter-active[data-v-845a0c0b],.list-leave-active[data-v-845a0c0b]{transition:all .5s ease}.list-enter-from[data-v-845a0c0b]{transform:translatey(-30px)}.list-leave-to[data-v-845a0c0b]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-845a0c0b]{position:absolute}.bounce-enter-active[data-v-845a0c0b]{animation:bounce-in-845a0c0b .5s}.bounce-leave-active[data-v-845a0c0b]{animation:bounce-in-845a0c0b .5s reverse}@keyframes bounce-in-845a0c0b{0%{transform:scale(0)}50%{transform:scale(1.25)}to{transform:scale(1)}}.bg-primary-light[data-v-845a0c0b]{background-color:#0ff}.hover[data-v-845a0c0b]:bg-primary-light:hover{background-color:#7fffd4}.font-bold[data-v-845a0c0b]{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-cc0f8d41]{position:relative;padding-top:10px}.custom-scrollbar[data-v-cc0f8d41]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-cc0f8d41]::-webkit-scrollbar{width:6px}.custom-scrollbar[data-v-cc0f8d41]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-cc0f8d41]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}.list-move[data-v-cc0f8d41],.list-enter-active[data-v-cc0f8d41],.list-leave-active[data-v-cc0f8d41]{transition:all .5s ease}.list-enter-from[data-v-cc0f8d41]{transform:translatey(-30px)}.list-leave-to[data-v-cc0f8d41]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-cc0f8d41]{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-85f3dede]{box-shadow:0 0 5px 2px #00ffffb3;animation:glow-85f3dede 1.5s ease-in-out infinite alternate}@keyframes glow-85f3dede{0%{box-shadow:0 0 5px 2px #00ffffb3}to{box-shadow:0 0 20px 2px #00ffffb3}}.personalities-container[data-v-533fa73a]{position:relative}.skills-lib-icon[data-v-533fa73a]{position:absolute;top:-2px;right:-2px;z-index:10;font-size:5px;width:2px;height:2px}.skills-lib-icon i[data-v-533fa73a]{width:2px;height:2px}@keyframes giggle-533fa73a{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-533fa73a]{animation:giggle-533fa73a 1.5s infinite ease-in-out}.custom-scrollbar[data-v-533fa73a]{scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent}.custom-scrollbar[data-v-533fa73a]::-webkit-scrollbar{width:8px}.custom-scrollbar[data-v-533fa73a]::-webkit-scrollbar-track{background:transparent}.custom-scrollbar[data-v-533fa73a]::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}@keyframes custom-pulse-533fa73a{0%,to{box-shadow:0 0 #3b82f680}50%{box-shadow:0 0 0 15px #3b82f600}}.animate-pulse[data-v-533fa73a]{animation:custom-pulse-533fa73a 2s infinite}.slide-right-enter-active[data-v-533fa73a],.slide-right-leave-active[data-v-533fa73a]{transition:transform .3s ease}.slide-right-enter[data-v-533fa73a],.slide-right-leave-to[data-v-533fa73a]{transform:translate(-100%)}.slide-left-enter-active[data-v-533fa73a],.slide-left-leave-active[data-v-533fa73a]{transition:transform .3s ease}.slide-left-enter[data-v-533fa73a],.slide-left-leave-to[data-v-533fa73a]{transform:translate(100%)}.fade-and-fly-enter-active[data-v-533fa73a]{animation:fade-and-fly-enter-533fa73a .5s ease}.fade-and-fly-leave-active[data-v-533fa73a]{animation:fade-and-fly-leave-533fa73a .5s ease}@keyframes fade-and-fly-enter-533fa73a{0%{opacity:0;transform:translateY(20px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes fade-and-fly-leave-533fa73a{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-20px) scale(1.2)}}.list-move[data-v-533fa73a],.list-enter-active[data-v-533fa73a],.list-leave-active[data-v-533fa73a]{transition:all .5s ease}.list-enter-from[data-v-533fa73a]{transform:translatey(-30px)}.list-leave-to[data-v-533fa73a]{opacity:0;transform:translatey(30px)}.list-leave-active[data-v-533fa73a]{position:absolute}@keyframes float-533fa73a{0%,to{transform:translateY(0)}50%{transform:translateY(-20px)}}.animate-float[data-v-533fa73a]{animation:float-533fa73a linear infinite}@keyframes star-move-533fa73a{0%{transform:translate(0) rotate(0)}50%{transform:translate(20px,20px) rotate(180deg)}to{transform:translate(0) rotate(360deg)}}.animate-star[data-v-533fa73a]{animation:star-move-533fa73a linear infinite}@keyframes fall-533fa73a{0%{transform:translateY(-20px) rotate(0);opacity:1}to{transform:translateY(calc(100vh + 20px)) rotate(360deg);opacity:0}}.animate-fall[data-v-533fa73a]{animation:fall-533fa73a linear infinite}@keyframes glow-533fa73a{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-533fa73a]{animation:glow-533fa73a 2s ease-in-out infinite}@media (prefers-color-scheme: dark){@keyframes glow-533fa73a{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-533fa73a{0%{transform:translate(-50%) rotate(0)}to{transform:translate(50%) rotate(360deg)}}.animate-roll[data-v-533fa73a]{animation:roll-533fa73a 4s linear infinite}.toolbar[data-v-533fa73a]{position:relative;width:100%}.toolbar-container[data-v-533fa73a]{display:flex;height:2.5rem;align-items:center}.toolbar-button[data-v-533fa73a]{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-533fa73a]:hover{--tw-text-opacity: 1;color:rgb(63 131 248 / var(--tw-text-opacity))}.menu-container[data-v-533fa73a]{position:relative}.expandable-menu[data-v-533fa73a]{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-533fa73a],.menu-visible[data-v-533fa73a]{display:flex}.menu-item[data-v-533fa73a]{background:none;border:none;cursor:pointer;padding:8px;color:#333;transition:background-color .3s}.menu-item[data-v-533fa73a]:hover{background-color:#f0f0f0}.dot[data-v-533fa73a]{width:10px;height:10px;border-radius:50%}.dot-green[data-v-533fa73a]{background-color:green}.dot-red[data-v-533fa73a]{background-color:red}.animate-pulse[data-v-533fa73a]{animation:pulse-533fa73a 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse-533fa73a{0%,to{opacity:1}50%{opacity:.7}}.logo-container[data-v-533fa73a]{position:relative;width:48px;height:48px}.logo-image[data-v-533fa73a]{width:100%;height:100%;border-radius:50%;-o-object-fit:cover;object-fit:cover}@keyframes bounce-533fa73a{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-533fa73a]{animation:bounce-533fa73a 1s infinite}@keyframes roll-and-bounce-533fa73a{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-533fa73a{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:Inter,Outfit,PTSans,Roboto,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,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:JetBrains Mono,Consolas,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}.not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\!visible{visibility:visible!important}.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-1{top:-.25rem;right:-.25rem;bottom:-.25rem;left:-.25rem}.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-12{bottom:-3rem}.-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-0\.5{left:.125rem}.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-0\.5{top:.125rem}.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%}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.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}.float-right{float:right}.float-left{float:left}.float-none{float:none}.clear-left{clear:left}.clear-right{clear:right}.clear-both{clear:both}.clear-none{clear:none}.-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-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}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.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!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.inline-table{display:inline-table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row-group{display:table-row-group}.table-row{display:table-row}.flow-root{display:flow-root}.grid{display:grid}.inline-grid{display:inline-grid}.contents{display:contents}.list-item{display:list-item}.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-\[300px\]{height:300px}.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-72{max-height:18rem}.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-\[200px\]{min-height:200px}.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-1\/3{width:33.333333%}.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-2\/3{width:66.666667%}.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-\[this-is\\\\\]{width:this-is\\}.w-\[this-is\]{width:this-is}.w-\[weird-and-invalid\]{width:weird-and-invalid}.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-width:24rem}.min-w-\[200px\]{min-width:200px}.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-none{max-width:none}.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}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.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-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))!important}.transform,.transform-cpu{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-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) 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-help{cursor:help}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-auto{touch-action:auto}.touch-none{touch-action:none}.touch-pan-x{--tw-pan-x: pan-x;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-left{--tw-pan-x: pan-left;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-right{--tw-pan-x: pan-right;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y: pan-y;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-up{--tw-pan-y: pan-up;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-down{--tw-pan-y: pan-down;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pinch-zoom{--tw-pinch-zoom: pinch-zoom;touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-manipulation{touch-action:manipulation}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.select-auto{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.resize-none{resize:none}.resize-y{resize:vertical}.resize-x{resize:horizontal}.resize{resize:both}.snap-none{scroll-snap-type:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-both{scroll-snap-type:both var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.snap-proximity{--tw-scroll-snap-strictness: proximity}.snap-start{scroll-snap-align:start}.snap-end{scroll-snap-align:end}.snap-center{scroll-snap-align:center}.snap-align-none{scroll-snap-align:none}.snap-normal{scroll-snap-stop:normal}.snap-always{scroll-snap-stop:always}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.break-before-auto{-moz-column-break-before:auto;break-before:auto}.break-before-avoid{-moz-column-break-before:avoid;break-before:avoid}.break-before-all{-moz-column-break-before:all;break-before:all}.break-before-avoid-page{-moz-column-break-before:avoid;break-before:avoid-page}.break-before-page{-moz-column-break-before:page;break-before:page}.break-before-left{-moz-column-break-before:left;break-before:left}.break-before-right{-moz-column-break-before:right;break-before:right}.break-before-column{-moz-column-break-before:column;break-before:column}.break-inside-auto{-moz-column-break-inside:auto;break-inside:auto}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-inside-avoid-page{break-inside:avoid-page}.break-inside-avoid-column{-moz-column-break-inside:avoid;break-inside:avoid-column}.break-after-auto{-moz-column-break-after:auto;break-after:auto}.break-after-avoid{-moz-column-break-after:avoid;break-after:avoid}.break-after-all{-moz-column-break-after:all;break-after:all}.break-after-avoid-page{-moz-column-break-after:avoid;break-after:avoid-page}.break-after-page{-moz-column-break-after:page;break-after:page}.break-after-left{-moz-column-break-after:left;break-after:left}.break-after-right{-moz-column-break-after:right;break-after:right}.break-after-column{-moz-column-break-after:column;break-after:column}.grid-flow-row{grid-auto-flow:row}.grid-flow-col{grid-auto-flow:column}.grid-flow-dense{grid-auto-flow:dense}.grid-flow-row-dense{grid-auto-flow:row dense}.grid-flow-col-dense{grid-auto-flow:column dense}.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))}.grid-cols-\[200px\,1fr\]{grid-template-columns:200px 1fr}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.flex-nowrap{flex-wrap:nowrap}.place-content-center{place-content:center}.place-content-start{place-content:start}.place-content-end{place-content:end}.place-content-between{place-content:space-between}.place-content-around{place-content:space-around}.place-content-evenly{place-content:space-evenly}.place-content-baseline{place-content:baseline}.place-content-stretch{place-content:stretch}.place-items-start{place-items:start}.place-items-end{place-items:end}.place-items-center{place-items:center}.place-items-baseline{place-items:baseline}.place-items-stretch{place-items:stretch}.content-center{align-content:center}.content-start{align-content:flex-start}.content-end{align-content:flex-end}.content-between{align-content:space-between}.content-around{align-content:space-around}.content-evenly{align-content:space-evenly}.content-baseline{align-content:baseline}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.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-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * 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))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}.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-y-reverse>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 1}.divide-x-reverse>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 1}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.divide-dashed>:not([hidden])~:not([hidden]){border-style:dashed}.divide-dotted>:not([hidden])~:not([hidden]){border-style:dotted}.divide-double>:not([hidden])~:not([hidden]){border-style:double}.divide-none>:not([hidden])~:not([hidden]){border-style:none}.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))}.place-self-auto{place-self:auto}.place-self-start{place-self:start}.place-self-end{place-self:end}.place-self-center{place-self:center}.place-self-stretch{place-self:stretch}.self-auto{align-self:auto}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.self-baseline{align-self:baseline}.justify-self-auto{justify-self:auto}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.justify-self-stretch{justify-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-scroll{overflow:scroll}.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-x-clip{overflow-x:clip}.overflow-y-clip{overflow-y:clip}.overflow-x-visible{overflow-x:visible}.overflow-y-visible{overflow-y:visible}.overflow-x-scroll{overflow-x:scroll}.overflow-y-scroll{overflow-y:scroll}.overscroll-auto{overscroll-behavior:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.overscroll-y-auto{overscroll-behavior-y:auto}.overscroll-y-contain{overscroll-behavior-y:contain}.overscroll-y-none{overscroll-behavior-y:none}.overscroll-x-auto{overscroll-behavior-x:auto}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-x-none{overscroll-behavior-x:none}.scroll-auto{scroll-behavior:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.text-clip{text-overflow:clip}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-normal{overflow-wrap:normal;word-break:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-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{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.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}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-x{border-left-width:1px;border-right-width:1px}.border-y{border-top-width:1px;border-bottom-width:1px}.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-l-2{border-left-width:2px}.border-r{border-right-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-solid{border-style:solid}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-double{border-style:double}.border-hidden{border-style:hidden}.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))}.border-b-gray-900{--tw-border-opacity: 1;border-bottom-color:rgb(17 24 39 / var(--tw-border-opacity))}.bg-\[rgb\(255\,0\,0\)\]{--tw-bg-opacity: 1;background-color:rgb(255 0 0 / var(--tw-bg-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-500{--tw-gradient-to: #0E9F6E 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%}.decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.box-decoration-slice{-webkit-box-decoration-break:slice;box-decoration-break:slice}.box-decoration-clone{-webkit-box-decoration-break:clone;box-decoration-break:clone}.bg-fixed{background-attachment:fixed}.bg-local{background-attachment:local}.bg-scroll{background-attachment:scroll}.bg-clip-border{background-clip:border-box}.bg-clip-padding{background-clip:padding-box}.bg-clip-content{background-clip:content-box}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.bg-no-repeat{background-repeat:no-repeat}.bg-repeat-x{background-repeat:repeat-x}.bg-repeat-y{background-repeat:repeat-y}.bg-repeat-round{background-repeat:round}.bg-repeat-space{background-repeat:space}.bg-origin-border{background-origin:border-box}.bg-origin-padding{background-origin:padding-box}.bg-origin-content{background-origin:content-box}.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-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.object-fill{-o-object-fit:fill;object-fit:fill}.object-none{-o-object-fit:none;object-fit:none}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.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-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}.pl-5{padding-left:1.25rem}.pl-6{padding-left:1.5rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.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-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-start{text-align:start}.text-end{text-align:end}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-top{vertical-align:text-top}.align-text-bottom{vertical-align:text-bottom}.align-sub{vertical-align:sub}.align-super{vertical-align:super}.font-mono{font-family:JetBrains Mono,Consolas,monospace}.font-sans{font-family:Inter,Outfit,PTSans,Roboto,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,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}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.italic{font-style:italic}.not-italic{font-style:normal}.normal-nums{font-variant-numeric:normal}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.lining-nums{--tw-numeric-figure: lining-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.oldstyle-nums{--tw-numeric-figure: oldstyle-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.proportional-nums{--tw-numeric-spacing: proportional-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.diagonal-fractions{--tw-numeric-fraction: diagonal-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.stacked-fractions{--tw-numeric-fraction: stacked-fractions;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.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-\[\#336699\]\/\[\.35\]{color:#33669959}.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}.overline{text-decoration-line:overline}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-solid{text-decoration-style:solid}.decoration-double{text-decoration-style:double}.decoration-dotted{text-decoration-style:dotted}.decoration-dashed{text-decoration-style:dashed}.decoration-wavy{text-decoration-style:wavy}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.accent-blue-500{accent-color:#3F83F8}.accent-blue-600{accent-color:#1C64F2}.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}.bg-blend-normal{background-blend-mode:normal}.bg-blend-multiply{background-blend-mode:multiply}.bg-blend-screen{background-blend-mode:screen}.bg-blend-overlay{background-blend-mode:overlay}.bg-blend-darken{background-blend-mode:darken}.bg-blend-lighten{background-blend-mode:lighten}.bg-blend-color-dodge{background-blend-mode:color-dodge}.bg-blend-color-burn{background-blend-mode:color-burn}.bg-blend-hard-light{background-blend-mode:hard-light}.bg-blend-soft-light{background-blend-mode:soft-light}.bg-blend-difference{background-blend-mode:difference}.bg-blend-exclusion{background-blend-mode:exclusion}.bg-blend-hue{background-blend-mode:hue}.bg-blend-saturation{background-blend-mode:saturation}.bg-blend-color{background-blend-mode:color}.bg-blend-luminosity{background-blend-mode:luminosity}.mix-blend-normal{mix-blend-mode:normal}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-screen{mix-blend-mode:screen}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-lighten{mix-blend-mode:lighten}.mix-blend-color-dodge{mix-blend-mode:color-dodge}.mix-blend-color-burn{mix-blend-mode:color-burn}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-soft-light{mix-blend-mode:soft-light}.mix-blend-difference{mix-blend-mode:difference}.mix-blend-exclusion{mix-blend-mode:exclusion}.mix-blend-hue{mix-blend-mode:hue}.mix-blend-saturation{mix-blend-mode:saturation}.mix-blend-color{mix-blend-mode:color}.mix-blend-luminosity{mix-blend-mode:luminosity}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.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}.outline-dashed{outline-style:dashed}.outline-dotted{outline-style:dotted}.outline-double{outline-style:double}.ring{--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)}.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-inset{--tw-ring-inset: inset}.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{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px 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-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)}.invert{--tw-invert: invert(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)}.sepia{--tw-sepia: sepia(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)!important}.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)}.filter-none{filter:none}.backdrop-blur{--tw-backdrop-blur: blur(8px);-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-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-grayscale{--tw-backdrop-grayscale: grayscale(100%);-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-invert{--tw-backdrop-invert: invert(100%);-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-sepia{--tw-backdrop-sepia: sepia(100%);-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)}.backdrop-filter-none{-webkit-backdrop-filter:none;backdrop-filter:none}.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-700{transition-duration:.7s}.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)}.content-\[\'this-is-also-valid\]-weirdly-enough\'\]{--tw-content: "this-is-also-valid]-weirdly-enough";content:var(--tw-content)}.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-family:Inter,Outfit,PTSans,Roboto,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Arial,sans-serif;font-size:1rem;line-height:1.5rem;line-height:1.625;letter-spacing:-.025em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}p:is(.dark *){--tw-text-opacity: 1;color:rgb(164 202 254 / var(--tw-text-opacity))}@media (min-width: 768px){p{font-size:1.125rem;line-height:1.75rem;line-height:2}}table{border-collapse:collapse;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}table:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}th,td{border-width:1px;--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity));padding:.5rem}th:is(.dark *),td:is(.dark *){--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}tr:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}tr:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}ul,ol{margin-top:1rem;margin-bottom:1rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:1.75rem}ul{margin-left:.5rem;list-style-type:disc}ul>: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))}li{position:relative;padding-left:.5rem}ol{margin-left:.5rem;list-style-type:decimal}ol>: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))}ul ul,ol ol,ul ol,ol ul{margin-top:.5rem;margin-bottom:0;margin-left:1.5rem}li::marker{color:#4b5563}: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))}@media (min-width: 640px){.sm\:container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}.sm\:container{max-width:640px}@media (min-width: 768px){.sm\:container{max-width:768px}}@media (min-width: 1024px){.sm\:container{max-width:1024px}}@media (min-width: 1280px){.sm\:container{max-width:1280px}}@media (min-width: 1536px){.sm\:container{max-width:1536px}}}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:h-5:after{content:var(--tw-content);height:1.25rem}.after\:w-5:after{content:var(--tw-content);width:1.25rem}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:border:after{content:var(--tw-content);border-width:1px}.after\:border-gray-300:after{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.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)}.checked\:translate-x-6:checked{--tw-translate-x: 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))}.checked\:bg-blue-500:checked{--tw-bg-opacity: 1;background-color:rgb(63 131 248 / var(--tw-bg-opacity))}.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\:bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(28 100 242 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:text-primary{color:var(--color-primary)}.peer:checked~.peer-checked\:after\:translate-x-full:after{content:var(--tw-content);--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))}.peer:checked~.peer-checked\:after\:border-white:after{content:var(--tw-content);--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.peer:focus~.peer-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)}.peer:focus~.peer-focus\:ring-blue-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(164 202 254 / var(--tw-ring-opacity))}.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-blue-500:hover{--tw-border-opacity: 1;border-color:rgb(63 131 248 / 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-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-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-50:hover{--tw-bg-opacity: 1;background-color:rgb(253 242 242 / 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-300:hover{--tw-bg-opacity: 1;background-color:rgb(250 202 21 / 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-green-500:hover{--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)}.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-green-600:hover{--tw-gradient-to: #057A55 var(--tw-gradient-to-position)}.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\:font-bold:hover{font-weight:700}.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\: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}.before\:hover\:text-center:hover:before{content:var(--tw-content);text-align:center}.hover\:before\:text-center:hover:before{content:var(--tw-content);text-align:center}.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-green-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(14 159 110 / 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}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\:hover\:text-center:hover:focus{text-align:center}.hover\:focus\:text-center:focus:hover{text-align:center}.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-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)}.peer:focus~.dark\:peer-focus\:ring-blue-800:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(30 66 159 / var(--tw-ring-opacity))}.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))}.dark\:hover\:bg-yellow-500:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(194 120 3 / 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\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-center{text-align:center}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}.sm\:underline{text-decoration-line:underline}}@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\/3{width:33.333333%}.md\:w-1\/4{width:25%}.md\:w-2\/3{width:66.666667%}.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\:grid-cols-\[300px\,1fr\]{grid-template-columns:300px 1fr}.md\:flex-row{flex-direction:row}.md\:items-start{align-items:flex-start}.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-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)))}.md\:space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * 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\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-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\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.dark\:lg\:hover\:\[paint-order\:markers\]:hover:is(.dark *){paint-order:markers}}@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-DiGBKYgc.js b/web/dist/assets/index-CX04FRDU.js similarity index 94% rename from web/dist/assets/index-DiGBKYgc.js rename to web/dist/assets/index-CX04FRDU.js index c8505e7f..6f345014 100644 --- a/web/dist/assets/index-DiGBKYgc.js +++ b/web/dist/assets/index-CX04FRDU.js @@ -74,7 +74,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),W=V,K=U),G===void 0&&( `)+` ]`},t}();l7.default=C6t;var ww;function Hr(){if(ww)return E6;ww=1;var t=S&&S.__values||function(c){var u=typeof Symbol=="function"&&Symbol.iterator,d=u&&c[u],h=0;if(d)return d.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&h>=c.length&&(c=void 0),{value:c&&c[h++],done:!c}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")},e=S&&S.__read||function(c,u){var d=typeof Symbol=="function"&&c[Symbol.iterator];if(!d)return c;var h=d.call(c),f,m=[],T;try{for(;(u===void 0||u-- >0)&&!(f=h.next()).done;)m.push(f.value)}catch(Q){T={error:Q}}finally{try{f&&!f.done&&(d=h.return)&&d.call(h)}finally{if(T)throw T.error}}return m},n=S&&S.__spreadArray||function(c,u,d){if(d||arguments.length===2)for(var h=0,f=u.length,m;h0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Mw=S&&S.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},M6t=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(To,"__esModule",{value:!0});To.BaseItem=To.MmlStack=void 0;var Ow=M6t(cn),CV=function(){function t(e){this._nodes=e}return Object.defineProperty(t.prototype,"nodes",{get:function(){return this._nodes},enumerable:!1,configurable:!0}),t.prototype.Push=function(){for(var e,n=[],r=0;r=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Rw=S&&S.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Nw=S&&S.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},H6t=S&&S.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},U6t=S&&S.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wV=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c7,"__esModule",{value:!0});var G6t=wV(ey),q6t=Ic,kw=wV(On),Pw=or,z6t=function(){function t(e,n){n===void 0&&(n=[]),this.options={},this.packageData=new Map,this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.handlers=e.handlers,this.nodeFactory=new q6t.NodeFactory,this.nodeFactory.configuration=this,this.nodeFactory.setCreators(e.nodes),this.itemFactory=new G6t.default(e.items),this.itemFactory.configuration=this,Pw.defaultOptions.apply(void 0,U6t([this.options],$6t(n),!1)),(0,Pw.defaultOptions)(this.options,e.options)}return t.prototype.pushParser=function(e){this.parsers.unshift(e)},t.prototype.popParser=function(){this.parsers.shift()},Object.defineProperty(t.prototype,"parser",{get:function(){return this.parsers[0]},enumerable:!1,configurable:!0}),t.prototype.clear=function(){this.parsers=[],this.root=null,this.nodeLists={},this.error=!1,this.tags.resetTag()},t.prototype.addNode=function(e,n){var r=this.nodeLists[e];if(r||(r=this.nodeLists[e]=[]),r.push(n),n.kind!==e){var i=kw.default.getProperty(n,"in-lists")||"",o=(i?i.split(/,/):[]).concat(e).join(",");kw.default.setProperty(n,"in-lists",o)}},t.prototype.getList=function(e){var n,r,i=this.nodeLists[e]||[],o=[];try{for(var s=Iw(i),a=s.next();!a.done;a=s.next()){var l=a.value;this.inTree(l)&&o.push(l)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return this.nodeLists[e]=o,o},t.prototype.removeFromList=function(e,n){var r,i,o=this.nodeLists[e]||[];try{for(var s=Iw(n),a=s.next();!a.done;a=s.next()){var l=a.value,c=o.indexOf(l);c>=0&&o.splice(c,1)}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}},t.prototype.inTree=function(e){for(;e&&e!==this.root;)e=e.parent;return!!e},t}();c7.default=z6t;var zs={};(function(t){var e=S&&S.__extends||function(){var u=function(d,h){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var T in m)Object.prototype.hasOwnProperty.call(m,T)&&(f[T]=m[T])},u(d,h)};return function(d,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");u(d,h);function f(){this.constructor=d}d.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}(),n=S&&S.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,h=d&&u[d],f=0;if(h)return h.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&f>=u.length&&(u=void 0),{value:u&&u[f++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},r=S&&S.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.TagsFactory=t.AllTags=t.NoTags=t.AbstractTags=t.TagInfo=t.Label=void 0;var i=r(Hr()),o=function(){function u(d,h){d===void 0&&(d="???"),h===void 0&&(h=""),this.tag=d,this.id=h}return u}();t.Label=o;var s=function(){function u(d,h,f,m,T,Q,_,v){d===void 0&&(d=""),h===void 0&&(h=!1),f===void 0&&(f=!1),m===void 0&&(m=null),T===void 0&&(T=""),Q===void 0&&(Q=""),_===void 0&&(_=!1),v===void 0&&(v=""),this.env=d,this.taggable=h,this.defaultTags=f,this.tag=m,this.tagId=T,this.tagFormat=Q,this.noTag=_,this.labelId=v}return u}();t.TagInfo=s;var a=function(){function u(){this.counter=0,this.allCounter=0,this.configuration=null,this.ids={},this.allIds={},this.labels={},this.allLabels={},this.redo=!1,this.refUpdate=!1,this.currentTag=new s,this.history=[],this.stack=[],this.enTag=function(d,h){var f=this.configuration.nodeFactory,m=f.create("node","mtd",[d]),T=f.create("node","mlabeledtr",[h,m]),Q=f.create("node","mtable",[T],{side:this.configuration.options.tagSide,minlabelspacing:this.configuration.options.tagIndent,displaystyle:!0});return Q}}return u.prototype.start=function(d,h,f){this.currentTag&&this.stack.push(this.currentTag),this.currentTag=new s(d,h,f)},Object.defineProperty(u.prototype,"env",{get:function(){return this.currentTag.env},enumerable:!1,configurable:!0}),u.prototype.end=function(){this.history.push(this.currentTag),this.currentTag=this.stack.pop()},u.prototype.tag=function(d,h){this.currentTag.tag=d,this.currentTag.tagFormat=h?d:this.formatTag(d),this.currentTag.noTag=!1},u.prototype.notag=function(){this.tag("",!0),this.currentTag.noTag=!0},Object.defineProperty(u.prototype,"noTag",{get:function(){return this.currentTag.noTag},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"label",{get:function(){return this.currentTag.labelId},set:function(d){this.currentTag.labelId=d},enumerable:!1,configurable:!0}),u.prototype.formatUrl=function(d,h){return h+"#"+encodeURIComponent(d)},u.prototype.formatTag=function(d){return"("+d+")"},u.prototype.formatId=function(d){return"mjx-eqn:"+d.replace(/\s/g,"_")},u.prototype.formatNumber=function(d){return d.toString()},u.prototype.autoTag=function(){this.currentTag.tag==null&&(this.counter++,this.tag(this.formatNumber(this.counter),!1))},u.prototype.clearTag=function(){this.label="",this.tag(null,!0),this.currentTag.tagId=""},u.prototype.getTag=function(d){if(d===void 0&&(d=!1),d)return this.autoTag(),this.makeTag();var h=this.currentTag;return h.taggable&&!h.noTag&&(h.defaultTags&&this.autoTag(),h.tag)?this.makeTag():null},u.prototype.resetTag=function(){this.history=[],this.redo=!1,this.refUpdate=!1,this.clearTag()},u.prototype.reset=function(d){d===void 0&&(d=0),this.resetTag(),this.counter=this.allCounter=d,this.allLabels={},this.allIds={}},u.prototype.startEquation=function(d){this.history=[],this.stack=[],this.clearTag(),this.currentTag=new s("",void 0,void 0),this.labels={},this.ids={},this.counter=this.allCounter,this.redo=!1;var h=d.inputData.recompile;h&&(this.refUpdate=!0,this.counter=h.counter)},u.prototype.finishEquation=function(d){this.redo&&(d.inputData.recompile={state:d.state(),counter:this.allCounter}),this.refUpdate||(this.allCounter=this.counter),Object.assign(this.allIds,this.ids),Object.assign(this.allLabels,this.labels)},u.prototype.finalize=function(d,h){if(!h.display||this.currentTag.env||this.currentTag.tag==null)return d;var f=this.makeTag(),m=this.enTag(d,f);return m},u.prototype.makeId=function(){this.currentTag.tagId=this.formatId(this.configuration.options.useLabelIds?this.label||this.currentTag.tag:this.currentTag.tag)},u.prototype.makeTag=function(){this.makeId(),this.label&&(this.labels[this.label]=new o(this.currentTag.tag,this.currentTag.tagId));var d=new i.default("\\text{"+this.currentTag.tagFormat+"}",{},this.configuration).mml();return this.configuration.nodeFactory.create("node","mtd",[d],{id:this.currentTag.tagId})},u}();t.AbstractTags=a;var l=function(u){e(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.prototype.autoTag=function(){},d.prototype.getTag=function(){return this.currentTag.tag?u.prototype.getTag.call(this):null},d}(a);t.NoTags=l;var c=function(u){e(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.prototype.finalize=function(h,f){if(!f.display||this.history.find(function(T){return T.taggable}))return h;var m=this.getTag(!0);return this.enTag(h,m)},d}(a);t.AllTags=c,function(u){var d=new Map([["none",l],["all",c]]),h="none";u.OPTIONS={tags:h,tagSide:"right",tagIndent:"0.8em",useLabelIds:!0,ignoreDuplicateLabels:!1},u.add=function(f,m){d.set(f,m)},u.addTags=function(f){var m,T;try{for(var Q=n(Object.keys(f)),_=Q.next();!_.done;_=Q.next()){var v=_.value;u.add(v,f[v])}}catch(y){m={error:y}}finally{try{_&&!_.done&&(T=Q.return)&&T.call(Q)}finally{if(m)throw m.error}}},u.create=function(f){var m=d.get(f)||d.get(h);if(!m)throw Error("Unknown tags class");return new m},u.setDefault=function(f){h=f},u.getDefault=function(){return u.create(h)}}(t.TagsFactory||(t.TagsFactory={}))})(zs);var nn={},Q0={};(function(t){var e=S&&S.__values||function(l){var c=typeof Symbol=="function"&&Symbol.iterator,u=c&&l[c],d=0;if(u)return u.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&d>=l.length&&(l=void 0),{value:l&&l[d++],done:!l}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},n=S&&S.__read||function(l,c){var u=typeof Symbol=="function"&&l[Symbol.iterator];if(!u)return l;var d=u.call(l),h,f=[],m;try{for(;(c===void 0||c-- >0)&&!(h=d.next()).done;)f.push(h.value)}catch(T){m={error:T}}finally{try{h&&!h.done&&(u=d.return)&&u.call(d)}finally{if(m)throw m.error}}return f};Object.defineProperty(t,"__esModule",{value:!0}),t.SubHandlers=t.SubHandler=t.MapHandler=void 0;var r=Ka,i=b2,o;(function(l){var c=new Map;l.register=function(u){c.set(u.name,u)},l.getMap=function(u){return c.get(u)}})(o=t.MapHandler||(t.MapHandler={}));var s=function(){function l(){this._configuration=new r.PrioritizedList,this._fallback=new i.FunctionList}return l.prototype.add=function(c,u,d){var h,f;d===void 0&&(d=r.PrioritizedList.DEFAULTPRIORITY);try{for(var m=e(c.slice().reverse()),T=m.next();!T.done;T=m.next()){var Q=T.value,_=o.getMap(Q);if(!_){this.warn("Configuration "+Q+" not found! Omitted.");return}this._configuration.add(_,d)}}catch(v){h={error:v}}finally{try{T&&!T.done&&(f=m.return)&&f.call(m)}finally{if(h)throw h.error}}u&&this._fallback.add(u,d)},l.prototype.parse=function(c){var u,d;try{for(var h=e(this._configuration),f=h.next();!f.done;f=h.next()){var m=f.value.item,T=m.parse(c);if(T)return T}}catch(y){u={error:y}}finally{try{f&&!f.done&&(d=h.return)&&d.call(h)}finally{if(u)throw u.error}}var Q=n(c,2),_=Q[0],v=Q[1];Array.from(this._fallback)[0].item(_,v)},l.prototype.lookup=function(c){var u=this.applicable(c);return u?u.lookup(c):null},l.prototype.contains=function(c){return!!this.applicable(c)},l.prototype.toString=function(){var c,u,d=[];try{for(var h=e(this._configuration),f=h.next();!f.done;f=h.next()){var m=f.value.item;d.push(m.name)}}catch(T){c={error:T}}finally{try{f&&!f.done&&(u=h.return)&&u.call(h)}finally{if(c)throw c.error}}return d.join(", ")},l.prototype.applicable=function(c){var u,d;try{for(var h=e(this._configuration),f=h.next();!f.done;f=h.next()){var m=f.value.item;if(m.contains(c))return m}}catch(T){u={error:T}}finally{try{f&&!f.done&&(d=h.return)&&d.call(h)}finally{if(u)throw u.error}}return null},l.prototype.retrieve=function(c){var u,d;try{for(var h=e(this._configuration),f=h.next();!f.done;f=h.next()){var m=f.value.item;if(m.name===c)return m}}catch(T){u={error:T}}finally{try{f&&!f.done&&(d=h.return)&&d.call(h)}finally{if(u)throw u.error}}return null},l.prototype.warn=function(c){console.log("TexParser Warning: "+c)},l}();t.SubHandler=s;var a=function(){function l(){this.map=new Map}return l.prototype.add=function(c,u,d){var h,f;d===void 0&&(d=r.PrioritizedList.DEFAULTPRIORITY);try{for(var m=e(Object.keys(c)),T=m.next();!T.done;T=m.next()){var Q=T.value,_=Q,v=this.get(_);v||(v=new s,this.set(_,v)),v.add(c[_],u[_],d)}}catch(y){h={error:y}}finally{try{T&&!T.done&&(f=m.return)&&f.call(m)}finally{if(h)throw h.error}}},l.prototype.set=function(c,u){this.map.set(c,u)},l.prototype.get=function(c){return this.map.get(c)},l.prototype.retrieve=function(c){var u,d;try{for(var h=e(this.map.values()),f=h.next();!f.done;f=h.next()){var m=f.value,T=m.retrieve(c);if(T)return T}}catch(Q){u={error:Q}}finally{try{f&&!f.done&&(d=h.return)&&d.call(h)}finally{if(u)throw u.error}}return null},l.prototype.keys=function(){return this.map.keys()},l}();t.SubHandlers=a})(Q0);(function(t){var e=S&&S.__values||function(d){var h=typeof Symbol=="function"&&Symbol.iterator,f=h&&d[h],m=0;if(f)return f.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&m>=d.length&&(d=void 0),{value:d&&d[m++],done:!d}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},n=S&&S.__read||function(d,h){var f=typeof Symbol=="function"&&d[Symbol.iterator];if(!f)return d;var m=f.call(d),T,Q=[],_;try{for(;(h===void 0||h-- >0)&&!(T=m.next()).done;)Q.push(T.value)}catch(v){_={error:v}}finally{try{T&&!T.done&&(f=m.return)&&f.call(m)}finally{if(_)throw _.error}}return Q};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserConfiguration=t.ConfigurationHandler=t.Configuration=void 0;var r=or,i=Q0,o=b2,s=Ka,a=zs,l=function(){function d(h,f,m,T,Q,_,v,y,b,E,x,L,M){f===void 0&&(f={}),m===void 0&&(m={}),T===void 0&&(T={}),Q===void 0&&(Q={}),_===void 0&&(_={}),v===void 0&&(v={}),y===void 0&&(y=[]),b===void 0&&(b=[]),E===void 0&&(E=null),x===void 0&&(x=null),this.name=h,this.handler=f,this.fallback=m,this.items=T,this.tags=Q,this.options=_,this.nodes=v,this.preprocessors=y,this.postprocessors=b,this.initMethod=E,this.configMethod=x,this.priority=L,this.parser=M,this.handler=Object.assign({character:[],delimiter:[],macro:[],environment:[]},f)}return d.makeProcessor=function(h,f){return Array.isArray(h)?h:[h,f]},d._create=function(h,f){var m=this;f===void 0&&(f={});var T=f.priority||s.PrioritizedList.DEFAULTPRIORITY,Q=f.init?this.makeProcessor(f.init,T):null,_=f.config?this.makeProcessor(f.config,T):null,v=(f.preprocessors||[]).map(function(E){return m.makeProcessor(E,T)}),y=(f.postprocessors||[]).map(function(E){return m.makeProcessor(E,T)}),b=f.parser||"tex";return new d(h,f.handler||{},f.fallback||{},f.items||{},f.tags||{},f.options||{},f.nodes||{},v,y,Q,_,T,b)},d.create=function(h,f){f===void 0&&(f={});var m=d._create(h,f);return c.set(h,m),m},d.local=function(h){return h===void 0&&(h={}),d._create("",h)},Object.defineProperty(d.prototype,"init",{get:function(){return this.initMethod?this.initMethod[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"config",{get:function(){return this.configMethod?this.configMethod[0]:null},enumerable:!1,configurable:!0}),d}();t.Configuration=l;var c;(function(d){var h=new Map;d.set=function(f,m){h.set(f,m)},d.get=function(f){return h.get(f)},d.keys=function(){return h.keys()}})(c=t.ConfigurationHandler||(t.ConfigurationHandler={}));var u=function(){function d(h,f){var m,T,Q,_;f===void 0&&(f=["tex"]),this.initMethod=new o.FunctionList,this.configMethod=new o.FunctionList,this.configurations=new s.PrioritizedList,this.parsers=[],this.handlers=new i.SubHandlers,this.items={},this.tags={},this.options={},this.nodes={},this.parsers=f;try{for(var v=e(h.slice().reverse()),y=v.next();!y.done;y=v.next()){var b=y.value;this.addPackage(b)}}catch(A){m={error:A}}finally{try{y&&!y.done&&(T=v.return)&&T.call(v)}finally{if(m)throw m.error}}try{for(var E=e(this.configurations),x=E.next();!x.done;x=E.next()){var L=x.value,M=L.item,C=L.priority;this.append(M,C)}}catch(A){Q={error:A}}finally{try{x&&!x.done&&(_=E.return)&&_.call(E)}finally{if(Q)throw Q.error}}}return d.prototype.init=function(){this.initMethod.execute(this)},d.prototype.config=function(h){var f,m;this.configMethod.execute(this,h);try{for(var T=e(this.configurations),Q=T.next();!Q.done;Q=T.next()){var _=Q.value;this.addFilters(h,_.item)}}catch(v){f={error:v}}finally{try{Q&&!Q.done&&(m=T.return)&&m.call(T)}finally{if(f)throw f.error}}},d.prototype.addPackage=function(h){var f=typeof h=="string"?h:h[0],m=this.getPackage(f);m&&this.configurations.add(m,typeof h=="string"?m.priority:h[1])},d.prototype.add=function(h,f,m){var T,Q;m===void 0&&(m={});var _=this.getPackage(h);this.append(_),this.configurations.add(_,_.priority),this.init();var v=f.parseOptions;v.nodeFactory.setCreators(_.nodes);try{for(var y=e(Object.keys(_.items)),b=y.next();!b.done;b=y.next()){var E=b.value;v.itemFactory.setNodeClass(E,_.items[E])}}catch(x){T={error:x}}finally{try{b&&!b.done&&(Q=y.return)&&Q.call(y)}finally{if(T)throw T.error}}a.TagsFactory.addTags(_.tags),(0,r.defaultOptions)(v.options,_.options),(0,r.userOptions)(v.options,m),this.addFilters(f,_),_.config&&_.config(this,f)},d.prototype.getPackage=function(h){var f=c.get(h);if(f&&this.parsers.indexOf(f.parser)<0)throw Error("Package ".concat(h," doesn't target the proper parser"));return f},d.prototype.append=function(h,f){f=f||h.priority,h.initMethod&&this.initMethod.add(h.initMethod[0],h.initMethod[1]),h.configMethod&&this.configMethod.add(h.configMethod[0],h.configMethod[1]),this.handlers.add(h.handler,h.fallback,f),Object.assign(this.items,h.items),Object.assign(this.tags,h.tags),(0,r.defaultOptions)(this.options,h.options),Object.assign(this.nodes,h.nodes)},d.prototype.addFilters=function(h,f){var m,T,Q,_;try{for(var v=e(f.preprocessors),y=v.next();!y.done;y=v.next()){var b=n(y.value,2),E=b[0],x=b[1];h.preFilters.add(E,x)}}catch(I){m={error:I}}finally{try{y&&!y.done&&(T=v.return)&&T.call(v)}finally{if(m)throw m.error}}try{for(var L=e(f.postprocessors),M=L.next();!M.done;M=L.next()){var C=n(M.value,2),A=C[0],x=C[1];h.postFilters.add(A,x)}}catch(I){Q={error:I}}finally{try{M&&!M.done&&(_=L.return)&&_.call(L)}finally{if(Q)throw Q.error}}},d}();t.ParserConfiguration=u})(nn);var Na={},Lt={},mo={};Object.defineProperty(mo,"__esModule",{value:!0});mo.Macro=mo.Symbol=void 0;var j6t=function(){function t(e,n,r){this._symbol=e,this._char=n,this._attributes=r}return Object.defineProperty(t.prototype,"symbol",{get:function(){return this._symbol},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"char",{get:function(){return this._char},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){return this._attributes},enumerable:!1,configurable:!0}),t}();mo.Symbol=j6t;var W6t=function(){function t(e,n,r){r===void 0&&(r=[]),this._symbol=e,this._func=n,this._args=r}return Object.defineProperty(t.prototype,"symbol",{get:function(){return this._symbol},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"func",{get:function(){return this._func},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"args",{get:function(){return this._args},enumerable:!1,configurable:!0}),t}();mo.Macro=W6t;var S2=S&&S.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ds=S&&S.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},MV=S&&S.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},OV=S&&S.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},Z_=S&&S.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;rthis.maxrow&&(this.maxrow=this.row.length);var n="mtr",r=this.factory.configuration.tags.getTag();r&&(this.row=[r].concat(this.row),n="mlabeledtr"),this.factory.configuration.tags.clearTag();var i=this.create("node",n,this.row);this.table.push(i),this.row=[]},e.prototype.EndTable=function(){t.prototype.EndTable.call(this),this.factory.configuration.tags.end(),this.extendArray("columnalign",this.maxrow),this.extendArray("columnwidth",this.maxrow),this.extendArray("columnspacing",this.maxrow-1)},e.prototype.extendArray=function(n,r){if(this.arraydef[n]){var i=this.arraydef[n].split(/ /),o=Z_([],Su(i),!1);if(o.length>1){for(;o.length0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},u7=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pi,"__esModule",{value:!0});var sy=L5t(Et),it=u7(On),cr=u7(cn),d7=u7(Hr()),ay=Lr,Zn=u7(Rn()),kc=xt,IV=zs,kV=es,X_=Nc,C5t=or,ht={},A5t=1.2/.85,w5t={fontfamily:1,fontsize:1,fontweight:1,fontstyle:1,color:1,background:1,id:1,class:1,href:1,style:1};ht.Open=function(t,e){t.Push(t.itemFactory.create("open"))};ht.Close=function(t,e){t.Push(t.itemFactory.create("close"))};ht.Tilde=function(t,e){t.Push(t.create("token","mtext",{},X_.entities.nbsp))};ht.Space=function(t,e){};ht.Superscript=function(t,e){var n;t.GetNext().match(/\d/)&&(t.string=t.string.substr(0,t.i+1)+" "+t.string.substr(t.i+1));var r,i,o=t.stack.Top();o.isKind("prime")?(n=oy(o.Peek(2),2),i=n[0],r=n[1],t.stack.Pop()):(i=t.stack.Prev(),i||(i=t.create("token","mi",{},"")));var s=it.default.getProperty(i,"movesupsub"),a=it.default.isType(i,"msubsup")?i.sup:i.over;if(it.default.isType(i,"msubsup")&&!it.default.isType(i,"msup")&&it.default.getChildAt(i,i.sup)||it.default.isType(i,"munderover")&&!it.default.isType(i,"mover")&&it.default.getChildAt(i,i.over)&&!it.default.getProperty(i,"subsupOK"))throw new cr.default("DoubleExponent","Double exponent: use braces to clarify");(!it.default.isType(i,"msubsup")||it.default.isType(i,"msup"))&&(s?((!it.default.isType(i,"munderover")||it.default.isType(i,"mover")||it.default.getChildAt(i,i.over))&&(i=t.create("node","munderover",[i],{movesupsub:!0})),a=i.over):(i=t.create("node","msubsup",[i]),a=i.sup)),t.Push(t.itemFactory.create("subsup",i).setProperties({position:a,primes:r,movesupsub:s}))};ht.Subscript=function(t,e){var n;t.GetNext().match(/\d/)&&(t.string=t.string.substr(0,t.i+1)+" "+t.string.substr(t.i+1));var r,i,o=t.stack.Top();o.isKind("prime")?(n=oy(o.Peek(2),2),i=n[0],r=n[1],t.stack.Pop()):(i=t.stack.Prev(),i||(i=t.create("token","mi",{},"")));var s=it.default.getProperty(i,"movesupsub"),a=it.default.isType(i,"msubsup")?i.sub:i.under;if(it.default.isType(i,"msubsup")&&!it.default.isType(i,"msup")&&it.default.getChildAt(i,i.sub)||it.default.isType(i,"munderover")&&!it.default.isType(i,"mover")&&it.default.getChildAt(i,i.under)&&!it.default.getProperty(i,"subsupOK"))throw new cr.default("DoubleSubscripts","Double subscripts: use braces to clarify");(!it.default.isType(i,"msubsup")||it.default.isType(i,"msup"))&&(s?((!it.default.isType(i,"munderover")||it.default.isType(i,"mover")||it.default.getChildAt(i,i.under))&&(i=t.create("node","munderover",[i],{movesupsub:!0})),a=i.under):(i=t.create("node","msubsup",[i]),a=i.sub)),t.Push(t.itemFactory.create("subsup",i).setProperties({position:a,primes:r,movesupsub:s}))};ht.Prime=function(t,e){var n=t.stack.Prev();if(n||(n=t.create("node","mi")),it.default.isType(n,"msubsup")&&!it.default.isType(n,"msup")&&it.default.getChildAt(n,n.sup))throw new cr.default("DoubleExponentPrime","Prime causes double exponent: use braces to clarify");var r="";t.i--;do r+=X_.entities.prime,t.i++,e=t.GetNext();while(e==="'"||e===X_.entities.rsquo);r=["","′","″","‴","⁗"][r.length]||r;var i=t.create("token","mo",{variantForm:!0},r);t.Push(t.itemFactory.create("prime",n,i))};ht.Comment=function(t,e){for(;t.i0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},O5t=S&&S.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r1&&(d.autoOP=!1));var f=c.create("token","mi",d,u);c.Push(f)}t.variable=e;function n(c,u){var d,h=c.configuration.options.digits,f=c.string.slice(c.i-1).match(h),m=Hw.default.getFontDef(c);f?(d=c.create("token","mn",m,f[0].replace(/[{}]/g,"")),c.i+=f[0].length-1):d=c.create("token","mo",m,u),c.Push(d)}t.digit=n;function r(c,u){var d=c.GetCS();c.parse("macro",[c,d])}t.controlSequence=r;function i(c,u){var d=u.attributes||{mathvariant:rm.TexConstant.Variant.ITALIC},h=c.create("token","mi",d,u.char);c.Push(h)}t.mathchar0mi=i;function o(c,u){var d=u.attributes||{};d.stretchy=!1;var h=c.create("token","mo",d,u.char);R5t.default.setProperty(h,"fixStretchy",!0),c.configuration.addNode("fixStretchy",h),c.Push(h)}t.mathchar0mo=o;function s(c,u){var d=u.attributes||{mathvariant:rm.TexConstant.Variant.NORMAL};c.stack.env.font&&(d.mathvariant=c.stack.env.font);var h=c.create("token","mi",d,u.char);c.Push(h)}t.mathchar7=s;function a(c,u){var d=u.attributes||{};d=Object.assign({fence:!1,stretchy:!1},d);var h=c.create("token","mo",d,u.char);c.Push(h)}t.delimiter=a;function l(c,u,d,h){var f=h[0],m=c.itemFactory.create("begin").setProperties({name:u,end:f});m=d.apply(void 0,O5t([c,m],M5t(h.slice(1)),!1)),c.Push(m)}t.environment=l})(J_||(J_={}));yo.default=J_;var N5t=S&&S.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),D5t=S&&S.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),I5t=S&&S.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&N5t(e,t,n);return D5t(e,t),e},ly=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},bo=I5t(Lt),Je=Lr,cy=ly(pi),Za=ly(yo),k5t=ly(Rn()),Mt=xt,ti=es;new bo.RegExpMap("letter",Za.default.variable,/[a-z]/i);new bo.RegExpMap("digit",Za.default.digit,/[0-9.,]/);new bo.RegExpMap("command",Za.default.controlSequence,/^\\/);new bo.MacroMap("special",{"{":"Open","}":"Close","~":"Tilde","^":"Superscript",_:"Subscript"," ":"Space"," ":"Space","\r":"Space","\n":"Space","'":"Prime","%":"Comment","&":"Entry","#":"Hash"," ":"Space","’":"Prime"},cy.default);new bo.CharacterMap("mathchar0mi",Za.default.mathchar0mi,{alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ϵ",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigma:"σ",tau:"τ",upsilon:"υ",phi:"ϕ",chi:"χ",psi:"ψ",omega:"ω",varepsilon:"ε",vartheta:"ϑ",varpi:"ϖ",varrho:"ϱ",varsigma:"ς",varphi:"φ",S:["§",{mathvariant:Je.TexConstant.Variant.NORMAL}],aleph:["ℵ",{mathvariant:Je.TexConstant.Variant.NORMAL}],hbar:["ℏ",{variantForm:!0}],imath:"ı",jmath:"ȷ",ell:"ℓ",wp:["℘",{mathvariant:Je.TexConstant.Variant.NORMAL}],Re:["ℜ",{mathvariant:Je.TexConstant.Variant.NORMAL}],Im:["ℑ",{mathvariant:Je.TexConstant.Variant.NORMAL}],partial:["∂",{mathvariant:Je.TexConstant.Variant.ITALIC}],infty:["∞",{mathvariant:Je.TexConstant.Variant.NORMAL}],prime:["′",{variantForm:!0}],emptyset:["∅",{mathvariant:Je.TexConstant.Variant.NORMAL}],nabla:["∇",{mathvariant:Je.TexConstant.Variant.NORMAL}],top:["⊤",{mathvariant:Je.TexConstant.Variant.NORMAL}],bot:["⊥",{mathvariant:Je.TexConstant.Variant.NORMAL}],angle:["∠",{mathvariant:Je.TexConstant.Variant.NORMAL}],triangle:["△",{mathvariant:Je.TexConstant.Variant.NORMAL}],backslash:["∖",{mathvariant:Je.TexConstant.Variant.NORMAL}],forall:["∀",{mathvariant:Je.TexConstant.Variant.NORMAL}],exists:["∃",{mathvariant:Je.TexConstant.Variant.NORMAL}],neg:["¬",{mathvariant:Je.TexConstant.Variant.NORMAL}],lnot:["¬",{mathvariant:Je.TexConstant.Variant.NORMAL}],flat:["♭",{mathvariant:Je.TexConstant.Variant.NORMAL}],natural:["♮",{mathvariant:Je.TexConstant.Variant.NORMAL}],sharp:["♯",{mathvariant:Je.TexConstant.Variant.NORMAL}],clubsuit:["♣",{mathvariant:Je.TexConstant.Variant.NORMAL}],diamondsuit:["♢",{mathvariant:Je.TexConstant.Variant.NORMAL}],heartsuit:["♡",{mathvariant:Je.TexConstant.Variant.NORMAL}],spadesuit:["♠",{mathvariant:Je.TexConstant.Variant.NORMAL}]});new bo.CharacterMap("mathchar0mo",Za.default.mathchar0mo,{surd:"√",coprod:["∐",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigvee:["⋁",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigwedge:["⋀",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],biguplus:["⨄",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigcap:["⋂",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigcup:["⋃",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],int:["∫",{texClass:Mt.TEXCLASS.OP}],intop:["∫",{texClass:Mt.TEXCLASS.OP,movesupsub:!0,movablelimits:!0}],iint:["∬",{texClass:Mt.TEXCLASS.OP}],iiint:["∭",{texClass:Mt.TEXCLASS.OP}],prod:["∏",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],sum:["∑",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigotimes:["⨂",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigoplus:["⨁",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigodot:["⨀",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],oint:["∮",{texClass:Mt.TEXCLASS.OP}],bigsqcup:["⨆",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],smallint:["∫",{largeop:!1}],triangleleft:"◃",triangleright:"▹",bigtriangleup:"△",bigtriangledown:"▽",wedge:"∧",land:"∧",vee:"∨",lor:"∨",cap:"∩",cup:"∪",ddagger:"‡",dagger:"†",sqcap:"⊓",sqcup:"⊔",uplus:"⊎",amalg:"⨿",diamond:"⋄",bullet:"∙",wr:"≀",div:"÷",divsymbol:"÷",odot:["⊙",{largeop:!1}],oslash:["⊘",{largeop:!1}],otimes:["⊗",{largeop:!1}],ominus:["⊖",{largeop:!1}],oplus:["⊕",{largeop:!1}],mp:"∓",pm:"±",circ:"∘",bigcirc:"◯",setminus:"∖",cdot:"⋅",ast:"∗",times:"×",star:"⋆",propto:"∝",sqsubseteq:"⊑",sqsupseteq:"⊒",parallel:"∥",mid:"∣",dashv:"⊣",vdash:"⊢",leq:"≤",le:"≤",geq:"≥",ge:"≥",lt:"<",gt:">",succ:"≻",prec:"≺",approx:"≈",succeq:"⪰",preceq:"⪯",supset:"⊃",subset:"⊂",supseteq:"⊇",subseteq:"⊆",in:"∈",ni:"∋",notin:"∉",owns:"∋",gg:"≫",ll:"≪",sim:"∼",simeq:"≃",perp:"⊥",equiv:"≡",asymp:"≍",smile:"⌣",frown:"⌢",ne:"≠",neq:"≠",cong:"≅",doteq:"≐",bowtie:"⋈",models:"⊨",notChar:"⧸",Leftrightarrow:"⇔",Leftarrow:"⇐",Rightarrow:"⇒",leftrightarrow:"↔",leftarrow:"←",gets:"←",rightarrow:"→",to:["→",{accent:!1}],mapsto:"↦",leftharpoonup:"↼",leftharpoondown:"↽",rightharpoonup:"⇀",rightharpoondown:"⇁",nearrow:"↗",searrow:"↘",nwarrow:"↖",swarrow:"↙",rightleftharpoons:"⇌",hookrightarrow:"↪",hookleftarrow:"↩",longleftarrow:"⟵",Longleftarrow:"⟸",longrightarrow:"⟶",Longrightarrow:"⟹",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",ldots:"…",cdots:"⋯",vdots:"⋮",ddots:"⋱",dotsc:"…",dotsb:"⋯",dotsm:"⋯",dotsi:"⋯",dotso:"…",ldotp:[".",{texClass:Mt.TEXCLASS.PUNCT}],cdotp:["⋅",{texClass:Mt.TEXCLASS.PUNCT}],colon:[":",{texClass:Mt.TEXCLASS.PUNCT}]});new bo.CharacterMap("mathchar7",Za.default.mathchar7,{Gamma:"Γ",Delta:"Δ",Theta:"Θ",Lambda:"Λ",Xi:"Ξ",Pi:"Π",Sigma:"Σ",Upsilon:"Υ",Phi:"Φ",Psi:"Ψ",Omega:"Ω",_:"_","#":"#",$:"$","%":"%","&":"&",And:"&"});new bo.DelimiterMap("delimiter",Za.default.delimiter,{"(":"(",")":")","[":"[","]":"]","<":"⟨",">":"⟩","\\lt":"⟨","\\gt":"⟩","/":"/","|":["|",{texClass:Mt.TEXCLASS.ORD}],".":"","\\\\":"\\","\\lmoustache":"⎰","\\rmoustache":"⎱","\\lgroup":"⟮","\\rgroup":"⟯","\\arrowvert":"⏐","\\Arrowvert":"‖","\\bracevert":"⎪","\\Vert":["‖",{texClass:Mt.TEXCLASS.ORD}],"\\|":["‖",{texClass:Mt.TEXCLASS.ORD}],"\\vert":["|",{texClass:Mt.TEXCLASS.ORD}],"\\uparrow":"↑","\\downarrow":"↓","\\updownarrow":"↕","\\Uparrow":"⇑","\\Downarrow":"⇓","\\Updownarrow":"⇕","\\backslash":"\\","\\rangle":"⟩","\\langle":"⟨","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"⌉","\\lceil":"⌈","\\rfloor":"⌋","\\lfloor":"⌊","\\lbrack":"[","\\rbrack":"]"});new bo.CommandMap("macros",{displaystyle:["SetStyle","D",!0,0],textstyle:["SetStyle","T",!1,0],scriptstyle:["SetStyle","S",!1,1],scriptscriptstyle:["SetStyle","SS",!1,2],rm:["SetFont",Je.TexConstant.Variant.NORMAL],mit:["SetFont",Je.TexConstant.Variant.ITALIC],oldstyle:["SetFont",Je.TexConstant.Variant.OLDSTYLE],cal:["SetFont",Je.TexConstant.Variant.CALLIGRAPHIC],it:["SetFont",Je.TexConstant.Variant.MATHITALIC],bf:["SetFont",Je.TexConstant.Variant.BOLD],bbFont:["SetFont",Je.TexConstant.Variant.DOUBLESTRUCK],scr:["SetFont",Je.TexConstant.Variant.SCRIPT],frak:["SetFont",Je.TexConstant.Variant.FRAKTUR],sf:["SetFont",Je.TexConstant.Variant.SANSSERIF],tt:["SetFont",Je.TexConstant.Variant.MONOSPACE],mathrm:["MathFont",Je.TexConstant.Variant.NORMAL],mathup:["MathFont",Je.TexConstant.Variant.NORMAL],mathnormal:["MathFont",""],mathbf:["MathFont",Je.TexConstant.Variant.BOLD],mathbfup:["MathFont",Je.TexConstant.Variant.BOLD],mathit:["MathFont",Je.TexConstant.Variant.MATHITALIC],mathbfit:["MathFont",Je.TexConstant.Variant.BOLDITALIC],mathbb:["MathFont",Je.TexConstant.Variant.DOUBLESTRUCK],Bbb:["MathFont",Je.TexConstant.Variant.DOUBLESTRUCK],mathfrak:["MathFont",Je.TexConstant.Variant.FRAKTUR],mathbffrak:["MathFont",Je.TexConstant.Variant.BOLDFRAKTUR],mathscr:["MathFont",Je.TexConstant.Variant.SCRIPT],mathbfscr:["MathFont",Je.TexConstant.Variant.BOLDSCRIPT],mathsf:["MathFont",Je.TexConstant.Variant.SANSSERIF],mathsfup:["MathFont",Je.TexConstant.Variant.SANSSERIF],mathbfsf:["MathFont",Je.TexConstant.Variant.BOLDSANSSERIF],mathbfsfup:["MathFont",Je.TexConstant.Variant.BOLDSANSSERIF],mathsfit:["MathFont",Je.TexConstant.Variant.SANSSERIFITALIC],mathbfsfit:["MathFont",Je.TexConstant.Variant.SANSSERIFBOLDITALIC],mathtt:["MathFont",Je.TexConstant.Variant.MONOSPACE],mathcal:["MathFont",Je.TexConstant.Variant.CALLIGRAPHIC],mathbfcal:["MathFont",Je.TexConstant.Variant.BOLDCALLIGRAPHIC],symrm:["MathFont",Je.TexConstant.Variant.NORMAL],symup:["MathFont",Je.TexConstant.Variant.NORMAL],symnormal:["MathFont",""],symbf:["MathFont",Je.TexConstant.Variant.BOLD],symbfup:["MathFont",Je.TexConstant.Variant.BOLD],symit:["MathFont",Je.TexConstant.Variant.ITALIC],symbfit:["MathFont",Je.TexConstant.Variant.BOLDITALIC],symbb:["MathFont",Je.TexConstant.Variant.DOUBLESTRUCK],symfrak:["MathFont",Je.TexConstant.Variant.FRAKTUR],symbffrak:["MathFont",Je.TexConstant.Variant.BOLDFRAKTUR],symscr:["MathFont",Je.TexConstant.Variant.SCRIPT],symbfscr:["MathFont",Je.TexConstant.Variant.BOLDSCRIPT],symsf:["MathFont",Je.TexConstant.Variant.SANSSERIF],symsfup:["MathFont",Je.TexConstant.Variant.SANSSERIF],symbfsf:["MathFont",Je.TexConstant.Variant.BOLDSANSSERIF],symbfsfup:["MathFont",Je.TexConstant.Variant.BOLDSANSSERIF],symsfit:["MathFont",Je.TexConstant.Variant.SANSSERIFITALIC],symbfsfit:["MathFont",Je.TexConstant.Variant.SANSSERIFBOLDITALIC],symtt:["MathFont",Je.TexConstant.Variant.MONOSPACE],symcal:["MathFont",Je.TexConstant.Variant.CALLIGRAPHIC],symbfcal:["MathFont",Je.TexConstant.Variant.BOLDCALLIGRAPHIC],textrm:["HBox",null,Je.TexConstant.Variant.NORMAL],textup:["HBox",null,Je.TexConstant.Variant.NORMAL],textnormal:["HBox"],textit:["HBox",null,Je.TexConstant.Variant.ITALIC],textbf:["HBox",null,Je.TexConstant.Variant.BOLD],textsf:["HBox",null,Je.TexConstant.Variant.SANSSERIF],texttt:["HBox",null,Je.TexConstant.Variant.MONOSPACE],tiny:["SetSize",.5],Tiny:["SetSize",.6],scriptsize:["SetSize",.7],small:["SetSize",.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],arcsin:"NamedFn",arccos:"NamedFn",arctan:"NamedFn",arg:"NamedFn",cos:"NamedFn",cosh:"NamedFn",cot:"NamedFn",coth:"NamedFn",csc:"NamedFn",deg:"NamedFn",det:"NamedOp",dim:"NamedFn",exp:"NamedFn",gcd:"NamedOp",hom:"NamedFn",inf:"NamedOp",ker:"NamedFn",lg:"NamedFn",lim:"NamedOp",liminf:["NamedOp","lim inf"],limsup:["NamedOp","lim sup"],ln:"NamedFn",log:"NamedFn",max:"NamedOp",min:"NamedOp",Pr:"NamedOp",sec:"NamedFn",sin:"NamedFn",sinh:"NamedFn",sup:"NamedOp",tan:"NamedFn",tanh:"NamedFn",limits:["Limits",1],nolimits:["Limits",0],overline:["UnderOver","2015"],underline:["UnderOver","2015"],overbrace:["UnderOver","23DE",1],underbrace:["UnderOver","23DF",1],overparen:["UnderOver","23DC"],underparen:["UnderOver","23DD"],overrightarrow:["UnderOver","2192"],underrightarrow:["UnderOver","2192"],overleftarrow:["UnderOver","2190"],underleftarrow:["UnderOver","2190"],overleftrightarrow:["UnderOver","2194"],underleftrightarrow:["UnderOver","2194"],overset:"Overset",underset:"Underset",overunderset:"Overunderset",stackrel:["Macro","\\mathrel{\\mathop{#2}\\limits^{#1}}",2],stackbin:["Macro","\\mathbin{\\mathop{#2}\\limits^{#1}}",2],over:"Over",overwithdelims:"Over",atop:"Over",atopwithdelims:"Over",above:"Over",abovewithdelims:"Over",brace:["Over","{","}"],brack:["Over","[","]"],choose:["Over","(",")"],frac:"Frac",sqrt:"Sqrt",root:"Root",uproot:["MoveRoot","upRoot"],leftroot:["MoveRoot","leftRoot"],left:"LeftRight",right:"LeftRight",middle:"LeftRight",llap:"Lap",rlap:"Lap",raise:"RaiseLower",lower:"RaiseLower",moveleft:"MoveLeftRight",moveright:"MoveLeftRight",",":["Spacer",ti.MATHSPACE.thinmathspace],":":["Spacer",ti.MATHSPACE.mediummathspace],">":["Spacer",ti.MATHSPACE.mediummathspace],";":["Spacer",ti.MATHSPACE.thickmathspace],"!":["Spacer",ti.MATHSPACE.negativethinmathspace],enspace:["Spacer",.5],quad:["Spacer",1],qquad:["Spacer",2],thinspace:["Spacer",ti.MATHSPACE.thinmathspace],negthinspace:["Spacer",ti.MATHSPACE.negativethinmathspace],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip",mspace:"Hskip",mkern:"Hskip",rule:"rule",Rule:["Rule"],Space:["Rule","blank"],nonscript:"Nonscript",big:["MakeBig",Mt.TEXCLASS.ORD,.85],Big:["MakeBig",Mt.TEXCLASS.ORD,1.15],bigg:["MakeBig",Mt.TEXCLASS.ORD,1.45],Bigg:["MakeBig",Mt.TEXCLASS.ORD,1.75],bigl:["MakeBig",Mt.TEXCLASS.OPEN,.85],Bigl:["MakeBig",Mt.TEXCLASS.OPEN,1.15],biggl:["MakeBig",Mt.TEXCLASS.OPEN,1.45],Biggl:["MakeBig",Mt.TEXCLASS.OPEN,1.75],bigr:["MakeBig",Mt.TEXCLASS.CLOSE,.85],Bigr:["MakeBig",Mt.TEXCLASS.CLOSE,1.15],biggr:["MakeBig",Mt.TEXCLASS.CLOSE,1.45],Biggr:["MakeBig",Mt.TEXCLASS.CLOSE,1.75],bigm:["MakeBig",Mt.TEXCLASS.REL,.85],Bigm:["MakeBig",Mt.TEXCLASS.REL,1.15],biggm:["MakeBig",Mt.TEXCLASS.REL,1.45],Biggm:["MakeBig",Mt.TEXCLASS.REL,1.75],mathord:["TeXAtom",Mt.TEXCLASS.ORD],mathop:["TeXAtom",Mt.TEXCLASS.OP],mathopen:["TeXAtom",Mt.TEXCLASS.OPEN],mathclose:["TeXAtom",Mt.TEXCLASS.CLOSE],mathbin:["TeXAtom",Mt.TEXCLASS.BIN],mathrel:["TeXAtom",Mt.TEXCLASS.REL],mathpunct:["TeXAtom",Mt.TEXCLASS.PUNCT],mathinner:["TeXAtom",Mt.TEXCLASS.INNER],vcenter:["TeXAtom",Mt.TEXCLASS.VCENTER],buildrel:"BuildRel",hbox:["HBox",0],text:"HBox",mbox:["HBox",0],fbox:"FBox",boxed:["Macro","\\fbox{$\\displaystyle{#1}$}",1],framebox:"FrameBox",strut:"Strut",mathstrut:["Macro","\\vphantom{(}"],phantom:"Phantom",vphantom:["Phantom",1,0],hphantom:["Phantom",0,1],smash:"Smash",acute:["Accent","00B4"],grave:["Accent","0060"],ddot:["Accent","00A8"],tilde:["Accent","007E"],bar:["Accent","00AF"],breve:["Accent","02D8"],check:["Accent","02C7"],hat:["Accent","005E"],vec:["Accent","2192"],dot:["Accent","02D9"],widetilde:["Accent","007E",1],widehat:["Accent","005E",1],matrix:"Matrix",array:"Matrix",pmatrix:["Matrix","(",")"],cases:["Matrix","{","","left left",null,".1em",null,!0],eqalign:["Matrix",null,null,"right left",(0,ti.em)(ti.MATHSPACE.thickmathspace),".5em","D"],displaylines:["Matrix",null,null,"center",null,".5em","D"],cr:"Cr","\\":"CrLaTeX",newline:["CrLaTeX",!0],hline:["HLine","solid"],hdashline:["HLine","dashed"],eqalignno:["Matrix",null,null,"right left",(0,ti.em)(ti.MATHSPACE.thickmathspace),".5em","D",null,"right"],leqalignno:["Matrix",null,null,"right left",(0,ti.em)(ti.MATHSPACE.thickmathspace),".5em","D",null,"left"],hfill:"HFill",hfil:"HFill",hfilll:"HFill",bmod:["Macro",'\\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}'],pmod:["Macro","\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:["Macro","\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:["Macro","\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:["Macro","\\;\\Longleftrightarrow\\;"],skew:["Macro","{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],pmb:["Macro","\\rlap{#1}\\kern1px{#1}",1],TeX:["Macro","T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:["Macro","L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"]," ":["Macro","\\text{ }"],not:"Not",dots:"Dots",space:"Tilde"," ":"Tilde",begin:"BeginEnd",end:"BeginEnd",label:"HandleLabel",ref:"HandleRef",nonumber:"HandleNoTag",mathchoice:"MathChoice",mmlToken:"MmlToken"},cy.default);new bo.EnvironmentMap("environment",Za.default.environment,{array:["AlignedArray"],equation:["Equation",null,!0],eqnarray:["EqnArray",null,!0,!0,"rcl",k5t.default.cols(0,ti.MATHSPACE.thickmathspace),".5em"]},cy.default);new bo.CharacterMap("not_remap",null,{"←":"↚","→":"↛","↔":"↮","⇐":"⇍","⇒":"⇏","⇔":"⇎","∈":"∉","∋":"∌","∣":"∤","∥":"∦","∼":"≁","~":"≁","≃":"≄","≅":"≇","≈":"≉","≍":"≭","=":"≠","≡":"≢","<":"≮",">":"≯","≤":"≰","≥":"≱","≲":"≴","≳":"≵","≶":"≸","≷":"≹","≺":"⊀","≻":"⊁","⊂":"⊄","⊃":"⊅","⊆":"⊈","⊇":"⊉","⊢":"⊬","⊨":"⊭","⊩":"⊮","⊫":"⊯","≼":"⋠","≽":"⋡","⊑":"⋢","⊒":"⋣","⊲":"⋪","⊳":"⋫","⊴":"⋬","⊵":"⋭","∃":"∄"});var P5t=S&&S.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),H5t=S&&S.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),V5t=S&&S.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),B5t=S&&S.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&H5t(e,t,n);return V5t(e,t),e},F5t=S&&S.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},VV=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},In;Object.defineProperty(Na,"__esModule",{value:!0});Na.BaseConfiguration=Na.BaseTags=Na.Other=void 0;var $5t=nn,U5t=Q0,BV=VV(cn),G5t=VV(On),q5t=Lt,Rt=B5t(Et),z5t=zs,j5t=Jv;new q5t.CharacterMap("remap",null,{"-":"−","*":"∗","`":"‘"});function FV(t,e){var n=t.stack.env.font,r=n?{mathvariant:t.stack.env.font}:{},i=U5t.MapHandler.getMap("remap").lookup(e),o=(0,j5t.getRange)(e),s=o?o[3]:"mo",a=t.create("token",s,r,i?i.char:e);o[4]&&a.attributes.set("mathvariant",o[4]),s==="mo"&&(G5t.default.setProperty(a,"fixStretchy",!0),t.configuration.addNode("fixStretchy",a)),t.Push(a)}Na.Other=FV;function W5t(t,e){throw new BV.default("UndefinedControlSequence","Undefined control sequence %1","\\"+e)}function Y5t(t,e){throw new BV.default("UnknownEnv","Unknown environment '%1'",e)}function K5t(t){var e,n,r=t.data;try{for(var i=F5t(r.getList("nonscript")),o=i.next();!o.done;o=i.next()){var s=o.value;if(s.attributes.get("scriptlevel")>0){var a=s.parent;if(a.childNodes.splice(a.childIndex(s),1),r.removeFromList(s.kind,[s]),s.isKind("mrow")){var l=s.childNodes[0];r.removeFromList("mstyle",[l]),r.removeFromList("mspace",l.childNodes[0].childNodes)}}else s.isKind("mrow")&&(s.parent.replaceChild(s.childNodes[0],s),r.removeFromList("mrow",[s]))}}catch(c){e={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}}var $V=function(t){P5t(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(z5t.AbstractTags);Na.BaseTags=$V;Na.BaseConfiguration=$5t.Configuration.create("base",{handler:{character:["command","special","letter","digit"],delimiter:["delimiter"],macro:["delimiter","macros","mathchar0mi","mathchar0mo","mathchar7"],environment:["environment"]},fallback:{character:FV,macro:W5t,environment:Y5t},items:(In={},In[Rt.StartItem.prototype.kind]=Rt.StartItem,In[Rt.StopItem.prototype.kind]=Rt.StopItem,In[Rt.OpenItem.prototype.kind]=Rt.OpenItem,In[Rt.CloseItem.prototype.kind]=Rt.CloseItem,In[Rt.PrimeItem.prototype.kind]=Rt.PrimeItem,In[Rt.SubsupItem.prototype.kind]=Rt.SubsupItem,In[Rt.OverItem.prototype.kind]=Rt.OverItem,In[Rt.LeftItem.prototype.kind]=Rt.LeftItem,In[Rt.Middle.prototype.kind]=Rt.Middle,In[Rt.RightItem.prototype.kind]=Rt.RightItem,In[Rt.BeginItem.prototype.kind]=Rt.BeginItem,In[Rt.EndItem.prototype.kind]=Rt.EndItem,In[Rt.StyleItem.prototype.kind]=Rt.StyleItem,In[Rt.PositionItem.prototype.kind]=Rt.PositionItem,In[Rt.CellItem.prototype.kind]=Rt.CellItem,In[Rt.MmlItem.prototype.kind]=Rt.MmlItem,In[Rt.FnItem.prototype.kind]=Rt.FnItem,In[Rt.NotItem.prototype.kind]=Rt.NotItem,In[Rt.NonscriptItem.prototype.kind]=Rt.NonscriptItem,In[Rt.DotsItem.prototype.kind]=Rt.DotsItem,In[Rt.ArrayItem.prototype.kind]=Rt.ArrayItem,In[Rt.EqnArrayItem.prototype.kind]=Rt.EqnArrayItem,In[Rt.EquationItem.prototype.kind]=Rt.EquationItem,In),options:{maxMacros:1e3,baseURL:typeof document>"u"||document.getElementsByTagName("base").length===0?"":String(document.location).replace(/#.*$/,"")},tags:{base:$V},postprocessors:[[K5t,-4]]});var Z5t=S&&S.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lu=S&&S.__assign||function(){return Lu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},y0=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i7,"__esModule",{value:!0});i7.TeX=void 0;var Vw=_0,Bw=or,Fw=o7,B2=y0(Xv),$w=y0(On),J5t=y0(Hr()),eut=y0(cn),tut=y0(c7),S6=zs,nut=nn,rut=function(t){Z5t(e,t);function e(n){n===void 0&&(n={});var r=this,i=X5t((0,Bw.separateOptions)(n,e.OPTIONS,Fw.FindTeX.OPTIONS),3),o=i[0],s=i[1],a=i[2];r=t.call(this,s)||this,r.findTeX=r.options.FindTeX||new Fw.FindTeX(a);var l=r.options.packages,c=r.configuration=e.configure(l),u=r._parseOptions=new tut.default(c,[r.options,S6.TagsFactory.OPTIONS]);return(0,Bw.userOptions)(u.options,o),c.config(r),e.tags(u,c),r.postFilters.add(B2.default.cleanSubSup,-6),r.postFilters.add(B2.default.setInherited,-5),r.postFilters.add(B2.default.moveLimits,-4),r.postFilters.add(B2.default.cleanStretchy,-3),r.postFilters.add(B2.default.cleanAttributes,-2),r.postFilters.add(B2.default.combineRelations,-1),r}return e.configure=function(n){var r=new nut.ParserConfiguration(n,["tex"]);return r.init(),r},e.tags=function(n,r){S6.TagsFactory.addTags(r.tags),S6.TagsFactory.setDefault(n.options.tags),n.tags=S6.TagsFactory.getDefault(),n.tags.configuration=n},e.prototype.setMmlFactory=function(n){t.prototype.setMmlFactory.call(this,n),this._parseOptions.nodeFactory.setMmlFactory(n)},Object.defineProperty(e.prototype,"parseOptions",{get:function(){return this._parseOptions},enumerable:!1,configurable:!0}),e.prototype.reset=function(n){n===void 0&&(n=0),this.parseOptions.tags.reset(n)},e.prototype.compile=function(n,r){this.parseOptions.clear(),this.executeFilters(this.preFilters,n,r,this.parseOptions);var i=n.display;this.latex=n.math;var o;this.parseOptions.tags.startEquation(n);var s;try{var a=new J5t.default(this.latex,{display:i,isInner:!1},this.parseOptions);o=a.mml(),s=a.stack.global}catch(l){if(!(l instanceof eut.default))throw l;this.parseOptions.error=!0,o=this.options.formatError(this,l)}return o=this.parseOptions.nodeFactory.create("node","math",[o]),s!=null&&s.indentalign&&$w.default.setAttribute(o,"indentalign",s.indentalign),i&&$w.default.setAttribute(o,"display","block"),this.parseOptions.tags.finishEquation(n),this.parseOptions.root=o,this.executeFilters(this.postFilters,n,r,this.parseOptions),this.mathNode=this.parseOptions.root,this.mathNode},e.prototype.findMath=function(n){return this.findTeX.findMath(n)},e.prototype.formatError=function(n){var r=n.message.replace(/\n.*/,"");return this.parseOptions.nodeFactory.create("error",r,n.id,this.latex)},e.NAME="TeX",e.OPTIONS=Lu(Lu({},Vw.AbstractInputJax.OPTIONS),{FindTeX:null,packages:["base"],digits:/^(?:[0-9]+(?:\{,\}[0-9]{3})*(?:\.[0-9]*)?|\.[0-9]+)/,maxBuffer:5*1024,formatError:function(n,r){return n.formatError(r)}}),e}(Vw.AbstractInputJax);i7.TeX=rut;var im={},f7={},b0={};Object.defineProperty(b0,"__esModule",{value:!0});b0.AbstractOutputJax=void 0;var Uw=or,iut=b2,out=function(){function t(e){e===void 0&&(e={}),this.adaptor=null;var n=this.constructor;this.options=(0,Uw.userOptions)((0,Uw.defaultOptions)({},n.OPTIONS),e),this.postFilters=new iut.FunctionList}return Object.defineProperty(t.prototype,"name",{get:function(){return this.constructor.NAME},enumerable:!1,configurable:!0}),t.prototype.setAdaptor=function(e){this.adaptor=e},t.prototype.initialize=function(){},t.prototype.reset=function(){},t.prototype.getMetrics=function(e){},t.prototype.styleSheet=function(e){return null},t.prototype.pageElements=function(e){return null},t.prototype.executeFilters=function(e,n,r,i){var o={math:n,document:r,data:i};return e.execute(o),o.data},t.NAME="generic",t.OPTIONS={},t}();b0.AbstractOutputJax=out;var Pc={},Ki=S&&S.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},uy=S&&S.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},sut=S&&S.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r1;)e.shift(),n.push(e.shift());return n}function C6(t){var e,n,r=dy(this.styles[t]);r.length===0&&r.push(""),r.length===1&&r.push(r[0]),r.length===2&&r.push(r[0]),r.length===3&&r.push(r[1]);try{for(var i=Ki(Xa.connect[t].children),o=i.next();!o.done;o=i.next()){var s=o.value;this.setStyle(this.childName(t,s),r.shift())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}}function aut(t){var e,n,r=Xa.connect[t].children,i=[];try{for(var o=Ki(r),s=o.next();!s.done;s=o.next()){var a=s.value,l=this.styles[t+"-"+a];if(!l){delete this.styles[t];return}i.push(l)}}catch(c){e={error:c}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}i[3]===i[1]&&(i.pop(),i[2]===i[0]&&(i.pop(),i[1]===i[0]&&i.pop())),this.styles[t]=i.join(" ")}function lut(t){var e,n;try{for(var r=Ki(Xa.connect[t].children),i=r.next();!i.done;i=r.next()){var o=i.value;this.setStyle(this.childName(t,o),this.styles[t])}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}function cut(t){var e,n,r=sut([],uy(Xa.connect[t].children),!1),i=this.styles[this.childName(t,r.shift())];try{for(var o=Ki(r),s=o.next();!s.done;s=o.next()){var a=s.value;if(this.styles[this.childName(t,a)]!==i){delete this.styles[t];return}}}catch(l){e={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}this.styles[t]=i}var Gw={width:/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,style:/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/};function A6(t){var e,n,r,i,o={width:"",style:"",color:""};try{for(var s=Ki(dy(this.styles[t])),a=s.next();!a.done;a=s.next()){var l=a.value;l.match(Gw.width)&&o.width===""?o.width=l:l.match(Gw.style)&&o.style===""?o.style=l:o.color=l}}catch(h){e={error:h}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}try{for(var c=Ki(Xa.connect[t].children),u=c.next();!u.done;u=c.next()){var d=u.value;this.setStyle(this.childName(t,d),o[d])}}catch(h){r={error:h}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}}function w6(t){var e,n,r=[];try{for(var i=Ki(Xa.connect[t].children),o=i.next();!o.done;o=i.next()){var s=o.value,a=this.styles[this.childName(t,s)];a&&r.push(a)}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}r.length?this.styles[t]=r.join(" "):delete this.styles[t]}var qw={style:/^(?:normal|italic|oblique|inherit|initial|unset)$/,variant:new RegExp("^(?:"+["normal|none","inherit|initial|unset","common-ligatures|no-common-ligatures","discretionary-ligatures|no-discretionary-ligatures","historical-ligatures|no-historical-ligatures","contextual|no-contextual","(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)","small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","lining-nums|oldstyle-nums|proportional-nums|tabular-nums","diagonal-fractions|stacked-fractions","ordinal|slashed-zero","jis78|jis83|jis90|jis04|simplified|traditional","full-width|proportional-width","ruby"].join("|")+")$"),weight:/^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,stretch:new RegExp("^(?:"+["normal","(?:(?:ultra|extra|semi)-)?condensed","(?:(?:semi|extra|ulta)-)?expanded","inherit|initial|unset"].join("|")+")$"),size:new RegExp("^(?:"+["xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller","[d.]+%|[d.]+[a-z]+","inherit|initial|unset"].join("|")+")(?:/(?:normal|[d.+](?:%|[a-z]+)?))?$")};function uut(t){var e,n,r,i,o=dy(this.styles[t]),s={style:"",variant:[],weight:"",stretch:"",size:"",family:"","line-height":""};try{for(var a=Ki(o),l=a.next();!l.done;l=a.next()){var c=l.value;s.family=c;try{for(var u=(r=void 0,Ki(Object.keys(qw))),d=u.next();!d.done;d=u.next()){var h=d.value;if((Array.isArray(s[h])||s[h]==="")&&c.match(qw[h]))if(h==="size"){var f=uy(c.split(/\//),2),m=f[0],T=f[1];s[h]=m,T&&(s["line-height"]=T)}else s.size===""&&(Array.isArray(s[h])?s[h].push(c):s[h]=c)}}catch(Q){r={error:Q}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}}catch(Q){e={error:Q}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}dut(t,s),delete this.styles[t]}function dut(t,e){var n,r;try{for(var i=Ki(Xa.connect[t].children),o=i.next();!o.done;o=i.next()){var s=o.value,a=this.childName(t,s);if(Array.isArray(e[s])){var l=e[s];l.length&&(this.styles[a]=l.join(" "))}else e[s]!==""&&(this.styles[a]=e[s])}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function fut(t){}var Xa=function(){function t(e){e===void 0&&(e=""),this.parse(e)}return Object.defineProperty(t.prototype,"cssText",{get:function(){var e,n,r=[];try{for(var i=Ki(Object.keys(this.styles)),o=i.next();!o.done;o=i.next()){var s=o.value,a=this.parentName(s);this.styles[a]||r.push(s+": "+this.styles[s]+";")}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r.join(" ")},enumerable:!1,configurable:!0}),t.prototype.set=function(e,n){for(e=this.normalizeName(e),this.setStyle(e,n),t.connect[e]&&!t.connect[e].combine&&(this.combineChildren(e),delete this.styles[e]);e.match(/-/)&&(e=this.parentName(e),!!t.connect[e]);)t.connect[e].combine.call(this,e)},t.prototype.get=function(e){return e=this.normalizeName(e),this.styles.hasOwnProperty(e)?this.styles[e]:""},t.prototype.setStyle=function(e,n){this.styles[e]=n,t.connect[e]&&t.connect[e].children&&t.connect[e].split.call(this,e),n===""&&delete this.styles[e]},t.prototype.combineChildren=function(e){var n,r,i=this.parentName(e);try{for(var o=Ki(t.connect[e].children),s=o.next();!s.done;s=o.next()){var a=s.value,l=this.childName(i,a);t.connect[l].combine.call(this,l)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.parentName=function(e){var n=e.replace(/-[^-]*$/,"");return e===n?"":n},t.prototype.childName=function(e,n){return n.match(/-/)?n:(t.connect[e]&&!t.connect[e].combine&&(n+=e.replace(/.*-/,"-"),e=this.parentName(e)),e+"-"+n)},t.prototype.normalizeName=function(e){return e.replace(/[A-Z]/g,function(n){return"-"+n.toLowerCase()})},t.prototype.parse=function(e){e===void 0&&(e="");var n=this.constructor.pattern;this.styles={};for(var r=e.replace(n.comment,"").split(n.style);r.length>1;){var i=uy(r.splice(0,3),3),o=i[0],s=i[1],a=i[2];if(o.match(/[^\s\n]/))return;this.set(s,a)}},t.pattern={style:/([-a-z]+)[\s\n]*:[\s\n]*((?:'[^']*'|"[^"]*"|\n|.)*?)[\s\n]*(?:;|$)/g,comment:/\/\*[^]*?\*\//g},t.connect={padding:{children:l3,split:C6,combine:aut},border:{children:l3,split:lut,combine:cut},"border-top":{children:L6,split:A6,combine:w6},"border-right":{children:L6,split:A6,combine:w6},"border-bottom":{children:L6,split:A6,combine:w6},"border-left":{children:L6,split:A6,combine:w6},"border-width":{children:l3,split:C6,combine:null},"border-style":{children:l3,split:C6,combine:null},"border-color":{children:l3,split:C6,combine:null},font:{children:["style","variant","weight","stretch","line-height","size","family"],split:uut,combine:fut}},t}();Pc.Styles=Xa;var p7={},M6=S&&S.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(p7,"__esModule",{value:!0});p7.CssStyles=void 0;var put=function(){function t(e){e===void 0&&(e=null),this.styles={},this.addStyles(e)}return Object.defineProperty(t.prototype,"cssText",{get:function(){return this.getStyleString()},enumerable:!1,configurable:!0}),t.prototype.addStyles=function(e){var n,r;if(e)try{for(var i=M6(Object.keys(e)),o=i.next();!o.done;o=i.next()){var s=o.value;this.styles[s]||(this.styles[s]={}),Object.assign(this.styles[s],e[s])}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.removeStyles=function(){for(var e,n,r=[],i=0;i0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},O5t=S&&S.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r1&&(d.autoOP=!1));var f=c.create("token","mi",d,u);c.Push(f)}t.variable=e;function n(c,u){var d,h=c.configuration.options.digits,f=c.string.slice(c.i-1).match(h),m=Hw.default.getFontDef(c);f?(d=c.create("token","mn",m,f[0].replace(/[{}]/g,"")),c.i+=f[0].length-1):d=c.create("token","mo",m,u),c.Push(d)}t.digit=n;function r(c,u){var d=c.GetCS();c.parse("macro",[c,d])}t.controlSequence=r;function i(c,u){var d=u.attributes||{mathvariant:rm.TexConstant.Variant.ITALIC},h=c.create("token","mi",d,u.char);c.Push(h)}t.mathchar0mi=i;function o(c,u){var d=u.attributes||{};d.stretchy=!1;var h=c.create("token","mo",d,u.char);R5t.default.setProperty(h,"fixStretchy",!0),c.configuration.addNode("fixStretchy",h),c.Push(h)}t.mathchar0mo=o;function s(c,u){var d=u.attributes||{mathvariant:rm.TexConstant.Variant.NORMAL};c.stack.env.font&&(d.mathvariant=c.stack.env.font);var h=c.create("token","mi",d,u.char);c.Push(h)}t.mathchar7=s;function a(c,u){var d=u.attributes||{};d=Object.assign({fence:!1,stretchy:!1},d);var h=c.create("token","mo",d,u.char);c.Push(h)}t.delimiter=a;function l(c,u,d,h){var f=h[0],m=c.itemFactory.create("begin").setProperties({name:u,end:f});m=d.apply(void 0,O5t([c,m],M5t(h.slice(1)),!1)),c.Push(m)}t.environment=l})(J_||(J_={}));yo.default=J_;var N5t=S&&S.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),D5t=S&&S.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),I5t=S&&S.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&N5t(e,t,n);return D5t(e,t),e},ly=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},bo=I5t(Lt),et=Lr,cy=ly(pi),Za=ly(yo),k5t=ly(Rn()),Mt=xt,ti=es;new bo.RegExpMap("letter",Za.default.variable,/[a-z]/i);new bo.RegExpMap("digit",Za.default.digit,/[0-9.,]/);new bo.RegExpMap("command",Za.default.controlSequence,/^\\/);new bo.MacroMap("special",{"{":"Open","}":"Close","~":"Tilde","^":"Superscript",_:"Subscript"," ":"Space"," ":"Space","\r":"Space","\n":"Space","'":"Prime","%":"Comment","&":"Entry","#":"Hash"," ":"Space","’":"Prime"},cy.default);new bo.CharacterMap("mathchar0mi",Za.default.mathchar0mi,{alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ϵ",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigma:"σ",tau:"τ",upsilon:"υ",phi:"ϕ",chi:"χ",psi:"ψ",omega:"ω",varepsilon:"ε",vartheta:"ϑ",varpi:"ϖ",varrho:"ϱ",varsigma:"ς",varphi:"φ",S:["§",{mathvariant:et.TexConstant.Variant.NORMAL}],aleph:["ℵ",{mathvariant:et.TexConstant.Variant.NORMAL}],hbar:["ℏ",{variantForm:!0}],imath:"ı",jmath:"ȷ",ell:"ℓ",wp:["℘",{mathvariant:et.TexConstant.Variant.NORMAL}],Re:["ℜ",{mathvariant:et.TexConstant.Variant.NORMAL}],Im:["ℑ",{mathvariant:et.TexConstant.Variant.NORMAL}],partial:["∂",{mathvariant:et.TexConstant.Variant.ITALIC}],infty:["∞",{mathvariant:et.TexConstant.Variant.NORMAL}],prime:["′",{variantForm:!0}],emptyset:["∅",{mathvariant:et.TexConstant.Variant.NORMAL}],nabla:["∇",{mathvariant:et.TexConstant.Variant.NORMAL}],top:["⊤",{mathvariant:et.TexConstant.Variant.NORMAL}],bot:["⊥",{mathvariant:et.TexConstant.Variant.NORMAL}],angle:["∠",{mathvariant:et.TexConstant.Variant.NORMAL}],triangle:["△",{mathvariant:et.TexConstant.Variant.NORMAL}],backslash:["∖",{mathvariant:et.TexConstant.Variant.NORMAL}],forall:["∀",{mathvariant:et.TexConstant.Variant.NORMAL}],exists:["∃",{mathvariant:et.TexConstant.Variant.NORMAL}],neg:["¬",{mathvariant:et.TexConstant.Variant.NORMAL}],lnot:["¬",{mathvariant:et.TexConstant.Variant.NORMAL}],flat:["♭",{mathvariant:et.TexConstant.Variant.NORMAL}],natural:["♮",{mathvariant:et.TexConstant.Variant.NORMAL}],sharp:["♯",{mathvariant:et.TexConstant.Variant.NORMAL}],clubsuit:["♣",{mathvariant:et.TexConstant.Variant.NORMAL}],diamondsuit:["♢",{mathvariant:et.TexConstant.Variant.NORMAL}],heartsuit:["♡",{mathvariant:et.TexConstant.Variant.NORMAL}],spadesuit:["♠",{mathvariant:et.TexConstant.Variant.NORMAL}]});new bo.CharacterMap("mathchar0mo",Za.default.mathchar0mo,{surd:"√",coprod:["∐",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigvee:["⋁",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigwedge:["⋀",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],biguplus:["⨄",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigcap:["⋂",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigcup:["⋃",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],int:["∫",{texClass:Mt.TEXCLASS.OP}],intop:["∫",{texClass:Mt.TEXCLASS.OP,movesupsub:!0,movablelimits:!0}],iint:["∬",{texClass:Mt.TEXCLASS.OP}],iiint:["∭",{texClass:Mt.TEXCLASS.OP}],prod:["∏",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],sum:["∑",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigotimes:["⨂",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigoplus:["⨁",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],bigodot:["⨀",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],oint:["∮",{texClass:Mt.TEXCLASS.OP}],bigsqcup:["⨆",{texClass:Mt.TEXCLASS.OP,movesupsub:!0}],smallint:["∫",{largeop:!1}],triangleleft:"◃",triangleright:"▹",bigtriangleup:"△",bigtriangledown:"▽",wedge:"∧",land:"∧",vee:"∨",lor:"∨",cap:"∩",cup:"∪",ddagger:"‡",dagger:"†",sqcap:"⊓",sqcup:"⊔",uplus:"⊎",amalg:"⨿",diamond:"⋄",bullet:"∙",wr:"≀",div:"÷",divsymbol:"÷",odot:["⊙",{largeop:!1}],oslash:["⊘",{largeop:!1}],otimes:["⊗",{largeop:!1}],ominus:["⊖",{largeop:!1}],oplus:["⊕",{largeop:!1}],mp:"∓",pm:"±",circ:"∘",bigcirc:"◯",setminus:"∖",cdot:"⋅",ast:"∗",times:"×",star:"⋆",propto:"∝",sqsubseteq:"⊑",sqsupseteq:"⊒",parallel:"∥",mid:"∣",dashv:"⊣",vdash:"⊢",leq:"≤",le:"≤",geq:"≥",ge:"≥",lt:"<",gt:">",succ:"≻",prec:"≺",approx:"≈",succeq:"⪰",preceq:"⪯",supset:"⊃",subset:"⊂",supseteq:"⊇",subseteq:"⊆",in:"∈",ni:"∋",notin:"∉",owns:"∋",gg:"≫",ll:"≪",sim:"∼",simeq:"≃",perp:"⊥",equiv:"≡",asymp:"≍",smile:"⌣",frown:"⌢",ne:"≠",neq:"≠",cong:"≅",doteq:"≐",bowtie:"⋈",models:"⊨",notChar:"⧸",Leftrightarrow:"⇔",Leftarrow:"⇐",Rightarrow:"⇒",leftrightarrow:"↔",leftarrow:"←",gets:"←",rightarrow:"→",to:["→",{accent:!1}],mapsto:"↦",leftharpoonup:"↼",leftharpoondown:"↽",rightharpoonup:"⇀",rightharpoondown:"⇁",nearrow:"↗",searrow:"↘",nwarrow:"↖",swarrow:"↙",rightleftharpoons:"⇌",hookrightarrow:"↪",hookleftarrow:"↩",longleftarrow:"⟵",Longleftarrow:"⟸",longrightarrow:"⟶",Longrightarrow:"⟹",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",ldots:"…",cdots:"⋯",vdots:"⋮",ddots:"⋱",dotsc:"…",dotsb:"⋯",dotsm:"⋯",dotsi:"⋯",dotso:"…",ldotp:[".",{texClass:Mt.TEXCLASS.PUNCT}],cdotp:["⋅",{texClass:Mt.TEXCLASS.PUNCT}],colon:[":",{texClass:Mt.TEXCLASS.PUNCT}]});new bo.CharacterMap("mathchar7",Za.default.mathchar7,{Gamma:"Γ",Delta:"Δ",Theta:"Θ",Lambda:"Λ",Xi:"Ξ",Pi:"Π",Sigma:"Σ",Upsilon:"Υ",Phi:"Φ",Psi:"Ψ",Omega:"Ω",_:"_","#":"#",$:"$","%":"%","&":"&",And:"&"});new bo.DelimiterMap("delimiter",Za.default.delimiter,{"(":"(",")":")","[":"[","]":"]","<":"⟨",">":"⟩","\\lt":"⟨","\\gt":"⟩","/":"/","|":["|",{texClass:Mt.TEXCLASS.ORD}],".":"","\\\\":"\\","\\lmoustache":"⎰","\\rmoustache":"⎱","\\lgroup":"⟮","\\rgroup":"⟯","\\arrowvert":"⏐","\\Arrowvert":"‖","\\bracevert":"⎪","\\Vert":["‖",{texClass:Mt.TEXCLASS.ORD}],"\\|":["‖",{texClass:Mt.TEXCLASS.ORD}],"\\vert":["|",{texClass:Mt.TEXCLASS.ORD}],"\\uparrow":"↑","\\downarrow":"↓","\\updownarrow":"↕","\\Uparrow":"⇑","\\Downarrow":"⇓","\\Updownarrow":"⇕","\\backslash":"\\","\\rangle":"⟩","\\langle":"⟨","\\rbrace":"}","\\lbrace":"{","\\}":"}","\\{":"{","\\rceil":"⌉","\\lceil":"⌈","\\rfloor":"⌋","\\lfloor":"⌊","\\lbrack":"[","\\rbrack":"]"});new bo.CommandMap("macros",{displaystyle:["SetStyle","D",!0,0],textstyle:["SetStyle","T",!1,0],scriptstyle:["SetStyle","S",!1,1],scriptscriptstyle:["SetStyle","SS",!1,2],rm:["SetFont",et.TexConstant.Variant.NORMAL],mit:["SetFont",et.TexConstant.Variant.ITALIC],oldstyle:["SetFont",et.TexConstant.Variant.OLDSTYLE],cal:["SetFont",et.TexConstant.Variant.CALLIGRAPHIC],it:["SetFont",et.TexConstant.Variant.MATHITALIC],bf:["SetFont",et.TexConstant.Variant.BOLD],bbFont:["SetFont",et.TexConstant.Variant.DOUBLESTRUCK],scr:["SetFont",et.TexConstant.Variant.SCRIPT],frak:["SetFont",et.TexConstant.Variant.FRAKTUR],sf:["SetFont",et.TexConstant.Variant.SANSSERIF],tt:["SetFont",et.TexConstant.Variant.MONOSPACE],mathrm:["MathFont",et.TexConstant.Variant.NORMAL],mathup:["MathFont",et.TexConstant.Variant.NORMAL],mathnormal:["MathFont",""],mathbf:["MathFont",et.TexConstant.Variant.BOLD],mathbfup:["MathFont",et.TexConstant.Variant.BOLD],mathit:["MathFont",et.TexConstant.Variant.MATHITALIC],mathbfit:["MathFont",et.TexConstant.Variant.BOLDITALIC],mathbb:["MathFont",et.TexConstant.Variant.DOUBLESTRUCK],Bbb:["MathFont",et.TexConstant.Variant.DOUBLESTRUCK],mathfrak:["MathFont",et.TexConstant.Variant.FRAKTUR],mathbffrak:["MathFont",et.TexConstant.Variant.BOLDFRAKTUR],mathscr:["MathFont",et.TexConstant.Variant.SCRIPT],mathbfscr:["MathFont",et.TexConstant.Variant.BOLDSCRIPT],mathsf:["MathFont",et.TexConstant.Variant.SANSSERIF],mathsfup:["MathFont",et.TexConstant.Variant.SANSSERIF],mathbfsf:["MathFont",et.TexConstant.Variant.BOLDSANSSERIF],mathbfsfup:["MathFont",et.TexConstant.Variant.BOLDSANSSERIF],mathsfit:["MathFont",et.TexConstant.Variant.SANSSERIFITALIC],mathbfsfit:["MathFont",et.TexConstant.Variant.SANSSERIFBOLDITALIC],mathtt:["MathFont",et.TexConstant.Variant.MONOSPACE],mathcal:["MathFont",et.TexConstant.Variant.CALLIGRAPHIC],mathbfcal:["MathFont",et.TexConstant.Variant.BOLDCALLIGRAPHIC],symrm:["MathFont",et.TexConstant.Variant.NORMAL],symup:["MathFont",et.TexConstant.Variant.NORMAL],symnormal:["MathFont",""],symbf:["MathFont",et.TexConstant.Variant.BOLD],symbfup:["MathFont",et.TexConstant.Variant.BOLD],symit:["MathFont",et.TexConstant.Variant.ITALIC],symbfit:["MathFont",et.TexConstant.Variant.BOLDITALIC],symbb:["MathFont",et.TexConstant.Variant.DOUBLESTRUCK],symfrak:["MathFont",et.TexConstant.Variant.FRAKTUR],symbffrak:["MathFont",et.TexConstant.Variant.BOLDFRAKTUR],symscr:["MathFont",et.TexConstant.Variant.SCRIPT],symbfscr:["MathFont",et.TexConstant.Variant.BOLDSCRIPT],symsf:["MathFont",et.TexConstant.Variant.SANSSERIF],symsfup:["MathFont",et.TexConstant.Variant.SANSSERIF],symbfsf:["MathFont",et.TexConstant.Variant.BOLDSANSSERIF],symbfsfup:["MathFont",et.TexConstant.Variant.BOLDSANSSERIF],symsfit:["MathFont",et.TexConstant.Variant.SANSSERIFITALIC],symbfsfit:["MathFont",et.TexConstant.Variant.SANSSERIFBOLDITALIC],symtt:["MathFont",et.TexConstant.Variant.MONOSPACE],symcal:["MathFont",et.TexConstant.Variant.CALLIGRAPHIC],symbfcal:["MathFont",et.TexConstant.Variant.BOLDCALLIGRAPHIC],textrm:["HBox",null,et.TexConstant.Variant.NORMAL],textup:["HBox",null,et.TexConstant.Variant.NORMAL],textnormal:["HBox"],textit:["HBox",null,et.TexConstant.Variant.ITALIC],textbf:["HBox",null,et.TexConstant.Variant.BOLD],textsf:["HBox",null,et.TexConstant.Variant.SANSSERIF],texttt:["HBox",null,et.TexConstant.Variant.MONOSPACE],tiny:["SetSize",.5],Tiny:["SetSize",.6],scriptsize:["SetSize",.7],small:["SetSize",.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],arcsin:"NamedFn",arccos:"NamedFn",arctan:"NamedFn",arg:"NamedFn",cos:"NamedFn",cosh:"NamedFn",cot:"NamedFn",coth:"NamedFn",csc:"NamedFn",deg:"NamedFn",det:"NamedOp",dim:"NamedFn",exp:"NamedFn",gcd:"NamedOp",hom:"NamedFn",inf:"NamedOp",ker:"NamedFn",lg:"NamedFn",lim:"NamedOp",liminf:["NamedOp","lim inf"],limsup:["NamedOp","lim sup"],ln:"NamedFn",log:"NamedFn",max:"NamedOp",min:"NamedOp",Pr:"NamedOp",sec:"NamedFn",sin:"NamedFn",sinh:"NamedFn",sup:"NamedOp",tan:"NamedFn",tanh:"NamedFn",limits:["Limits",1],nolimits:["Limits",0],overline:["UnderOver","2015"],underline:["UnderOver","2015"],overbrace:["UnderOver","23DE",1],underbrace:["UnderOver","23DF",1],overparen:["UnderOver","23DC"],underparen:["UnderOver","23DD"],overrightarrow:["UnderOver","2192"],underrightarrow:["UnderOver","2192"],overleftarrow:["UnderOver","2190"],underleftarrow:["UnderOver","2190"],overleftrightarrow:["UnderOver","2194"],underleftrightarrow:["UnderOver","2194"],overset:"Overset",underset:"Underset",overunderset:"Overunderset",stackrel:["Macro","\\mathrel{\\mathop{#2}\\limits^{#1}}",2],stackbin:["Macro","\\mathbin{\\mathop{#2}\\limits^{#1}}",2],over:"Over",overwithdelims:"Over",atop:"Over",atopwithdelims:"Over",above:"Over",abovewithdelims:"Over",brace:["Over","{","}"],brack:["Over","[","]"],choose:["Over","(",")"],frac:"Frac",sqrt:"Sqrt",root:"Root",uproot:["MoveRoot","upRoot"],leftroot:["MoveRoot","leftRoot"],left:"LeftRight",right:"LeftRight",middle:"LeftRight",llap:"Lap",rlap:"Lap",raise:"RaiseLower",lower:"RaiseLower",moveleft:"MoveLeftRight",moveright:"MoveLeftRight",",":["Spacer",ti.MATHSPACE.thinmathspace],":":["Spacer",ti.MATHSPACE.mediummathspace],">":["Spacer",ti.MATHSPACE.mediummathspace],";":["Spacer",ti.MATHSPACE.thickmathspace],"!":["Spacer",ti.MATHSPACE.negativethinmathspace],enspace:["Spacer",.5],quad:["Spacer",1],qquad:["Spacer",2],thinspace:["Spacer",ti.MATHSPACE.thinmathspace],negthinspace:["Spacer",ti.MATHSPACE.negativethinmathspace],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip",mspace:"Hskip",mkern:"Hskip",rule:"rule",Rule:["Rule"],Space:["Rule","blank"],nonscript:"Nonscript",big:["MakeBig",Mt.TEXCLASS.ORD,.85],Big:["MakeBig",Mt.TEXCLASS.ORD,1.15],bigg:["MakeBig",Mt.TEXCLASS.ORD,1.45],Bigg:["MakeBig",Mt.TEXCLASS.ORD,1.75],bigl:["MakeBig",Mt.TEXCLASS.OPEN,.85],Bigl:["MakeBig",Mt.TEXCLASS.OPEN,1.15],biggl:["MakeBig",Mt.TEXCLASS.OPEN,1.45],Biggl:["MakeBig",Mt.TEXCLASS.OPEN,1.75],bigr:["MakeBig",Mt.TEXCLASS.CLOSE,.85],Bigr:["MakeBig",Mt.TEXCLASS.CLOSE,1.15],biggr:["MakeBig",Mt.TEXCLASS.CLOSE,1.45],Biggr:["MakeBig",Mt.TEXCLASS.CLOSE,1.75],bigm:["MakeBig",Mt.TEXCLASS.REL,.85],Bigm:["MakeBig",Mt.TEXCLASS.REL,1.15],biggm:["MakeBig",Mt.TEXCLASS.REL,1.45],Biggm:["MakeBig",Mt.TEXCLASS.REL,1.75],mathord:["TeXAtom",Mt.TEXCLASS.ORD],mathop:["TeXAtom",Mt.TEXCLASS.OP],mathopen:["TeXAtom",Mt.TEXCLASS.OPEN],mathclose:["TeXAtom",Mt.TEXCLASS.CLOSE],mathbin:["TeXAtom",Mt.TEXCLASS.BIN],mathrel:["TeXAtom",Mt.TEXCLASS.REL],mathpunct:["TeXAtom",Mt.TEXCLASS.PUNCT],mathinner:["TeXAtom",Mt.TEXCLASS.INNER],vcenter:["TeXAtom",Mt.TEXCLASS.VCENTER],buildrel:"BuildRel",hbox:["HBox",0],text:"HBox",mbox:["HBox",0],fbox:"FBox",boxed:["Macro","\\fbox{$\\displaystyle{#1}$}",1],framebox:"FrameBox",strut:"Strut",mathstrut:["Macro","\\vphantom{(}"],phantom:"Phantom",vphantom:["Phantom",1,0],hphantom:["Phantom",0,1],smash:"Smash",acute:["Accent","00B4"],grave:["Accent","0060"],ddot:["Accent","00A8"],tilde:["Accent","007E"],bar:["Accent","00AF"],breve:["Accent","02D8"],check:["Accent","02C7"],hat:["Accent","005E"],vec:["Accent","2192"],dot:["Accent","02D9"],widetilde:["Accent","007E",1],widehat:["Accent","005E",1],matrix:"Matrix",array:"Matrix",pmatrix:["Matrix","(",")"],cases:["Matrix","{","","left left",null,".1em",null,!0],eqalign:["Matrix",null,null,"right left",(0,ti.em)(ti.MATHSPACE.thickmathspace),".5em","D"],displaylines:["Matrix",null,null,"center",null,".5em","D"],cr:"Cr","\\":"CrLaTeX",newline:["CrLaTeX",!0],hline:["HLine","solid"],hdashline:["HLine","dashed"],eqalignno:["Matrix",null,null,"right left",(0,ti.em)(ti.MATHSPACE.thickmathspace),".5em","D",null,"right"],leqalignno:["Matrix",null,null,"right left",(0,ti.em)(ti.MATHSPACE.thickmathspace),".5em","D",null,"left"],hfill:"HFill",hfil:"HFill",hfilll:"HFill",bmod:["Macro",'\\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}'],pmod:["Macro","\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",1],mod:["Macro","\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",1],pod:["Macro","\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",1],iff:["Macro","\\;\\Longleftrightarrow\\;"],skew:["Macro","{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",3],pmb:["Macro","\\rlap{#1}\\kern1px{#1}",1],TeX:["Macro","T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],LaTeX:["Macro","L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"]," ":["Macro","\\text{ }"],not:"Not",dots:"Dots",space:"Tilde"," ":"Tilde",begin:"BeginEnd",end:"BeginEnd",label:"HandleLabel",ref:"HandleRef",nonumber:"HandleNoTag",mathchoice:"MathChoice",mmlToken:"MmlToken"},cy.default);new bo.EnvironmentMap("environment",Za.default.environment,{array:["AlignedArray"],equation:["Equation",null,!0],eqnarray:["EqnArray",null,!0,!0,"rcl",k5t.default.cols(0,ti.MATHSPACE.thickmathspace),".5em"]},cy.default);new bo.CharacterMap("not_remap",null,{"←":"↚","→":"↛","↔":"↮","⇐":"⇍","⇒":"⇏","⇔":"⇎","∈":"∉","∋":"∌","∣":"∤","∥":"∦","∼":"≁","~":"≁","≃":"≄","≅":"≇","≈":"≉","≍":"≭","=":"≠","≡":"≢","<":"≮",">":"≯","≤":"≰","≥":"≱","≲":"≴","≳":"≵","≶":"≸","≷":"≹","≺":"⊀","≻":"⊁","⊂":"⊄","⊃":"⊅","⊆":"⊈","⊇":"⊉","⊢":"⊬","⊨":"⊭","⊩":"⊮","⊫":"⊯","≼":"⋠","≽":"⋡","⊑":"⋢","⊒":"⋣","⊲":"⋪","⊳":"⋫","⊴":"⋬","⊵":"⋭","∃":"∄"});var P5t=S&&S.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),H5t=S&&S.__createBinding||(Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]}),V5t=S&&S.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),B5t=S&&S.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&H5t(e,t,n);return V5t(e,t),e},F5t=S&&S.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},VV=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},In;Object.defineProperty(Na,"__esModule",{value:!0});Na.BaseConfiguration=Na.BaseTags=Na.Other=void 0;var $5t=nn,U5t=Q0,BV=VV(cn),G5t=VV(On),q5t=Lt,Rt=B5t(Et),z5t=zs,j5t=Jv;new q5t.CharacterMap("remap",null,{"-":"−","*":"∗","`":"‘"});function FV(t,e){var n=t.stack.env.font,r=n?{mathvariant:t.stack.env.font}:{},i=U5t.MapHandler.getMap("remap").lookup(e),o=(0,j5t.getRange)(e),s=o?o[3]:"mo",a=t.create("token",s,r,i?i.char:e);o[4]&&a.attributes.set("mathvariant",o[4]),s==="mo"&&(G5t.default.setProperty(a,"fixStretchy",!0),t.configuration.addNode("fixStretchy",a)),t.Push(a)}Na.Other=FV;function W5t(t,e){throw new BV.default("UndefinedControlSequence","Undefined control sequence %1","\\"+e)}function Y5t(t,e){throw new BV.default("UnknownEnv","Unknown environment '%1'",e)}function K5t(t){var e,n,r=t.data;try{for(var i=F5t(r.getList("nonscript")),o=i.next();!o.done;o=i.next()){var s=o.value;if(s.attributes.get("scriptlevel")>0){var a=s.parent;if(a.childNodes.splice(a.childIndex(s),1),r.removeFromList(s.kind,[s]),s.isKind("mrow")){var l=s.childNodes[0];r.removeFromList("mstyle",[l]),r.removeFromList("mspace",l.childNodes[0].childNodes)}}else s.isKind("mrow")&&(s.parent.replaceChild(s.childNodes[0],s),r.removeFromList("mrow",[s]))}}catch(c){e={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}}var $V=function(t){P5t(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(z5t.AbstractTags);Na.BaseTags=$V;Na.BaseConfiguration=$5t.Configuration.create("base",{handler:{character:["command","special","letter","digit"],delimiter:["delimiter"],macro:["delimiter","macros","mathchar0mi","mathchar0mo","mathchar7"],environment:["environment"]},fallback:{character:FV,macro:W5t,environment:Y5t},items:(In={},In[Rt.StartItem.prototype.kind]=Rt.StartItem,In[Rt.StopItem.prototype.kind]=Rt.StopItem,In[Rt.OpenItem.prototype.kind]=Rt.OpenItem,In[Rt.CloseItem.prototype.kind]=Rt.CloseItem,In[Rt.PrimeItem.prototype.kind]=Rt.PrimeItem,In[Rt.SubsupItem.prototype.kind]=Rt.SubsupItem,In[Rt.OverItem.prototype.kind]=Rt.OverItem,In[Rt.LeftItem.prototype.kind]=Rt.LeftItem,In[Rt.Middle.prototype.kind]=Rt.Middle,In[Rt.RightItem.prototype.kind]=Rt.RightItem,In[Rt.BeginItem.prototype.kind]=Rt.BeginItem,In[Rt.EndItem.prototype.kind]=Rt.EndItem,In[Rt.StyleItem.prototype.kind]=Rt.StyleItem,In[Rt.PositionItem.prototype.kind]=Rt.PositionItem,In[Rt.CellItem.prototype.kind]=Rt.CellItem,In[Rt.MmlItem.prototype.kind]=Rt.MmlItem,In[Rt.FnItem.prototype.kind]=Rt.FnItem,In[Rt.NotItem.prototype.kind]=Rt.NotItem,In[Rt.NonscriptItem.prototype.kind]=Rt.NonscriptItem,In[Rt.DotsItem.prototype.kind]=Rt.DotsItem,In[Rt.ArrayItem.prototype.kind]=Rt.ArrayItem,In[Rt.EqnArrayItem.prototype.kind]=Rt.EqnArrayItem,In[Rt.EquationItem.prototype.kind]=Rt.EquationItem,In),options:{maxMacros:1e3,baseURL:typeof document>"u"||document.getElementsByTagName("base").length===0?"":String(document.location).replace(/#.*$/,"")},tags:{base:$V},postprocessors:[[K5t,-4]]});var Z5t=S&&S.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lu=S&&S.__assign||function(){return Lu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},y0=S&&S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i7,"__esModule",{value:!0});i7.TeX=void 0;var Vw=_0,Bw=or,Fw=o7,B2=y0(Xv),$w=y0(On),J5t=y0(Hr()),eut=y0(cn),tut=y0(c7),S6=zs,nut=nn,rut=function(t){Z5t(e,t);function e(n){n===void 0&&(n={});var r=this,i=X5t((0,Bw.separateOptions)(n,e.OPTIONS,Fw.FindTeX.OPTIONS),3),o=i[0],s=i[1],a=i[2];r=t.call(this,s)||this,r.findTeX=r.options.FindTeX||new Fw.FindTeX(a);var l=r.options.packages,c=r.configuration=e.configure(l),u=r._parseOptions=new tut.default(c,[r.options,S6.TagsFactory.OPTIONS]);return(0,Bw.userOptions)(u.options,o),c.config(r),e.tags(u,c),r.postFilters.add(B2.default.cleanSubSup,-6),r.postFilters.add(B2.default.setInherited,-5),r.postFilters.add(B2.default.moveLimits,-4),r.postFilters.add(B2.default.cleanStretchy,-3),r.postFilters.add(B2.default.cleanAttributes,-2),r.postFilters.add(B2.default.combineRelations,-1),r}return e.configure=function(n){var r=new nut.ParserConfiguration(n,["tex"]);return r.init(),r},e.tags=function(n,r){S6.TagsFactory.addTags(r.tags),S6.TagsFactory.setDefault(n.options.tags),n.tags=S6.TagsFactory.getDefault(),n.tags.configuration=n},e.prototype.setMmlFactory=function(n){t.prototype.setMmlFactory.call(this,n),this._parseOptions.nodeFactory.setMmlFactory(n)},Object.defineProperty(e.prototype,"parseOptions",{get:function(){return this._parseOptions},enumerable:!1,configurable:!0}),e.prototype.reset=function(n){n===void 0&&(n=0),this.parseOptions.tags.reset(n)},e.prototype.compile=function(n,r){this.parseOptions.clear(),this.executeFilters(this.preFilters,n,r,this.parseOptions);var i=n.display;this.latex=n.math;var o;this.parseOptions.tags.startEquation(n);var s;try{var a=new J5t.default(this.latex,{display:i,isInner:!1},this.parseOptions);o=a.mml(),s=a.stack.global}catch(l){if(!(l instanceof eut.default))throw l;this.parseOptions.error=!0,o=this.options.formatError(this,l)}return o=this.parseOptions.nodeFactory.create("node","math",[o]),s!=null&&s.indentalign&&$w.default.setAttribute(o,"indentalign",s.indentalign),i&&$w.default.setAttribute(o,"display","block"),this.parseOptions.tags.finishEquation(n),this.parseOptions.root=o,this.executeFilters(this.postFilters,n,r,this.parseOptions),this.mathNode=this.parseOptions.root,this.mathNode},e.prototype.findMath=function(n){return this.findTeX.findMath(n)},e.prototype.formatError=function(n){var r=n.message.replace(/\n.*/,"");return this.parseOptions.nodeFactory.create("error",r,n.id,this.latex)},e.NAME="TeX",e.OPTIONS=Lu(Lu({},Vw.AbstractInputJax.OPTIONS),{FindTeX:null,packages:["base"],digits:/^(?:[0-9]+(?:\{,\}[0-9]{3})*(?:\.[0-9]*)?|\.[0-9]+)/,maxBuffer:5*1024,formatError:function(n,r){return n.formatError(r)}}),e}(Vw.AbstractInputJax);i7.TeX=rut;var im={},f7={},b0={};Object.defineProperty(b0,"__esModule",{value:!0});b0.AbstractOutputJax=void 0;var Uw=or,iut=b2,out=function(){function t(e){e===void 0&&(e={}),this.adaptor=null;var n=this.constructor;this.options=(0,Uw.userOptions)((0,Uw.defaultOptions)({},n.OPTIONS),e),this.postFilters=new iut.FunctionList}return Object.defineProperty(t.prototype,"name",{get:function(){return this.constructor.NAME},enumerable:!1,configurable:!0}),t.prototype.setAdaptor=function(e){this.adaptor=e},t.prototype.initialize=function(){},t.prototype.reset=function(){},t.prototype.getMetrics=function(e){},t.prototype.styleSheet=function(e){return null},t.prototype.pageElements=function(e){return null},t.prototype.executeFilters=function(e,n,r,i){var o={math:n,document:r,data:i};return e.execute(o),o.data},t.NAME="generic",t.OPTIONS={},t}();b0.AbstractOutputJax=out;var Pc={},Ki=S&&S.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},uy=S&&S.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o},sut=S&&S.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r1;)e.shift(),n.push(e.shift());return n}function C6(t){var e,n,r=dy(this.styles[t]);r.length===0&&r.push(""),r.length===1&&r.push(r[0]),r.length===2&&r.push(r[0]),r.length===3&&r.push(r[1]);try{for(var i=Ki(Xa.connect[t].children),o=i.next();!o.done;o=i.next()){var s=o.value;this.setStyle(this.childName(t,s),r.shift())}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}}function aut(t){var e,n,r=Xa.connect[t].children,i=[];try{for(var o=Ki(r),s=o.next();!s.done;s=o.next()){var a=s.value,l=this.styles[t+"-"+a];if(!l){delete this.styles[t];return}i.push(l)}}catch(c){e={error:c}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}i[3]===i[1]&&(i.pop(),i[2]===i[0]&&(i.pop(),i[1]===i[0]&&i.pop())),this.styles[t]=i.join(" ")}function lut(t){var e,n;try{for(var r=Ki(Xa.connect[t].children),i=r.next();!i.done;i=r.next()){var o=i.value;this.setStyle(this.childName(t,o),this.styles[t])}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}function cut(t){var e,n,r=sut([],uy(Xa.connect[t].children),!1),i=this.styles[this.childName(t,r.shift())];try{for(var o=Ki(r),s=o.next();!s.done;s=o.next()){var a=s.value;if(this.styles[this.childName(t,a)]!==i){delete this.styles[t];return}}}catch(l){e={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}this.styles[t]=i}var Gw={width:/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,style:/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/};function A6(t){var e,n,r,i,o={width:"",style:"",color:""};try{for(var s=Ki(dy(this.styles[t])),a=s.next();!a.done;a=s.next()){var l=a.value;l.match(Gw.width)&&o.width===""?o.width=l:l.match(Gw.style)&&o.style===""?o.style=l:o.color=l}}catch(h){e={error:h}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}try{for(var c=Ki(Xa.connect[t].children),u=c.next();!u.done;u=c.next()){var d=u.value;this.setStyle(this.childName(t,d),o[d])}}catch(h){r={error:h}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}}function w6(t){var e,n,r=[];try{for(var i=Ki(Xa.connect[t].children),o=i.next();!o.done;o=i.next()){var s=o.value,a=this.styles[this.childName(t,s)];a&&r.push(a)}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}r.length?this.styles[t]=r.join(" "):delete this.styles[t]}var qw={style:/^(?:normal|italic|oblique|inherit|initial|unset)$/,variant:new RegExp("^(?:"+["normal|none","inherit|initial|unset","common-ligatures|no-common-ligatures","discretionary-ligatures|no-discretionary-ligatures","historical-ligatures|no-historical-ligatures","contextual|no-contextual","(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)","small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","lining-nums|oldstyle-nums|proportional-nums|tabular-nums","diagonal-fractions|stacked-fractions","ordinal|slashed-zero","jis78|jis83|jis90|jis04|simplified|traditional","full-width|proportional-width","ruby"].join("|")+")$"),weight:/^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,stretch:new RegExp("^(?:"+["normal","(?:(?:ultra|extra|semi)-)?condensed","(?:(?:semi|extra|ulta)-)?expanded","inherit|initial|unset"].join("|")+")$"),size:new RegExp("^(?:"+["xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller","[d.]+%|[d.]+[a-z]+","inherit|initial|unset"].join("|")+")(?:/(?:normal|[d.+](?:%|[a-z]+)?))?$")};function uut(t){var e,n,r,i,o=dy(this.styles[t]),s={style:"",variant:[],weight:"",stretch:"",size:"",family:"","line-height":""};try{for(var a=Ki(o),l=a.next();!l.done;l=a.next()){var c=l.value;s.family=c;try{for(var u=(r=void 0,Ki(Object.keys(qw))),d=u.next();!d.done;d=u.next()){var h=d.value;if((Array.isArray(s[h])||s[h]==="")&&c.match(qw[h]))if(h==="size"){var f=uy(c.split(/\//),2),m=f[0],T=f[1];s[h]=m,T&&(s["line-height"]=T)}else s.size===""&&(Array.isArray(s[h])?s[h].push(c):s[h]=c)}}catch(Q){r={error:Q}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}}catch(Q){e={error:Q}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}dut(t,s),delete this.styles[t]}function dut(t,e){var n,r;try{for(var i=Ki(Xa.connect[t].children),o=i.next();!o.done;o=i.next()){var s=o.value,a=this.childName(t,s);if(Array.isArray(e[s])){var l=e[s];l.length&&(this.styles[a]=l.join(" "))}else e[s]!==""&&(this.styles[a]=e[s])}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function fut(t){}var Xa=function(){function t(e){e===void 0&&(e=""),this.parse(e)}return Object.defineProperty(t.prototype,"cssText",{get:function(){var e,n,r=[];try{for(var i=Ki(Object.keys(this.styles)),o=i.next();!o.done;o=i.next()){var s=o.value,a=this.parentName(s);this.styles[a]||r.push(s+": "+this.styles[s]+";")}}catch(l){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r.join(" ")},enumerable:!1,configurable:!0}),t.prototype.set=function(e,n){for(e=this.normalizeName(e),this.setStyle(e,n),t.connect[e]&&!t.connect[e].combine&&(this.combineChildren(e),delete this.styles[e]);e.match(/-/)&&(e=this.parentName(e),!!t.connect[e]);)t.connect[e].combine.call(this,e)},t.prototype.get=function(e){return e=this.normalizeName(e),this.styles.hasOwnProperty(e)?this.styles[e]:""},t.prototype.setStyle=function(e,n){this.styles[e]=n,t.connect[e]&&t.connect[e].children&&t.connect[e].split.call(this,e),n===""&&delete this.styles[e]},t.prototype.combineChildren=function(e){var n,r,i=this.parentName(e);try{for(var o=Ki(t.connect[e].children),s=o.next();!s.done;s=o.next()){var a=s.value,l=this.childName(i,a);t.connect[l].combine.call(this,l)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.parentName=function(e){var n=e.replace(/-[^-]*$/,"");return e===n?"":n},t.prototype.childName=function(e,n){return n.match(/-/)?n:(t.connect[e]&&!t.connect[e].combine&&(n+=e.replace(/.*-/,"-"),e=this.parentName(e)),e+"-"+n)},t.prototype.normalizeName=function(e){return e.replace(/[A-Z]/g,function(n){return"-"+n.toLowerCase()})},t.prototype.parse=function(e){e===void 0&&(e="");var n=this.constructor.pattern;this.styles={};for(var r=e.replace(n.comment,"").split(n.style);r.length>1;){var i=uy(r.splice(0,3),3),o=i[0],s=i[1],a=i[2];if(o.match(/[^\s\n]/))return;this.set(s,a)}},t.pattern={style:/([-a-z]+)[\s\n]*:[\s\n]*((?:'[^']*'|"[^"]*"|\n|.)*?)[\s\n]*(?:;|$)/g,comment:/\/\*[^]*?\*\//g},t.connect={padding:{children:l3,split:C6,combine:aut},border:{children:l3,split:lut,combine:cut},"border-top":{children:L6,split:A6,combine:w6},"border-right":{children:L6,split:A6,combine:w6},"border-bottom":{children:L6,split:A6,combine:w6},"border-left":{children:L6,split:A6,combine:w6},"border-width":{children:l3,split:C6,combine:null},"border-style":{children:l3,split:C6,combine:null},"border-color":{children:l3,split:C6,combine:null},font:{children:["style","variant","weight","stretch","line-height","size","family"],split:uut,combine:fut}},t}();Pc.Styles=Xa;var p7={},M6=S&&S.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(p7,"__esModule",{value:!0});p7.CssStyles=void 0;var put=function(){function t(e){e===void 0&&(e=null),this.styles={},this.addStyles(e)}return Object.defineProperty(t.prototype,"cssText",{get:function(){return this.getStyleString()},enumerable:!1,configurable:!0}),t.prototype.addStyles=function(e){var n,r;if(e)try{for(var i=M6(Object.keys(e)),o=i.next();!o.done;o=i.next()){var s=o.value;this.styles[s]||(this.styles[s]={}),Object.assign(this.styles[s],e[s])}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.removeStyles=function(){for(var e,n,r=[],i=0;i option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"}),W3}var lg={},$R;function tb(){return $R||($R=1,function(t){var e=S&&S.__spreadArray||function(a,l,c){if(c||arguments.length===2)for(var u=0,d=l.length,h;u"u")return function(m){for(var T=m;T=c.getParent(T);)if(c.isTag(T)&&i(T))return!0;return!1};var h=new WeakSet;return function(m){for(var T=m;T=c.getParent(T);)if(!h.has(T)){if(c.isTag(T)&&i(T))return!0;h.add(T)}return!1}}case"_flexibleDescendant":return function(m){var T=m;do if(c.isTag(T)&&i(T))return!0;while(T=c.getParent(T));return!1};case n.SelectorType.Parent:return function(m){return c.getChildren(m).some(function(T){return c.isTag(T)&&i(T)})};case n.SelectorType.Child:return function(m){var T=c.getParent(m);return T!=null&&c.isTag(T)&&i(T)};case n.SelectorType.Sibling:return function(m){for(var T=c.getSiblings(m),Q=0;Q0&&(0,i.isTraversal)(M[0])&&M[0].type!=="descendant"))if(E&&!M.some(c))M.unshift(u);else continue;M.unshift(h)}}function m(_,v,y){var b;_=_.filter(function(C){return C.length>0}),_.forEach(r.default),y=(b=v.context)!==null&&b!==void 0?b:y;var E=Array.isArray(y),x=y&&(Array.isArray(y)?y:[y]);f(_,v,x);var L=!1,M=_.map(function(C){if(C.length>=2){var A=C[0],I=C[1];A.type!=="pseudo"||A.name!=="scope"||(E&&I.type==="descendant"?C[1]=d:(I.type==="adjacent"||I.type==="sibling")&&(L=!0))}return T(C,v,x)}).reduce(Q,n.falseFunc);return M.shouldTestNextSiblings=L,M}hs.compileToken=m;function T(_,v,y){var b;return _.reduce(function(E,x){return E===n.falseFunc?n.falseFunc:(0,o.compileGeneralSelector)(E,x,v,y,m)},(b=v.rootFunc)!==null&&b!==void 0?b:n.trueFunc)}function Q(_,v){return v===n.falseFunc||_===n.trueFunc?_:_===n.falseFunc||v===n.trueFunc?v:function(b){return _(b)||v(b)}}return hs}var zR;function jR(){return zR||(zR=1,function(t){var e=S&&S.__createBinding||(Object.create?function(_,v,y,b){b===void 0&&(b=y);var E=Object.getOwnPropertyDescriptor(v,y);(!E||("get"in E?!v.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return v[y]}}),Object.defineProperty(_,b,E)}:function(_,v,y,b){b===void 0&&(b=y),_[b]=v[y]}),n=S&&S.__setModuleDefault||(Object.create?function(_,v){Object.defineProperty(_,"default",{enumerable:!0,value:v})}:function(_,v){_.default=v}),r=S&&S.__importStar||function(_){if(_&&_.__esModule)return _;var v={};if(_!=null)for(var y in _)y!=="default"&&Object.prototype.hasOwnProperty.call(_,y)&&e(v,_,y);return n(v,_),v};Object.defineProperty(t,"__esModule",{value:!0}),t.aliases=t.pseudos=t.filters=t.is=t.selectOne=t.selectAll=t.prepareContext=t._compileToken=t._compileUnsafe=t.compile=void 0;var i=r(p9()),o=C2(),s=Ain(),a=tb(),l=function(_,v){return _===v},c={adapter:i,equals:l};function u(_){var v,y,b,E,x=_??c;return(v=x.adapter)!==null&&v!==void 0||(x.adapter=i),(y=x.equals)!==null&&y!==void 0||(x.equals=(E=(b=x.adapter)===null||b===void 0?void 0:b.equals)!==null&&E!==void 0?E:l),x}function d(_){return function(y,b,E){var x=u(b);return _(y,x,E)}}t.compile=d(s.compile),t._compileUnsafe=d(s.compileUnsafe),t._compileToken=d(s.compileToken);function h(_){return function(y,b,E){var x=u(E);typeof y!="function"&&(y=(0,s.compileUnsafe)(y,x,b));var L=f(b,x.adapter,y.shouldTestNextSiblings);return _(y,L,x)}}function f(_,v,y){return y===void 0&&(y=!1),y&&(_=m(_,v)),Array.isArray(_)?v.removeSubsets(_):v.getChildren(_)}t.prepareContext=f;function m(_,v){for(var y=Array.isArray(_)?_.slice(0):[_],b=y.length,E=0;E=0?o+1:1/0:0;case"lt":return isFinite(o)?o>=0?o:1/0:0;case"gt":return isFinite(o)?1/0:0;default:return 1/0}}t.getLimit=n}(cg)),cg}var YR;function win(){if(YR)return b1;YR=1,Object.defineProperty(b1,"__esModule",{value:!0}),b1.groupSelectors=b1.getDocumentRoot=void 0;var t=qF();function e(r){for(;r.parent;)r=r.parent;return r}b1.getDocumentRoot=e;function n(r){for(var i=[],o=[],s=0,a=r;s0&&P.some((0,a._compileToken)(U,F))||G.some(function(K){return b(K,P,F).length>0})}t.some=Q;function _(P,O,F,V){var U=typeof F=="string"?parseInt(F,10):NaN;switch(P){case"first":case"lt":return O;case"last":return O.length>0?[O[O.length-1]]:O;case"nth":case"eq":return isFinite(U)&&Math.abs(U)65535&&(i-=65536,o+=String.fromCharCode(i>>>10&1023|55296),i=56320|i&1023),o+=String.fromCharCode(i),o};function r(i){return i>=55296&&i<=57343||i>1114111?"�":(i in e.default&&(i=e.default[i]),n(i))}return e5.default=r,e5}const Rin="Á",Nin="á",Din="Ă",Iin="ă",kin="∾",Pin="∿",Hin="∾̳",Vin="Â",Bin="â",Fin="´",$in="А",Uin="а",Gin="Æ",qin="æ",zin="⁡",jin="𝔄",Win="𝔞",Yin="À",Kin="à",Zin="ℵ",Xin="ℵ",Jin="Α",eon="α",ton="Ā",non="ā",ron="⨿",ion="&",oon="&",son="⩕",aon="⩓",lon="∧",con="⩜",uon="⩘",don="⩚",fon="∠",pon="⦤",hon="∠",Ton="⦨",mon="⦩",gon="⦪",_on="⦫",Qon="⦬",von="⦭",yon="⦮",bon="⦯",Eon="∡",xon="∟",Son="⊾",Lon="⦝",Con="∢",Aon="Å",won="⍼",Mon="Ą",Oon="ą",Ron="𝔸",Non="𝕒",Don="⩯",Ion="≈",kon="⩰",Pon="≊",Hon="≋",Von="'",Bon="⁡",Fon="≈",$on="≊",Uon="Å",Gon="å",qon="𝒜",zon="𝒶",jon="≔",Won="*",Yon="≈",Kon="≍",Zon="Ã",Xon="ã",Jon="Ä",esn="ä",tsn="∳",nsn="⨑",rsn="≌",isn="϶",osn="‵",ssn="∽",asn="⋍",lsn="∖",csn="⫧",usn="⊽",dsn="⌅",fsn="⌆",psn="⌅",hsn="⎵",Tsn="⎶",msn="≌",gsn="Б",_sn="б",Qsn="„",vsn="∵",ysn="∵",bsn="∵",Esn="⦰",xsn="϶",Ssn="ℬ",Lsn="ℬ",Csn="Β",Asn="β",wsn="ℶ",Msn="≬",Osn="𝔅",Rsn="𝔟",Nsn="⋂",Dsn="◯",Isn="⋃",ksn="⨀",Psn="⨁",Hsn="⨂",Vsn="⨆",Bsn="★",Fsn="▽",$sn="△",Usn="⨄",Gsn="⋁",qsn="⋀",zsn="⤍",jsn="⧫",Wsn="▪",Ysn="▴",Ksn="▾",Zsn="◂",Xsn="▸",Jsn="␣",ean="▒",tan="░",nan="▓",ran="█",ian="=⃥",oan="≡⃥",san="⫭",aan="⌐",lan="𝔹",can="𝕓",uan="⊥",dan="⊥",fan="⋈",pan="⧉",han="┐",Tan="╕",man="╖",gan="╗",_an="┌",Qan="╒",van="╓",yan="╔",ban="─",Ean="═",xan="┬",San="╤",Lan="╥",Can="╦",Aan="┴",wan="╧",Man="╨",Oan="╩",Ran="⊟",Nan="⊞",Dan="⊠",Ian="┘",kan="╛",Pan="╜",Han="╝",Van="└",Ban="╘",Fan="╙",$an="╚",Uan="│",Gan="║",qan="┼",zan="╪",jan="╫",Wan="╬",Yan="┤",Kan="╡",Zan="╢",Xan="╣",Jan="├",e1n="╞",t1n="╟",n1n="╠",r1n="‵",i1n="˘",o1n="˘",s1n="¦",a1n="𝒷",l1n="ℬ",c1n="⁏",u1n="∽",d1n="⋍",f1n="⧅",p1n="\\",h1n="⟈",T1n="•",m1n="•",g1n="≎",_1n="⪮",Q1n="≏",v1n="≎",y1n="≏",b1n="Ć",E1n="ć",x1n="⩄",S1n="⩉",L1n="⩋",C1n="∩",A1n="⋒",w1n="⩇",M1n="⩀",O1n="ⅅ",R1n="∩︀",N1n="⁁",D1n="ˇ",I1n="ℭ",k1n="⩍",P1n="Č",H1n="č",V1n="Ç",B1n="ç",F1n="Ĉ",$1n="ĉ",U1n="∰",G1n="⩌",q1n="⩐",z1n="Ċ",j1n="ċ",W1n="¸",Y1n="¸",K1n="⦲",Z1n="¢",X1n="·",J1n="·",e2n="𝔠",t2n="ℭ",n2n="Ч",r2n="ч",i2n="✓",o2n="✓",s2n="Χ",a2n="χ",l2n="ˆ",c2n="≗",u2n="↺",d2n="↻",f2n="⊛",p2n="⊚",h2n="⊝",T2n="⊙",m2n="®",g2n="Ⓢ",_2n="⊖",Q2n="⊕",v2n="⊗",y2n="○",b2n="⧃",E2n="≗",x2n="⨐",S2n="⫯",L2n="⧂",C2n="∲",A2n="”",w2n="’",M2n="♣",O2n="♣",R2n=":",N2n="∷",D2n="⩴",I2n="≔",k2n="≔",P2n=",",H2n="@",V2n="∁",B2n="∘",F2n="∁",$2n="ℂ",U2n="≅",G2n="⩭",q2n="≡",z2n="∮",j2n="∯",W2n="∮",Y2n="𝕔",K2n="ℂ",Z2n="∐",X2n="∐",J2n="©",eln="©",tln="℗",nln="∳",rln="↵",iln="✗",oln="⨯",sln="𝒞",aln="𝒸",lln="⫏",cln="⫑",uln="⫐",dln="⫒",fln="⋯",pln="⤸",hln="⤵",Tln="⋞",mln="⋟",gln="↶",_ln="⤽",Qln="⩈",vln="⩆",yln="≍",bln="∪",Eln="⋓",xln="⩊",Sln="⊍",Lln="⩅",Cln="∪︀",Aln="↷",wln="⤼",Mln="⋞",Oln="⋟",Rln="⋎",Nln="⋏",Dln="¤",Iln="↶",kln="↷",Pln="⋎",Hln="⋏",Vln="∲",Bln="∱",Fln="⌭",$ln="†",Uln="‡",Gln="ℸ",qln="↓",zln="↡",jln="⇓",Wln="‐",Yln="⫤",Kln="⊣",Zln="⤏",Xln="˝",Jln="Ď",ecn="ď",tcn="Д",ncn="д",rcn="‡",icn="⇊",ocn="ⅅ",scn="ⅆ",acn="⤑",lcn="⩷",ccn="°",ucn="∇",dcn="Δ",fcn="δ",pcn="⦱",hcn="⥿",Tcn="𝔇",mcn="𝔡",gcn="⥥",_cn="⇃",Qcn="⇂",vcn="´",ycn="˙",bcn="˝",Ecn="`",xcn="˜",Scn="⋄",Lcn="⋄",Ccn="⋄",Acn="♦",wcn="♦",Mcn="¨",Ocn="ⅆ",Rcn="ϝ",Ncn="⋲",Dcn="÷",Icn="÷",kcn="⋇",Pcn="⋇",Hcn="Ђ",Vcn="ђ",Bcn="⌞",Fcn="⌍",$cn="$",Ucn="𝔻",Gcn="𝕕",qcn="¨",zcn="˙",jcn="⃜",Wcn="≐",Ycn="≑",Kcn="≐",Zcn="∸",Xcn="∔",Jcn="⊡",e3n="⌆",t3n="∯",n3n="¨",r3n="⇓",i3n="⇐",o3n="⇔",s3n="⫤",a3n="⟸",l3n="⟺",c3n="⟹",u3n="⇒",d3n="⊨",f3n="⇑",p3n="⇕",h3n="∥",T3n="⤓",m3n="↓",g3n="↓",_3n="⇓",Q3n="⇵",v3n="̑",y3n="⇊",b3n="⇃",E3n="⇂",x3n="⥐",S3n="⥞",L3n="⥖",C3n="↽",A3n="⥟",w3n="⥗",M3n="⇁",O3n="↧",R3n="⊤",N3n="⤐",D3n="⌟",I3n="⌌",k3n="𝒟",P3n="𝒹",H3n="Ѕ",V3n="ѕ",B3n="⧶",F3n="Đ",$3n="đ",U3n="⋱",G3n="▿",q3n="▾",z3n="⇵",j3n="⥯",W3n="⦦",Y3n="Џ",K3n="џ",Z3n="⟿",X3n="É",J3n="é",e4n="⩮",t4n="Ě",n4n="ě",r4n="Ê",i4n="ê",o4n="≖",s4n="≕",a4n="Э",l4n="э",c4n="⩷",u4n="Ė",d4n="ė",f4n="≑",p4n="ⅇ",h4n="≒",T4n="𝔈",m4n="𝔢",g4n="⪚",_4n="È",Q4n="è",v4n="⪖",y4n="⪘",b4n="⪙",E4n="∈",x4n="⏧",S4n="ℓ",L4n="⪕",C4n="⪗",A4n="Ē",w4n="ē",M4n="∅",O4n="∅",R4n="◻",N4n="∅",D4n="▫",I4n=" ",k4n=" ",P4n=" ",H4n="Ŋ",V4n="ŋ",B4n=" ",F4n="Ę",$4n="ę",U4n="𝔼",G4n="𝕖",q4n="⋕",z4n="⧣",j4n="⩱",W4n="ε",Y4n="Ε",K4n="ε",Z4n="ϵ",X4n="≖",J4n="≕",e0n="≂",t0n="⪖",n0n="⪕",r0n="⩵",i0n="=",o0n="≂",s0n="≟",a0n="⇌",l0n="≡",c0n="⩸",u0n="⧥",d0n="⥱",f0n="≓",p0n="ℯ",h0n="ℰ",T0n="≐",m0n="⩳",g0n="≂",_0n="Η",Q0n="η",v0n="Ð",y0n="ð",b0n="Ë",E0n="ë",x0n="€",S0n="!",L0n="∃",C0n="∃",A0n="ℰ",w0n="ⅇ",M0n="ⅇ",O0n="≒",R0n="Ф",N0n="ф",D0n="♀",I0n="ffi",k0n="ff",P0n="ffl",H0n="𝔉",V0n="𝔣",B0n="fi",F0n="◼",$0n="▪",U0n="fj",G0n="♭",q0n="fl",z0n="▱",j0n="ƒ",W0n="𝔽",Y0n="𝕗",K0n="∀",Z0n="∀",X0n="⋔",J0n="⫙",e6n="ℱ",t6n="⨍",n6n="½",r6n="⅓",i6n="¼",o6n="⅕",s6n="⅙",a6n="⅛",l6n="⅔",c6n="⅖",u6n="¾",d6n="⅗",f6n="⅜",p6n="⅘",h6n="⅚",T6n="⅝",m6n="⅞",g6n="⁄",_6n="⌢",Q6n="𝒻",v6n="ℱ",y6n="ǵ",b6n="Γ",E6n="γ",x6n="Ϝ",S6n="ϝ",L6n="⪆",C6n="Ğ",A6n="ğ",w6n="Ģ",M6n="Ĝ",O6n="ĝ",R6n="Г",N6n="г",D6n="Ġ",I6n="ġ",k6n="≥",P6n="≧",H6n="⪌",V6n="⋛",B6n="≥",F6n="≧",$6n="⩾",U6n="⪩",G6n="⩾",q6n="⪀",z6n="⪂",j6n="⪄",W6n="⋛︀",Y6n="⪔",K6n="𝔊",Z6n="𝔤",X6n="≫",J6n="⋙",e5n="⋙",t5n="ℷ",n5n="Ѓ",r5n="ѓ",i5n="⪥",o5n="≷",s5n="⪒",a5n="⪤",l5n="⪊",c5n="⪊",u5n="⪈",d5n="≩",f5n="⪈",p5n="≩",h5n="⋧",T5n="𝔾",m5n="𝕘",g5n="`",_5n="≥",Q5n="⋛",v5n="≧",y5n="⪢",b5n="≷",E5n="⩾",x5n="≳",S5n="𝒢",L5n="ℊ",C5n="≳",A5n="⪎",w5n="⪐",M5n="⪧",O5n="⩺",R5n=">",N5n=">",D5n="≫",I5n="⋗",k5n="⦕",P5n="⩼",H5n="⪆",V5n="⥸",B5n="⋗",F5n="⋛",$5n="⪌",U5n="≷",G5n="≳",q5n="≩︀",z5n="≩︀",j5n="ˇ",W5n=" ",Y5n="½",K5n="ℋ",Z5n="Ъ",X5n="ъ",J5n="⥈",eun="↔",tun="⇔",nun="↭",run="^",iun="ℏ",oun="Ĥ",sun="ĥ",aun="♥",lun="♥",cun="…",uun="⊹",dun="𝔥",fun="ℌ",pun="ℋ",hun="⤥",Tun="⤦",mun="⇿",gun="∻",_un="↩",Qun="↪",vun="𝕙",yun="ℍ",bun="―",Eun="─",xun="𝒽",Sun="ℋ",Lun="ℏ",Cun="Ħ",Aun="ħ",wun="≎",Mun="≏",Oun="⁃",Run="‐",Nun="Í",Dun="í",Iun="⁣",kun="Î",Pun="î",Hun="И",Vun="и",Bun="İ",Fun="Е",$un="е",Uun="¡",Gun="⇔",qun="𝔦",zun="ℑ",jun="Ì",Wun="ì",Yun="ⅈ",Kun="⨌",Zun="∭",Xun="⧜",Jun="℩",edn="IJ",tdn="ij",ndn="Ī",rdn="ī",idn="ℑ",odn="ⅈ",sdn="ℐ",adn="ℑ",ldn="ı",cdn="ℑ",udn="⊷",ddn="Ƶ",fdn="⇒",pdn="℅",hdn="∞",Tdn="⧝",mdn="ı",gdn="⊺",_dn="∫",Qdn="∬",vdn="ℤ",ydn="∫",bdn="⊺",Edn="⋂",xdn="⨗",Sdn="⨼",Ldn="⁣",Cdn="⁢",Adn="Ё",wdn="ё",Mdn="Į",Odn="į",Rdn="𝕀",Ndn="𝕚",Ddn="Ι",Idn="ι",kdn="⨼",Pdn="¿",Hdn="𝒾",Vdn="ℐ",Bdn="∈",Fdn="⋵",$dn="⋹",Udn="⋴",Gdn="⋳",qdn="∈",zdn="⁢",jdn="Ĩ",Wdn="ĩ",Ydn="І",Kdn="і",Zdn="Ï",Xdn="ï",Jdn="Ĵ",e7n="ĵ",t7n="Й",n7n="й",r7n="𝔍",i7n="𝔧",o7n="ȷ",s7n="𝕁",a7n="𝕛",l7n="𝒥",c7n="𝒿",u7n="Ј",d7n="ј",f7n="Є",p7n="є",h7n="Κ",T7n="κ",m7n="ϰ",g7n="Ķ",_7n="ķ",Q7n="К",v7n="к",y7n="𝔎",b7n="𝔨",E7n="ĸ",x7n="Х",S7n="х",L7n="Ќ",C7n="ќ",A7n="𝕂",w7n="𝕜",M7n="𝒦",O7n="𝓀",R7n="⇚",N7n="Ĺ",D7n="ĺ",I7n="⦴",k7n="ℒ",P7n="Λ",H7n="λ",V7n="⟨",B7n="⟪",F7n="⦑",$7n="⟨",U7n="⪅",G7n="ℒ",q7n="«",z7n="⇤",j7n="⤟",W7n="←",Y7n="↞",K7n="⇐",Z7n="⤝",X7n="↩",J7n="↫",e8n="⤹",t8n="⥳",n8n="↢",r8n="⤙",i8n="⤛",o8n="⪫",s8n="⪭",a8n="⪭︀",l8n="⤌",c8n="⤎",u8n="❲",d8n="{",f8n="[",p8n="⦋",h8n="⦏",T8n="⦍",m8n="Ľ",g8n="ľ",_8n="Ļ",Q8n="ļ",v8n="⌈",y8n="{",b8n="Л",E8n="л",x8n="⤶",S8n="“",L8n="„",C8n="⥧",A8n="⥋",w8n="↲",M8n="≤",O8n="≦",R8n="⟨",N8n="⇤",D8n="←",I8n="←",k8n="⇐",P8n="⇆",H8n="↢",V8n="⌈",B8n="⟦",F8n="⥡",$8n="⥙",U8n="⇃",G8n="⌊",q8n="↽",z8n="↼",j8n="⇇",W8n="↔",Y8n="↔",K8n="⇔",Z8n="⇆",X8n="⇋",J8n="↭",e9n="⥎",t9n="↤",n9n="⊣",r9n="⥚",i9n="⋋",o9n="⧏",s9n="⊲",a9n="⊴",l9n="⥑",c9n="⥠",u9n="⥘",d9n="↿",f9n="⥒",p9n="↼",h9n="⪋",T9n="⋚",m9n="≤",g9n="≦",_9n="⩽",Q9n="⪨",v9n="⩽",y9n="⩿",b9n="⪁",E9n="⪃",x9n="⋚︀",S9n="⪓",L9n="⪅",C9n="⋖",A9n="⋚",w9n="⪋",M9n="⋚",O9n="≦",R9n="≶",N9n="≶",D9n="⪡",I9n="≲",k9n="⩽",P9n="≲",H9n="⥼",V9n="⌊",B9n="𝔏",F9n="𝔩",$9n="≶",U9n="⪑",G9n="⥢",q9n="↽",z9n="↼",j9n="⥪",W9n="▄",Y9n="Љ",K9n="љ",Z9n="⇇",X9n="≪",J9n="⋘",efn="⌞",tfn="⇚",nfn="⥫",rfn="◺",ifn="Ŀ",ofn="ŀ",sfn="⎰",afn="⎰",lfn="⪉",cfn="⪉",ufn="⪇",dfn="≨",ffn="⪇",pfn="≨",hfn="⋦",Tfn="⟬",mfn="⇽",gfn="⟦",_fn="⟵",Qfn="⟵",vfn="⟸",yfn="⟷",bfn="⟷",Efn="⟺",xfn="⟼",Sfn="⟶",Lfn="⟶",Cfn="⟹",Afn="↫",wfn="↬",Mfn="⦅",Ofn="𝕃",Rfn="𝕝",Nfn="⨭",Dfn="⨴",Ifn="∗",kfn="_",Pfn="↙",Hfn="↘",Vfn="◊",Bfn="◊",Ffn="⧫",$fn="(",Ufn="⦓",Gfn="⇆",qfn="⌟",zfn="⇋",jfn="⥭",Wfn="‎",Yfn="⊿",Kfn="‹",Zfn="𝓁",Xfn="ℒ",Jfn="↰",epn="↰",tpn="≲",npn="⪍",rpn="⪏",ipn="[",opn="‘",spn="‚",apn="Ł",lpn="ł",cpn="⪦",upn="⩹",dpn="<",fpn="<",ppn="≪",hpn="⋖",Tpn="⋋",mpn="⋉",gpn="⥶",_pn="⩻",Qpn="◃",vpn="⊴",ypn="◂",bpn="⦖",Epn="⥊",xpn="⥦",Spn="≨︀",Lpn="≨︀",Cpn="¯",Apn="♂",wpn="✠",Mpn="✠",Opn="↦",Rpn="↦",Npn="↧",Dpn="↤",Ipn="↥",kpn="▮",Ppn="⨩",Hpn="М",Vpn="м",Bpn="—",Fpn="∺",$pn="∡",Upn=" ",Gpn="ℳ",qpn="𝔐",zpn="𝔪",jpn="℧",Wpn="µ",Ypn="*",Kpn="⫰",Zpn="∣",Xpn="·",Jpn="⊟",ehn="−",thn="∸",nhn="⨪",rhn="∓",ihn="⫛",ohn="…",shn="∓",ahn="⊧",lhn="𝕄",chn="𝕞",uhn="∓",dhn="𝓂",fhn="ℳ",phn="∾",hhn="Μ",Thn="μ",mhn="⊸",ghn="⊸",_hn="∇",Qhn="Ń",vhn="ń",yhn="∠⃒",bhn="≉",Ehn="⩰̸",xhn="≋̸",Shn="ʼn",Lhn="≉",Chn="♮",Ahn="ℕ",whn="♮",Mhn=" ",Ohn="≎̸",Rhn="≏̸",Nhn="⩃",Dhn="Ň",Ihn="ň",khn="Ņ",Phn="ņ",Hhn="≇",Vhn="⩭̸",Bhn="⩂",Fhn="Н",$hn="н",Uhn="–",Ghn="⤤",qhn="↗",zhn="⇗",jhn="↗",Whn="≠",Yhn="≐̸",Khn="​",Zhn="​",Xhn="​",Jhn="​",eTn="≢",tTn="⤨",nTn="≂̸",rTn="≫",iTn="≪",oTn=` `,sTn="∄",aTn="∄",lTn="𝔑",cTn="𝔫",uTn="≧̸",dTn="≱",fTn="≱",pTn="≧̸",hTn="⩾̸",TTn="⩾̸",mTn="⋙̸",gTn="≵",_Tn="≫⃒",QTn="≯",vTn="≯",yTn="≫̸",bTn="↮",ETn="⇎",xTn="⫲",STn="∋",LTn="⋼",CTn="⋺",ATn="∋",wTn="Њ",MTn="њ",OTn="↚",RTn="⇍",NTn="‥",DTn="≦̸",ITn="≰",kTn="↚",PTn="⇍",HTn="↮",VTn="⇎",BTn="≰",FTn="≦̸",$Tn="⩽̸",UTn="⩽̸",GTn="≮",qTn="⋘̸",zTn="≴",jTn="≪⃒",WTn="≮",YTn="⋪",KTn="⋬",ZTn="≪̸",XTn="∤",JTn="⁠",emn=" ",tmn="𝕟",nmn="ℕ",rmn="⫬",imn="¬",omn="≢",smn="≭",amn="∦",lmn="∉",cmn="≠",umn="≂̸",dmn="∄",fmn="≯",pmn="≱",hmn="≧̸",Tmn="≫̸",mmn="≹",gmn="⩾̸",_mn="≵",Qmn="≎̸",vmn="≏̸",ymn="∉",bmn="⋵̸",Emn="⋹̸",xmn="∉",Smn="⋷",Lmn="⋶",Cmn="⧏̸",Amn="⋪",wmn="⋬",Mmn="≮",Omn="≰",Rmn="≸",Nmn="≪̸",Dmn="⩽̸",Imn="≴",kmn="⪢̸",Pmn="⪡̸",Hmn="∌",Vmn="∌",Bmn="⋾",Fmn="⋽",$mn="⊀",Umn="⪯̸",Gmn="⋠",qmn="∌",zmn="⧐̸",jmn="⋫",Wmn="⋭",Ymn="⊏̸",Kmn="⋢",Zmn="⊐̸",Xmn="⋣",Jmn="⊂⃒",egn="⊈",tgn="⊁",ngn="⪰̸",rgn="⋡",ign="≿̸",ogn="⊃⃒",sgn="⊉",agn="≁",lgn="≄",cgn="≇",ugn="≉",dgn="∤",fgn="∦",pgn="∦",hgn="⫽⃥",Tgn="∂̸",mgn="⨔",ggn="⊀",_gn="⋠",Qgn="⊀",vgn="⪯̸",ygn="⪯̸",bgn="⤳̸",Egn="↛",xgn="⇏",Sgn="↝̸",Lgn="↛",Cgn="⇏",Agn="⋫",wgn="⋭",Mgn="⊁",Ogn="⋡",Rgn="⪰̸",Ngn="𝒩",Dgn="𝓃",Ign="∤",kgn="∦",Pgn="≁",Hgn="≄",Vgn="≄",Bgn="∤",Fgn="∦",$gn="⋢",Ugn="⋣",Ggn="⊄",qgn="⫅̸",zgn="⊈",jgn="⊂⃒",Wgn="⊈",Ygn="⫅̸",Kgn="⊁",Zgn="⪰̸",Xgn="⊅",Jgn="⫆̸",e_n="⊉",t_n="⊃⃒",n_n="⊉",r_n="⫆̸",i_n="≹",o_n="Ñ",s_n="ñ",a_n="≸",l_n="⋪",c_n="⋬",u_n="⋫",d_n="⋭",f_n="Ν",p_n="ν",h_n="#",T_n="№",m_n=" ",g_n="≍⃒",__n="⊬",Q_n="⊭",v_n="⊮",y_n="⊯",b_n="≥⃒",E_n=">⃒",x_n="⤄",S_n="⧞",L_n="⤂",C_n="≤⃒",A_n="<⃒",w_n="⊴⃒",M_n="⤃",O_n="⊵⃒",R_n="∼⃒",N_n="⤣",D_n="↖",I_n="⇖",k_n="↖",P_n="⤧",H_n="Ó",V_n="ó",B_n="⊛",F_n="Ô",$_n="ô",U_n="⊚",G_n="О",q_n="о",z_n="⊝",j_n="Ő",W_n="ő",Y_n="⨸",K_n="⊙",Z_n="⦼",X_n="Œ",J_n="œ",eQn="⦿",tQn="𝔒",nQn="𝔬",rQn="˛",iQn="Ò",oQn="ò",sQn="⧁",aQn="⦵",lQn="Ω",cQn="∮",uQn="↺",dQn="⦾",fQn="⦻",pQn="‾",hQn="⧀",TQn="Ō",mQn="ō",gQn="Ω",_Qn="ω",QQn="Ο",vQn="ο",yQn="⦶",bQn="⊖",EQn="𝕆",xQn="𝕠",SQn="⦷",LQn="“",CQn="‘",AQn="⦹",wQn="⊕",MQn="↻",OQn="⩔",RQn="∨",NQn="⩝",DQn="ℴ",IQn="ℴ",kQn="ª",PQn="º",HQn="⊶",VQn="⩖",BQn="⩗",FQn="⩛",$Qn="Ⓢ",UQn="𝒪",GQn="ℴ",qQn="Ø",zQn="ø",jQn="⊘",WQn="Õ",YQn="õ",KQn="⨶",ZQn="⨷",XQn="⊗",JQn="Ö",evn="ö",tvn="⌽",nvn="‾",rvn="⏞",ivn="⎴",ovn="⏜",svn="¶",avn="∥",lvn="∥",cvn="⫳",uvn="⫽",dvn="∂",fvn="∂",pvn="П",hvn="п",Tvn="%",mvn=".",gvn="‰",_vn="⊥",Qvn="‱",vvn="𝔓",yvn="𝔭",bvn="Φ",Evn="φ",xvn="ϕ",Svn="ℳ",Lvn="☎",Cvn="Π",Avn="π",wvn="⋔",Mvn="ϖ",Ovn="ℏ",Rvn="ℎ",Nvn="ℏ",Dvn="⨣",Ivn="⊞",kvn="⨢",Pvn="+",Hvn="∔",Vvn="⨥",Bvn="⩲",Fvn="±",$vn="±",Uvn="⨦",Gvn="⨧",qvn="±",zvn="ℌ",jvn="⨕",Wvn="𝕡",Yvn="ℙ",Kvn="£",Zvn="⪷",Xvn="⪻",Jvn="≺",eyn="≼",tyn="⪷",nyn="≺",ryn="≼",iyn="≺",oyn="⪯",syn="≼",ayn="≾",lyn="⪯",cyn="⪹",uyn="⪵",dyn="⋨",fyn="⪯",pyn="⪳",hyn="≾",Tyn="′",myn="″",gyn="ℙ",_yn="⪹",Qyn="⪵",vyn="⋨",yyn="∏",byn="∏",Eyn="⌮",xyn="⌒",Syn="⌓",Lyn="∝",Cyn="∝",Ayn="∷",wyn="∝",Myn="≾",Oyn="⊰",Ryn="𝒫",Nyn="𝓅",Dyn="Ψ",Iyn="ψ",kyn=" ",Pyn="𝔔",Hyn="𝔮",Vyn="⨌",Byn="𝕢",Fyn="ℚ",$yn="⁗",Uyn="𝒬",Gyn="𝓆",qyn="ℍ",zyn="⨖",jyn="?",Wyn="≟",Yyn='"',Kyn='"',Zyn="⇛",Xyn="∽̱",Jyn="Ŕ",ebn="ŕ",tbn="√",nbn="⦳",rbn="⟩",ibn="⟫",obn="⦒",sbn="⦥",abn="⟩",lbn="»",cbn="⥵",ubn="⇥",dbn="⤠",fbn="⤳",pbn="→",hbn="↠",Tbn="⇒",mbn="⤞",gbn="↪",_bn="↬",Qbn="⥅",vbn="⥴",ybn="⤖",bbn="↣",Ebn="↝",xbn="⤚",Sbn="⤜",Lbn="∶",Cbn="ℚ",Abn="⤍",wbn="⤏",Mbn="⤐",Obn="❳",Rbn="}",Nbn="]",Dbn="⦌",Ibn="⦎",kbn="⦐",Pbn="Ř",Hbn="ř",Vbn="Ŗ",Bbn="ŗ",Fbn="⌉",$bn="}",Ubn="Р",Gbn="р",qbn="⤷",zbn="⥩",jbn="”",Wbn="”",Ybn="↳",Kbn="ℜ",Zbn="ℛ",Xbn="ℜ",Jbn="ℝ",eEn="ℜ",tEn="▭",nEn="®",rEn="®",iEn="∋",oEn="⇋",sEn="⥯",aEn="⥽",lEn="⌋",cEn="𝔯",uEn="ℜ",dEn="⥤",fEn="⇁",pEn="⇀",hEn="⥬",TEn="Ρ",mEn="ρ",gEn="ϱ",_En="⟩",QEn="⇥",vEn="→",yEn="→",bEn="⇒",EEn="⇄",xEn="↣",SEn="⌉",LEn="⟧",CEn="⥝",AEn="⥕",wEn="⇂",MEn="⌋",OEn="⇁",REn="⇀",NEn="⇄",DEn="⇌",IEn="⇉",kEn="↝",PEn="↦",HEn="⊢",VEn="⥛",BEn="⋌",FEn="⧐",$En="⊳",UEn="⊵",GEn="⥏",qEn="⥜",zEn="⥔",jEn="↾",WEn="⥓",YEn="⇀",KEn="˚",ZEn="≓",XEn="⇄",JEn="⇌",exn="‏",txn="⎱",nxn="⎱",rxn="⫮",ixn="⟭",oxn="⇾",sxn="⟧",axn="⦆",lxn="𝕣",cxn="ℝ",uxn="⨮",dxn="⨵",fxn="⥰",pxn=")",hxn="⦔",Txn="⨒",mxn="⇉",gxn="⇛",_xn="›",Qxn="𝓇",vxn="ℛ",yxn="↱",bxn="↱",Exn="]",xxn="’",Sxn="’",Lxn="⋌",Cxn="⋊",Axn="▹",wxn="⊵",Mxn="▸",Oxn="⧎",Rxn="⧴",Nxn="⥨",Dxn="℞",Ixn="Ś",kxn="ś",Pxn="‚",Hxn="⪸",Vxn="Š",Bxn="š",Fxn="⪼",$xn="≻",Uxn="≽",Gxn="⪰",qxn="⪴",zxn="Ş",jxn="ş",Wxn="Ŝ",Yxn="ŝ",Kxn="⪺",Zxn="⪶",Xxn="⋩",Jxn="⨓",eSn="≿",tSn="С",nSn="с",rSn="⊡",iSn="⋅",oSn="⩦",sSn="⤥",aSn="↘",lSn="⇘",cSn="↘",uSn="§",dSn=";",fSn="⤩",pSn="∖",hSn="∖",TSn="✶",mSn="𝔖",gSn="𝔰",_Sn="⌢",QSn="♯",vSn="Щ",ySn="щ",bSn="Ш",ESn="ш",xSn="↓",SSn="←",LSn="∣",CSn="∥",ASn="→",wSn="↑",MSn="­",OSn="Σ",RSn="σ",NSn="ς",DSn="ς",ISn="∼",kSn="⩪",PSn="≃",HSn="≃",VSn="⪞",BSn="⪠",FSn="⪝",$Sn="⪟",USn="≆",GSn="⨤",qSn="⥲",zSn="←",jSn="∘",WSn="∖",YSn="⨳",KSn="⧤",ZSn="∣",XSn="⌣",JSn="⪪",eLn="⪬",tLn="⪬︀",nLn="Ь",rLn="ь",iLn="⌿",oLn="⧄",sLn="/",aLn="𝕊",lLn="𝕤",cLn="♠",uLn="♠",dLn="∥",fLn="⊓",pLn="⊓︀",hLn="⊔",TLn="⊔︀",mLn="√",gLn="⊏",_Ln="⊑",QLn="⊏",vLn="⊑",yLn="⊐",bLn="⊒",ELn="⊐",xLn="⊒",SLn="□",LLn="□",CLn="⊓",ALn="⊏",wLn="⊑",MLn="⊐",OLn="⊒",RLn="⊔",NLn="▪",DLn="□",ILn="▪",kLn="→",PLn="𝒮",HLn="𝓈",VLn="∖",BLn="⌣",FLn="⋆",$Ln="⋆",ULn="☆",GLn="★",qLn="ϵ",zLn="ϕ",jLn="¯",WLn="⊂",YLn="⋐",KLn="⪽",ZLn="⫅",XLn="⊆",JLn="⫃",eCn="⫁",tCn="⫋",nCn="⊊",rCn="⪿",iCn="⥹",oCn="⊂",sCn="⋐",aCn="⊆",lCn="⫅",cCn="⊆",uCn="⊊",dCn="⫋",fCn="⫇",pCn="⫕",hCn="⫓",TCn="⪸",mCn="≻",gCn="≽",_Cn="≻",QCn="⪰",vCn="≽",yCn="≿",bCn="⪰",ECn="⪺",xCn="⪶",SCn="⋩",LCn="≿",CCn="∋",ACn="∑",wCn="∑",MCn="♪",OCn="¹",RCn="²",NCn="³",DCn="⊃",ICn="⋑",kCn="⪾",PCn="⫘",HCn="⫆",VCn="⊇",BCn="⫄",FCn="⊃",$Cn="⊇",UCn="⟉",GCn="⫗",qCn="⥻",zCn="⫂",jCn="⫌",WCn="⊋",YCn="⫀",KCn="⊃",ZCn="⋑",XCn="⊇",JCn="⫆",eAn="⊋",tAn="⫌",nAn="⫈",rAn="⫔",iAn="⫖",oAn="⤦",sAn="↙",aAn="⇙",lAn="↙",cAn="⤪",uAn="ß",dAn=" ",fAn="⌖",pAn="Τ",hAn="τ",TAn="⎴",mAn="Ť",gAn="ť",_An="Ţ",QAn="ţ",vAn="Т",yAn="т",bAn="⃛",EAn="⌕",xAn="𝔗",SAn="𝔱",LAn="∴",CAn="∴",AAn="∴",wAn="Θ",MAn="θ",OAn="ϑ",RAn="ϑ",NAn="≈",DAn="∼",IAn="  ",kAn=" ",PAn=" ",HAn="≈",VAn="∼",BAn="Þ",FAn="þ",$An="˜",UAn="∼",GAn="≃",qAn="≅",zAn="≈",jAn="⨱",WAn="⊠",YAn="×",KAn="⨰",ZAn="∭",XAn="⤨",JAn="⌶",ewn="⫱",twn="⊤",nwn="𝕋",rwn="𝕥",iwn="⫚",own="⤩",swn="‴",awn="™",lwn="™",cwn="▵",uwn="▿",dwn="◃",fwn="⊴",pwn="≜",hwn="▹",Twn="⊵",mwn="◬",gwn="≜",_wn="⨺",Qwn="⃛",vwn="⨹",ywn="⧍",bwn="⨻",Ewn="⏢",xwn="𝒯",Swn="𝓉",Lwn="Ц",Cwn="ц",Awn="Ћ",wwn="ћ",Mwn="Ŧ",Own="ŧ",Rwn="≬",Nwn="↞",Dwn="↠",Iwn="Ú",kwn="ú",Pwn="↑",Hwn="↟",Vwn="⇑",Bwn="⥉",Fwn="Ў",$wn="ў",Uwn="Ŭ",Gwn="ŭ",qwn="Û",zwn="û",jwn="У",Wwn="у",Ywn="⇅",Kwn="Ű",Zwn="ű",Xwn="⥮",Jwn="⥾",eMn="𝔘",tMn="𝔲",nMn="Ù",rMn="ù",iMn="⥣",oMn="↿",sMn="↾",aMn="▀",lMn="⌜",cMn="⌜",uMn="⌏",dMn="◸",fMn="Ū",pMn="ū",hMn="¨",TMn="_",mMn="⏟",gMn="⎵",_Mn="⏝",QMn="⋃",vMn="⊎",yMn="Ų",bMn="ų",EMn="𝕌",xMn="𝕦",SMn="⤒",LMn="↑",CMn="↑",AMn="⇑",wMn="⇅",MMn="↕",OMn="↕",RMn="⇕",NMn="⥮",DMn="↿",IMn="↾",kMn="⊎",PMn="↖",HMn="↗",VMn="υ",BMn="ϒ",FMn="ϒ",$Mn="Υ",UMn="υ",GMn="↥",qMn="⊥",zMn="⇈",jMn="⌝",WMn="⌝",YMn="⌎",KMn="Ů",ZMn="ů",XMn="◹",JMn="𝒰",eOn="𝓊",tOn="⋰",nOn="Ũ",rOn="ũ",iOn="▵",oOn="▴",sOn="⇈",aOn="Ü",lOn="ü",cOn="⦧",uOn="⦜",dOn="ϵ",fOn="ϰ",pOn="∅",hOn="ϕ",TOn="ϖ",mOn="∝",gOn="↕",_On="⇕",QOn="ϱ",vOn="ς",yOn="⊊︀",bOn="⫋︀",EOn="⊋︀",xOn="⫌︀",SOn="ϑ",LOn="⊲",COn="⊳",AOn="⫨",wOn="⫫",MOn="⫩",OOn="В",ROn="в",NOn="⊢",DOn="⊨",IOn="⊩",kOn="⊫",POn="⫦",HOn="⊻",VOn="∨",BOn="⋁",FOn="≚",$On="⋮",UOn="|",GOn="‖",qOn="|",zOn="‖",jOn="∣",WOn="|",YOn="❘",KOn="≀",ZOn=" ",XOn="𝔙",JOn="𝔳",eRn="⊲",tRn="⊂⃒",nRn="⊃⃒",rRn="𝕍",iRn="𝕧",oRn="∝",sRn="⊳",aRn="𝒱",lRn="𝓋",cRn="⫋︀",uRn="⊊︀",dRn="⫌︀",fRn="⊋︀",pRn="⊪",hRn="⦚",TRn="Ŵ",mRn="ŵ",gRn="⩟",_Rn="∧",QRn="⋀",vRn="≙",yRn="℘",bRn="𝔚",ERn="𝔴",xRn="𝕎",SRn="𝕨",LRn="℘",CRn="≀",ARn="≀",wRn="𝒲",MRn="𝓌",ORn="⋂",RRn="◯",NRn="⋃",DRn="▽",IRn="𝔛",kRn="𝔵",PRn="⟷",HRn="⟺",VRn="Ξ",BRn="ξ",FRn="⟵",$Rn="⟸",URn="⟼",GRn="⋻",qRn="⨀",zRn="𝕏",jRn="𝕩",WRn="⨁",YRn="⨂",KRn="⟶",ZRn="⟹",XRn="𝒳",JRn="𝓍",eNn="⨆",tNn="⨄",nNn="△",rNn="⋁",iNn="⋀",oNn="Ý",sNn="ý",aNn="Я",lNn="я",cNn="Ŷ",uNn="ŷ",dNn="Ы",fNn="ы",pNn="¥",hNn="𝔜",TNn="𝔶",mNn="Ї",gNn="ї",_Nn="𝕐",QNn="𝕪",vNn="𝒴",yNn="𝓎",bNn="Ю",ENn="ю",xNn="ÿ",SNn="Ÿ",LNn="Ź",CNn="ź",ANn="Ž",wNn="ž",MNn="З",ONn="з",RNn="Ż",NNn="ż",DNn="ℨ",INn="​",kNn="Ζ",PNn="ζ",HNn="𝔷",VNn="ℨ",BNn="Ж",FNn="ж",$Nn="⇝",UNn="𝕫",GNn="ℤ",qNn="𝒵",zNn="𝓏",jNn="‍",WNn="‌",YNn={Aacute:Rin,aacute:Nin,Abreve:Din,abreve:Iin,ac:kin,acd:Pin,acE:Hin,Acirc:Vin,acirc:Bin,acute:Fin,Acy:$in,acy:Uin,AElig:Gin,aelig:qin,af:zin,Afr:jin,afr:Win,Agrave:Yin,agrave:Kin,alefsym:Zin,aleph:Xin,Alpha:Jin,alpha:eon,Amacr:ton,amacr:non,amalg:ron,amp:ion,AMP:oon,andand:son,And:aon,and:lon,andd:con,andslope:uon,andv:don,ang:fon,ange:pon,angle:hon,angmsdaa:Ton,angmsdab:mon,angmsdac:gon,angmsdad:_on,angmsdae:Qon,angmsdaf:von,angmsdag:yon,angmsdah:bon,angmsd:Eon,angrt:xon,angrtvb:Son,angrtvbd:Lon,angsph:Con,angst:Aon,angzarr:won,Aogon:Mon,aogon:Oon,Aopf:Ron,aopf:Non,apacir:Don,ap:Ion,apE:kon,ape:Pon,apid:Hon,apos:Von,ApplyFunction:Bon,approx:Fon,approxeq:$on,Aring:Uon,aring:Gon,Ascr:qon,ascr:zon,Assign:jon,ast:Won,asymp:Yon,asympeq:Kon,Atilde:Zon,atilde:Xon,Auml:Jon,auml:esn,awconint:tsn,awint:nsn,backcong:rsn,backepsilon:isn,backprime:osn,backsim:ssn,backsimeq:asn,Backslash:lsn,Barv:csn,barvee:usn,barwed:dsn,Barwed:fsn,barwedge:psn,bbrk:hsn,bbrktbrk:Tsn,bcong:msn,Bcy:gsn,bcy:_sn,bdquo:Qsn,becaus:vsn,because:ysn,Because:bsn,bemptyv:Esn,bepsi:xsn,bernou:Ssn,Bernoullis:Lsn,Beta:Csn,beta:Asn,beth:wsn,between:Msn,Bfr:Osn,bfr:Rsn,bigcap:Nsn,bigcirc:Dsn,bigcup:Isn,bigodot:ksn,bigoplus:Psn,bigotimes:Hsn,bigsqcup:Vsn,bigstar:Bsn,bigtriangledown:Fsn,bigtriangleup:$sn,biguplus:Usn,bigvee:Gsn,bigwedge:qsn,bkarow:zsn,blacklozenge:jsn,blacksquare:Wsn,blacktriangle:Ysn,blacktriangledown:Ksn,blacktriangleleft:Zsn,blacktriangleright:Xsn,blank:Jsn,blk12:ean,blk14:tan,blk34:nan,block:ran,bne:ian,bnequiv:oan,bNot:san,bnot:aan,Bopf:lan,bopf:can,bot:uan,bottom:dan,bowtie:fan,boxbox:pan,boxdl:han,boxdL:Tan,boxDl:man,boxDL:gan,boxdr:_an,boxdR:Qan,boxDr:van,boxDR:yan,boxh:ban,boxH:Ean,boxhd:xan,boxHd:San,boxhD:Lan,boxHD:Can,boxhu:Aan,boxHu:wan,boxhU:Man,boxHU:Oan,boxminus:Ran,boxplus:Nan,boxtimes:Dan,boxul:Ian,boxuL:kan,boxUl:Pan,boxUL:Han,boxur:Van,boxuR:Ban,boxUr:Fan,boxUR:$an,boxv:Uan,boxV:Gan,boxvh:qan,boxvH:zan,boxVh:jan,boxVH:Wan,boxvl:Yan,boxvL:Kan,boxVl:Zan,boxVL:Xan,boxvr:Jan,boxvR:e1n,boxVr:t1n,boxVR:n1n,bprime:r1n,breve:i1n,Breve:o1n,brvbar:s1n,bscr:a1n,Bscr:l1n,bsemi:c1n,bsim:u1n,bsime:d1n,bsolb:f1n,bsol:p1n,bsolhsub:h1n,bull:T1n,bullet:m1n,bump:g1n,bumpE:_1n,bumpe:Q1n,Bumpeq:v1n,bumpeq:y1n,Cacute:b1n,cacute:E1n,capand:x1n,capbrcup:S1n,capcap:L1n,cap:C1n,Cap:A1n,capcup:w1n,capdot:M1n,CapitalDifferentialD:O1n,caps:R1n,caret:N1n,caron:D1n,Cayleys:I1n,ccaps:k1n,Ccaron:P1n,ccaron:H1n,Ccedil:V1n,ccedil:B1n,Ccirc:F1n,ccirc:$1n,Cconint:U1n,ccups:G1n,ccupssm:q1n,Cdot:z1n,cdot:j1n,cedil:W1n,Cedilla:Y1n,cemptyv:K1n,cent:Z1n,centerdot:X1n,CenterDot:J1n,cfr:e2n,Cfr:t2n,CHcy:n2n,chcy:r2n,check:i2n,checkmark:o2n,Chi:s2n,chi:a2n,circ:l2n,circeq:c2n,circlearrowleft:u2n,circlearrowright:d2n,circledast:f2n,circledcirc:p2n,circleddash:h2n,CircleDot:T2n,circledR:m2n,circledS:g2n,CircleMinus:_2n,CirclePlus:Q2n,CircleTimes:v2n,cir:y2n,cirE:b2n,cire:E2n,cirfnint:x2n,cirmid:S2n,cirscir:L2n,ClockwiseContourIntegral:C2n,CloseCurlyDoubleQuote:A2n,CloseCurlyQuote:w2n,clubs:M2n,clubsuit:O2n,colon:R2n,Colon:N2n,Colone:D2n,colone:I2n,coloneq:k2n,comma:P2n,commat:H2n,comp:V2n,compfn:B2n,complement:F2n,complexes:$2n,cong:U2n,congdot:G2n,Congruent:q2n,conint:z2n,Conint:j2n,ContourIntegral:W2n,copf:Y2n,Copf:K2n,coprod:Z2n,Coproduct:X2n,copy:J2n,COPY:eln,copysr:tln,CounterClockwiseContourIntegral:nln,crarr:rln,cross:iln,Cross:oln,Cscr:sln,cscr:aln,csub:lln,csube:cln,csup:uln,csupe:dln,ctdot:fln,cudarrl:pln,cudarrr:hln,cuepr:Tln,cuesc:mln,cularr:gln,cularrp:_ln,cupbrcap:Qln,cupcap:vln,CupCap:yln,cup:bln,Cup:Eln,cupcup:xln,cupdot:Sln,cupor:Lln,cups:Cln,curarr:Aln,curarrm:wln,curlyeqprec:Mln,curlyeqsucc:Oln,curlyvee:Rln,curlywedge:Nln,curren:Dln,curvearrowleft:Iln,curvearrowright:kln,cuvee:Pln,cuwed:Hln,cwconint:Vln,cwint:Bln,cylcty:Fln,dagger:$ln,Dagger:Uln,daleth:Gln,darr:qln,Darr:zln,dArr:jln,dash:Wln,Dashv:Yln,dashv:Kln,dbkarow:Zln,dblac:Xln,Dcaron:Jln,dcaron:ecn,Dcy:tcn,dcy:ncn,ddagger:rcn,ddarr:icn,DD:ocn,dd:scn,DDotrahd:acn,ddotseq:lcn,deg:ccn,Del:ucn,Delta:dcn,delta:fcn,demptyv:pcn,dfisht:hcn,Dfr:Tcn,dfr:mcn,dHar:gcn,dharl:_cn,dharr:Qcn,DiacriticalAcute:vcn,DiacriticalDot:ycn,DiacriticalDoubleAcute:bcn,DiacriticalGrave:Ecn,DiacriticalTilde:xcn,diam:Scn,diamond:Lcn,Diamond:Ccn,diamondsuit:Acn,diams:wcn,die:Mcn,DifferentialD:Ocn,digamma:Rcn,disin:Ncn,div:Dcn,divide:Icn,divideontimes:kcn,divonx:Pcn,DJcy:Hcn,djcy:Vcn,dlcorn:Bcn,dlcrop:Fcn,dollar:$cn,Dopf:Ucn,dopf:Gcn,Dot:qcn,dot:zcn,DotDot:jcn,doteq:Wcn,doteqdot:Ycn,DotEqual:Kcn,dotminus:Zcn,dotplus:Xcn,dotsquare:Jcn,doublebarwedge:e3n,DoubleContourIntegral:t3n,DoubleDot:n3n,DoubleDownArrow:r3n,DoubleLeftArrow:i3n,DoubleLeftRightArrow:o3n,DoubleLeftTee:s3n,DoubleLongLeftArrow:a3n,DoubleLongLeftRightArrow:l3n,DoubleLongRightArrow:c3n,DoubleRightArrow:u3n,DoubleRightTee:d3n,DoubleUpArrow:f3n,DoubleUpDownArrow:p3n,DoubleVerticalBar:h3n,DownArrowBar:T3n,downarrow:m3n,DownArrow:g3n,Downarrow:_3n,DownArrowUpArrow:Q3n,DownBreve:v3n,downdownarrows:y3n,downharpoonleft:b3n,downharpoonright:E3n,DownLeftRightVector:x3n,DownLeftTeeVector:S3n,DownLeftVectorBar:L3n,DownLeftVector:C3n,DownRightTeeVector:A3n,DownRightVectorBar:w3n,DownRightVector:M3n,DownTeeArrow:O3n,DownTee:R3n,drbkarow:N3n,drcorn:D3n,drcrop:I3n,Dscr:k3n,dscr:P3n,DScy:H3n,dscy:V3n,dsol:B3n,Dstrok:F3n,dstrok:$3n,dtdot:U3n,dtri:G3n,dtrif:q3n,duarr:z3n,duhar:j3n,dwangle:W3n,DZcy:Y3n,dzcy:K3n,dzigrarr:Z3n,Eacute:X3n,eacute:J3n,easter:e4n,Ecaron:t4n,ecaron:n4n,Ecirc:r4n,ecirc:i4n,ecir:o4n,ecolon:s4n,Ecy:a4n,ecy:l4n,eDDot:c4n,Edot:u4n,edot:d4n,eDot:f4n,ee:p4n,efDot:h4n,Efr:T4n,efr:m4n,eg:g4n,Egrave:_4n,egrave:Q4n,egs:v4n,egsdot:y4n,el:b4n,Element:E4n,elinters:x4n,ell:S4n,els:L4n,elsdot:C4n,Emacr:A4n,emacr:w4n,empty:M4n,emptyset:O4n,EmptySmallSquare:R4n,emptyv:N4n,EmptyVerySmallSquare:D4n,emsp13:I4n,emsp14:k4n,emsp:P4n,ENG:H4n,eng:V4n,ensp:B4n,Eogon:F4n,eogon:$4n,Eopf:U4n,eopf:G4n,epar:q4n,eparsl:z4n,eplus:j4n,epsi:W4n,Epsilon:Y4n,epsilon:K4n,epsiv:Z4n,eqcirc:X4n,eqcolon:J4n,eqsim:e0n,eqslantgtr:t0n,eqslantless:n0n,Equal:r0n,equals:i0n,EqualTilde:o0n,equest:s0n,Equilibrium:a0n,equiv:l0n,equivDD:c0n,eqvparsl:u0n,erarr:d0n,erDot:f0n,escr:p0n,Escr:h0n,esdot:T0n,Esim:m0n,esim:g0n,Eta:_0n,eta:Q0n,ETH:v0n,eth:y0n,Euml:b0n,euml:E0n,euro:x0n,excl:S0n,exist:L0n,Exists:C0n,expectation:A0n,exponentiale:w0n,ExponentialE:M0n,fallingdotseq:O0n,Fcy:R0n,fcy:N0n,female:D0n,ffilig:I0n,fflig:k0n,ffllig:P0n,Ffr:H0n,ffr:V0n,filig:B0n,FilledSmallSquare:F0n,FilledVerySmallSquare:$0n,fjlig:U0n,flat:G0n,fllig:q0n,fltns:z0n,fnof:j0n,Fopf:W0n,fopf:Y0n,forall:K0n,ForAll:Z0n,fork:X0n,forkv:J0n,Fouriertrf:e6n,fpartint:t6n,frac12:n6n,frac13:r6n,frac14:i6n,frac15:o6n,frac16:s6n,frac18:a6n,frac23:l6n,frac25:c6n,frac34:u6n,frac35:d6n,frac38:f6n,frac45:p6n,frac56:h6n,frac58:T6n,frac78:m6n,frasl:g6n,frown:_6n,fscr:Q6n,Fscr:v6n,gacute:y6n,Gamma:b6n,gamma:E6n,Gammad:x6n,gammad:S6n,gap:L6n,Gbreve:C6n,gbreve:A6n,Gcedil:w6n,Gcirc:M6n,gcirc:O6n,Gcy:R6n,gcy:N6n,Gdot:D6n,gdot:I6n,ge:k6n,gE:P6n,gEl:H6n,gel:V6n,geq:B6n,geqq:F6n,geqslant:$6n,gescc:U6n,ges:G6n,gesdot:q6n,gesdoto:z6n,gesdotol:j6n,gesl:W6n,gesles:Y6n,Gfr:K6n,gfr:Z6n,gg:X6n,Gg:J6n,ggg:e5n,gimel:t5n,GJcy:n5n,gjcy:r5n,gla:i5n,gl:o5n,glE:s5n,glj:a5n,gnap:l5n,gnapprox:c5n,gne:u5n,gnE:d5n,gneq:f5n,gneqq:p5n,gnsim:h5n,Gopf:T5n,gopf:m5n,grave:g5n,GreaterEqual:_5n,GreaterEqualLess:Q5n,GreaterFullEqual:v5n,GreaterGreater:y5n,GreaterLess:b5n,GreaterSlantEqual:E5n,GreaterTilde:x5n,Gscr:S5n,gscr:L5n,gsim:C5n,gsime:A5n,gsiml:w5n,gtcc:M5n,gtcir:O5n,gt:R5n,GT:N5n,Gt:D5n,gtdot:I5n,gtlPar:k5n,gtquest:P5n,gtrapprox:H5n,gtrarr:V5n,gtrdot:B5n,gtreqless:F5n,gtreqqless:$5n,gtrless:U5n,gtrsim:G5n,gvertneqq:q5n,gvnE:z5n,Hacek:j5n,hairsp:W5n,half:Y5n,hamilt:K5n,HARDcy:Z5n,hardcy:X5n,harrcir:J5n,harr:eun,hArr:tun,harrw:nun,Hat:run,hbar:iun,Hcirc:oun,hcirc:sun,hearts:aun,heartsuit:lun,hellip:cun,hercon:uun,hfr:dun,Hfr:fun,HilbertSpace:pun,hksearow:hun,hkswarow:Tun,hoarr:mun,homtht:gun,hookleftarrow:_un,hookrightarrow:Qun,hopf:vun,Hopf:yun,horbar:bun,HorizontalLine:Eun,hscr:xun,Hscr:Sun,hslash:Lun,Hstrok:Cun,hstrok:Aun,HumpDownHump:wun,HumpEqual:Mun,hybull:Oun,hyphen:Run,Iacute:Nun,iacute:Dun,ic:Iun,Icirc:kun,icirc:Pun,Icy:Hun,icy:Vun,Idot:Bun,IEcy:Fun,iecy:$un,iexcl:Uun,iff:Gun,ifr:qun,Ifr:zun,Igrave:jun,igrave:Wun,ii:Yun,iiiint:Kun,iiint:Zun,iinfin:Xun,iiota:Jun,IJlig:edn,ijlig:tdn,Imacr:ndn,imacr:rdn,image:idn,ImaginaryI:odn,imagline:sdn,imagpart:adn,imath:ldn,Im:cdn,imof:udn,imped:ddn,Implies:fdn,incare:pdn,in:"∈",infin:hdn,infintie:Tdn,inodot:mdn,intcal:gdn,int:_dn,Int:Qdn,integers:vdn,Integral:ydn,intercal:bdn,Intersection:Edn,intlarhk:xdn,intprod:Sdn,InvisibleComma:Ldn,InvisibleTimes:Cdn,IOcy:Adn,iocy:wdn,Iogon:Mdn,iogon:Odn,Iopf:Rdn,iopf:Ndn,Iota:Ddn,iota:Idn,iprod:kdn,iquest:Pdn,iscr:Hdn,Iscr:Vdn,isin:Bdn,isindot:Fdn,isinE:$dn,isins:Udn,isinsv:Gdn,isinv:qdn,it:zdn,Itilde:jdn,itilde:Wdn,Iukcy:Ydn,iukcy:Kdn,Iuml:Zdn,iuml:Xdn,Jcirc:Jdn,jcirc:e7n,Jcy:t7n,jcy:n7n,Jfr:r7n,jfr:i7n,jmath:o7n,Jopf:s7n,jopf:a7n,Jscr:l7n,jscr:c7n,Jsercy:u7n,jsercy:d7n,Jukcy:f7n,jukcy:p7n,Kappa:h7n,kappa:T7n,kappav:m7n,Kcedil:g7n,kcedil:_7n,Kcy:Q7n,kcy:v7n,Kfr:y7n,kfr:b7n,kgreen:E7n,KHcy:x7n,khcy:S7n,KJcy:L7n,kjcy:C7n,Kopf:A7n,kopf:w7n,Kscr:M7n,kscr:O7n,lAarr:R7n,Lacute:N7n,lacute:D7n,laemptyv:I7n,lagran:k7n,Lambda:P7n,lambda:H7n,lang:V7n,Lang:B7n,langd:F7n,langle:$7n,lap:U7n,Laplacetrf:G7n,laquo:q7n,larrb:z7n,larrbfs:j7n,larr:W7n,Larr:Y7n,lArr:K7n,larrfs:Z7n,larrhk:X7n,larrlp:J7n,larrpl:e8n,larrsim:t8n,larrtl:n8n,latail:r8n,lAtail:i8n,lat:o8n,late:s8n,lates:a8n,lbarr:l8n,lBarr:c8n,lbbrk:u8n,lbrace:d8n,lbrack:f8n,lbrke:p8n,lbrksld:h8n,lbrkslu:T8n,Lcaron:m8n,lcaron:g8n,Lcedil:_8n,lcedil:Q8n,lceil:v8n,lcub:y8n,Lcy:b8n,lcy:E8n,ldca:x8n,ldquo:S8n,ldquor:L8n,ldrdhar:C8n,ldrushar:A8n,ldsh:w8n,le:M8n,lE:O8n,LeftAngleBracket:R8n,LeftArrowBar:N8n,leftarrow:D8n,LeftArrow:I8n,Leftarrow:k8n,LeftArrowRightArrow:P8n,leftarrowtail:H8n,LeftCeiling:V8n,LeftDoubleBracket:B8n,LeftDownTeeVector:F8n,LeftDownVectorBar:$8n,LeftDownVector:U8n,LeftFloor:G8n,leftharpoondown:q8n,leftharpoonup:z8n,leftleftarrows:j8n,leftrightarrow:W8n,LeftRightArrow:Y8n,Leftrightarrow:K8n,leftrightarrows:Z8n,leftrightharpoons:X8n,leftrightsquigarrow:J8n,LeftRightVector:e9n,LeftTeeArrow:t9n,LeftTee:n9n,LeftTeeVector:r9n,leftthreetimes:i9n,LeftTriangleBar:o9n,LeftTriangle:s9n,LeftTriangleEqual:a9n,LeftUpDownVector:l9n,LeftUpTeeVector:c9n,LeftUpVectorBar:u9n,LeftUpVector:d9n,LeftVectorBar:f9n,LeftVector:p9n,lEg:h9n,leg:T9n,leq:m9n,leqq:g9n,leqslant:_9n,lescc:Q9n,les:v9n,lesdot:y9n,lesdoto:b9n,lesdotor:E9n,lesg:x9n,lesges:S9n,lessapprox:L9n,lessdot:C9n,lesseqgtr:A9n,lesseqqgtr:w9n,LessEqualGreater:M9n,LessFullEqual:O9n,LessGreater:R9n,lessgtr:N9n,LessLess:D9n,lesssim:I9n,LessSlantEqual:k9n,LessTilde:P9n,lfisht:H9n,lfloor:V9n,Lfr:B9n,lfr:F9n,lg:$9n,lgE:U9n,lHar:G9n,lhard:q9n,lharu:z9n,lharul:j9n,lhblk:W9n,LJcy:Y9n,ljcy:K9n,llarr:Z9n,ll:X9n,Ll:J9n,llcorner:efn,Lleftarrow:tfn,llhard:nfn,lltri:rfn,Lmidot:ifn,lmidot:ofn,lmoustache:sfn,lmoust:afn,lnap:lfn,lnapprox:cfn,lne:ufn,lnE:dfn,lneq:ffn,lneqq:pfn,lnsim:hfn,loang:Tfn,loarr:mfn,lobrk:gfn,longleftarrow:_fn,LongLeftArrow:Qfn,Longleftarrow:vfn,longleftrightarrow:yfn,LongLeftRightArrow:bfn,Longleftrightarrow:Efn,longmapsto:xfn,longrightarrow:Sfn,LongRightArrow:Lfn,Longrightarrow:Cfn,looparrowleft:Afn,looparrowright:wfn,lopar:Mfn,Lopf:Ofn,lopf:Rfn,loplus:Nfn,lotimes:Dfn,lowast:Ifn,lowbar:kfn,LowerLeftArrow:Pfn,LowerRightArrow:Hfn,loz:Vfn,lozenge:Bfn,lozf:Ffn,lpar:$fn,lparlt:Ufn,lrarr:Gfn,lrcorner:qfn,lrhar:zfn,lrhard:jfn,lrm:Wfn,lrtri:Yfn,lsaquo:Kfn,lscr:Zfn,Lscr:Xfn,lsh:Jfn,Lsh:epn,lsim:tpn,lsime:npn,lsimg:rpn,lsqb:ipn,lsquo:opn,lsquor:spn,Lstrok:apn,lstrok:lpn,ltcc:cpn,ltcir:upn,lt:dpn,LT:fpn,Lt:ppn,ltdot:hpn,lthree:Tpn,ltimes:mpn,ltlarr:gpn,ltquest:_pn,ltri:Qpn,ltrie:vpn,ltrif:ypn,ltrPar:bpn,lurdshar:Epn,luruhar:xpn,lvertneqq:Spn,lvnE:Lpn,macr:Cpn,male:Apn,malt:wpn,maltese:Mpn,Map:"⤅",map:Opn,mapsto:Rpn,mapstodown:Npn,mapstoleft:Dpn,mapstoup:Ipn,marker:kpn,mcomma:Ppn,Mcy:Hpn,mcy:Vpn,mdash:Bpn,mDDot:Fpn,measuredangle:$pn,MediumSpace:Upn,Mellintrf:Gpn,Mfr:qpn,mfr:zpn,mho:jpn,micro:Wpn,midast:Ypn,midcir:Kpn,mid:Zpn,middot:Xpn,minusb:Jpn,minus:ehn,minusd:thn,minusdu:nhn,MinusPlus:rhn,mlcp:ihn,mldr:ohn,mnplus:shn,models:ahn,Mopf:lhn,mopf:chn,mp:uhn,mscr:dhn,Mscr:fhn,mstpos:phn,Mu:hhn,mu:Thn,multimap:mhn,mumap:ghn,nabla:_hn,Nacute:Qhn,nacute:vhn,nang:yhn,nap:bhn,napE:Ehn,napid:xhn,napos:Shn,napprox:Lhn,natural:Chn,naturals:Ahn,natur:whn,nbsp:Mhn,nbump:Ohn,nbumpe:Rhn,ncap:Nhn,Ncaron:Dhn,ncaron:Ihn,Ncedil:khn,ncedil:Phn,ncong:Hhn,ncongdot:Vhn,ncup:Bhn,Ncy:Fhn,ncy:$hn,ndash:Uhn,nearhk:Ghn,nearr:qhn,neArr:zhn,nearrow:jhn,ne:Whn,nedot:Yhn,NegativeMediumSpace:Khn,NegativeThickSpace:Zhn,NegativeThinSpace:Xhn,NegativeVeryThinSpace:Jhn,nequiv:eTn,nesear:tTn,nesim:nTn,NestedGreaterGreater:rTn,NestedLessLess:iTn,NewLine:oTn,nexist:sTn,nexists:aTn,Nfr:lTn,nfr:cTn,ngE:uTn,nge:dTn,ngeq:fTn,ngeqq:pTn,ngeqslant:hTn,nges:TTn,nGg:mTn,ngsim:gTn,nGt:_Tn,ngt:QTn,ngtr:vTn,nGtv:yTn,nharr:bTn,nhArr:ETn,nhpar:xTn,ni:STn,nis:LTn,nisd:CTn,niv:ATn,NJcy:wTn,njcy:MTn,nlarr:OTn,nlArr:RTn,nldr:NTn,nlE:DTn,nle:ITn,nleftarrow:kTn,nLeftarrow:PTn,nleftrightarrow:HTn,nLeftrightarrow:VTn,nleq:BTn,nleqq:FTn,nleqslant:$Tn,nles:UTn,nless:GTn,nLl:qTn,nlsim:zTn,nLt:jTn,nlt:WTn,nltri:YTn,nltrie:KTn,nLtv:ZTn,nmid:XTn,NoBreak:JTn,NonBreakingSpace:emn,nopf:tmn,Nopf:nmn,Not:rmn,not:imn,NotCongruent:omn,NotCupCap:smn,NotDoubleVerticalBar:amn,NotElement:lmn,NotEqual:cmn,NotEqualTilde:umn,NotExists:dmn,NotGreater:fmn,NotGreaterEqual:pmn,NotGreaterFullEqual:hmn,NotGreaterGreater:Tmn,NotGreaterLess:mmn,NotGreaterSlantEqual:gmn,NotGreaterTilde:_mn,NotHumpDownHump:Qmn,NotHumpEqual:vmn,notin:ymn,notindot:bmn,notinE:Emn,notinva:xmn,notinvb:Smn,notinvc:Lmn,NotLeftTriangleBar:Cmn,NotLeftTriangle:Amn,NotLeftTriangleEqual:wmn,NotLess:Mmn,NotLessEqual:Omn,NotLessGreater:Rmn,NotLessLess:Nmn,NotLessSlantEqual:Dmn,NotLessTilde:Imn,NotNestedGreaterGreater:kmn,NotNestedLessLess:Pmn,notni:Hmn,notniva:Vmn,notnivb:Bmn,notnivc:Fmn,NotPrecedes:$mn,NotPrecedesEqual:Umn,NotPrecedesSlantEqual:Gmn,NotReverseElement:qmn,NotRightTriangleBar:zmn,NotRightTriangle:jmn,NotRightTriangleEqual:Wmn,NotSquareSubset:Ymn,NotSquareSubsetEqual:Kmn,NotSquareSuperset:Zmn,NotSquareSupersetEqual:Xmn,NotSubset:Jmn,NotSubsetEqual:egn,NotSucceeds:tgn,NotSucceedsEqual:ngn,NotSucceedsSlantEqual:rgn,NotSucceedsTilde:ign,NotSuperset:ogn,NotSupersetEqual:sgn,NotTilde:agn,NotTildeEqual:lgn,NotTildeFullEqual:cgn,NotTildeTilde:ugn,NotVerticalBar:dgn,nparallel:fgn,npar:pgn,nparsl:hgn,npart:Tgn,npolint:mgn,npr:ggn,nprcue:_gn,nprec:Qgn,npreceq:vgn,npre:ygn,nrarrc:bgn,nrarr:Egn,nrArr:xgn,nrarrw:Sgn,nrightarrow:Lgn,nRightarrow:Cgn,nrtri:Agn,nrtrie:wgn,nsc:Mgn,nsccue:Ogn,nsce:Rgn,Nscr:Ngn,nscr:Dgn,nshortmid:Ign,nshortparallel:kgn,nsim:Pgn,nsime:Hgn,nsimeq:Vgn,nsmid:Bgn,nspar:Fgn,nsqsube:$gn,nsqsupe:Ugn,nsub:Ggn,nsubE:qgn,nsube:zgn,nsubset:jgn,nsubseteq:Wgn,nsubseteqq:Ygn,nsucc:Kgn,nsucceq:Zgn,nsup:Xgn,nsupE:Jgn,nsupe:e_n,nsupset:t_n,nsupseteq:n_n,nsupseteqq:r_n,ntgl:i_n,Ntilde:o_n,ntilde:s_n,ntlg:a_n,ntriangleleft:l_n,ntrianglelefteq:c_n,ntriangleright:u_n,ntrianglerighteq:d_n,Nu:f_n,nu:p_n,num:h_n,numero:T_n,numsp:m_n,nvap:g_n,nvdash:__n,nvDash:Q_n,nVdash:v_n,nVDash:y_n,nvge:b_n,nvgt:E_n,nvHarr:x_n,nvinfin:S_n,nvlArr:L_n,nvle:C_n,nvlt:A_n,nvltrie:w_n,nvrArr:M_n,nvrtrie:O_n,nvsim:R_n,nwarhk:N_n,nwarr:D_n,nwArr:I_n,nwarrow:k_n,nwnear:P_n,Oacute:H_n,oacute:V_n,oast:B_n,Ocirc:F_n,ocirc:$_n,ocir:U_n,Ocy:G_n,ocy:q_n,odash:z_n,Odblac:j_n,odblac:W_n,odiv:Y_n,odot:K_n,odsold:Z_n,OElig:X_n,oelig:J_n,ofcir:eQn,Ofr:tQn,ofr:nQn,ogon:rQn,Ograve:iQn,ograve:oQn,ogt:sQn,ohbar:aQn,ohm:lQn,oint:cQn,olarr:uQn,olcir:dQn,olcross:fQn,oline:pQn,olt:hQn,Omacr:TQn,omacr:mQn,Omega:gQn,omega:_Qn,Omicron:QQn,omicron:vQn,omid:yQn,ominus:bQn,Oopf:EQn,oopf:xQn,opar:SQn,OpenCurlyDoubleQuote:LQn,OpenCurlyQuote:CQn,operp:AQn,oplus:wQn,orarr:MQn,Or:OQn,or:RQn,ord:NQn,order:DQn,orderof:IQn,ordf:kQn,ordm:PQn,origof:HQn,oror:VQn,orslope:BQn,orv:FQn,oS:$Qn,Oscr:UQn,oscr:GQn,Oslash:qQn,oslash:zQn,osol:jQn,Otilde:WQn,otilde:YQn,otimesas:KQn,Otimes:ZQn,otimes:XQn,Ouml:JQn,ouml:evn,ovbar:tvn,OverBar:nvn,OverBrace:rvn,OverBracket:ivn,OverParenthesis:ovn,para:svn,parallel:avn,par:lvn,parsim:cvn,parsl:uvn,part:dvn,PartialD:fvn,Pcy:pvn,pcy:hvn,percnt:Tvn,period:mvn,permil:gvn,perp:_vn,pertenk:Qvn,Pfr:vvn,pfr:yvn,Phi:bvn,phi:Evn,phiv:xvn,phmmat:Svn,phone:Lvn,Pi:Cvn,pi:Avn,pitchfork:wvn,piv:Mvn,planck:Ovn,planckh:Rvn,plankv:Nvn,plusacir:Dvn,plusb:Ivn,pluscir:kvn,plus:Pvn,plusdo:Hvn,plusdu:Vvn,pluse:Bvn,PlusMinus:Fvn,plusmn:$vn,plussim:Uvn,plustwo:Gvn,pm:qvn,Poincareplane:zvn,pointint:jvn,popf:Wvn,Popf:Yvn,pound:Kvn,prap:Zvn,Pr:Xvn,pr:Jvn,prcue:eyn,precapprox:tyn,prec:nyn,preccurlyeq:ryn,Precedes:iyn,PrecedesEqual:oyn,PrecedesSlantEqual:syn,PrecedesTilde:ayn,preceq:lyn,precnapprox:cyn,precneqq:uyn,precnsim:dyn,pre:fyn,prE:pyn,precsim:hyn,prime:Tyn,Prime:myn,primes:gyn,prnap:_yn,prnE:Qyn,prnsim:vyn,prod:yyn,Product:byn,profalar:Eyn,profline:xyn,profsurf:Syn,prop:Lyn,Proportional:Cyn,Proportion:Ayn,propto:wyn,prsim:Myn,prurel:Oyn,Pscr:Ryn,pscr:Nyn,Psi:Dyn,psi:Iyn,puncsp:kyn,Qfr:Pyn,qfr:Hyn,qint:Vyn,qopf:Byn,Qopf:Fyn,qprime:$yn,Qscr:Uyn,qscr:Gyn,quaternions:qyn,quatint:zyn,quest:jyn,questeq:Wyn,quot:Yyn,QUOT:Kyn,rAarr:Zyn,race:Xyn,Racute:Jyn,racute:ebn,radic:tbn,raemptyv:nbn,rang:rbn,Rang:ibn,rangd:obn,range:sbn,rangle:abn,raquo:lbn,rarrap:cbn,rarrb:ubn,rarrbfs:dbn,rarrc:fbn,rarr:pbn,Rarr:hbn,rArr:Tbn,rarrfs:mbn,rarrhk:gbn,rarrlp:_bn,rarrpl:Qbn,rarrsim:vbn,Rarrtl:ybn,rarrtl:bbn,rarrw:Ebn,ratail:xbn,rAtail:Sbn,ratio:Lbn,rationals:Cbn,rbarr:Abn,rBarr:wbn,RBarr:Mbn,rbbrk:Obn,rbrace:Rbn,rbrack:Nbn,rbrke:Dbn,rbrksld:Ibn,rbrkslu:kbn,Rcaron:Pbn,rcaron:Hbn,Rcedil:Vbn,rcedil:Bbn,rceil:Fbn,rcub:$bn,Rcy:Ubn,rcy:Gbn,rdca:qbn,rdldhar:zbn,rdquo:jbn,rdquor:Wbn,rdsh:Ybn,real:Kbn,realine:Zbn,realpart:Xbn,reals:Jbn,Re:eEn,rect:tEn,reg:nEn,REG:rEn,ReverseElement:iEn,ReverseEquilibrium:oEn,ReverseUpEquilibrium:sEn,rfisht:aEn,rfloor:lEn,rfr:cEn,Rfr:uEn,rHar:dEn,rhard:fEn,rharu:pEn,rharul:hEn,Rho:TEn,rho:mEn,rhov:gEn,RightAngleBracket:_En,RightArrowBar:QEn,rightarrow:vEn,RightArrow:yEn,Rightarrow:bEn,RightArrowLeftArrow:EEn,rightarrowtail:xEn,RightCeiling:SEn,RightDoubleBracket:LEn,RightDownTeeVector:CEn,RightDownVectorBar:AEn,RightDownVector:wEn,RightFloor:MEn,rightharpoondown:OEn,rightharpoonup:REn,rightleftarrows:NEn,rightleftharpoons:DEn,rightrightarrows:IEn,rightsquigarrow:kEn,RightTeeArrow:PEn,RightTee:HEn,RightTeeVector:VEn,rightthreetimes:BEn,RightTriangleBar:FEn,RightTriangle:$En,RightTriangleEqual:UEn,RightUpDownVector:GEn,RightUpTeeVector:qEn,RightUpVectorBar:zEn,RightUpVector:jEn,RightVectorBar:WEn,RightVector:YEn,ring:KEn,risingdotseq:ZEn,rlarr:XEn,rlhar:JEn,rlm:exn,rmoustache:txn,rmoust:nxn,rnmid:rxn,roang:ixn,roarr:oxn,robrk:sxn,ropar:axn,ropf:lxn,Ropf:cxn,roplus:uxn,rotimes:dxn,RoundImplies:fxn,rpar:pxn,rpargt:hxn,rppolint:Txn,rrarr:mxn,Rrightarrow:gxn,rsaquo:_xn,rscr:Qxn,Rscr:vxn,rsh:yxn,Rsh:bxn,rsqb:Exn,rsquo:xxn,rsquor:Sxn,rthree:Lxn,rtimes:Cxn,rtri:Axn,rtrie:wxn,rtrif:Mxn,rtriltri:Oxn,RuleDelayed:Rxn,ruluhar:Nxn,rx:Dxn,Sacute:Ixn,sacute:kxn,sbquo:Pxn,scap:Hxn,Scaron:Vxn,scaron:Bxn,Sc:Fxn,sc:$xn,sccue:Uxn,sce:Gxn,scE:qxn,Scedil:zxn,scedil:jxn,Scirc:Wxn,scirc:Yxn,scnap:Kxn,scnE:Zxn,scnsim:Xxn,scpolint:Jxn,scsim:eSn,Scy:tSn,scy:nSn,sdotb:rSn,sdot:iSn,sdote:oSn,searhk:sSn,searr:aSn,seArr:lSn,searrow:cSn,sect:uSn,semi:dSn,seswar:fSn,setminus:pSn,setmn:hSn,sext:TSn,Sfr:mSn,sfr:gSn,sfrown:_Sn,sharp:QSn,SHCHcy:vSn,shchcy:ySn,SHcy:bSn,shcy:ESn,ShortDownArrow:xSn,ShortLeftArrow:SSn,shortmid:LSn,shortparallel:CSn,ShortRightArrow:ASn,ShortUpArrow:wSn,shy:MSn,Sigma:OSn,sigma:RSn,sigmaf:NSn,sigmav:DSn,sim:ISn,simdot:kSn,sime:PSn,simeq:HSn,simg:VSn,simgE:BSn,siml:FSn,simlE:$Sn,simne:USn,simplus:GSn,simrarr:qSn,slarr:zSn,SmallCircle:jSn,smallsetminus:WSn,smashp:YSn,smeparsl:KSn,smid:ZSn,smile:XSn,smt:JSn,smte:eLn,smtes:tLn,SOFTcy:nLn,softcy:rLn,solbar:iLn,solb:oLn,sol:sLn,Sopf:aLn,sopf:lLn,spades:cLn,spadesuit:uLn,spar:dLn,sqcap:fLn,sqcaps:pLn,sqcup:hLn,sqcups:TLn,Sqrt:mLn,sqsub:gLn,sqsube:_Ln,sqsubset:QLn,sqsubseteq:vLn,sqsup:yLn,sqsupe:bLn,sqsupset:ELn,sqsupseteq:xLn,square:SLn,Square:LLn,SquareIntersection:CLn,SquareSubset:ALn,SquareSubsetEqual:wLn,SquareSuperset:MLn,SquareSupersetEqual:OLn,SquareUnion:RLn,squarf:NLn,squ:DLn,squf:ILn,srarr:kLn,Sscr:PLn,sscr:HLn,ssetmn:VLn,ssmile:BLn,sstarf:FLn,Star:$Ln,star:ULn,starf:GLn,straightepsilon:qLn,straightphi:zLn,strns:jLn,sub:WLn,Sub:YLn,subdot:KLn,subE:ZLn,sube:XLn,subedot:JLn,submult:eCn,subnE:tCn,subne:nCn,subplus:rCn,subrarr:iCn,subset:oCn,Subset:sCn,subseteq:aCn,subseteqq:lCn,SubsetEqual:cCn,subsetneq:uCn,subsetneqq:dCn,subsim:fCn,subsub:pCn,subsup:hCn,succapprox:TCn,succ:mCn,succcurlyeq:gCn,Succeeds:_Cn,SucceedsEqual:QCn,SucceedsSlantEqual:vCn,SucceedsTilde:yCn,succeq:bCn,succnapprox:ECn,succneqq:xCn,succnsim:SCn,succsim:LCn,SuchThat:CCn,sum:ACn,Sum:wCn,sung:MCn,sup1:OCn,sup2:RCn,sup3:NCn,sup:DCn,Sup:ICn,supdot:kCn,supdsub:PCn,supE:HCn,supe:VCn,supedot:BCn,Superset:FCn,SupersetEqual:$Cn,suphsol:UCn,suphsub:GCn,suplarr:qCn,supmult:zCn,supnE:jCn,supne:WCn,supplus:YCn,supset:KCn,Supset:ZCn,supseteq:XCn,supseteqq:JCn,supsetneq:eAn,supsetneqq:tAn,supsim:nAn,supsub:rAn,supsup:iAn,swarhk:oAn,swarr:sAn,swArr:aAn,swarrow:lAn,swnwar:cAn,szlig:uAn,Tab:dAn,target:fAn,Tau:pAn,tau:hAn,tbrk:TAn,Tcaron:mAn,tcaron:gAn,Tcedil:_An,tcedil:QAn,Tcy:vAn,tcy:yAn,tdot:bAn,telrec:EAn,Tfr:xAn,tfr:SAn,there4:LAn,therefore:CAn,Therefore:AAn,Theta:wAn,theta:MAn,thetasym:OAn,thetav:RAn,thickapprox:NAn,thicksim:DAn,ThickSpace:IAn,ThinSpace:kAn,thinsp:PAn,thkap:HAn,thksim:VAn,THORN:BAn,thorn:FAn,tilde:$An,Tilde:UAn,TildeEqual:GAn,TildeFullEqual:qAn,TildeTilde:zAn,timesbar:jAn,timesb:WAn,times:YAn,timesd:KAn,tint:ZAn,toea:XAn,topbot:JAn,topcir:ewn,top:twn,Topf:nwn,topf:rwn,topfork:iwn,tosa:own,tprime:swn,trade:awn,TRADE:lwn,triangle:cwn,triangledown:uwn,triangleleft:dwn,trianglelefteq:fwn,triangleq:pwn,triangleright:hwn,trianglerighteq:Twn,tridot:mwn,trie:gwn,triminus:_wn,TripleDot:Qwn,triplus:vwn,trisb:ywn,tritime:bwn,trpezium:Ewn,Tscr:xwn,tscr:Swn,TScy:Lwn,tscy:Cwn,TSHcy:Awn,tshcy:wwn,Tstrok:Mwn,tstrok:Own,twixt:Rwn,twoheadleftarrow:Nwn,twoheadrightarrow:Dwn,Uacute:Iwn,uacute:kwn,uarr:Pwn,Uarr:Hwn,uArr:Vwn,Uarrocir:Bwn,Ubrcy:Fwn,ubrcy:$wn,Ubreve:Uwn,ubreve:Gwn,Ucirc:qwn,ucirc:zwn,Ucy:jwn,ucy:Wwn,udarr:Ywn,Udblac:Kwn,udblac:Zwn,udhar:Xwn,ufisht:Jwn,Ufr:eMn,ufr:tMn,Ugrave:nMn,ugrave:rMn,uHar:iMn,uharl:oMn,uharr:sMn,uhblk:aMn,ulcorn:lMn,ulcorner:cMn,ulcrop:uMn,ultri:dMn,Umacr:fMn,umacr:pMn,uml:hMn,UnderBar:TMn,UnderBrace:mMn,UnderBracket:gMn,UnderParenthesis:_Mn,Union:QMn,UnionPlus:vMn,Uogon:yMn,uogon:bMn,Uopf:EMn,uopf:xMn,UpArrowBar:SMn,uparrow:LMn,UpArrow:CMn,Uparrow:AMn,UpArrowDownArrow:wMn,updownarrow:MMn,UpDownArrow:OMn,Updownarrow:RMn,UpEquilibrium:NMn,upharpoonleft:DMn,upharpoonright:IMn,uplus:kMn,UpperLeftArrow:PMn,UpperRightArrow:HMn,upsi:VMn,Upsi:BMn,upsih:FMn,Upsilon:$Mn,upsilon:UMn,UpTeeArrow:GMn,UpTee:qMn,upuparrows:zMn,urcorn:jMn,urcorner:WMn,urcrop:YMn,Uring:KMn,uring:ZMn,urtri:XMn,Uscr:JMn,uscr:eOn,utdot:tOn,Utilde:nOn,utilde:rOn,utri:iOn,utrif:oOn,uuarr:sOn,Uuml:aOn,uuml:lOn,uwangle:cOn,vangrt:uOn,varepsilon:dOn,varkappa:fOn,varnothing:pOn,varphi:hOn,varpi:TOn,varpropto:mOn,varr:gOn,vArr:_On,varrho:QOn,varsigma:vOn,varsubsetneq:yOn,varsubsetneqq:bOn,varsupsetneq:EOn,varsupsetneqq:xOn,vartheta:SOn,vartriangleleft:LOn,vartriangleright:COn,vBar:AOn,Vbar:wOn,vBarv:MOn,Vcy:OOn,vcy:ROn,vdash:NOn,vDash:DOn,Vdash:IOn,VDash:kOn,Vdashl:POn,veebar:HOn,vee:VOn,Vee:BOn,veeeq:FOn,vellip:$On,verbar:UOn,Verbar:GOn,vert:qOn,Vert:zOn,VerticalBar:jOn,VerticalLine:WOn,VerticalSeparator:YOn,VerticalTilde:KOn,VeryThinSpace:ZOn,Vfr:XOn,vfr:JOn,vltri:eRn,vnsub:tRn,vnsup:nRn,Vopf:rRn,vopf:iRn,vprop:oRn,vrtri:sRn,Vscr:aRn,vscr:lRn,vsubnE:cRn,vsubne:uRn,vsupnE:dRn,vsupne:fRn,Vvdash:pRn,vzigzag:hRn,Wcirc:TRn,wcirc:mRn,wedbar:gRn,wedge:_Rn,Wedge:QRn,wedgeq:vRn,weierp:yRn,Wfr:bRn,wfr:ERn,Wopf:xRn,wopf:SRn,wp:LRn,wr:CRn,wreath:ARn,Wscr:wRn,wscr:MRn,xcap:ORn,xcirc:RRn,xcup:NRn,xdtri:DRn,Xfr:IRn,xfr:kRn,xharr:PRn,xhArr:HRn,Xi:VRn,xi:BRn,xlarr:FRn,xlArr:$Rn,xmap:URn,xnis:GRn,xodot:qRn,Xopf:zRn,xopf:jRn,xoplus:WRn,xotime:YRn,xrarr:KRn,xrArr:ZRn,Xscr:XRn,xscr:JRn,xsqcup:eNn,xuplus:tNn,xutri:nNn,xvee:rNn,xwedge:iNn,Yacute:oNn,yacute:sNn,YAcy:aNn,yacy:lNn,Ycirc:cNn,ycirc:uNn,Ycy:dNn,ycy:fNn,yen:pNn,Yfr:hNn,yfr:TNn,YIcy:mNn,yicy:gNn,Yopf:_Nn,yopf:QNn,Yscr:vNn,yscr:yNn,YUcy:bNn,yucy:ENn,yuml:xNn,Yuml:SNn,Zacute:LNn,zacute:CNn,Zcaron:ANn,zcaron:wNn,Zcy:MNn,zcy:ONn,Zdot:RNn,zdot:NNn,zeetrf:DNn,ZeroWidthSpace:INn,Zeta:kNn,zeta:PNn,zfr:HNn,Zfr:VNn,ZHcy:BNn,zhcy:FNn,zigrarr:$Nn,zopf:UNn,Zopf:GNn,Zscr:qNn,zscr:zNn,zwj:jNn,zwnj:WNn},KNn="Á",ZNn="á",XNn="Â",JNn="â",eDn="´",tDn="Æ",nDn="æ",rDn="À",iDn="à",oDn="&",sDn="&",aDn="Å",lDn="å",cDn="Ã",uDn="ã",dDn="Ä",fDn="ä",pDn="¦",hDn="Ç",TDn="ç",mDn="¸",gDn="¢",_Dn="©",QDn="©",vDn="¤",yDn="°",bDn="÷",EDn="É",xDn="é",SDn="Ê",LDn="ê",CDn="È",ADn="è",wDn="Ð",MDn="ð",ODn="Ë",RDn="ë",NDn="½",DDn="¼",IDn="¾",kDn=">",PDn=">",HDn="Í",VDn="í",BDn="Î",FDn="î",$Dn="¡",UDn="Ì",GDn="ì",qDn="¿",zDn="Ï",jDn="ï",WDn="«",YDn="<",KDn="<",ZDn="¯",XDn="µ",JDn="·",eIn=" ",tIn="¬",nIn="Ñ",rIn="ñ",iIn="Ó",oIn="ó",sIn="Ô",aIn="ô",lIn="Ò",cIn="ò",uIn="ª",dIn="º",fIn="Ø",pIn="ø",hIn="Õ",TIn="õ",mIn="Ö",gIn="ö",_In="¶",QIn="±",vIn="£",yIn='"',bIn='"',EIn="»",xIn="®",SIn="®",LIn="§",CIn="­",AIn="¹",wIn="²",MIn="³",OIn="ß",RIn="Þ",NIn="þ",DIn="×",IIn="Ú",kIn="ú",PIn="Û",HIn="û",VIn="Ù",BIn="ù",FIn="¨",$In="Ü",UIn="ü",GIn="Ý",qIn="ý",zIn="¥",jIn="ÿ",WIn={Aacute:KNn,aacute:ZNn,Acirc:XNn,acirc:JNn,acute:eDn,AElig:tDn,aelig:nDn,Agrave:rDn,agrave:iDn,amp:oDn,AMP:sDn,Aring:aDn,aring:lDn,Atilde:cDn,atilde:uDn,Auml:dDn,auml:fDn,brvbar:pDn,Ccedil:hDn,ccedil:TDn,cedil:mDn,cent:gDn,copy:_Dn,COPY:QDn,curren:vDn,deg:yDn,divide:bDn,Eacute:EDn,eacute:xDn,Ecirc:SDn,ecirc:LDn,Egrave:CDn,egrave:ADn,ETH:wDn,eth:MDn,Euml:ODn,euml:RDn,frac12:NDn,frac14:DDn,frac34:IDn,gt:kDn,GT:PDn,Iacute:HDn,iacute:VDn,Icirc:BDn,icirc:FDn,iexcl:$Dn,Igrave:UDn,igrave:GDn,iquest:qDn,Iuml:zDn,iuml:jDn,laquo:WDn,lt:YDn,LT:KDn,macr:ZDn,micro:XDn,middot:JDn,nbsp:eIn,not:tIn,Ntilde:nIn,ntilde:rIn,Oacute:iIn,oacute:oIn,Ocirc:sIn,ocirc:aIn,Ograve:lIn,ograve:cIn,ordf:uIn,ordm:dIn,Oslash:fIn,oslash:pIn,Otilde:hIn,otilde:TIn,Ouml:mIn,ouml:gIn,para:_In,plusmn:QIn,pound:vIn,quot:yIn,QUOT:bIn,raquo:EIn,reg:xIn,REG:SIn,sect:LIn,shy:CIn,sup1:AIn,sup2:wIn,sup3:MIn,szlig:OIn,THORN:RIn,thorn:NIn,times:DIn,Uacute:IIn,uacute:kIn,Ucirc:PIn,ucirc:HIn,Ugrave:VIn,ugrave:BIn,uml:FIn,Uuml:$In,uuml:UIn,Yacute:GIn,yacute:qIn,yen:zIn,yuml:jIn},YIn="&",KIn="'",ZIn=">",XIn="<",JIn='"',ekn={amp:YIn,apos:KIn,gt:ZIn,lt:XIn,quot:JIn};var XR;function jF(){if(XR)return J6;XR=1;var t=S&&S.__importDefault||function(X){return X&&X.__esModule?X:{default:X}};Object.defineProperty(J6,"__esModule",{value:!0});var e=t(Oin()),n=t(YNn),r=t(WIn),i=t(ekn);function o(X){return X===" "||X===` -`||X===" "||X==="\f"||X==="\r"}function s(X){return X>="a"&&X<="z"||X>="A"&&X<="Z"}function a(X,$,ce){var ye=X.toLowerCase();return X===ye?function(z,ne){ne===ye?z._state=$:(z._state=ce,z._index--)}:function(z,ne){ne===ye||ne===X?z._state=$:(z._state=ce,z._index--)}}function l(X,$){var ce=X.toLowerCase();return function(ye,z){z===ce||z===X?ye._state=$:(ye._state=3,ye._index--)}}var c=a("C",24,16),u=a("D",25,16),d=a("A",26,16),h=a("T",27,16),f=a("A",28,16),m=l("R",35),T=l("I",36),Q=l("P",37),_=l("T",38),v=a("R",40,1),y=a("I",41,1),b=a("P",42,1),E=a("T",43,1),x=l("Y",45),L=l("L",46),M=l("E",47),C=a("Y",49,1),A=a("L",50,1),I=a("E",51,1),N=l("I",54),P=l("T",55),O=l("L",56),F=l("E",57),V=a("I",58,1),U=a("T",59,1),G=a("L",60,1),K=a("E",61,1),W=a("#",63,64),te=a("X",66,65),de=function(){function X($,ce){var ye;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=ce,this.xmlMode=!!($!=null&&$.xmlMode),this.decodeEntities=(ye=$==null?void 0:$.decodeEntities)!==null&&ye!==void 0?ye:!0}return X.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},X.prototype.write=function($){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=$,this.parse()},X.prototype.end=function($){this.ended&&this.cbs.onerror(Error(".end() after done!")),$&&this.write($),this.ended=!0,this.running&&this.finish()},X.prototype.pause=function(){this.running=!1},X.prototype.resume=function(){this.running=!0,this._indexthis.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):this.decodeEntities&&$==="&"&&(this.special===1||this.special===4)&&(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},X.prototype.isTagStartChar=function($){return s($)||this.xmlMode&&!o($)&&$!=="/"&&$!==">"},X.prototype.stateBeforeTagName=function($){$==="/"?this._state=5:$==="<"?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):$===">"||this.special!==1||o($)?this._state=1:$==="!"?(this._state=15,this.sectionStart=this._index+1):$==="?"?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar($)?(this._state=!this.xmlMode&&($==="s"||$==="S")?32:!this.xmlMode&&($==="t"||$==="T")?52:3,this.sectionStart=this._index):this._state=1},X.prototype.stateInTagName=function($){($==="/"||$===">"||o($))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},X.prototype.stateBeforeClosingTagName=function($){o($)||($===">"?this._state=1:this.special!==1?this.special!==4&&($==="s"||$==="S")?this._state=33:this.special===4&&($==="t"||$==="T")?this._state=53:(this._state=1,this._index--):this.isTagStartChar($)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},X.prototype.stateInClosingTagName=function($){($===">"||o($))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},X.prototype.stateAfterClosingTagName=function($){$===">"&&(this._state=1,this.sectionStart=this._index+1)},X.prototype.stateBeforeAttributeName=function($){$===">"?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):$==="/"?this._state=4:o($)||(this._state=9,this.sectionStart=this._index)},X.prototype.stateInSelfClosingTag=function($){$===">"?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):o($)||(this._state=8,this._index--)},X.prototype.stateInAttributeName=function($){($==="="||$==="/"||$===">"||o($))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},X.prototype.stateAfterAttributeName=function($){$==="="?this._state=11:$==="/"||$===">"?(this.cbs.onattribend(void 0),this._state=8,this._index--):o($)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},X.prototype.stateBeforeAttributeValue=function($){$==='"'?(this._state=12,this.sectionStart=this._index+1):$==="'"?(this._state=13,this.sectionStart=this._index+1):o($)||(this._state=14,this.sectionStart=this._index,this._index--)},X.prototype.handleInAttributeValue=function($,ce){$===ce?(this.emitToken("onattribdata"),this.cbs.onattribend(ce),this._state=8):this.decodeEntities&&$==="&"&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},X.prototype.stateInAttributeValueDoubleQuotes=function($){this.handleInAttributeValue($,'"')},X.prototype.stateInAttributeValueSingleQuotes=function($){this.handleInAttributeValue($,"'")},X.prototype.stateInAttributeValueNoQuotes=function($){o($)||$===">"?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&$==="&"&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},X.prototype.stateBeforeDeclaration=function($){this._state=$==="["?23:$==="-"?18:16},X.prototype.stateInDeclaration=function($){$===">"&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},X.prototype.stateInProcessingInstruction=function($){$===">"&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},X.prototype.stateBeforeComment=function($){$==="-"?(this._state=19,this.sectionStart=this._index+1):this._state=16},X.prototype.stateInComment=function($){$==="-"&&(this._state=21)},X.prototype.stateInSpecialComment=function($){$===">"&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},X.prototype.stateAfterComment1=function($){$==="-"?this._state=22:this._state=19},X.prototype.stateAfterComment2=function($){$===">"?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):$!=="-"&&(this._state=19)},X.prototype.stateBeforeCdata6=function($){$==="["?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},X.prototype.stateInCdata=function($){$==="]"&&(this._state=30)},X.prototype.stateAfterCdata1=function($){$==="]"?this._state=31:this._state=29},X.prototype.stateAfterCdata2=function($){$===">"?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):$!=="]"&&(this._state=29)},X.prototype.stateBeforeSpecialS=function($){$==="c"||$==="C"?this._state=34:$==="t"||$==="T"?this._state=44:(this._state=3,this._index--)},X.prototype.stateBeforeSpecialSEnd=function($){this.special===2&&($==="c"||$==="C")?this._state=39:this.special===3&&($==="t"||$==="T")?this._state=48:this._state=1},X.prototype.stateBeforeSpecialLast=function($,ce){($==="/"||$===">"||o($))&&(this.special=ce),this._state=3,this._index--},X.prototype.stateAfterSpecialLast=function($,ce){$===">"||o($)?(this.special=1,this._state=6,this.sectionStart=this._index-ce,this._index--):this._state=1},X.prototype.parseFixedEntity=function($){if($===void 0&&($=this.xmlMode?i.default:n.default),this.sectionStart+1=2;){var ye=this.buffer.substr($,ce);if(Object.prototype.hasOwnProperty.call(r.default,ye)){this.emitPartial(r.default[ye]),this.sectionStart+=ce+1;return}ce--}},X.prototype.stateInNamedEntity=function($){$===";"?(this.parseFixedEntity(),this.baseState===1&&this.sectionStart+1"9")&&!s($)&&(this.xmlMode||this.sectionStart+1===this._index||(this.baseState!==1?$!=="="&&this.parseFixedEntity(r.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},X.prototype.decodeNumericEntity=function($,ce,ye){var z=this.sectionStart+$;if(z!==this._index){var ne=this.buffer.substring(z,this._index),fe=parseInt(ne,ce);this.emitPartial(e.default(fe)),this.sectionStart=ye?this._index+1:this._index}this._state=this.baseState},X.prototype.stateInNumericEntity=function($){$===";"?this.decodeNumericEntity(2,10,!0):($<"0"||$>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},X.prototype.stateInHexEntity=function($){$===";"?this.decodeNumericEntity(3,16,!0):($<"a"||$>"f")&&($<"A"||$>"F")&&($<"0"||$>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},X.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(this._state===1?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},X.prototype.parse=function(){for(;this._index0&&i[d].has(m=this.stack[this.stack.length-1]);)this.onclosetag(m);(this.options.xmlMode||!o.has(d))&&(this.stack.push(d),s.has(d)?this.foreignContext.push(!0):a.has(d)&&this.foreignContext.push(!1)),(f=(h=this.cbs).onopentagname)===null||f===void 0||f.call(h,d),this.cbs.onopentag&&(this.attribs={})},u.prototype.onopentagend=function(){var d,h;this.updatePosition(1),this.attribs&&((h=(d=this.cbs).onopentag)===null||h===void 0||h.call(d,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&o.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},u.prototype.onclosetag=function(d){if(this.updatePosition(1),this.lowerCaseTagNames&&(d=d.toLowerCase()),(s.has(d)||a.has(d))&&this.foreignContext.pop(),this.stack.length&&(this.options.xmlMode||!o.has(d))){var h=this.stack.lastIndexOf(d);if(h!==-1)if(this.cbs.onclosetag)for(h=this.stack.length-h;h--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=h;else d==="p"&&!this.options.xmlMode&&(this.onopentagname(d),this.closeCurrentTag())}else!this.options.xmlMode&&(d==="br"||d==="p")&&(this.onopentagname(d),this.closeCurrentTag())},u.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},u.prototype.closeCurrentTag=function(){var d,h,f=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===f&&((h=(d=this.cbs).onclosetag)===null||h===void 0||h.call(d,f),this.stack.pop())},u.prototype.onattribname=function(d){this.lowerCaseAttributeNames&&(d=d.toLowerCase()),this.attribname=d},u.prototype.onattribdata=function(d){this.attribvalue+=d},u.prototype.onattribend=function(d){var h,f;(f=(h=this.cbs).onattribute)===null||f===void 0||f.call(h,this.attribname,this.attribvalue,d),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},u.prototype.getInstructionName=function(d){var h=d.search(l),f=h<0?d:d.substr(0,h);return this.lowerCaseTagNames&&(f=f.toLowerCase()),f},u.prototype.ondeclaration=function(d){if(this.cbs.onprocessinginstruction){var h=this.getInstructionName(d);this.cbs.onprocessinginstruction("!"+h,"!"+d)}},u.prototype.onprocessinginstruction=function(d){if(this.cbs.onprocessinginstruction){var h=this.getInstructionName(d);this.cbs.onprocessinginstruction("?"+h,"?"+d)}},u.prototype.oncomment=function(d){var h,f,m,T;this.updatePosition(4),(f=(h=this.cbs).oncomment)===null||f===void 0||f.call(h,d),(T=(m=this.cbs).oncommentend)===null||T===void 0||T.call(m)},u.prototype.oncdata=function(d){var h,f,m,T,Q,_;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?((f=(h=this.cbs).oncdatastart)===null||f===void 0||f.call(h),(T=(m=this.cbs).ontext)===null||T===void 0||T.call(m,d),(_=(Q=this.cbs).oncdataend)===null||_===void 0||_.call(Q)):this.oncomment("[CDATA["+d+"]]")},u.prototype.onerror=function(d){var h,f;(f=(h=this.cbs).onerror)===null||f===void 0||f.call(h,d)},u.prototype.onend=function(){var d,h;if(this.cbs.onclosetag)for(var f=this.stack.length;f>0;this.cbs.onclosetag(this.stack[--f]));(h=(d=this.cbs).onend)===null||h===void 0||h.call(d)},u.prototype.reset=function(){var d,h,f,m;(h=(d=this.cbs).onreset)===null||h===void 0||h.call(d),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],(m=(f=this.cbs).onparserinit)===null||m===void 0||m.call(f,this)},u.prototype.parseComplete=function(d){this.reset(),this.end(d)},u.prototype.write=function(d){this.tokenizer.write(d)},u.prototype.end=function(d){this.tokenizer.end(d)},u.prototype.pause=function(){this.tokenizer.pause()},u.prototype.resume=function(){this.tokenizer.resume()},u.prototype.parseChunk=function(d){this.write(d)},u.prototype.done=function(d){this.end(d)},u}();return Y3.Parser=c,Y3}var E1={},eN;function tN(){if(eN)return E1;eN=1;var t=S&&S.__extends||function(){var y=function(b,E){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,L){x.__proto__=L}||function(x,L){for(var M in L)Object.prototype.hasOwnProperty.call(L,M)&&(x[M]=L[M])},y(b,E)};return function(b,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");y(b,E);function x(){this.constructor=b}b.prototype=E===null?Object.create(E):(x.prototype=E.prototype,new x)}}(),e=S&&S.__createBinding||(Object.create?function(y,b,E,x){x===void 0&&(x=E),Object.defineProperty(y,x,{enumerable:!0,get:function(){return b[E]}})}:function(y,b,E,x){x===void 0&&(x=E),y[x]=b[E]}),n=S&&S.__setModuleDefault||(Object.create?function(y,b){Object.defineProperty(y,"default",{enumerable:!0,value:b})}:function(y,b){y.default=b}),r=S&&S.__importStar||function(y){if(y&&y.__esModule)return y;var b={};if(y!=null)for(var E in y)E!=="default"&&Object.prototype.hasOwnProperty.call(y,E)&&e(b,y,E);return n(b,y),b},i=S&&S.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(E1,"__esModule",{value:!0}),E1.parseFeed=E1.FeedHandler=void 0;var o=i(di()),s=r(p9()),a=WF(),l;(function(y){y[y.image=0]="image",y[y.audio=1]="audio",y[y.video=2]="video",y[y.document=3]="document",y[y.executable=4]="executable"})(l||(l={}));var c;(function(y){y[y.sample=0]="sample",y[y.full=1]="full",y[y.nonstop=2]="nonstop"})(c||(c={}));var u=function(y){t(b,y);function b(E,x){var L=this;return typeof E=="object"&&(E=void 0,x=E),L=y.call(this,E,x)||this,L}return b.prototype.onend=function(){var E,x,L=f(_,this.dom);if(!L){this.handleCallback(new Error("couldn't find root of feed"));return}var M={};if(L.name==="feed"){var C=L.children;M.type="atom",Q(M,"id","id",C),Q(M,"title","title",C);var A=T("href",f("link",C));A&&(M.link=A),Q(M,"description","subtitle",C);var I=m("updated",C);I&&(M.updated=new Date(I)),Q(M,"author","email",C,!0),M.items=h("entry",C).map(function(N){var P={},O=N.children;Q(P,"id","id",O),Q(P,"title","title",O);var F=T("href",f("link",O));F&&(P.link=F);var V=m("summary",O)||m("content",O);V&&(P.description=V);var U=m("updated",O);return U&&(P.pubDate=new Date(U)),P.media=d(O),P})}else{var C=(x=(E=f("channel",L.children))===null||E===void 0?void 0:E.children)!==null&&x!==void 0?x:[];M.type=L.name.substr(0,3),M.id="",Q(M,"title","title",C),Q(M,"link","link",C),Q(M,"description","description",C);var I=m("lastBuildDate",C);I&&(M.updated=new Date(I)),Q(M,"author","managingEditor",C,!0),M.items=h("item",L.children).map(function(O){var F={},V=O.children;Q(F,"id","guid",V),Q(F,"title","title",V),Q(F,"link","link",V),Q(F,"description","description",V);var U=m("pubDate",V);return U&&(F.pubDate=new Date(U)),F.media=d(V),F})}this.feed=M,this.handleCallback(null)},b}(o.default);E1.FeedHandler=u;function d(y){return h("media:content",y).map(function(b){var E={medium:b.attribs.medium,isDefault:!!b.attribs.isDefault};return b.attribs.url&&(E.url=b.attribs.url),b.attribs.fileSize&&(E.fileSize=parseInt(b.attribs.fileSize,10)),b.attribs.type&&(E.type=b.attribs.type),b.attribs.expression&&(E.expression=b.attribs.expression),b.attribs.bitrate&&(E.bitrate=parseInt(b.attribs.bitrate,10)),b.attribs.framerate&&(E.framerate=parseInt(b.attribs.framerate,10)),b.attribs.samplingrate&&(E.samplingrate=parseInt(b.attribs.samplingrate,10)),b.attribs.channels&&(E.channels=parseInt(b.attribs.channels,10)),b.attribs.duration&&(E.duration=parseInt(b.attribs.duration,10)),b.attribs.height&&(E.height=parseInt(b.attribs.height,10)),b.attribs.width&&(E.width=parseInt(b.attribs.width,10)),b.attribs.lang&&(E.lang=b.attribs.lang),E})}function h(y,b){return s.getElementsByTagName(y,b,!0)}function f(y,b){return s.getElementsByTagName(y,b,!0,1)[0]}function m(y,b,E){return E===void 0&&(E=!1),s.getText(s.getElementsByTagName(y,b,E,1)).trim()}function T(y,b){if(!b)return null;var E=b.attribs;return E[y]}function Q(y,b,E,x,L){L===void 0&&(L=!1);var M=m(E,x,L);M&&(y[b]=M)}function _(y){return y==="rss"||y==="feed"||y==="rdf:RDF"}function v(y,b){b===void 0&&(b={xmlMode:!0});var E=new u(b);return new a.Parser(E,b).end(y),E.feed}return E1.parseFeed=v,E1}var nN;function Uc(){return nN||(nN=1,function(t){var e=S&&S.__createBinding||(Object.create?function(m,T,Q,_){_===void 0&&(_=Q),Object.defineProperty(m,_,{enumerable:!0,get:function(){return T[Q]}})}:function(m,T,Q,_){_===void 0&&(_=Q),m[_]=T[Q]}),n=S&&S.__setModuleDefault||(Object.create?function(m,T){Object.defineProperty(m,"default",{enumerable:!0,value:T})}:function(m,T){m.default=T}),r=S&&S.__importStar||function(m){if(m&&m.__esModule)return m;var T={};if(m!=null)for(var Q in m)Q!=="default"&&Object.prototype.hasOwnProperty.call(m,Q)&&e(T,m,Q);return n(T,m),T},i=S&&S.__exportStar||function(m,T){for(var Q in m)Q!=="default"&&!Object.prototype.hasOwnProperty.call(T,Q)&&e(T,m,Q)},o=S&&S.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0}),t.RssHandler=t.DefaultHandler=t.DomUtils=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DomHandler=t.Parser=void 0;var s=WF();Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return s.Parser}});var a=di();Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return a.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return a.DomHandler}});function l(m,T){var Q=new a.DomHandler(void 0,T);return new s.Parser(Q,T).end(m),Q.root}t.parseDocument=l;function c(m,T){return l(m,T).children}t.parseDOM=c;function u(m,T,Q){var _=new a.DomHandler(m,T,Q);return new s.Parser(_,T)}t.createDomStream=u;var d=jF();Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return o(d).default}});var h=r(K0());t.ElementType=h,i(tN(),t),t.DomUtils=r(p9());var f=tN();Object.defineProperty(t,"RssHandler",{enumerable:!0,get:function(){return f.FeedHandler}})}(ug)),ug}var x1={},K3={},Mo={},rN;function nb(){if(rN)return Mo;rN=1;const t=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];return Mo.REPLACEMENT_CHARACTER="�",Mo.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},Mo.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},Mo.isSurrogate=function(e){return e>=55296&&e<=57343},Mo.isSurrogatePair=function(e){return e>=56320&&e<=57343},Mo.getSurrogatePairCodePoint=function(e,n){return(e-55296)*1024+9216+n},Mo.isControlCodePoint=function(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159},Mo.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||t.indexOf(e)>-1},Mo}var dg,iN;function rb(){return iN||(iN=1,dg={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}),dg}var fg,oN;function tkn(){if(oN)return fg;oN=1;const t=nb(),e=rb(),n=t.CODE_POINTS,r=65536;class i{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=r}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(s){if(this.pos!==this.lastCharPos){const a=this.html.charCodeAt(this.pos+1);if(t.isSurrogatePair(a))return this.pos++,this._addGap(),t.getSurrogatePairCodePoint(s,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,n.EOF;return this._err(e.surrogateInInputStream),s}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(s,a){this.html?this.html+=s:this.html=s,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=a}insertHtmlAtCurrentPos(s){this.html=this.html.substring(0,this.pos+1)+s+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,n.EOF;let s=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&s===n.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):s===n.CARRIAGE_RETURN?(this.skipNextNewLine=!0,n.LINE_FEED):(this.skipNextNewLine=!1,t.isSurrogate(s)&&(s=this._processSurrogate(s)),s>31&&s<127||s===n.LINE_FEED||s===n.CARRIAGE_RETURN||s>159&&s<64976||this._checkForProblematicCharacters(s),s)}_checkForProblematicCharacters(s){t.isControlCodePoint(s)?this._err(e.controlCharacterInInputStream):t.isUndefinedCodePoint(s)&&this._err(e.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}return fg=i,fg}var pg,sN;function nkn(){return sN||(sN=1,pg=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])),pg}var hg,aN;function h9(){if(aN)return hg;aN=1;const t=tkn(),e=nb(),n=nkn(),r=rb(),i=e.CODE_POINTS,o=e.CODE_POINT_SEQUENCES,s={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},a=1,l=2,c=4,u=a|l|c,d="DATA_STATE",h="RCDATA_STATE",f="RAWTEXT_STATE",m="SCRIPT_DATA_STATE",T="PLAINTEXT_STATE",Q="TAG_OPEN_STATE",_="END_TAG_OPEN_STATE",v="TAG_NAME_STATE",y="RCDATA_LESS_THAN_SIGN_STATE",b="RCDATA_END_TAG_OPEN_STATE",E="RCDATA_END_TAG_NAME_STATE",x="RAWTEXT_LESS_THAN_SIGN_STATE",L="RAWTEXT_END_TAG_OPEN_STATE",M="RAWTEXT_END_TAG_NAME_STATE",C="SCRIPT_DATA_LESS_THAN_SIGN_STATE",A="SCRIPT_DATA_END_TAG_OPEN_STATE",I="SCRIPT_DATA_END_TAG_NAME_STATE",N="SCRIPT_DATA_ESCAPE_START_STATE",P="SCRIPT_DATA_ESCAPE_START_DASH_STATE",O="SCRIPT_DATA_ESCAPED_STATE",F="SCRIPT_DATA_ESCAPED_DASH_STATE",V="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",U="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",G="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",K="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",W="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",te="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",de="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",X="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",$="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",ce="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",ye="BEFORE_ATTRIBUTE_NAME_STATE",z="ATTRIBUTE_NAME_STATE",ne="AFTER_ATTRIBUTE_NAME_STATE",fe="BEFORE_ATTRIBUTE_VALUE_STATE",be="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",Le="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",se="ATTRIBUTE_VALUE_UNQUOTED_STATE",Y="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",j="SELF_CLOSING_START_TAG_STATE",ie="BOGUS_COMMENT_STATE",Te="MARKUP_DECLARATION_OPEN_STATE",ve="COMMENT_START_STATE",ae="COMMENT_START_DASH_STATE",Oe="COMMENT_STATE",Se="COMMENT_LESS_THAN_SIGN_STATE",Me="COMMENT_LESS_THAN_SIGN_BANG_STATE",ke="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",Z="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",q="COMMENT_END_DASH_STATE",pe="COMMENT_END_STATE",ue="COMMENT_END_BANG_STATE",_e="DOCTYPE_STATE",Ae="BEFORE_DOCTYPE_NAME_STATE",Ie="DOCTYPE_NAME_STATE",Ve="AFTER_DOCTYPE_NAME_STATE",$e="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",lt="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",at="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",Be="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",It="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",Tt="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",mt="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",dt="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",st="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",ct="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",me="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",Ye="BOGUS_DOCTYPE_STATE",Ge="CDATA_SECTION_STATE",Pe="CDATA_SECTION_BRACKET_STATE",Xe="CDATA_SECTION_END_STATE",vt="CHARACTER_REFERENCE_STATE",Ot="NAMED_CHARACTER_REFERENCE_STATE",Hn="AMBIGUOS_AMPERSAND_STATE",zn="NUMERIC_CHARACTER_REFERENCE_STATE",an="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",Yn="DECIMAL_CHARACTER_REFERENCE_START_STATE",Cr="HEXADEMICAL_CHARACTER_REFERENCE_STATE",Xs="DECIMAL_CHARACTER_REFERENCE_STATE",So="NUMERIC_CHARACTER_REFERENCE_END_STATE";function Gt(Fe){return Fe===i.SPACE||Fe===i.LINE_FEED||Fe===i.TABULATION||Fe===i.FORM_FEED}function eo(Fe){return Fe>=i.DIGIT_0&&Fe<=i.DIGIT_9}function Xn(Fe){return Fe>=i.LATIN_CAPITAL_A&&Fe<=i.LATIN_CAPITAL_Z}function hi(Fe){return Fe>=i.LATIN_SMALL_A&&Fe<=i.LATIN_SMALL_Z}function sr(Fe){return hi(Fe)||Xn(Fe)}function Js(Fe){return sr(Fe)||eo(Fe)}function ea(Fe){return Fe>=i.LATIN_CAPITAL_A&&Fe<=i.LATIN_CAPITAL_F}function r1(Fe){return Fe>=i.LATIN_SMALL_A&&Fe<=i.LATIN_SMALL_F}function ee(Fe){return eo(Fe)||ea(Fe)||r1(Fe)}function xe(Fe){return Fe+32}function Ce(Fe){return Fe<=65535?String.fromCharCode(Fe):(Fe-=65536,String.fromCharCode(Fe>>>10&1023|55296)+String.fromCharCode(56320|Fe&1023))}function Ne(Fe){return String.fromCharCode(xe(Fe))}function Re(Fe,B){const et=n[++Fe];let bt=++Fe,gt=bt+et-1;for(;bt<=gt;){const Qt=bt+gt>>>1,Ht=n[Qt];if(HtB)gt=Qt-1;else return n[Qt+et]}return-1}class We{constructor(){this.preprocessor=new t,this.tokenQueue=[],this.allowCDATA=!1,this.state=d,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(B){this._consume(),this._err(B),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const B=this._consume();this._ensureHibernation()||this[this.state](B)}return this.tokenQueue.shift()}write(B,et){this.active=!0,this.preprocessor.write(B,et)}insertHtmlAtCurrentPos(B){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(B)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:We.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(B){this.state=B,this._unconsume()}_consumeSequenceIfMatch(B,et,bt){let gt=0,Qt=!0;const Ht=B.length;let Kt=0,un=et,Ar;for(;Kt0&&(un=this._consume(),gt++),un===i.EOF){Qt=!1;break}if(Ar=B[Kt],un!==Ar&&(bt||un!==xe(Ar))){Qt=!1;break}}if(!Qt)for(;gt--;)this._unconsume();return Qt}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==o.SCRIPT_STRING.length)return!1;for(let B=0;B0&&this._err(r.endTagWithAttributes),B.selfClosing&&this._err(r.endTagWithTrailingSolidus)),this.tokenQueue.push(B)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(B,et){this.currentCharacterToken&&this.currentCharacterToken.type!==B&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=et:this._createCharacterToken(B,et)}_emitCodePoint(B){let et=We.CHARACTER_TOKEN;Gt(B)?et=We.WHITESPACE_CHARACTER_TOKEN:B===i.NULL&&(et=We.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(et,Ce(B))}_emitSeveralCodePoints(B){for(let et=0;et-1;){const Qt=n[gt],Ht=Qt")):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.state=O,this._emitChars(e.REPLACEMENT_CHARACTER)):B===i.EOF?(this._err(r.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=O,this._emitCodePoint(B))}[U](B){B===i.SOLIDUS?(this.tempBuff=[],this.state=G):sr(B)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(W)):(this._emitChars("<"),this._reconsumeInState(O))}[G](B){sr(B)?(this._createEndTagToken(),this._reconsumeInState(K)):(this._emitChars("")):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.state=te,this._emitChars(e.REPLACEMENT_CHARACTER)):B===i.EOF?(this._err(r.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=te,this._emitCodePoint(B))}[$](B){B===i.SOLIDUS?(this.tempBuff=[],this.state=ce,this._emitChars("/")):this._reconsumeInState(te)}[ce](B){Gt(B)||B===i.SOLIDUS||B===i.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?O:te,this._emitCodePoint(B)):Xn(B)?(this.tempBuff.push(xe(B)),this._emitCodePoint(B)):hi(B)?(this.tempBuff.push(B),this._emitCodePoint(B)):this._reconsumeInState(te)}[ye](B){Gt(B)||(B===i.SOLIDUS||B===i.GREATER_THAN_SIGN||B===i.EOF?this._reconsumeInState(ne):B===i.EQUALS_SIGN?(this._err(r.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=z):(this._createAttr(""),this._reconsumeInState(z)))}[z](B){Gt(B)||B===i.SOLIDUS||B===i.GREATER_THAN_SIGN||B===i.EOF?(this._leaveAttrName(ne),this._unconsume()):B===i.EQUALS_SIGN?this._leaveAttrName(fe):Xn(B)?this.currentAttr.name+=Ne(B):B===i.QUOTATION_MARK||B===i.APOSTROPHE||B===i.LESS_THAN_SIGN?(this._err(r.unexpectedCharacterInAttributeName),this.currentAttr.name+=Ce(B)):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentAttr.name+=e.REPLACEMENT_CHARACTER):this.currentAttr.name+=Ce(B)}[ne](B){Gt(B)||(B===i.SOLIDUS?this.state=j:B===i.EQUALS_SIGN?this.state=fe:B===i.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(z)))}[fe](B){Gt(B)||(B===i.QUOTATION_MARK?this.state=be:B===i.APOSTROPHE?this.state=Le:B===i.GREATER_THAN_SIGN?(this._err(r.missingAttributeValue),this.state=d,this._emitCurrentToken()):this._reconsumeInState(se))}[be](B){B===i.QUOTATION_MARK?this.state=Y:B===i.AMPERSAND?(this.returnState=be,this.state=vt):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentAttr.value+=e.REPLACEMENT_CHARACTER):B===i.EOF?(this._err(r.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ce(B)}[Le](B){B===i.APOSTROPHE?this.state=Y:B===i.AMPERSAND?(this.returnState=Le,this.state=vt):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentAttr.value+=e.REPLACEMENT_CHARACTER):B===i.EOF?(this._err(r.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ce(B)}[se](B){Gt(B)?this._leaveAttrValue(ye):B===i.AMPERSAND?(this.returnState=se,this.state=vt):B===i.GREATER_THAN_SIGN?(this._leaveAttrValue(d),this._emitCurrentToken()):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentAttr.value+=e.REPLACEMENT_CHARACTER):B===i.QUOTATION_MARK||B===i.APOSTROPHE||B===i.LESS_THAN_SIGN||B===i.EQUALS_SIGN||B===i.GRAVE_ACCENT?(this._err(r.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=Ce(B)):B===i.EOF?(this._err(r.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ce(B)}[Y](B){Gt(B)?this._leaveAttrValue(ye):B===i.SOLIDUS?this._leaveAttrValue(j):B===i.GREATER_THAN_SIGN?(this._leaveAttrValue(d),this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInTag),this._emitEOFToken()):(this._err(r.missingWhitespaceBetweenAttributes),this._reconsumeInState(ye))}[j](B){B===i.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInTag),this._emitEOFToken()):(this._err(r.unexpectedSolidusInTag),this._reconsumeInState(ye))}[ie](B){B===i.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):B===i.EOF?(this._emitCurrentToken(),this._emitEOFToken()):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.data+=e.REPLACEMENT_CHARACTER):this.currentToken.data+=Ce(B)}[Te](B){this._consumeSequenceIfMatch(o.DASH_DASH_STRING,B,!0)?(this._createCommentToken(),this.state=ve):this._consumeSequenceIfMatch(o.DOCTYPE_STRING,B,!1)?this.state=_e:this._consumeSequenceIfMatch(o.CDATA_START_STRING,B,!0)?this.allowCDATA?this.state=Ge:(this._err(r.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=ie):this._ensureHibernation()||(this._err(r.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(ie))}[ve](B){B===i.HYPHEN_MINUS?this.state=ae:B===i.GREATER_THAN_SIGN?(this._err(r.abruptClosingOfEmptyComment),this.state=d,this._emitCurrentToken()):this._reconsumeInState(Oe)}[ae](B){B===i.HYPHEN_MINUS?this.state=pe:B===i.GREATER_THAN_SIGN?(this._err(r.abruptClosingOfEmptyComment),this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(Oe))}[Oe](B){B===i.HYPHEN_MINUS?this.state=q:B===i.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=Se):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.data+=e.REPLACEMENT_CHARACTER):B===i.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=Ce(B)}[Se](B){B===i.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=Me):B===i.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(Oe)}[Me](B){B===i.HYPHEN_MINUS?this.state=ke:this._reconsumeInState(Oe)}[ke](B){B===i.HYPHEN_MINUS?this.state=Z:this._reconsumeInState(q)}[Z](B){B!==i.GREATER_THAN_SIGN&&B!==i.EOF&&this._err(r.nestedComment),this._reconsumeInState(pe)}[q](B){B===i.HYPHEN_MINUS?this.state=pe:B===i.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(Oe))}[pe](B){B===i.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):B===i.EXCLAMATION_MARK?this.state=ue:B===i.HYPHEN_MINUS?this.currentToken.data+="-":B===i.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(Oe))}[ue](B){B===i.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=q):B===i.GREATER_THAN_SIGN?(this._err(r.incorrectlyClosedComment),this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(Oe))}[_e](B){Gt(B)?this.state=Ae:B===i.GREATER_THAN_SIGN?this._reconsumeInState(Ae):B===i.EOF?(this._err(r.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(Ae))}[Ae](B){Gt(B)||(Xn(B)?(this._createDoctypeToken(Ne(B)),this.state=Ie):B===i.NULL?(this._err(r.unexpectedNullCharacter),this._createDoctypeToken(e.REPLACEMENT_CHARACTER),this.state=Ie):B===i.GREATER_THAN_SIGN?(this._err(r.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=d):B===i.EOF?(this._err(r.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(Ce(B)),this.state=Ie))}[Ie](B){Gt(B)?this.state=Ve:B===i.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):Xn(B)?this.currentToken.name+=Ne(B):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.name+=e.REPLACEMENT_CHARACTER):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=Ce(B)}[Ve](B){Gt(B)||(B===i.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(o.PUBLIC_STRING,B,!1)?this.state=$e:this._consumeSequenceIfMatch(o.SYSTEM_STRING,B,!1)?this.state=mt:this._ensureHibernation()||(this._err(r.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye)))}[$e](B){Gt(B)?this.state=lt:B===i.QUOTATION_MARK?(this._err(r.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=at):B===i.APOSTROPHE?(this._err(r.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=Be):B===i.GREATER_THAN_SIGN?(this._err(r.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye))}[lt](B){Gt(B)||(B===i.QUOTATION_MARK?(this.currentToken.publicId="",this.state=at):B===i.APOSTROPHE?(this.currentToken.publicId="",this.state=Be):B===i.GREATER_THAN_SIGN?(this._err(r.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye)))}[at](B){B===i.QUOTATION_MARK?this.state=It:B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.publicId+=e.REPLACEMENT_CHARACTER):B===i.GREATER_THAN_SIGN?(this._err(r.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=d):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ce(B)}[Be](B){B===i.APOSTROPHE?this.state=It:B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.publicId+=e.REPLACEMENT_CHARACTER):B===i.GREATER_THAN_SIGN?(this._err(r.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=d):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ce(B)}[It](B){Gt(B)?this.state=Tt:B===i.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):B===i.QUOTATION_MARK?(this._err(r.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=st):B===i.APOSTROPHE?(this._err(r.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=ct):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye))}[Tt](B){Gt(B)||(B===i.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=d):B===i.QUOTATION_MARK?(this.currentToken.systemId="",this.state=st):B===i.APOSTROPHE?(this.currentToken.systemId="",this.state=ct):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye)))}[mt](B){Gt(B)?this.state=dt:B===i.QUOTATION_MARK?(this._err(r.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=st):B===i.APOSTROPHE?(this._err(r.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=ct):B===i.GREATER_THAN_SIGN?(this._err(r.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye))}[dt](B){Gt(B)||(B===i.QUOTATION_MARK?(this.currentToken.systemId="",this.state=st):B===i.APOSTROPHE?(this.currentToken.systemId="",this.state=ct):B===i.GREATER_THAN_SIGN?(this._err(r.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye)))}[st](B){B===i.QUOTATION_MARK?this.state=me:B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.systemId+=e.REPLACEMENT_CHARACTER):B===i.GREATER_THAN_SIGN?(this._err(r.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=d):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ce(B)}[ct](B){B===i.APOSTROPHE?this.state=me:B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.systemId+=e.REPLACEMENT_CHARACTER):B===i.GREATER_THAN_SIGN?(this._err(r.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=d):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ce(B)}[me](B){Gt(B)||(B===i.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=d):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(Ye)))}[Ye](B){B===i.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=d):B===i.NULL?this._err(r.unexpectedNullCharacter):B===i.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[Ge](B){B===i.RIGHT_SQUARE_BRACKET?this.state=Pe:B===i.EOF?(this._err(r.eofInCdata),this._emitEOFToken()):this._emitCodePoint(B)}[Pe](B){B===i.RIGHT_SQUARE_BRACKET?this.state=Xe:(this._emitChars("]"),this._reconsumeInState(Ge))}[Xe](B){B===i.GREATER_THAN_SIGN?this.state=d:B===i.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(Ge))}[vt](B){this.tempBuff=[i.AMPERSAND],B===i.NUMBER_SIGN?(this.tempBuff.push(B),this.state=zn):Js(B)?this._reconsumeInState(Ot):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Ot](B){const et=this._matchNamedCharacterReference(B);if(this._ensureHibernation())this.tempBuff=[i.AMPERSAND];else if(et){const bt=this.tempBuff[this.tempBuff.length-1]===i.SEMICOLON;this._isCharacterReferenceAttributeQuirk(bt)||(bt||this._errOnNextCodePoint(r.missingSemicolonAfterCharacterReference),this.tempBuff=et),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=Hn}[Hn](B){Js(B)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=Ce(B):this._emitCodePoint(B):(B===i.SEMICOLON&&this._err(r.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[zn](B){this.charRefCode=0,B===i.LATIN_SMALL_X||B===i.LATIN_CAPITAL_X?(this.tempBuff.push(B),this.state=an):this._reconsumeInState(Yn)}[an](B){ee(B)?this._reconsumeInState(Cr):(this._err(r.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Yn](B){eo(B)?this._reconsumeInState(Xs):(this._err(r.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Cr](B){ea(B)?this.charRefCode=this.charRefCode*16+B-55:r1(B)?this.charRefCode=this.charRefCode*16+B-87:eo(B)?this.charRefCode=this.charRefCode*16+B-48:B===i.SEMICOLON?this.state=So:(this._err(r.missingSemicolonAfterCharacterReference),this._reconsumeInState(So))}[Xs](B){eo(B)?this.charRefCode=this.charRefCode*10+B-48:B===i.SEMICOLON?this.state=So:(this._err(r.missingSemicolonAfterCharacterReference),this._reconsumeInState(So))}[So](){if(this.charRefCode===i.NULL)this._err(r.nullCharacterReference),this.charRefCode=i.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(r.characterReferenceOutsideUnicodeRange),this.charRefCode=i.REPLACEMENT_CHARACTER;else if(e.isSurrogate(this.charRefCode))this._err(r.surrogateCharacterReference),this.charRefCode=i.REPLACEMENT_CHARACTER;else if(e.isUndefinedCodePoint(this.charRefCode))this._err(r.noncharacterCharacterReference);else if(e.isControlCodePoint(this.charRefCode)||this.charRefCode===i.CARRIAGE_RETURN){this._err(r.controlCharacterReference);const B=s[this.charRefCode];B&&(this.charRefCode=B)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}return We.CHARACTER_TOKEN="CHARACTER_TOKEN",We.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",We.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",We.START_TAG_TOKEN="START_TAG_TOKEN",We.END_TAG_TOKEN="END_TAG_TOKEN",We.COMMENT_TOKEN="COMMENT_TOKEN",We.DOCTYPE_TOKEN="DOCTYPE_TOKEN",We.EOF_TOKEN="EOF_TOKEN",We.HIBERNATION_TOKEN="HIBERNATION_TOKEN",We.MODE={DATA:d,RCDATA:h,RAWTEXT:f,SCRIPT_DATA:m,PLAINTEXT:T},We.getTokenAttr=function(Fe,B){for(let et=Fe.attrs.length-1;et>=0;et--)if(Fe.attrs[et].name===B)return Fe.attrs[et].value;return null},hg=We,hg}var S1={},lN;function e1(){if(lN)return S1;lN=1;const t=S1.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};S1.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},S1.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const e=S1.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};return S1.SPECIAL_ELEMENTS={[t.HTML]:{[e.ADDRESS]:!0,[e.APPLET]:!0,[e.AREA]:!0,[e.ARTICLE]:!0,[e.ASIDE]:!0,[e.BASE]:!0,[e.BASEFONT]:!0,[e.BGSOUND]:!0,[e.BLOCKQUOTE]:!0,[e.BODY]:!0,[e.BR]:!0,[e.BUTTON]:!0,[e.CAPTION]:!0,[e.CENTER]:!0,[e.COL]:!0,[e.COLGROUP]:!0,[e.DD]:!0,[e.DETAILS]:!0,[e.DIR]:!0,[e.DIV]:!0,[e.DL]:!0,[e.DT]:!0,[e.EMBED]:!0,[e.FIELDSET]:!0,[e.FIGCAPTION]:!0,[e.FIGURE]:!0,[e.FOOTER]:!0,[e.FORM]:!0,[e.FRAME]:!0,[e.FRAMESET]:!0,[e.H1]:!0,[e.H2]:!0,[e.H3]:!0,[e.H4]:!0,[e.H5]:!0,[e.H6]:!0,[e.HEAD]:!0,[e.HEADER]:!0,[e.HGROUP]:!0,[e.HR]:!0,[e.HTML]:!0,[e.IFRAME]:!0,[e.IMG]:!0,[e.INPUT]:!0,[e.LI]:!0,[e.LINK]:!0,[e.LISTING]:!0,[e.MAIN]:!0,[e.MARQUEE]:!0,[e.MENU]:!0,[e.META]:!0,[e.NAV]:!0,[e.NOEMBED]:!0,[e.NOFRAMES]:!0,[e.NOSCRIPT]:!0,[e.OBJECT]:!0,[e.OL]:!0,[e.P]:!0,[e.PARAM]:!0,[e.PLAINTEXT]:!0,[e.PRE]:!0,[e.SCRIPT]:!0,[e.SECTION]:!0,[e.SELECT]:!0,[e.SOURCE]:!0,[e.STYLE]:!0,[e.SUMMARY]:!0,[e.TABLE]:!0,[e.TBODY]:!0,[e.TD]:!0,[e.TEMPLATE]:!0,[e.TEXTAREA]:!0,[e.TFOOT]:!0,[e.TH]:!0,[e.THEAD]:!0,[e.TITLE]:!0,[e.TR]:!0,[e.TRACK]:!0,[e.UL]:!0,[e.WBR]:!0,[e.XMP]:!0},[t.MATHML]:{[e.MI]:!0,[e.MO]:!0,[e.MN]:!0,[e.MS]:!0,[e.MTEXT]:!0,[e.ANNOTATION_XML]:!0},[t.SVG]:{[e.TITLE]:!0,[e.FOREIGN_OBJECT]:!0,[e.DESC]:!0}},S1}var Tg,cN;function rkn(){if(cN)return Tg;cN=1;const t=e1(),e=t.TAG_NAMES,n=t.NAMESPACES;function r(a){switch(a.length){case 1:return a===e.P;case 2:return a===e.RB||a===e.RP||a===e.RT||a===e.DD||a===e.DT||a===e.LI;case 3:return a===e.RTC;case 6:return a===e.OPTION;case 8:return a===e.OPTGROUP}return!1}function i(a){switch(a.length){case 1:return a===e.P;case 2:return a===e.RB||a===e.RP||a===e.RT||a===e.DD||a===e.DT||a===e.LI||a===e.TD||a===e.TH||a===e.TR;case 3:return a===e.RTC;case 5:return a===e.TBODY||a===e.TFOOT||a===e.THEAD;case 6:return a===e.OPTION;case 7:return a===e.CAPTION;case 8:return a===e.OPTGROUP||a===e.COLGROUP}return!1}function o(a,l){switch(a.length){case 2:if(a===e.TD||a===e.TH)return l===n.HTML;if(a===e.MI||a===e.MO||a===e.MN||a===e.MS)return l===n.MATHML;break;case 4:if(a===e.HTML)return l===n.HTML;if(a===e.DESC)return l===n.SVG;break;case 5:if(a===e.TABLE)return l===n.HTML;if(a===e.MTEXT)return l===n.MATHML;if(a===e.TITLE)return l===n.SVG;break;case 6:return(a===e.APPLET||a===e.OBJECT)&&l===n.HTML;case 7:return(a===e.CAPTION||a===e.MARQUEE)&&l===n.HTML;case 8:return a===e.TEMPLATE&&l===n.HTML;case 13:return a===e.FOREIGN_OBJECT&&l===n.SVG;case 14:return a===e.ANNOTATION_XML&&l===n.MATHML}return!1}class s{constructor(l,c){this.stackTop=-1,this.items=[],this.current=l,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=c}_indexOf(l){let c=-1;for(let u=this.stackTop;u>=0;u--)if(this.items[u]===l){c=u;break}return c}_isInTemplate(){return this.currentTagName===e.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===n.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(l){this.items[++this.stackTop]=l,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(l,c){const u=this._indexOf(l);this.items[u]=c,u===this.stackTop&&this._updateCurrentElement()}insertAfter(l,c){const u=this._indexOf(l)+1;this.items.splice(u,0,c),u===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(l){for(;this.stackTop>-1;){const c=this.currentTagName,u=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),c===l&&u===n.HTML)break}}popUntilElementPopped(l){for(;this.stackTop>-1;){const c=this.current;if(this.pop(),c===l)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const l=this.currentTagName,c=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),l===e.H1||l===e.H2||l===e.H3||l===e.H4||l===e.H5||l===e.H6&&c===n.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const l=this.currentTagName,c=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),l===e.TD||l===e.TH&&c===n.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==e.TABLE&&this.currentTagName!==e.TEMPLATE&&this.currentTagName!==e.HTML||this.treeAdapter.getNamespaceURI(this.current)!==n.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==e.TBODY&&this.currentTagName!==e.TFOOT&&this.currentTagName!==e.THEAD&&this.currentTagName!==e.TEMPLATE&&this.currentTagName!==e.HTML||this.treeAdapter.getNamespaceURI(this.current)!==n.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==e.TR&&this.currentTagName!==e.TEMPLATE&&this.currentTagName!==e.HTML||this.treeAdapter.getNamespaceURI(this.current)!==n.HTML;)this.pop()}remove(l){for(let c=this.stackTop;c>=0;c--)if(this.items[c]===l){this.items.splice(c,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const l=this.items[1];return l&&this.treeAdapter.getTagName(l)===e.BODY?l:null}contains(l){return this._indexOf(l)>-1}getCommonAncestor(l){let c=this._indexOf(l);return--c>=0?this.items[c]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.currentTagName===e.HTML}hasInScope(l){for(let c=this.stackTop;c>=0;c--){const u=this.treeAdapter.getTagName(this.items[c]),d=this.treeAdapter.getNamespaceURI(this.items[c]);if(u===l&&d===n.HTML)return!0;if(o(u,d))return!1}return!0}hasNumberedHeaderInScope(){for(let l=this.stackTop;l>=0;l--){const c=this.treeAdapter.getTagName(this.items[l]),u=this.treeAdapter.getNamespaceURI(this.items[l]);if((c===e.H1||c===e.H2||c===e.H3||c===e.H4||c===e.H5||c===e.H6)&&u===n.HTML)return!0;if(o(c,u))return!1}return!0}hasInListItemScope(l){for(let c=this.stackTop;c>=0;c--){const u=this.treeAdapter.getTagName(this.items[c]),d=this.treeAdapter.getNamespaceURI(this.items[c]);if(u===l&&d===n.HTML)return!0;if((u===e.UL||u===e.OL)&&d===n.HTML||o(u,d))return!1}return!0}hasInButtonScope(l){for(let c=this.stackTop;c>=0;c--){const u=this.treeAdapter.getTagName(this.items[c]),d=this.treeAdapter.getNamespaceURI(this.items[c]);if(u===l&&d===n.HTML)return!0;if(u===e.BUTTON&&d===n.HTML||o(u,d))return!1}return!0}hasInTableScope(l){for(let c=this.stackTop;c>=0;c--){const u=this.treeAdapter.getTagName(this.items[c]);if(this.treeAdapter.getNamespaceURI(this.items[c])===n.HTML){if(u===l)return!0;if(u===e.TABLE||u===e.TEMPLATE||u===e.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let l=this.stackTop;l>=0;l--){const c=this.treeAdapter.getTagName(this.items[l]);if(this.treeAdapter.getNamespaceURI(this.items[l])===n.HTML){if(c===e.TBODY||c===e.THEAD||c===e.TFOOT)return!0;if(c===e.TABLE||c===e.HTML)return!1}}return!0}hasInSelectScope(l){for(let c=this.stackTop;c>=0;c--){const u=this.treeAdapter.getTagName(this.items[c]);if(this.treeAdapter.getNamespaceURI(this.items[c])===n.HTML){if(u===l)return!0;if(u!==e.OPTION&&u!==e.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;r(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;i(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(l){for(;r(this.currentTagName)&&this.currentTagName!==l;)this.pop()}}return Tg=s,Tg}var mg,uN;function ikn(){if(uN)return mg;uN=1;const t=3;class e{constructor(r){this.length=0,this.entries=[],this.treeAdapter=r,this.bookmark=null}_getNoahArkConditionCandidates(r){const i=[];if(this.length>=t){const o=this.treeAdapter.getAttrList(r).length,s=this.treeAdapter.getTagName(r),a=this.treeAdapter.getNamespaceURI(r);for(let l=this.length-1;l>=0;l--){const c=this.entries[l];if(c.type===e.MARKER_ENTRY)break;const u=c.element,d=this.treeAdapter.getAttrList(u);this.treeAdapter.getTagName(u)===s&&this.treeAdapter.getNamespaceURI(u)===a&&d.length===o&&i.push({idx:l,attrs:d})}}return i.length=t-1;c--)this.entries.splice(i[c].idx,1),this.length--}}insertMarker(){this.entries.push({type:e.MARKER_ENTRY}),this.length++}pushElement(r,i){this._ensureNoahArkCondition(r),this.entries.push({type:e.ELEMENT_ENTRY,element:r,token:i}),this.length++}insertElementAfterBookmark(r,i){let o=this.length-1;for(;o>=0&&this.entries[o]!==this.bookmark;o--);this.entries.splice(o+1,0,{type:e.ELEMENT_ENTRY,element:r,token:i}),this.length++}removeEntry(r){for(let i=this.length-1;i>=0;i--)if(this.entries[i]===r){this.entries.splice(i,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const r=this.entries.pop();if(this.length--,r.type===e.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(r){for(let i=this.length-1;i>=0;i--){const o=this.entries[i];if(o.type===e.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(o.element)===r)return o}return null}getElementEntry(r){for(let i=this.length-1;i>=0;i--){const o=this.entries[i];if(o.type===e.ELEMENT_ENTRY&&o.element===r)return o}return null}}return e.MARKER_ENTRY="MARKER_ENTRY",e.ELEMENT_ENTRY="ELEMENT_ENTRY",mg=e,mg}var gg,dN;function Ys(){if(dN)return gg;dN=1;class t{constructor(n){const r={},i=this._getOverriddenMethods(this,r);for(const o of Object.keys(i))typeof i[o]=="function"&&(r[o]=n[o],n[o]=i[o])}_getOverriddenMethods(){throw new Error("Not implemented")}}return t.install=function(e,n,r){e.__mixins||(e.__mixins=[]);for(let o=0;o="a"&&X<="z"||X>="A"&&X<="Z"}function a(X,$,ce){var ye=X.toLowerCase();return X===ye?function(z,ne){ne===ye?z._state=$:(z._state=ce,z._index--)}:function(z,ne){ne===ye||ne===X?z._state=$:(z._state=ce,z._index--)}}function l(X,$){var ce=X.toLowerCase();return function(ye,z){z===ce||z===X?ye._state=$:(ye._state=3,ye._index--)}}var c=a("C",24,16),u=a("D",25,16),d=a("A",26,16),h=a("T",27,16),f=a("A",28,16),m=l("R",35),T=l("I",36),Q=l("P",37),_=l("T",38),v=a("R",40,1),y=a("I",41,1),b=a("P",42,1),E=a("T",43,1),x=l("Y",45),L=l("L",46),M=l("E",47),C=a("Y",49,1),A=a("L",50,1),I=a("E",51,1),N=l("I",54),P=l("T",55),O=l("L",56),F=l("E",57),V=a("I",58,1),U=a("T",59,1),G=a("L",60,1),K=a("E",61,1),W=a("#",63,64),te=a("X",66,65),de=function(){function X($,ce){var ye;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=ce,this.xmlMode=!!($!=null&&$.xmlMode),this.decodeEntities=(ye=$==null?void 0:$.decodeEntities)!==null&&ye!==void 0?ye:!0}return X.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},X.prototype.write=function($){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=$,this.parse()},X.prototype.end=function($){this.ended&&this.cbs.onerror(Error(".end() after done!")),$&&this.write($),this.ended=!0,this.running&&this.finish()},X.prototype.pause=function(){this.running=!1},X.prototype.resume=function(){this.running=!0,this._indexthis.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):this.decodeEntities&&$==="&"&&(this.special===1||this.special===4)&&(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},X.prototype.isTagStartChar=function($){return s($)||this.xmlMode&&!o($)&&$!=="/"&&$!==">"},X.prototype.stateBeforeTagName=function($){$==="/"?this._state=5:$==="<"?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):$===">"||this.special!==1||o($)?this._state=1:$==="!"?(this._state=15,this.sectionStart=this._index+1):$==="?"?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar($)?(this._state=!this.xmlMode&&($==="s"||$==="S")?32:!this.xmlMode&&($==="t"||$==="T")?52:3,this.sectionStart=this._index):this._state=1},X.prototype.stateInTagName=function($){($==="/"||$===">"||o($))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},X.prototype.stateBeforeClosingTagName=function($){o($)||($===">"?this._state=1:this.special!==1?this.special!==4&&($==="s"||$==="S")?this._state=33:this.special===4&&($==="t"||$==="T")?this._state=53:(this._state=1,this._index--):this.isTagStartChar($)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},X.prototype.stateInClosingTagName=function($){($===">"||o($))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},X.prototype.stateAfterClosingTagName=function($){$===">"&&(this._state=1,this.sectionStart=this._index+1)},X.prototype.stateBeforeAttributeName=function($){$===">"?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):$==="/"?this._state=4:o($)||(this._state=9,this.sectionStart=this._index)},X.prototype.stateInSelfClosingTag=function($){$===">"?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):o($)||(this._state=8,this._index--)},X.prototype.stateInAttributeName=function($){($==="="||$==="/"||$===">"||o($))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},X.prototype.stateAfterAttributeName=function($){$==="="?this._state=11:$==="/"||$===">"?(this.cbs.onattribend(void 0),this._state=8,this._index--):o($)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},X.prototype.stateBeforeAttributeValue=function($){$==='"'?(this._state=12,this.sectionStart=this._index+1):$==="'"?(this._state=13,this.sectionStart=this._index+1):o($)||(this._state=14,this.sectionStart=this._index,this._index--)},X.prototype.handleInAttributeValue=function($,ce){$===ce?(this.emitToken("onattribdata"),this.cbs.onattribend(ce),this._state=8):this.decodeEntities&&$==="&"&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},X.prototype.stateInAttributeValueDoubleQuotes=function($){this.handleInAttributeValue($,'"')},X.prototype.stateInAttributeValueSingleQuotes=function($){this.handleInAttributeValue($,"'")},X.prototype.stateInAttributeValueNoQuotes=function($){o($)||$===">"?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&$==="&"&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},X.prototype.stateBeforeDeclaration=function($){this._state=$==="["?23:$==="-"?18:16},X.prototype.stateInDeclaration=function($){$===">"&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},X.prototype.stateInProcessingInstruction=function($){$===">"&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},X.prototype.stateBeforeComment=function($){$==="-"?(this._state=19,this.sectionStart=this._index+1):this._state=16},X.prototype.stateInComment=function($){$==="-"&&(this._state=21)},X.prototype.stateInSpecialComment=function($){$===">"&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},X.prototype.stateAfterComment1=function($){$==="-"?this._state=22:this._state=19},X.prototype.stateAfterComment2=function($){$===">"?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):$!=="-"&&(this._state=19)},X.prototype.stateBeforeCdata6=function($){$==="["?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},X.prototype.stateInCdata=function($){$==="]"&&(this._state=30)},X.prototype.stateAfterCdata1=function($){$==="]"?this._state=31:this._state=29},X.prototype.stateAfterCdata2=function($){$===">"?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):$!=="]"&&(this._state=29)},X.prototype.stateBeforeSpecialS=function($){$==="c"||$==="C"?this._state=34:$==="t"||$==="T"?this._state=44:(this._state=3,this._index--)},X.prototype.stateBeforeSpecialSEnd=function($){this.special===2&&($==="c"||$==="C")?this._state=39:this.special===3&&($==="t"||$==="T")?this._state=48:this._state=1},X.prototype.stateBeforeSpecialLast=function($,ce){($==="/"||$===">"||o($))&&(this.special=ce),this._state=3,this._index--},X.prototype.stateAfterSpecialLast=function($,ce){$===">"||o($)?(this.special=1,this._state=6,this.sectionStart=this._index-ce,this._index--):this._state=1},X.prototype.parseFixedEntity=function($){if($===void 0&&($=this.xmlMode?i.default:n.default),this.sectionStart+1=2;){var ye=this.buffer.substr($,ce);if(Object.prototype.hasOwnProperty.call(r.default,ye)){this.emitPartial(r.default[ye]),this.sectionStart+=ce+1;return}ce--}},X.prototype.stateInNamedEntity=function($){$===";"?(this.parseFixedEntity(),this.baseState===1&&this.sectionStart+1"9")&&!s($)&&(this.xmlMode||this.sectionStart+1===this._index||(this.baseState!==1?$!=="="&&this.parseFixedEntity(r.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},X.prototype.decodeNumericEntity=function($,ce,ye){var z=this.sectionStart+$;if(z!==this._index){var ne=this.buffer.substring(z,this._index),fe=parseInt(ne,ce);this.emitPartial(e.default(fe)),this.sectionStart=ye?this._index+1:this._index}this._state=this.baseState},X.prototype.stateInNumericEntity=function($){$===";"?this.decodeNumericEntity(2,10,!0):($<"0"||$>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},X.prototype.stateInHexEntity=function($){$===";"?this.decodeNumericEntity(3,16,!0):($<"a"||$>"f")&&($<"A"||$>"F")&&($<"0"||$>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},X.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(this._state===1?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},X.prototype.parse=function(){for(;this._index0&&i[d].has(m=this.stack[this.stack.length-1]);)this.onclosetag(m);(this.options.xmlMode||!o.has(d))&&(this.stack.push(d),s.has(d)?this.foreignContext.push(!0):a.has(d)&&this.foreignContext.push(!1)),(f=(h=this.cbs).onopentagname)===null||f===void 0||f.call(h,d),this.cbs.onopentag&&(this.attribs={})},u.prototype.onopentagend=function(){var d,h;this.updatePosition(1),this.attribs&&((h=(d=this.cbs).onopentag)===null||h===void 0||h.call(d,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&o.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},u.prototype.onclosetag=function(d){if(this.updatePosition(1),this.lowerCaseTagNames&&(d=d.toLowerCase()),(s.has(d)||a.has(d))&&this.foreignContext.pop(),this.stack.length&&(this.options.xmlMode||!o.has(d))){var h=this.stack.lastIndexOf(d);if(h!==-1)if(this.cbs.onclosetag)for(h=this.stack.length-h;h--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=h;else d==="p"&&!this.options.xmlMode&&(this.onopentagname(d),this.closeCurrentTag())}else!this.options.xmlMode&&(d==="br"||d==="p")&&(this.onopentagname(d),this.closeCurrentTag())},u.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},u.prototype.closeCurrentTag=function(){var d,h,f=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===f&&((h=(d=this.cbs).onclosetag)===null||h===void 0||h.call(d,f),this.stack.pop())},u.prototype.onattribname=function(d){this.lowerCaseAttributeNames&&(d=d.toLowerCase()),this.attribname=d},u.prototype.onattribdata=function(d){this.attribvalue+=d},u.prototype.onattribend=function(d){var h,f;(f=(h=this.cbs).onattribute)===null||f===void 0||f.call(h,this.attribname,this.attribvalue,d),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},u.prototype.getInstructionName=function(d){var h=d.search(l),f=h<0?d:d.substr(0,h);return this.lowerCaseTagNames&&(f=f.toLowerCase()),f},u.prototype.ondeclaration=function(d){if(this.cbs.onprocessinginstruction){var h=this.getInstructionName(d);this.cbs.onprocessinginstruction("!"+h,"!"+d)}},u.prototype.onprocessinginstruction=function(d){if(this.cbs.onprocessinginstruction){var h=this.getInstructionName(d);this.cbs.onprocessinginstruction("?"+h,"?"+d)}},u.prototype.oncomment=function(d){var h,f,m,T;this.updatePosition(4),(f=(h=this.cbs).oncomment)===null||f===void 0||f.call(h,d),(T=(m=this.cbs).oncommentend)===null||T===void 0||T.call(m)},u.prototype.oncdata=function(d){var h,f,m,T,Q,_;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?((f=(h=this.cbs).oncdatastart)===null||f===void 0||f.call(h),(T=(m=this.cbs).ontext)===null||T===void 0||T.call(m,d),(_=(Q=this.cbs).oncdataend)===null||_===void 0||_.call(Q)):this.oncomment("[CDATA["+d+"]]")},u.prototype.onerror=function(d){var h,f;(f=(h=this.cbs).onerror)===null||f===void 0||f.call(h,d)},u.prototype.onend=function(){var d,h;if(this.cbs.onclosetag)for(var f=this.stack.length;f>0;this.cbs.onclosetag(this.stack[--f]));(h=(d=this.cbs).onend)===null||h===void 0||h.call(d)},u.prototype.reset=function(){var d,h,f,m;(h=(d=this.cbs).onreset)===null||h===void 0||h.call(d),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],(m=(f=this.cbs).onparserinit)===null||m===void 0||m.call(f,this)},u.prototype.parseComplete=function(d){this.reset(),this.end(d)},u.prototype.write=function(d){this.tokenizer.write(d)},u.prototype.end=function(d){this.tokenizer.end(d)},u.prototype.pause=function(){this.tokenizer.pause()},u.prototype.resume=function(){this.tokenizer.resume()},u.prototype.parseChunk=function(d){this.write(d)},u.prototype.done=function(d){this.end(d)},u}();return Y3.Parser=c,Y3}var E1={},eN;function tN(){if(eN)return E1;eN=1;var t=S&&S.__extends||function(){var y=function(b,E){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,L){x.__proto__=L}||function(x,L){for(var M in L)Object.prototype.hasOwnProperty.call(L,M)&&(x[M]=L[M])},y(b,E)};return function(b,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");y(b,E);function x(){this.constructor=b}b.prototype=E===null?Object.create(E):(x.prototype=E.prototype,new x)}}(),e=S&&S.__createBinding||(Object.create?function(y,b,E,x){x===void 0&&(x=E),Object.defineProperty(y,x,{enumerable:!0,get:function(){return b[E]}})}:function(y,b,E,x){x===void 0&&(x=E),y[x]=b[E]}),n=S&&S.__setModuleDefault||(Object.create?function(y,b){Object.defineProperty(y,"default",{enumerable:!0,value:b})}:function(y,b){y.default=b}),r=S&&S.__importStar||function(y){if(y&&y.__esModule)return y;var b={};if(y!=null)for(var E in y)E!=="default"&&Object.prototype.hasOwnProperty.call(y,E)&&e(b,y,E);return n(b,y),b},i=S&&S.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(E1,"__esModule",{value:!0}),E1.parseFeed=E1.FeedHandler=void 0;var o=i(di()),s=r(p9()),a=WF(),l;(function(y){y[y.image=0]="image",y[y.audio=1]="audio",y[y.video=2]="video",y[y.document=3]="document",y[y.executable=4]="executable"})(l||(l={}));var c;(function(y){y[y.sample=0]="sample",y[y.full=1]="full",y[y.nonstop=2]="nonstop"})(c||(c={}));var u=function(y){t(b,y);function b(E,x){var L=this;return typeof E=="object"&&(E=void 0,x=E),L=y.call(this,E,x)||this,L}return b.prototype.onend=function(){var E,x,L=f(_,this.dom);if(!L){this.handleCallback(new Error("couldn't find root of feed"));return}var M={};if(L.name==="feed"){var C=L.children;M.type="atom",Q(M,"id","id",C),Q(M,"title","title",C);var A=T("href",f("link",C));A&&(M.link=A),Q(M,"description","subtitle",C);var I=m("updated",C);I&&(M.updated=new Date(I)),Q(M,"author","email",C,!0),M.items=h("entry",C).map(function(N){var P={},O=N.children;Q(P,"id","id",O),Q(P,"title","title",O);var F=T("href",f("link",O));F&&(P.link=F);var V=m("summary",O)||m("content",O);V&&(P.description=V);var U=m("updated",O);return U&&(P.pubDate=new Date(U)),P.media=d(O),P})}else{var C=(x=(E=f("channel",L.children))===null||E===void 0?void 0:E.children)!==null&&x!==void 0?x:[];M.type=L.name.substr(0,3),M.id="",Q(M,"title","title",C),Q(M,"link","link",C),Q(M,"description","description",C);var I=m("lastBuildDate",C);I&&(M.updated=new Date(I)),Q(M,"author","managingEditor",C,!0),M.items=h("item",L.children).map(function(O){var F={},V=O.children;Q(F,"id","guid",V),Q(F,"title","title",V),Q(F,"link","link",V),Q(F,"description","description",V);var U=m("pubDate",V);return U&&(F.pubDate=new Date(U)),F.media=d(V),F})}this.feed=M,this.handleCallback(null)},b}(o.default);E1.FeedHandler=u;function d(y){return h("media:content",y).map(function(b){var E={medium:b.attribs.medium,isDefault:!!b.attribs.isDefault};return b.attribs.url&&(E.url=b.attribs.url),b.attribs.fileSize&&(E.fileSize=parseInt(b.attribs.fileSize,10)),b.attribs.type&&(E.type=b.attribs.type),b.attribs.expression&&(E.expression=b.attribs.expression),b.attribs.bitrate&&(E.bitrate=parseInt(b.attribs.bitrate,10)),b.attribs.framerate&&(E.framerate=parseInt(b.attribs.framerate,10)),b.attribs.samplingrate&&(E.samplingrate=parseInt(b.attribs.samplingrate,10)),b.attribs.channels&&(E.channels=parseInt(b.attribs.channels,10)),b.attribs.duration&&(E.duration=parseInt(b.attribs.duration,10)),b.attribs.height&&(E.height=parseInt(b.attribs.height,10)),b.attribs.width&&(E.width=parseInt(b.attribs.width,10)),b.attribs.lang&&(E.lang=b.attribs.lang),E})}function h(y,b){return s.getElementsByTagName(y,b,!0)}function f(y,b){return s.getElementsByTagName(y,b,!0,1)[0]}function m(y,b,E){return E===void 0&&(E=!1),s.getText(s.getElementsByTagName(y,b,E,1)).trim()}function T(y,b){if(!b)return null;var E=b.attribs;return E[y]}function Q(y,b,E,x,L){L===void 0&&(L=!1);var M=m(E,x,L);M&&(y[b]=M)}function _(y){return y==="rss"||y==="feed"||y==="rdf:RDF"}function v(y,b){b===void 0&&(b={xmlMode:!0});var E=new u(b);return new a.Parser(E,b).end(y),E.feed}return E1.parseFeed=v,E1}var nN;function Uc(){return nN||(nN=1,function(t){var e=S&&S.__createBinding||(Object.create?function(m,T,Q,_){_===void 0&&(_=Q),Object.defineProperty(m,_,{enumerable:!0,get:function(){return T[Q]}})}:function(m,T,Q,_){_===void 0&&(_=Q),m[_]=T[Q]}),n=S&&S.__setModuleDefault||(Object.create?function(m,T){Object.defineProperty(m,"default",{enumerable:!0,value:T})}:function(m,T){m.default=T}),r=S&&S.__importStar||function(m){if(m&&m.__esModule)return m;var T={};if(m!=null)for(var Q in m)Q!=="default"&&Object.prototype.hasOwnProperty.call(m,Q)&&e(T,m,Q);return n(T,m),T},i=S&&S.__exportStar||function(m,T){for(var Q in m)Q!=="default"&&!Object.prototype.hasOwnProperty.call(T,Q)&&e(T,m,Q)},o=S&&S.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0}),t.RssHandler=t.DefaultHandler=t.DomUtils=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DomHandler=t.Parser=void 0;var s=WF();Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return s.Parser}});var a=di();Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return a.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return a.DomHandler}});function l(m,T){var Q=new a.DomHandler(void 0,T);return new s.Parser(Q,T).end(m),Q.root}t.parseDocument=l;function c(m,T){return l(m,T).children}t.parseDOM=c;function u(m,T,Q){var _=new a.DomHandler(m,T,Q);return new s.Parser(_,T)}t.createDomStream=u;var d=jF();Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return o(d).default}});var h=r(K0());t.ElementType=h,i(tN(),t),t.DomUtils=r(p9());var f=tN();Object.defineProperty(t,"RssHandler",{enumerable:!0,get:function(){return f.FeedHandler}})}(ug)),ug}var x1={},K3={},Mo={},rN;function nb(){if(rN)return Mo;rN=1;const t=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];return Mo.REPLACEMENT_CHARACTER="�",Mo.CODE_POINTS={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},Mo.CODE_POINT_SEQUENCES={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},Mo.isSurrogate=function(e){return e>=55296&&e<=57343},Mo.isSurrogatePair=function(e){return e>=56320&&e<=57343},Mo.getSurrogatePairCodePoint=function(e,n){return(e-55296)*1024+9216+n},Mo.isControlCodePoint=function(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159},Mo.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||t.indexOf(e)>-1},Mo}var dg,iN;function rb(){return iN||(iN=1,dg={controlCharacterInInputStream:"control-character-in-input-stream",noncharacterInInputStream:"noncharacter-in-input-stream",surrogateInInputStream:"surrogate-in-input-stream",nonVoidHtmlElementStartTagWithTrailingSolidus:"non-void-html-element-start-tag-with-trailing-solidus",endTagWithAttributes:"end-tag-with-attributes",endTagWithTrailingSolidus:"end-tag-with-trailing-solidus",unexpectedSolidusInTag:"unexpected-solidus-in-tag",unexpectedNullCharacter:"unexpected-null-character",unexpectedQuestionMarkInsteadOfTagName:"unexpected-question-mark-instead-of-tag-name",invalidFirstCharacterOfTagName:"invalid-first-character-of-tag-name",unexpectedEqualsSignBeforeAttributeName:"unexpected-equals-sign-before-attribute-name",missingEndTagName:"missing-end-tag-name",unexpectedCharacterInAttributeName:"unexpected-character-in-attribute-name",unknownNamedCharacterReference:"unknown-named-character-reference",missingSemicolonAfterCharacterReference:"missing-semicolon-after-character-reference",unexpectedCharacterAfterDoctypeSystemIdentifier:"unexpected-character-after-doctype-system-identifier",unexpectedCharacterInUnquotedAttributeValue:"unexpected-character-in-unquoted-attribute-value",eofBeforeTagName:"eof-before-tag-name",eofInTag:"eof-in-tag",missingAttributeValue:"missing-attribute-value",missingWhitespaceBetweenAttributes:"missing-whitespace-between-attributes",missingWhitespaceAfterDoctypePublicKeyword:"missing-whitespace-after-doctype-public-keyword",missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:"missing-whitespace-between-doctype-public-and-system-identifiers",missingWhitespaceAfterDoctypeSystemKeyword:"missing-whitespace-after-doctype-system-keyword",missingQuoteBeforeDoctypePublicIdentifier:"missing-quote-before-doctype-public-identifier",missingQuoteBeforeDoctypeSystemIdentifier:"missing-quote-before-doctype-system-identifier",missingDoctypePublicIdentifier:"missing-doctype-public-identifier",missingDoctypeSystemIdentifier:"missing-doctype-system-identifier",abruptDoctypePublicIdentifier:"abrupt-doctype-public-identifier",abruptDoctypeSystemIdentifier:"abrupt-doctype-system-identifier",cdataInHtmlContent:"cdata-in-html-content",incorrectlyOpenedComment:"incorrectly-opened-comment",eofInScriptHtmlCommentLikeText:"eof-in-script-html-comment-like-text",eofInDoctype:"eof-in-doctype",nestedComment:"nested-comment",abruptClosingOfEmptyComment:"abrupt-closing-of-empty-comment",eofInComment:"eof-in-comment",incorrectlyClosedComment:"incorrectly-closed-comment",eofInCdata:"eof-in-cdata",absenceOfDigitsInNumericCharacterReference:"absence-of-digits-in-numeric-character-reference",nullCharacterReference:"null-character-reference",surrogateCharacterReference:"surrogate-character-reference",characterReferenceOutsideUnicodeRange:"character-reference-outside-unicode-range",controlCharacterReference:"control-character-reference",noncharacterCharacterReference:"noncharacter-character-reference",missingWhitespaceBeforeDoctypeName:"missing-whitespace-before-doctype-name",missingDoctypeName:"missing-doctype-name",invalidCharacterSequenceAfterDoctypeName:"invalid-character-sequence-after-doctype-name",duplicateAttribute:"duplicate-attribute",nonConformingDoctype:"non-conforming-doctype",missingDoctype:"missing-doctype",misplacedDoctype:"misplaced-doctype",endTagWithoutMatchingOpenElement:"end-tag-without-matching-open-element",closingOfElementWithOpenChildElements:"closing-of-element-with-open-child-elements",disallowedContentInNoscriptInHead:"disallowed-content-in-noscript-in-head",openElementsLeftAfterEof:"open-elements-left-after-eof",abandonedHeadElementChild:"abandoned-head-element-child",misplacedStartTagForHeadElement:"misplaced-start-tag-for-head-element",nestedNoscriptInHead:"nested-noscript-in-head",eofInElementThatCanContainOnlyText:"eof-in-element-that-can-contain-only-text"}),dg}var fg,oN;function tkn(){if(oN)return fg;oN=1;const t=nb(),e=rb(),n=t.CODE_POINTS,r=65536;class i{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=r}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(s){if(this.pos!==this.lastCharPos){const a=this.html.charCodeAt(this.pos+1);if(t.isSurrogatePair(a))return this.pos++,this._addGap(),t.getSurrogatePairCodePoint(s,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,n.EOF;return this._err(e.surrogateInInputStream),s}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[])}write(s,a){this.html?this.html+=s:this.html=s,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=a}insertHtmlAtCurrentPos(s){this.html=this.html.substring(0,this.pos+1)+s+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,n.EOF;let s=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&s===n.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):s===n.CARRIAGE_RETURN?(this.skipNextNewLine=!0,n.LINE_FEED):(this.skipNextNewLine=!1,t.isSurrogate(s)&&(s=this._processSurrogate(s)),s>31&&s<127||s===n.LINE_FEED||s===n.CARRIAGE_RETURN||s>159&&s<64976||this._checkForProblematicCharacters(s),s)}_checkForProblematicCharacters(s){t.isControlCodePoint(s)?this._err(e.controlCharacterInInputStream):t.isUndefinedCodePoint(s)&&this._err(e.noncharacterInInputStream)}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--}}return fg=i,fg}var pg,sN;function nkn(){return sN||(sN=1,pg=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204])),pg}var hg,aN;function h9(){if(aN)return hg;aN=1;const t=tkn(),e=nb(),n=nkn(),r=rb(),i=e.CODE_POINTS,o=e.CODE_POINT_SEQUENCES,s={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},a=1,l=2,c=4,u=a|l|c,d="DATA_STATE",h="RCDATA_STATE",f="RAWTEXT_STATE",m="SCRIPT_DATA_STATE",T="PLAINTEXT_STATE",Q="TAG_OPEN_STATE",_="END_TAG_OPEN_STATE",v="TAG_NAME_STATE",y="RCDATA_LESS_THAN_SIGN_STATE",b="RCDATA_END_TAG_OPEN_STATE",E="RCDATA_END_TAG_NAME_STATE",x="RAWTEXT_LESS_THAN_SIGN_STATE",L="RAWTEXT_END_TAG_OPEN_STATE",M="RAWTEXT_END_TAG_NAME_STATE",C="SCRIPT_DATA_LESS_THAN_SIGN_STATE",A="SCRIPT_DATA_END_TAG_OPEN_STATE",I="SCRIPT_DATA_END_TAG_NAME_STATE",N="SCRIPT_DATA_ESCAPE_START_STATE",P="SCRIPT_DATA_ESCAPE_START_DASH_STATE",O="SCRIPT_DATA_ESCAPED_STATE",F="SCRIPT_DATA_ESCAPED_DASH_STATE",V="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",U="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",G="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",K="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",W="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",te="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",de="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",X="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",$="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",ce="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",ye="BEFORE_ATTRIBUTE_NAME_STATE",z="ATTRIBUTE_NAME_STATE",ne="AFTER_ATTRIBUTE_NAME_STATE",fe="BEFORE_ATTRIBUTE_VALUE_STATE",be="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",Le="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",se="ATTRIBUTE_VALUE_UNQUOTED_STATE",Y="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",j="SELF_CLOSING_START_TAG_STATE",ie="BOGUS_COMMENT_STATE",Te="MARKUP_DECLARATION_OPEN_STATE",ve="COMMENT_START_STATE",ae="COMMENT_START_DASH_STATE",Oe="COMMENT_STATE",Se="COMMENT_LESS_THAN_SIGN_STATE",Me="COMMENT_LESS_THAN_SIGN_BANG_STATE",ke="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",Z="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",q="COMMENT_END_DASH_STATE",pe="COMMENT_END_STATE",ue="COMMENT_END_BANG_STATE",_e="DOCTYPE_STATE",Ae="BEFORE_DOCTYPE_NAME_STATE",Ie="DOCTYPE_NAME_STATE",Ve="AFTER_DOCTYPE_NAME_STATE",$e="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",lt="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",at="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",Be="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",It="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",Tt="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",mt="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",dt="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",st="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",ct="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",me="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",Ye="BOGUS_DOCTYPE_STATE",Ge="CDATA_SECTION_STATE",Pe="CDATA_SECTION_BRACKET_STATE",Xe="CDATA_SECTION_END_STATE",vt="CHARACTER_REFERENCE_STATE",Ot="NAMED_CHARACTER_REFERENCE_STATE",Hn="AMBIGUOS_AMPERSAND_STATE",zn="NUMERIC_CHARACTER_REFERENCE_STATE",an="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",Yn="DECIMAL_CHARACTER_REFERENCE_START_STATE",Cr="HEXADEMICAL_CHARACTER_REFERENCE_STATE",Xs="DECIMAL_CHARACTER_REFERENCE_STATE",So="NUMERIC_CHARACTER_REFERENCE_END_STATE";function Gt(Fe){return Fe===i.SPACE||Fe===i.LINE_FEED||Fe===i.TABULATION||Fe===i.FORM_FEED}function eo(Fe){return Fe>=i.DIGIT_0&&Fe<=i.DIGIT_9}function Xn(Fe){return Fe>=i.LATIN_CAPITAL_A&&Fe<=i.LATIN_CAPITAL_Z}function hi(Fe){return Fe>=i.LATIN_SMALL_A&&Fe<=i.LATIN_SMALL_Z}function sr(Fe){return hi(Fe)||Xn(Fe)}function Js(Fe){return sr(Fe)||eo(Fe)}function ea(Fe){return Fe>=i.LATIN_CAPITAL_A&&Fe<=i.LATIN_CAPITAL_F}function r1(Fe){return Fe>=i.LATIN_SMALL_A&&Fe<=i.LATIN_SMALL_F}function ee(Fe){return eo(Fe)||ea(Fe)||r1(Fe)}function xe(Fe){return Fe+32}function Ce(Fe){return Fe<=65535?String.fromCharCode(Fe):(Fe-=65536,String.fromCharCode(Fe>>>10&1023|55296)+String.fromCharCode(56320|Fe&1023))}function Ne(Fe){return String.fromCharCode(xe(Fe))}function Re(Fe,B){const tt=n[++Fe];let bt=++Fe,gt=bt+tt-1;for(;bt<=gt;){const Qt=bt+gt>>>1,Ht=n[Qt];if(HtB)gt=Qt-1;else return n[Qt+tt]}return-1}class We{constructor(){this.preprocessor=new t,this.tokenQueue=[],this.allowCDATA=!1,this.state=d,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null}_err(){}_errOnNextCodePoint(B){this._consume(),this._err(B),this._unconsume()}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const B=this._consume();this._ensureHibernation()||this[this.state](B)}return this.tokenQueue.shift()}write(B,tt){this.active=!0,this.preprocessor.write(B,tt)}insertHtmlAtCurrentPos(B){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(B)}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:We.HIBERNATION_TOKEN}),!0}return!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat()}_reconsumeInState(B){this.state=B,this._unconsume()}_consumeSequenceIfMatch(B,tt,bt){let gt=0,Qt=!0;const Ht=B.length;let Kt=0,un=tt,Ar;for(;Kt0&&(un=this._consume(),gt++),un===i.EOF){Qt=!1;break}if(Ar=B[Kt],un!==Ar&&(bt||un!==xe(Ar))){Qt=!1;break}}if(!Qt)for(;gt--;)this._unconsume();return Qt}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==o.SCRIPT_STRING.length)return!1;for(let B=0;B0&&this._err(r.endTagWithAttributes),B.selfClosing&&this._err(r.endTagWithTrailingSolidus)),this.tokenQueue.push(B)}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null)}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken()}_appendCharToCurrentCharacterToken(B,tt){this.currentCharacterToken&&this.currentCharacterToken.type!==B&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=tt:this._createCharacterToken(B,tt)}_emitCodePoint(B){let tt=We.CHARACTER_TOKEN;Gt(B)?tt=We.WHITESPACE_CHARACTER_TOKEN:B===i.NULL&&(tt=We.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(tt,Ce(B))}_emitSeveralCodePoints(B){for(let tt=0;tt-1;){const Qt=n[gt],Ht=Qt")):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.state=O,this._emitChars(e.REPLACEMENT_CHARACTER)):B===i.EOF?(this._err(r.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=O,this._emitCodePoint(B))}[U](B){B===i.SOLIDUS?(this.tempBuff=[],this.state=G):sr(B)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(W)):(this._emitChars("<"),this._reconsumeInState(O))}[G](B){sr(B)?(this._createEndTagToken(),this._reconsumeInState(K)):(this._emitChars("")):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.state=te,this._emitChars(e.REPLACEMENT_CHARACTER)):B===i.EOF?(this._err(r.eofInScriptHtmlCommentLikeText),this._emitEOFToken()):(this.state=te,this._emitCodePoint(B))}[$](B){B===i.SOLIDUS?(this.tempBuff=[],this.state=ce,this._emitChars("/")):this._reconsumeInState(te)}[ce](B){Gt(B)||B===i.SOLIDUS||B===i.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?O:te,this._emitCodePoint(B)):Xn(B)?(this.tempBuff.push(xe(B)),this._emitCodePoint(B)):hi(B)?(this.tempBuff.push(B),this._emitCodePoint(B)):this._reconsumeInState(te)}[ye](B){Gt(B)||(B===i.SOLIDUS||B===i.GREATER_THAN_SIGN||B===i.EOF?this._reconsumeInState(ne):B===i.EQUALS_SIGN?(this._err(r.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=z):(this._createAttr(""),this._reconsumeInState(z)))}[z](B){Gt(B)||B===i.SOLIDUS||B===i.GREATER_THAN_SIGN||B===i.EOF?(this._leaveAttrName(ne),this._unconsume()):B===i.EQUALS_SIGN?this._leaveAttrName(fe):Xn(B)?this.currentAttr.name+=Ne(B):B===i.QUOTATION_MARK||B===i.APOSTROPHE||B===i.LESS_THAN_SIGN?(this._err(r.unexpectedCharacterInAttributeName),this.currentAttr.name+=Ce(B)):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentAttr.name+=e.REPLACEMENT_CHARACTER):this.currentAttr.name+=Ce(B)}[ne](B){Gt(B)||(B===i.SOLIDUS?this.state=j:B===i.EQUALS_SIGN?this.state=fe:B===i.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInTag),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(z)))}[fe](B){Gt(B)||(B===i.QUOTATION_MARK?this.state=be:B===i.APOSTROPHE?this.state=Le:B===i.GREATER_THAN_SIGN?(this._err(r.missingAttributeValue),this.state=d,this._emitCurrentToken()):this._reconsumeInState(se))}[be](B){B===i.QUOTATION_MARK?this.state=Y:B===i.AMPERSAND?(this.returnState=be,this.state=vt):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentAttr.value+=e.REPLACEMENT_CHARACTER):B===i.EOF?(this._err(r.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ce(B)}[Le](B){B===i.APOSTROPHE?this.state=Y:B===i.AMPERSAND?(this.returnState=Le,this.state=vt):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentAttr.value+=e.REPLACEMENT_CHARACTER):B===i.EOF?(this._err(r.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ce(B)}[se](B){Gt(B)?this._leaveAttrValue(ye):B===i.AMPERSAND?(this.returnState=se,this.state=vt):B===i.GREATER_THAN_SIGN?(this._leaveAttrValue(d),this._emitCurrentToken()):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentAttr.value+=e.REPLACEMENT_CHARACTER):B===i.QUOTATION_MARK||B===i.APOSTROPHE||B===i.LESS_THAN_SIGN||B===i.EQUALS_SIGN||B===i.GRAVE_ACCENT?(this._err(r.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=Ce(B)):B===i.EOF?(this._err(r.eofInTag),this._emitEOFToken()):this.currentAttr.value+=Ce(B)}[Y](B){Gt(B)?this._leaveAttrValue(ye):B===i.SOLIDUS?this._leaveAttrValue(j):B===i.GREATER_THAN_SIGN?(this._leaveAttrValue(d),this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInTag),this._emitEOFToken()):(this._err(r.missingWhitespaceBetweenAttributes),this._reconsumeInState(ye))}[j](B){B===i.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInTag),this._emitEOFToken()):(this._err(r.unexpectedSolidusInTag),this._reconsumeInState(ye))}[ie](B){B===i.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):B===i.EOF?(this._emitCurrentToken(),this._emitEOFToken()):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.data+=e.REPLACEMENT_CHARACTER):this.currentToken.data+=Ce(B)}[Te](B){this._consumeSequenceIfMatch(o.DASH_DASH_STRING,B,!0)?(this._createCommentToken(),this.state=ve):this._consumeSequenceIfMatch(o.DOCTYPE_STRING,B,!1)?this.state=_e:this._consumeSequenceIfMatch(o.CDATA_START_STRING,B,!0)?this.allowCDATA?this.state=Ge:(this._err(r.cdataInHtmlContent),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=ie):this._ensureHibernation()||(this._err(r.incorrectlyOpenedComment),this._createCommentToken(),this._reconsumeInState(ie))}[ve](B){B===i.HYPHEN_MINUS?this.state=ae:B===i.GREATER_THAN_SIGN?(this._err(r.abruptClosingOfEmptyComment),this.state=d,this._emitCurrentToken()):this._reconsumeInState(Oe)}[ae](B){B===i.HYPHEN_MINUS?this.state=pe:B===i.GREATER_THAN_SIGN?(this._err(r.abruptClosingOfEmptyComment),this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(Oe))}[Oe](B){B===i.HYPHEN_MINUS?this.state=q:B===i.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=Se):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.data+=e.REPLACEMENT_CHARACTER):B===i.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=Ce(B)}[Se](B){B===i.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=Me):B===i.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(Oe)}[Me](B){B===i.HYPHEN_MINUS?this.state=ke:this._reconsumeInState(Oe)}[ke](B){B===i.HYPHEN_MINUS?this.state=Z:this._reconsumeInState(q)}[Z](B){B!==i.GREATER_THAN_SIGN&&B!==i.EOF&&this._err(r.nestedComment),this._reconsumeInState(pe)}[q](B){B===i.HYPHEN_MINUS?this.state=pe:B===i.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(Oe))}[pe](B){B===i.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):B===i.EXCLAMATION_MARK?this.state=ue:B===i.HYPHEN_MINUS?this.currentToken.data+="-":B===i.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(Oe))}[ue](B){B===i.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=q):B===i.GREATER_THAN_SIGN?(this._err(r.incorrectlyClosedComment),this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInComment),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(Oe))}[_e](B){Gt(B)?this.state=Ae:B===i.GREATER_THAN_SIGN?this._reconsumeInState(Ae):B===i.EOF?(this._err(r.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingWhitespaceBeforeDoctypeName),this._reconsumeInState(Ae))}[Ae](B){Gt(B)||(Xn(B)?(this._createDoctypeToken(Ne(B)),this.state=Ie):B===i.NULL?(this._err(r.unexpectedNullCharacter),this._createDoctypeToken(e.REPLACEMENT_CHARACTER),this.state=Ie):B===i.GREATER_THAN_SIGN?(this._err(r.missingDoctypeName),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=d):B===i.EOF?(this._err(r.eofInDoctype),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(Ce(B)),this.state=Ie))}[Ie](B){Gt(B)?this.state=Ve:B===i.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):Xn(B)?this.currentToken.name+=Ne(B):B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.name+=e.REPLACEMENT_CHARACTER):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=Ce(B)}[Ve](B){Gt(B)||(B===i.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(o.PUBLIC_STRING,B,!1)?this.state=$e:this._consumeSequenceIfMatch(o.SYSTEM_STRING,B,!1)?this.state=mt:this._ensureHibernation()||(this._err(r.invalidCharacterSequenceAfterDoctypeName),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye)))}[$e](B){Gt(B)?this.state=lt:B===i.QUOTATION_MARK?(this._err(r.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=at):B===i.APOSTROPHE?(this._err(r.missingWhitespaceAfterDoctypePublicKeyword),this.currentToken.publicId="",this.state=Be):B===i.GREATER_THAN_SIGN?(this._err(r.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye))}[lt](B){Gt(B)||(B===i.QUOTATION_MARK?(this.currentToken.publicId="",this.state=at):B===i.APOSTROPHE?(this.currentToken.publicId="",this.state=Be):B===i.GREATER_THAN_SIGN?(this._err(r.missingDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye)))}[at](B){B===i.QUOTATION_MARK?this.state=It:B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.publicId+=e.REPLACEMENT_CHARACTER):B===i.GREATER_THAN_SIGN?(this._err(r.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=d):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ce(B)}[Be](B){B===i.APOSTROPHE?this.state=It:B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.publicId+=e.REPLACEMENT_CHARACTER):B===i.GREATER_THAN_SIGN?(this._err(r.abruptDoctypePublicIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=d):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=Ce(B)}[It](B){Gt(B)?this.state=Tt:B===i.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):B===i.QUOTATION_MARK?(this._err(r.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=st):B===i.APOSTROPHE?(this._err(r.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),this.currentToken.systemId="",this.state=ct):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye))}[Tt](B){Gt(B)||(B===i.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=d):B===i.QUOTATION_MARK?(this.currentToken.systemId="",this.state=st):B===i.APOSTROPHE?(this.currentToken.systemId="",this.state=ct):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye)))}[mt](B){Gt(B)?this.state=dt:B===i.QUOTATION_MARK?(this._err(r.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=st):B===i.APOSTROPHE?(this._err(r.missingWhitespaceAfterDoctypeSystemKeyword),this.currentToken.systemId="",this.state=ct):B===i.GREATER_THAN_SIGN?(this._err(r.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye))}[dt](B){Gt(B)||(B===i.QUOTATION_MARK?(this.currentToken.systemId="",this.state=st):B===i.APOSTROPHE?(this.currentToken.systemId="",this.state=ct):B===i.GREATER_THAN_SIGN?(this._err(r.missingDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this.state=d,this._emitCurrentToken()):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.missingQuoteBeforeDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._reconsumeInState(Ye)))}[st](B){B===i.QUOTATION_MARK?this.state=me:B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.systemId+=e.REPLACEMENT_CHARACTER):B===i.GREATER_THAN_SIGN?(this._err(r.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=d):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ce(B)}[ct](B){B===i.APOSTROPHE?this.state=me:B===i.NULL?(this._err(r.unexpectedNullCharacter),this.currentToken.systemId+=e.REPLACEMENT_CHARACTER):B===i.GREATER_THAN_SIGN?(this._err(r.abruptDoctypeSystemIdentifier),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=d):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=Ce(B)}[me](B){Gt(B)||(B===i.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=d):B===i.EOF?(this._err(r.eofInDoctype),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(r.unexpectedCharacterAfterDoctypeSystemIdentifier),this._reconsumeInState(Ye)))}[Ye](B){B===i.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=d):B===i.NULL?this._err(r.unexpectedNullCharacter):B===i.EOF&&(this._emitCurrentToken(),this._emitEOFToken())}[Ge](B){B===i.RIGHT_SQUARE_BRACKET?this.state=Pe:B===i.EOF?(this._err(r.eofInCdata),this._emitEOFToken()):this._emitCodePoint(B)}[Pe](B){B===i.RIGHT_SQUARE_BRACKET?this.state=Xe:(this._emitChars("]"),this._reconsumeInState(Ge))}[Xe](B){B===i.GREATER_THAN_SIGN?this.state=d:B===i.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(Ge))}[vt](B){this.tempBuff=[i.AMPERSAND],B===i.NUMBER_SIGN?(this.tempBuff.push(B),this.state=zn):Js(B)?this._reconsumeInState(Ot):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Ot](B){const tt=this._matchNamedCharacterReference(B);if(this._ensureHibernation())this.tempBuff=[i.AMPERSAND];else if(tt){const bt=this.tempBuff[this.tempBuff.length-1]===i.SEMICOLON;this._isCharacterReferenceAttributeQuirk(bt)||(bt||this._errOnNextCodePoint(r.missingSemicolonAfterCharacterReference),this.tempBuff=tt),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState}else this._flushCodePointsConsumedAsCharacterReference(),this.state=Hn}[Hn](B){Js(B)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=Ce(B):this._emitCodePoint(B):(B===i.SEMICOLON&&this._err(r.unknownNamedCharacterReference),this._reconsumeInState(this.returnState))}[zn](B){this.charRefCode=0,B===i.LATIN_SMALL_X||B===i.LATIN_CAPITAL_X?(this.tempBuff.push(B),this.state=an):this._reconsumeInState(Yn)}[an](B){ee(B)?this._reconsumeInState(Cr):(this._err(r.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Yn](B){eo(B)?this._reconsumeInState(Xs):(this._err(r.absenceOfDigitsInNumericCharacterReference),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState))}[Cr](B){ea(B)?this.charRefCode=this.charRefCode*16+B-55:r1(B)?this.charRefCode=this.charRefCode*16+B-87:eo(B)?this.charRefCode=this.charRefCode*16+B-48:B===i.SEMICOLON?this.state=So:(this._err(r.missingSemicolonAfterCharacterReference),this._reconsumeInState(So))}[Xs](B){eo(B)?this.charRefCode=this.charRefCode*10+B-48:B===i.SEMICOLON?this.state=So:(this._err(r.missingSemicolonAfterCharacterReference),this._reconsumeInState(So))}[So](){if(this.charRefCode===i.NULL)this._err(r.nullCharacterReference),this.charRefCode=i.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(r.characterReferenceOutsideUnicodeRange),this.charRefCode=i.REPLACEMENT_CHARACTER;else if(e.isSurrogate(this.charRefCode))this._err(r.surrogateCharacterReference),this.charRefCode=i.REPLACEMENT_CHARACTER;else if(e.isUndefinedCodePoint(this.charRefCode))this._err(r.noncharacterCharacterReference);else if(e.isControlCodePoint(this.charRefCode)||this.charRefCode===i.CARRIAGE_RETURN){this._err(r.controlCharacterReference);const B=s[this.charRefCode];B&&(this.charRefCode=B)}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)}}return We.CHARACTER_TOKEN="CHARACTER_TOKEN",We.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",We.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",We.START_TAG_TOKEN="START_TAG_TOKEN",We.END_TAG_TOKEN="END_TAG_TOKEN",We.COMMENT_TOKEN="COMMENT_TOKEN",We.DOCTYPE_TOKEN="DOCTYPE_TOKEN",We.EOF_TOKEN="EOF_TOKEN",We.HIBERNATION_TOKEN="HIBERNATION_TOKEN",We.MODE={DATA:d,RCDATA:h,RAWTEXT:f,SCRIPT_DATA:m,PLAINTEXT:T},We.getTokenAttr=function(Fe,B){for(let tt=Fe.attrs.length-1;tt>=0;tt--)if(Fe.attrs[tt].name===B)return Fe.attrs[tt].value;return null},hg=We,hg}var S1={},lN;function e1(){if(lN)return S1;lN=1;const t=S1.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};S1.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},S1.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const e=S1.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};return S1.SPECIAL_ELEMENTS={[t.HTML]:{[e.ADDRESS]:!0,[e.APPLET]:!0,[e.AREA]:!0,[e.ARTICLE]:!0,[e.ASIDE]:!0,[e.BASE]:!0,[e.BASEFONT]:!0,[e.BGSOUND]:!0,[e.BLOCKQUOTE]:!0,[e.BODY]:!0,[e.BR]:!0,[e.BUTTON]:!0,[e.CAPTION]:!0,[e.CENTER]:!0,[e.COL]:!0,[e.COLGROUP]:!0,[e.DD]:!0,[e.DETAILS]:!0,[e.DIR]:!0,[e.DIV]:!0,[e.DL]:!0,[e.DT]:!0,[e.EMBED]:!0,[e.FIELDSET]:!0,[e.FIGCAPTION]:!0,[e.FIGURE]:!0,[e.FOOTER]:!0,[e.FORM]:!0,[e.FRAME]:!0,[e.FRAMESET]:!0,[e.H1]:!0,[e.H2]:!0,[e.H3]:!0,[e.H4]:!0,[e.H5]:!0,[e.H6]:!0,[e.HEAD]:!0,[e.HEADER]:!0,[e.HGROUP]:!0,[e.HR]:!0,[e.HTML]:!0,[e.IFRAME]:!0,[e.IMG]:!0,[e.INPUT]:!0,[e.LI]:!0,[e.LINK]:!0,[e.LISTING]:!0,[e.MAIN]:!0,[e.MARQUEE]:!0,[e.MENU]:!0,[e.META]:!0,[e.NAV]:!0,[e.NOEMBED]:!0,[e.NOFRAMES]:!0,[e.NOSCRIPT]:!0,[e.OBJECT]:!0,[e.OL]:!0,[e.P]:!0,[e.PARAM]:!0,[e.PLAINTEXT]:!0,[e.PRE]:!0,[e.SCRIPT]:!0,[e.SECTION]:!0,[e.SELECT]:!0,[e.SOURCE]:!0,[e.STYLE]:!0,[e.SUMMARY]:!0,[e.TABLE]:!0,[e.TBODY]:!0,[e.TD]:!0,[e.TEMPLATE]:!0,[e.TEXTAREA]:!0,[e.TFOOT]:!0,[e.TH]:!0,[e.THEAD]:!0,[e.TITLE]:!0,[e.TR]:!0,[e.TRACK]:!0,[e.UL]:!0,[e.WBR]:!0,[e.XMP]:!0},[t.MATHML]:{[e.MI]:!0,[e.MO]:!0,[e.MN]:!0,[e.MS]:!0,[e.MTEXT]:!0,[e.ANNOTATION_XML]:!0},[t.SVG]:{[e.TITLE]:!0,[e.FOREIGN_OBJECT]:!0,[e.DESC]:!0}},S1}var Tg,cN;function rkn(){if(cN)return Tg;cN=1;const t=e1(),e=t.TAG_NAMES,n=t.NAMESPACES;function r(a){switch(a.length){case 1:return a===e.P;case 2:return a===e.RB||a===e.RP||a===e.RT||a===e.DD||a===e.DT||a===e.LI;case 3:return a===e.RTC;case 6:return a===e.OPTION;case 8:return a===e.OPTGROUP}return!1}function i(a){switch(a.length){case 1:return a===e.P;case 2:return a===e.RB||a===e.RP||a===e.RT||a===e.DD||a===e.DT||a===e.LI||a===e.TD||a===e.TH||a===e.TR;case 3:return a===e.RTC;case 5:return a===e.TBODY||a===e.TFOOT||a===e.THEAD;case 6:return a===e.OPTION;case 7:return a===e.CAPTION;case 8:return a===e.OPTGROUP||a===e.COLGROUP}return!1}function o(a,l){switch(a.length){case 2:if(a===e.TD||a===e.TH)return l===n.HTML;if(a===e.MI||a===e.MO||a===e.MN||a===e.MS)return l===n.MATHML;break;case 4:if(a===e.HTML)return l===n.HTML;if(a===e.DESC)return l===n.SVG;break;case 5:if(a===e.TABLE)return l===n.HTML;if(a===e.MTEXT)return l===n.MATHML;if(a===e.TITLE)return l===n.SVG;break;case 6:return(a===e.APPLET||a===e.OBJECT)&&l===n.HTML;case 7:return(a===e.CAPTION||a===e.MARQUEE)&&l===n.HTML;case 8:return a===e.TEMPLATE&&l===n.HTML;case 13:return a===e.FOREIGN_OBJECT&&l===n.SVG;case 14:return a===e.ANNOTATION_XML&&l===n.MATHML}return!1}class s{constructor(l,c){this.stackTop=-1,this.items=[],this.current=l,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=c}_indexOf(l){let c=-1;for(let u=this.stackTop;u>=0;u--)if(this.items[u]===l){c=u;break}return c}_isInTemplate(){return this.currentTagName===e.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===n.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null}push(l){this.items[++this.stackTop]=l,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement()}replace(l,c){const u=this._indexOf(l);this.items[u]=c,u===this.stackTop&&this._updateCurrentElement()}insertAfter(l,c){const u=this._indexOf(l)+1;this.items.splice(u,0,c),u===++this.stackTop&&this._updateCurrentElement()}popUntilTagNamePopped(l){for(;this.stackTop>-1;){const c=this.currentTagName,u=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),c===l&&u===n.HTML)break}}popUntilElementPopped(l){for(;this.stackTop>-1;){const c=this.current;if(this.pop(),c===l)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const l=this.currentTagName,c=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),l===e.H1||l===e.H2||l===e.H3||l===e.H4||l===e.H5||l===e.H6&&c===n.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const l=this.currentTagName,c=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),l===e.TD||l===e.TH&&c===n.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement()}clearBackToTableContext(){for(;this.currentTagName!==e.TABLE&&this.currentTagName!==e.TEMPLATE&&this.currentTagName!==e.HTML||this.treeAdapter.getNamespaceURI(this.current)!==n.HTML;)this.pop()}clearBackToTableBodyContext(){for(;this.currentTagName!==e.TBODY&&this.currentTagName!==e.TFOOT&&this.currentTagName!==e.THEAD&&this.currentTagName!==e.TEMPLATE&&this.currentTagName!==e.HTML||this.treeAdapter.getNamespaceURI(this.current)!==n.HTML;)this.pop()}clearBackToTableRowContext(){for(;this.currentTagName!==e.TR&&this.currentTagName!==e.TEMPLATE&&this.currentTagName!==e.HTML||this.treeAdapter.getNamespaceURI(this.current)!==n.HTML;)this.pop()}remove(l){for(let c=this.stackTop;c>=0;c--)if(this.items[c]===l){this.items.splice(c,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const l=this.items[1];return l&&this.treeAdapter.getTagName(l)===e.BODY?l:null}contains(l){return this._indexOf(l)>-1}getCommonAncestor(l){let c=this._indexOf(l);return--c>=0?this.items[c]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.currentTagName===e.HTML}hasInScope(l){for(let c=this.stackTop;c>=0;c--){const u=this.treeAdapter.getTagName(this.items[c]),d=this.treeAdapter.getNamespaceURI(this.items[c]);if(u===l&&d===n.HTML)return!0;if(o(u,d))return!1}return!0}hasNumberedHeaderInScope(){for(let l=this.stackTop;l>=0;l--){const c=this.treeAdapter.getTagName(this.items[l]),u=this.treeAdapter.getNamespaceURI(this.items[l]);if((c===e.H1||c===e.H2||c===e.H3||c===e.H4||c===e.H5||c===e.H6)&&u===n.HTML)return!0;if(o(c,u))return!1}return!0}hasInListItemScope(l){for(let c=this.stackTop;c>=0;c--){const u=this.treeAdapter.getTagName(this.items[c]),d=this.treeAdapter.getNamespaceURI(this.items[c]);if(u===l&&d===n.HTML)return!0;if((u===e.UL||u===e.OL)&&d===n.HTML||o(u,d))return!1}return!0}hasInButtonScope(l){for(let c=this.stackTop;c>=0;c--){const u=this.treeAdapter.getTagName(this.items[c]),d=this.treeAdapter.getNamespaceURI(this.items[c]);if(u===l&&d===n.HTML)return!0;if(u===e.BUTTON&&d===n.HTML||o(u,d))return!1}return!0}hasInTableScope(l){for(let c=this.stackTop;c>=0;c--){const u=this.treeAdapter.getTagName(this.items[c]);if(this.treeAdapter.getNamespaceURI(this.items[c])===n.HTML){if(u===l)return!0;if(u===e.TABLE||u===e.TEMPLATE||u===e.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let l=this.stackTop;l>=0;l--){const c=this.treeAdapter.getTagName(this.items[l]);if(this.treeAdapter.getNamespaceURI(this.items[l])===n.HTML){if(c===e.TBODY||c===e.THEAD||c===e.TFOOT)return!0;if(c===e.TABLE||c===e.HTML)return!1}}return!0}hasInSelectScope(l){for(let c=this.stackTop;c>=0;c--){const u=this.treeAdapter.getTagName(this.items[c]);if(this.treeAdapter.getNamespaceURI(this.items[c])===n.HTML){if(u===l)return!0;if(u!==e.OPTION&&u!==e.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;r(this.currentTagName);)this.pop()}generateImpliedEndTagsThoroughly(){for(;i(this.currentTagName);)this.pop()}generateImpliedEndTagsWithExclusion(l){for(;r(this.currentTagName)&&this.currentTagName!==l;)this.pop()}}return Tg=s,Tg}var mg,uN;function ikn(){if(uN)return mg;uN=1;const t=3;class e{constructor(r){this.length=0,this.entries=[],this.treeAdapter=r,this.bookmark=null}_getNoahArkConditionCandidates(r){const i=[];if(this.length>=t){const o=this.treeAdapter.getAttrList(r).length,s=this.treeAdapter.getTagName(r),a=this.treeAdapter.getNamespaceURI(r);for(let l=this.length-1;l>=0;l--){const c=this.entries[l];if(c.type===e.MARKER_ENTRY)break;const u=c.element,d=this.treeAdapter.getAttrList(u);this.treeAdapter.getTagName(u)===s&&this.treeAdapter.getNamespaceURI(u)===a&&d.length===o&&i.push({idx:l,attrs:d})}}return i.length=t-1;c--)this.entries.splice(i[c].idx,1),this.length--}}insertMarker(){this.entries.push({type:e.MARKER_ENTRY}),this.length++}pushElement(r,i){this._ensureNoahArkCondition(r),this.entries.push({type:e.ELEMENT_ENTRY,element:r,token:i}),this.length++}insertElementAfterBookmark(r,i){let o=this.length-1;for(;o>=0&&this.entries[o]!==this.bookmark;o--);this.entries.splice(o+1,0,{type:e.ELEMENT_ENTRY,element:r,token:i}),this.length++}removeEntry(r){for(let i=this.length-1;i>=0;i--)if(this.entries[i]===r){this.entries.splice(i,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const r=this.entries.pop();if(this.length--,r.type===e.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(r){for(let i=this.length-1;i>=0;i--){const o=this.entries[i];if(o.type===e.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(o.element)===r)return o}return null}getElementEntry(r){for(let i=this.length-1;i>=0;i--){const o=this.entries[i];if(o.type===e.ELEMENT_ENTRY&&o.element===r)return o}return null}}return e.MARKER_ENTRY="MARKER_ENTRY",e.ELEMENT_ENTRY="ELEMENT_ENTRY",mg=e,mg}var gg,dN;function Ys(){if(dN)return gg;dN=1;class t{constructor(n){const r={},i=this._getOverriddenMethods(this,r);for(const o of Object.keys(i))typeof i[o]=="function"&&(r[o]=n[o],n[o]=i[o])}_getOverriddenMethods(){throw new Error("Not implemented")}}return t.install=function(e,n,r){e.__mixins||(e.__mixins=[]);for(let o=0;o{const c=e.MODE[l];a[c]=function(u){o.ctLoc=o._getCurrentLocation(),s[c].call(this,u)}}),a}}return Qg=r,Qg}var vg,hN;function okn(){if(hN)return vg;hN=1;const t=Ys();class e extends t{constructor(r,i){super(r),this.onItemPop=i.onItemPop}_getOverriddenMethods(r,i){return{pop(){r.onItemPop(this.current),i.pop.call(this)},popAllUpToHtmlElement(){for(let o=this.stackTop;o>0;o--)r.onItemPop(this.items[o]);i.popAllUpToHtmlElement.call(this)},remove(o){r.onItemPop(this.current),i.remove.call(this,o)}}}}return vg=e,vg}var yg,TN;function skn(){if(TN)return yg;TN=1;const t=Ys(),e=h9(),n=KF(),r=okn(),o=e1().TAG_NAMES;class s extends t{constructor(l){super(l),this.parser=l,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null}_setStartLocation(l){let c=null;this.lastStartTagToken&&(c=Object.assign({},this.lastStartTagToken.location),c.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(l,c)}_setEndLocation(l,c){if(this.treeAdapter.getNodeSourceCodeLocation(l)&&c.location){const d=c.location,h=this.treeAdapter.getTagName(l),f=c.type===e.END_TAG_TOKEN&&h===c.tagName,m={};f?(m.endTag=Object.assign({},d),m.endLine=d.endLine,m.endCol=d.endCol,m.endOffset=d.endOffset):(m.endLine=d.startLine,m.endCol=d.startCol,m.endOffset=d.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(l,m)}}_getOverriddenMethods(l,c){return{_bootstrap(u,d){c._bootstrap.call(this,u,d),l.lastStartTagToken=null,l.lastFosterParentingLocation=null,l.currentToken=null;const h=t.install(this.tokenizer,n);l.posTracker=h.posTracker,t.install(this.openElements,r,{onItemPop:function(f){l._setEndLocation(f,l.currentToken)}})},_runParsingLoop(u){c._runParsingLoop.call(this,u);for(let d=this.openElements.stackTop;d>=0;d--)l._setEndLocation(this.openElements.items[d],l.currentToken)},_processTokenInForeignContent(u){l.currentToken=u,c._processTokenInForeignContent.call(this,u)},_processToken(u){if(l.currentToken=u,c._processToken.call(this,u),u.type===e.END_TAG_TOKEN&&(u.tagName===o.HTML||u.tagName===o.BODY&&this.openElements.hasInScope(o.BODY)))for(let h=this.openElements.stackTop;h>=0;h--){const f=this.openElements.items[h];if(this.treeAdapter.getTagName(f)===u.tagName){l._setEndLocation(f,u);break}}},_setDocumentType(u){c._setDocumentType.call(this,u);const d=this.treeAdapter.getChildNodes(this.document),h=d.length;for(let f=0;f(Object.keys(i).forEach(o=>{r[o]=i[o]}),r),Object.create(null))}),Lg}var Z3={},bN;function ob(){if(bN)return Z3;bN=1;const{DOCUMENT_MODE:t}=e1(),e="html",n="about:legacy-compat",r="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",i=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],o=i.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),s=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],a=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],l=a.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function c(d){const h=d.indexOf('"')!==-1?"'":'"';return h+d+h}function u(d,h){for(let f=0;f-1)return t.QUIRKS;let m=h===null?o:i;if(u(f,m))return t.QUIRKS;if(m=h===null?a:l,u(f,m))return t.LIMITED_QUIRKS}return t.NO_QUIRKS},Z3.serializeContent=function(d,h,f){let m="!DOCTYPE ";return d&&(m+=d),h?m+=" PUBLIC "+c(h):f&&(m+=" SYSTEM"),f!==null&&(m+=" "+c(f)),m},Z3}var Ts={},EN;function ukn(){if(EN)return Ts;EN=1;const t=h9(),e=e1(),n=e.TAG_NAMES,r=e.NAMESPACES,i=e.ATTRS,o={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},s="definitionurl",a="definitionURL",l={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},c={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:r.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:r.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:r.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:r.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:r.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:r.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:r.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:r.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:r.XML},"xml:space":{prefix:"xml",name:"space",namespace:r.XML},xmlns:{prefix:"",name:"xmlns",namespace:r.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:r.XMLNS}},u=Ts.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},d={[n.B]:!0,[n.BIG]:!0,[n.BLOCKQUOTE]:!0,[n.BODY]:!0,[n.BR]:!0,[n.CENTER]:!0,[n.CODE]:!0,[n.DD]:!0,[n.DIV]:!0,[n.DL]:!0,[n.DT]:!0,[n.EM]:!0,[n.EMBED]:!0,[n.H1]:!0,[n.H2]:!0,[n.H3]:!0,[n.H4]:!0,[n.H5]:!0,[n.H6]:!0,[n.HEAD]:!0,[n.HR]:!0,[n.I]:!0,[n.IMG]:!0,[n.LI]:!0,[n.LISTING]:!0,[n.MENU]:!0,[n.META]:!0,[n.NOBR]:!0,[n.OL]:!0,[n.P]:!0,[n.PRE]:!0,[n.RUBY]:!0,[n.S]:!0,[n.SMALL]:!0,[n.SPAN]:!0,[n.STRONG]:!0,[n.STRIKE]:!0,[n.SUB]:!0,[n.SUP]:!0,[n.TABLE]:!0,[n.TT]:!0,[n.U]:!0,[n.UL]:!0,[n.VAR]:!0};Ts.causesExit=function(m){const T=m.tagName;return T===n.FONT&&(t.getTokenAttr(m,i.COLOR)!==null||t.getTokenAttr(m,i.SIZE)!==null||t.getTokenAttr(m,i.FACE)!==null)?!0:d[T]},Ts.adjustTokenMathMLAttrs=function(m){for(let T=0;T0);for(let At=D;At=0;R--){let Ke=this.openElements.items[R];R===0&&(D=!0,this.fragmentContext&&(Ke=this.fragmentContext));const At=this.treeAdapter.getTagName(Ke),gn=z[At];if(gn){this.insertionMode=gn;break}else if(!D&&(At===f.TD||At===f.TH)){this.insertionMode=G;break}else if(!D&&At===f.HEAD){this.insertionMode=L;break}else if(At===f.SELECT){this._resetInsertionModeForSelect(R);break}else if(At===f.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}else if(At===f.HTML){this.insertionMode=this.headElement?C:x;break}else if(D){this.insertionMode=A;break}}}_resetInsertionModeForSelect(R){if(R>0)for(let D=R-1;D>0;D--){const Ke=this.openElements.items[D],At=this.treeAdapter.getTagName(Ke);if(At===f.TEMPLATE)break;if(At===f.TABLE){this.insertionMode=W;return}}this.insertionMode=K}_pushTmplInsertionMode(R){this.tmplInsertionModeStack.push(R),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=R}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(R){const D=this.treeAdapter.getTagName(R);return D===f.TABLE||D===f.TBODY||D===f.TFOOT||D===f.THEAD||D===f.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const R={parent:null,beforeElement:null};for(let D=this.openElements.stackTop;D>=0;D--){const Ke=this.openElements.items[D],At=this.treeAdapter.getTagName(Ke),gn=this.treeAdapter.getNamespaceURI(Ke);if(At===f.TEMPLATE&&gn===m.HTML){R.parent=this.treeAdapter.getTemplateContent(Ke);break}else if(At===f.TABLE){R.parent=this.treeAdapter.getParentNode(Ke),R.parent?R.beforeElement=Ke:R.parent=this.openElements.items[D-1];break}}return R.parent||(R.parent=this.openElements.items[0]),R}_fosterParentElement(R){const D=this._findFosterParentingLocation();D.beforeElement?this.treeAdapter.insertBefore(D.parent,R,D.beforeElement):this.treeAdapter.appendChild(D.parent,R)}_fosterParentText(R){const D=this._findFosterParentingLocation();D.beforeElement?this.treeAdapter.insertTextBefore(D.parent,R,D.beforeElement):this.treeAdapter.insertText(D.parent,R)}_isSpecialElement(R){const D=this.treeAdapter.getTagName(R),Ke=this.treeAdapter.getNamespaceURI(R);return h.SPECIAL_ELEMENTS[Ke][D]}}Cg=be;function Le(w,R){let D=w.activeFormattingElements.getElementEntryInScopeWithTagName(R.tagName);return D?w.openElements.contains(D.element)?w.openElements.hasInScope(R.tagName)||(D=null):(w.activeFormattingElements.removeEntry(D),D=null):mn(w,R),D}function se(w,R){let D=null;for(let Ke=w.openElements.stackTop;Ke>=0;Ke--){const At=w.openElements.items[Ke];if(At===R.element)break;w._isSpecialElement(At)&&(D=At)}return D||(w.openElements.popUntilElementPopped(R.element),w.activeFormattingElements.removeEntry(R)),D}function Y(w,R,D){let Ke=R,At=w.openElements.getCommonAncestor(R);for(let gn=0,wr=At;wr!==D;gn++,wr=At){At=w.openElements.getCommonAncestor(wr);const t3=w.activeFormattingElements.getElementEntry(wr),EE=t3&&gn>=y;!t3||EE?(EE&&w.activeFormattingElements.removeEntry(t3),w.openElements.remove(wr)):(wr=j(w,t3),Ke===R&&(w.activeFormattingElements.bookmark=t3),w.treeAdapter.detachNode(Ke),w.treeAdapter.appendChild(wr,Ke),Ke=wr)}return Ke}function j(w,R){const D=w.treeAdapter.getNamespaceURI(R.element),Ke=w.treeAdapter.createElement(R.token.tagName,D,R.token.attrs);return w.openElements.replace(R.element,Ke),R.element=Ke,Ke}function ie(w,R,D){if(w._isElementCausesFosterParenting(R))w._fosterParentElement(D);else{const Ke=w.treeAdapter.getTagName(R),At=w.treeAdapter.getNamespaceURI(R);Ke===f.TEMPLATE&&At===m.HTML&&(R=w.treeAdapter.getTemplateContent(R)),w.treeAdapter.appendChild(R,D)}}function Te(w,R,D){const Ke=w.treeAdapter.getNamespaceURI(D.element),At=D.token,gn=w.treeAdapter.createElement(At.tagName,Ke,At.attrs);w._adoptNodes(R,gn),w.treeAdapter.appendChild(R,gn),w.activeFormattingElements.insertElementAfterBookmark(gn,D.token),w.activeFormattingElements.removeEntry(D),w.openElements.remove(D.element),w.openElements.insertAfter(R,gn)}function ve(w,R){let D;for(let Ke=0;Ke0?(w.openElements.generateImpliedEndTagsThoroughly(),w.openElements.currentTagName!==f.TEMPLATE&&w._err(u.closingOfElementWithOpenChildElements),w.openElements.popUntilTagNamePopped(f.TEMPLATE),w.activeFormattingElements.clearToLastMarker(),w._popTmplInsertionMode(),w._resetInsertionMode()):w._err(u.endTagWithoutMatchingOpenElement)}function It(w,R){w.openElements.pop(),w.insertionMode=C,w._processToken(R)}function Tt(w,R){const D=R.tagName;D===f.HTML?Kt(w,R):D===f.BASEFONT||D===f.BGSOUND||D===f.HEAD||D===f.LINK||D===f.META||D===f.NOFRAMES||D===f.STYLE?at(w,R):D===f.NOSCRIPT?w._err(u.nestedNoscriptInHead):dt(w,R)}function mt(w,R){const D=R.tagName;D===f.NOSCRIPT?(w.openElements.pop(),w.insertionMode=L):D===f.BR?dt(w,R):w._err(u.endTagWithoutMatchingOpenElement)}function dt(w,R){const D=R.type===t.EOF_TOKEN?u.openElementsLeftAfterEof:u.disallowedContentInNoscriptInHead;w._err(D),w.openElements.pop(),w.insertionMode=L,w._processToken(R)}function st(w,R){const D=R.tagName;D===f.HTML?Kt(w,R):D===f.BODY?(w._insertElement(R,m.HTML),w.framesetOk=!1,w.insertionMode=A):D===f.FRAMESET?(w._insertElement(R,m.HTML),w.insertionMode=X):D===f.BASE||D===f.BASEFONT||D===f.BGSOUND||D===f.LINK||D===f.META||D===f.NOFRAMES||D===f.SCRIPT||D===f.STYLE||D===f.TEMPLATE||D===f.TITLE?(w._err(u.abandonedHeadElementChild),w.openElements.push(w.headElement),at(w,R),w.openElements.remove(w.headElement)):D===f.HEAD?w._err(u.misplacedStartTagForHeadElement):me(w,R)}function ct(w,R){const D=R.tagName;D===f.BODY||D===f.HTML||D===f.BR?me(w,R):D===f.TEMPLATE?Be(w,R):w._err(u.endTagWithoutMatchingOpenElement)}function me(w,R){w._insertFakeElement(f.BODY),w.insertionMode=A,w._processToken(R)}function Ye(w,R){w._reconstructActiveFormattingElements(),w._insertCharacters(R)}function Ge(w,R){w._reconstructActiveFormattingElements(),w._insertCharacters(R),w.framesetOk=!1}function Pe(w,R){w.openElements.tmplCount===0&&w.treeAdapter.adoptAttributes(w.openElements.items[0],R.attrs)}function Xe(w,R){const D=w.openElements.tryPeekProperlyNestedBodyElement();D&&w.openElements.tmplCount===0&&(w.framesetOk=!1,w.treeAdapter.adoptAttributes(D,R.attrs))}function vt(w,R){const D=w.openElements.tryPeekProperlyNestedBodyElement();w.framesetOk&&D&&(w.treeAdapter.detachNode(D),w.openElements.popAllUpToHtmlElement(),w._insertElement(R,m.HTML),w.insertionMode=X)}function Ot(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML)}function Hn(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement();const D=w.openElements.currentTagName;(D===f.H1||D===f.H2||D===f.H3||D===f.H4||D===f.H5||D===f.H6)&&w.openElements.pop(),w._insertElement(R,m.HTML)}function zn(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML),w.skipNextNewLine=!0,w.framesetOk=!1}function an(w,R){const D=w.openElements.tmplCount>0;(!w.formElement||D)&&(w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML),D||(w.formElement=w.openElements.current))}function Yn(w,R){w.framesetOk=!1;const D=R.tagName;for(let Ke=w.openElements.stackTop;Ke>=0;Ke--){const At=w.openElements.items[Ke],gn=w.treeAdapter.getTagName(At);let wr=null;if(D===f.LI&&gn===f.LI?wr=f.LI:(D===f.DD||D===f.DT)&&(gn===f.DD||gn===f.DT)&&(wr=gn),wr){w.openElements.generateImpliedEndTagsWithExclusion(wr),w.openElements.popUntilTagNamePopped(wr);break}if(gn!==f.ADDRESS&&gn!==f.DIV&&gn!==f.P&&w._isSpecialElement(At))break}w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML)}function Cr(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML),w.tokenizer.state=t.MODE.PLAINTEXT}function Xs(w,R){w.openElements.hasInScope(f.BUTTON)&&(w.openElements.generateImpliedEndTags(),w.openElements.popUntilTagNamePopped(f.BUTTON)),w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML),w.framesetOk=!1}function So(w,R){const D=w.activeFormattingElements.getElementEntryInScopeWithTagName(f.A);D&&(ve(w,R),w.openElements.remove(D.element),w.activeFormattingElements.removeEntry(D)),w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML),w.activeFormattingElements.pushElement(w.openElements.current,R)}function Gt(w,R){w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML),w.activeFormattingElements.pushElement(w.openElements.current,R)}function eo(w,R){w._reconstructActiveFormattingElements(),w.openElements.hasInScope(f.NOBR)&&(ve(w,R),w._reconstructActiveFormattingElements()),w._insertElement(R,m.HTML),w.activeFormattingElements.pushElement(w.openElements.current,R)}function Xn(w,R){w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML),w.activeFormattingElements.insertMarker(),w.framesetOk=!1}function hi(w,R){w.treeAdapter.getDocumentMode(w.document)!==h.DOCUMENT_MODE.QUIRKS&&w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML),w.framesetOk=!1,w.insertionMode=N}function sr(w,R){w._reconstructActiveFormattingElements(),w._appendElement(R,m.HTML),w.framesetOk=!1,R.ackSelfClosing=!0}function Js(w,R){w._reconstructActiveFormattingElements(),w._appendElement(R,m.HTML);const D=t.getTokenAttr(R,T.TYPE);(!D||D.toLowerCase()!==_)&&(w.framesetOk=!1),R.ackSelfClosing=!0}function ea(w,R){w._appendElement(R,m.HTML),R.ackSelfClosing=!0}function r1(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._appendElement(R,m.HTML),w.framesetOk=!1,R.ackSelfClosing=!0}function ee(w,R){R.tagName=f.IMG,sr(w,R)}function xe(w,R){w._insertElement(R,m.HTML),w.skipNextNewLine=!0,w.tokenizer.state=t.MODE.RCDATA,w.originalInsertionMode=w.insertionMode,w.framesetOk=!1,w.insertionMode=I}function Ce(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._reconstructActiveFormattingElements(),w.framesetOk=!1,w._switchToTextParsing(R,t.MODE.RAWTEXT)}function Ne(w,R){w.framesetOk=!1,w._switchToTextParsing(R,t.MODE.RAWTEXT)}function Re(w,R){w._switchToTextParsing(R,t.MODE.RAWTEXT)}function We(w,R){w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML),w.framesetOk=!1,w.insertionMode===N||w.insertionMode===O||w.insertionMode===V||w.insertionMode===U||w.insertionMode===G?w.insertionMode=W:w.insertionMode=K}function Fe(w,R){w.openElements.currentTagName===f.OPTION&&w.openElements.pop(),w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML)}function B(w,R){w.openElements.hasInScope(f.RUBY)&&w.openElements.generateImpliedEndTags(),w._insertElement(R,m.HTML)}function et(w,R){w.openElements.hasInScope(f.RUBY)&&w.openElements.generateImpliedEndTagsWithExclusion(f.RTC),w._insertElement(R,m.HTML)}function bt(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML)}function gt(w,R){w._reconstructActiveFormattingElements(),c.adjustTokenMathMLAttrs(R),c.adjustTokenXMLAttrs(R),R.selfClosing?w._appendElement(R,m.MATHML):w._insertElement(R,m.MATHML),R.ackSelfClosing=!0}function Qt(w,R){w._reconstructActiveFormattingElements(),c.adjustTokenSVGAttrs(R),c.adjustTokenXMLAttrs(R),R.selfClosing?w._appendElement(R,m.SVG):w._insertElement(R,m.SVG),R.ackSelfClosing=!0}function Ht(w,R){w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML)}function Kt(w,R){const D=R.tagName;switch(D.length){case 1:D===f.I||D===f.S||D===f.B||D===f.U?Gt(w,R):D===f.P?Ot(w,R):D===f.A?So(w,R):Ht(w,R);break;case 2:D===f.DL||D===f.OL||D===f.UL?Ot(w,R):D===f.H1||D===f.H2||D===f.H3||D===f.H4||D===f.H5||D===f.H6?Hn(w,R):D===f.LI||D===f.DD||D===f.DT?Yn(w,R):D===f.EM||D===f.TT?Gt(w,R):D===f.BR?sr(w,R):D===f.HR?r1(w,R):D===f.RB?B(w,R):D===f.RT||D===f.RP?et(w,R):D!==f.TH&&D!==f.TD&&D!==f.TR&&Ht(w,R);break;case 3:D===f.DIV||D===f.DIR||D===f.NAV?Ot(w,R):D===f.PRE?zn(w,R):D===f.BIG?Gt(w,R):D===f.IMG||D===f.WBR?sr(w,R):D===f.XMP?Ce(w,R):D===f.SVG?Qt(w,R):D===f.RTC?B(w,R):D!==f.COL&&Ht(w,R);break;case 4:D===f.HTML?Pe(w,R):D===f.BASE||D===f.LINK||D===f.META?at(w,R):D===f.BODY?Xe(w,R):D===f.MAIN||D===f.MENU?Ot(w,R):D===f.FORM?an(w,R):D===f.CODE||D===f.FONT?Gt(w,R):D===f.NOBR?eo(w,R):D===f.AREA?sr(w,R):D===f.MATH?gt(w,R):D===f.MENU?bt(w,R):D!==f.HEAD&&Ht(w,R);break;case 5:D===f.STYLE||D===f.TITLE?at(w,R):D===f.ASIDE?Ot(w,R):D===f.SMALL?Gt(w,R):D===f.TABLE?hi(w,R):D===f.EMBED?sr(w,R):D===f.INPUT?Js(w,R):D===f.PARAM||D===f.TRACK?ea(w,R):D===f.IMAGE?ee(w,R):D!==f.FRAME&&D!==f.TBODY&&D!==f.TFOOT&&D!==f.THEAD&&Ht(w,R);break;case 6:D===f.SCRIPT?at(w,R):D===f.CENTER||D===f.FIGURE||D===f.FOOTER||D===f.HEADER||D===f.HGROUP||D===f.DIALOG?Ot(w,R):D===f.BUTTON?Xs(w,R):D===f.STRIKE||D===f.STRONG?Gt(w,R):D===f.APPLET||D===f.OBJECT?Xn(w,R):D===f.KEYGEN?sr(w,R):D===f.SOURCE?ea(w,R):D===f.IFRAME?Ne(w,R):D===f.SELECT?We(w,R):D===f.OPTION?Fe(w,R):Ht(w,R);break;case 7:D===f.BGSOUND?at(w,R):D===f.DETAILS||D===f.ADDRESS||D===f.ARTICLE||D===f.SECTION||D===f.SUMMARY?Ot(w,R):D===f.LISTING?zn(w,R):D===f.MARQUEE?Xn(w,R):D===f.NOEMBED?Re(w,R):D!==f.CAPTION&&Ht(w,R);break;case 8:D===f.BASEFONT?at(w,R):D===f.FRAMESET?vt(w,R):D===f.FIELDSET?Ot(w,R):D===f.TEXTAREA?xe(w,R):D===f.TEMPLATE?at(w,R):D===f.NOSCRIPT?w.options.scriptingEnabled?Re(w,R):Ht(w,R):D===f.OPTGROUP?Fe(w,R):D!==f.COLGROUP&&Ht(w,R);break;case 9:D===f.PLAINTEXT?Cr(w,R):Ht(w,R);break;case 10:D===f.BLOCKQUOTE||D===f.FIGCAPTION?Ot(w,R):Ht(w,R);break;default:Ht(w,R)}}function un(w){w.openElements.hasInScope(f.BODY)&&(w.insertionMode=de)}function Ar(w,R){w.openElements.hasInScope(f.BODY)&&(w.insertionMode=de,w._processToken(R))}function on(w,R){const D=R.tagName;w.openElements.hasInScope(D)&&(w.openElements.generateImpliedEndTags(),w.openElements.popUntilTagNamePopped(D))}function $t(w){const R=w.openElements.tmplCount>0,D=w.formElement;R||(w.formElement=null),(D||R)&&w.openElements.hasInScope(f.FORM)&&(w.openElements.generateImpliedEndTags(),R?w.openElements.popUntilTagNamePopped(f.FORM):w.openElements.remove(D))}function w2(w){w.openElements.hasInButtonScope(f.P)||w._insertFakeElement(f.P),w._closePElement()}function Dn(w){w.openElements.hasInListItemScope(f.LI)&&(w.openElements.generateImpliedEndTagsWithExclusion(f.LI),w.openElements.popUntilTagNamePopped(f.LI))}function Lo(w,R){const D=R.tagName;w.openElements.hasInScope(D)&&(w.openElements.generateImpliedEndTagsWithExclusion(D),w.openElements.popUntilTagNamePopped(D))}function Xc(w){w.openElements.hasNumberedHeaderInScope()&&(w.openElements.generateImpliedEndTags(),w.openElements.popUntilNumberedHeaderPopped())}function os(w,R){const D=R.tagName;w.openElements.hasInScope(D)&&(w.openElements.generateImpliedEndTags(),w.openElements.popUntilTagNamePopped(D),w.activeFormattingElements.clearToLastMarker())}function M2(w){w._reconstructActiveFormattingElements(),w._insertFakeElement(f.BR),w.openElements.pop(),w.framesetOk=!1}function mn(w,R){const D=R.tagName;for(let Ke=w.openElements.stackTop;Ke>0;Ke--){const At=w.openElements.items[Ke];if(w.treeAdapter.getTagName(At)===D){w.openElements.generateImpliedEndTagsWithExclusion(D),w.openElements.popUntilElementPopped(At);break}if(w._isSpecialElement(At))break}}function Ai(w,R){const D=R.tagName;switch(D.length){case 1:D===f.A||D===f.B||D===f.I||D===f.S||D===f.U?ve(w,R):D===f.P?w2(w):mn(w,R);break;case 2:D===f.DL||D===f.UL||D===f.OL?on(w,R):D===f.LI?Dn(w):D===f.DD||D===f.DT?Lo(w,R):D===f.H1||D===f.H2||D===f.H3||D===f.H4||D===f.H5||D===f.H6?Xc(w):D===f.BR?M2(w):D===f.EM||D===f.TT?ve(w,R):mn(w,R);break;case 3:D===f.BIG?ve(w,R):D===f.DIR||D===f.DIV||D===f.NAV||D===f.PRE?on(w,R):mn(w,R);break;case 4:D===f.BODY?un(w):D===f.HTML?Ar(w,R):D===f.FORM?$t(w):D===f.CODE||D===f.FONT||D===f.NOBR?ve(w,R):D===f.MAIN||D===f.MENU?on(w,R):mn(w,R);break;case 5:D===f.ASIDE?on(w,R):D===f.SMALL?ve(w,R):mn(w,R);break;case 6:D===f.CENTER||D===f.FIGURE||D===f.FOOTER||D===f.HEADER||D===f.HGROUP||D===f.DIALOG?on(w,R):D===f.APPLET||D===f.OBJECT?os(w,R):D===f.STRIKE||D===f.STRONG?ve(w,R):mn(w,R);break;case 7:D===f.ADDRESS||D===f.ARTICLE||D===f.DETAILS||D===f.SECTION||D===f.SUMMARY||D===f.LISTING?on(w,R):D===f.MARQUEE?os(w,R):mn(w,R);break;case 8:D===f.FIELDSET?on(w,R):D===f.TEMPLATE?Be(w,R):mn(w,R);break;case 10:D===f.BLOCKQUOTE||D===f.FIGCAPTION?on(w,R):mn(w,R);break;default:mn(w,R)}}function Jr(w,R){w.tmplInsertionModeStackTop>-1?bE(w,R):w.stopped=!0}function Vr(w,R){R.tagName===f.SCRIPT&&(w.pendingScript=w.openElements.current),w.openElements.pop(),w.insertionMode=w.originalInsertionMode}function O2(w,R){w._err(u.eofInElementThatCanContainOnlyText),w.openElements.pop(),w.insertionMode=w.originalInsertionMode,w._processToken(R)}function wi(w,R){const D=w.openElements.currentTagName;D===f.TABLE||D===f.TBODY||D===f.TFOOT||D===f.THEAD||D===f.TR?(w.pendingCharacterTokens=[],w.hasNonWhitespacePendingCharacterToken=!1,w.originalInsertionMode=w.insertionMode,w.insertionMode=P,w._processToken(R)):Br(w,R)}function Jc(w,R){w.openElements.clearBackToTableContext(),w.activeFormattingElements.insertMarker(),w._insertElement(R,m.HTML),w.insertionMode=O}function O9(w,R){w.openElements.clearBackToTableContext(),w._insertElement(R,m.HTML),w.insertionMode=F}function R9(w,R){w.openElements.clearBackToTableContext(),w._insertFakeElement(f.COLGROUP),w.insertionMode=F,w._processToken(R)}function N9(w,R){w.openElements.clearBackToTableContext(),w._insertElement(R,m.HTML),w.insertionMode=V}function D9(w,R){w.openElements.clearBackToTableContext(),w._insertFakeElement(f.TBODY),w.insertionMode=V,w._processToken(R)}function I9(w,R){w.openElements.hasInTableScope(f.TABLE)&&(w.openElements.popUntilTagNamePopped(f.TABLE),w._resetInsertionMode(),w._processToken(R))}function k9(w,R){const D=t.getTokenAttr(R,T.TYPE);D&&D.toLowerCase()===_?w._appendElement(R,m.HTML):Br(w,R),R.ackSelfClosing=!0}function P9(w,R){!w.formElement&&w.openElements.tmplCount===0&&(w._insertElement(R,m.HTML),w.formElement=w.openElements.current,w.openElements.pop())}function R2(w,R){const D=R.tagName;switch(D.length){case 2:D===f.TD||D===f.TH||D===f.TR?D9(w,R):Br(w,R);break;case 3:D===f.COL?R9(w,R):Br(w,R);break;case 4:D===f.FORM?P9(w,R):Br(w,R);break;case 5:D===f.TABLE?I9(w,R):D===f.STYLE?at(w,R):D===f.TBODY||D===f.TFOOT||D===f.THEAD?N9(w,R):D===f.INPUT?k9(w,R):Br(w,R);break;case 6:D===f.SCRIPT?at(w,R):Br(w,R);break;case 7:D===f.CAPTION?Jc(w,R):Br(w,R);break;case 8:D===f.COLGROUP?O9(w,R):D===f.TEMPLATE?at(w,R):Br(w,R);break;default:Br(w,R)}}function N2(w,R){const D=R.tagName;D===f.TABLE?w.openElements.hasInTableScope(f.TABLE)&&(w.openElements.popUntilTagNamePopped(f.TABLE),w._resetInsertionMode()):D===f.TEMPLATE?Be(w,R):D!==f.BODY&&D!==f.CAPTION&&D!==f.COL&&D!==f.COLGROUP&&D!==f.HTML&&D!==f.TBODY&&D!==f.TD&&D!==f.TFOOT&&D!==f.TH&&D!==f.THEAD&&D!==f.TR&&Br(w,R)}function Br(w,R){const D=w.fosterParentingEnabled;w.fosterParentingEnabled=!0,w._processTokenInBodyMode(R),w.fosterParentingEnabled=D}function H9(w,R){w.pendingCharacterTokens.push(R)}function V9(w,R){w.pendingCharacterTokens.push(R),w.hasNonWhitespacePendingCharacterToken=!0}function ta(w,R){let D=0;if(w.hasNonWhitespacePendingCharacterToken)for(;D0?(w.openElements.popUntilTagNamePopped(f.TEMPLATE),w.activeFormattingElements.clearToLastMarker(),w._popTmplInsertionMode(),w._resetInsertionMode(),w._processToken(R)):w.stopped=!0}function $G(w,R){R.tagName===f.HTML?Kt(w,R):a6(w,R)}function UG(w,R){R.tagName===f.HTML?w.fragmentContext||(w.insertionMode=ce):a6(w,R)}function a6(w,R){w.insertionMode=A,w._processToken(R)}function GG(w,R){const D=R.tagName;D===f.HTML?Kt(w,R):D===f.FRAMESET?w._insertElement(R,m.HTML):D===f.FRAME?(w._appendElement(R,m.HTML),R.ackSelfClosing=!0):D===f.NOFRAMES&&at(w,R)}function qG(w,R){R.tagName===f.FRAMESET&&!w.openElements.isRootHtmlElementCurrent()&&(w.openElements.pop(),!w.fragmentContext&&w.openElements.currentTagName!==f.FRAMESET&&(w.insertionMode=$))}function zG(w,R){const D=R.tagName;D===f.HTML?Kt(w,R):D===f.NOFRAMES&&at(w,R)}function jG(w,R){R.tagName===f.HTML&&(w.insertionMode=ye)}function WG(w,R){R.tagName===f.HTML?Kt(w,R):l6(w,R)}function l6(w,R){w.insertionMode=A,w._processToken(R)}function YG(w,R){const D=R.tagName;D===f.HTML?Kt(w,R):D===f.NOFRAMES&&at(w,R)}function KG(w,R){R.chars=d.REPLACEMENT_CHARACTER,w._insertCharacters(R)}function ZG(w,R){w._insertCharacters(R),w.framesetOk=!1}function XG(w,R){if(c.causesExit(R)&&!w.fragmentContext){for(;w.treeAdapter.getNamespaceURI(w.openElements.current)!==m.HTML&&!w._isIntegrationPoint(w.openElements.current);)w.openElements.pop();w._processToken(R)}else{const D=w._getAdjustedCurrentElement(),Ke=w.treeAdapter.getNamespaceURI(D);Ke===m.MATHML?c.adjustTokenMathMLAttrs(R):Ke===m.SVG&&(c.adjustTokenSVGTagName(R),c.adjustTokenSVGAttrs(R)),c.adjustTokenXMLAttrs(R),R.selfClosing?w._appendElement(R,Ke):w._insertElement(R,Ke),R.ackSelfClosing=!0}}function JG(w,R){for(let D=w.openElements.stackTop;D>0;D--){const Ke=w.openElements.items[D];if(w.treeAdapter.getNamespaceURI(Ke)===m.HTML){w._processToken(R);break}if(w.treeAdapter.getTagName(Ke).toLowerCase()===R.tagName){w.openElements.popUntilElementPopped(Ke);break}}}return Cg}var Ag,SN;function fkn(){if(SN)return Ag;SN=1;const t=ZF(),e=XF(),n=ob(),r=e1(),i=r.TAG_NAMES,o=r.NAMESPACES,s={treeAdapter:t},a=/&/g,l=/\u00a0/g,c=/"/g,u=//g;class h{constructor(m,T){this.options=e(s,T),this.treeAdapter=this.options.treeAdapter,this.html="",this.startNode=m}serialize(){return this._serializeChildNodes(this.startNode),this.html}_serializeChildNodes(m){const T=this.treeAdapter.getChildNodes(m);if(T)for(let Q=0,_=T.length;Q<_;Q++){const v=T[Q];this.treeAdapter.isElementNode(v)?this._serializeElement(v):this.treeAdapter.isTextNode(v)?this._serializeTextNode(v):this.treeAdapter.isCommentNode(v)?this._serializeCommentNode(v):this.treeAdapter.isDocumentTypeNode(v)&&this._serializeDocumentTypeNode(v)}}_serializeElement(m){const T=this.treeAdapter.getTagName(m),Q=this.treeAdapter.getNamespaceURI(m);if(this.html+="<"+T,this._serializeAttributes(m),this.html+=">",T!==i.AREA&&T!==i.BASE&&T!==i.BASEFONT&&T!==i.BGSOUND&&T!==i.BR&&T!==i.COL&&T!==i.EMBED&&T!==i.FRAME&&T!==i.HR&&T!==i.IMG&&T!==i.INPUT&&T!==i.KEYGEN&&T!==i.LINK&&T!==i.META&&T!==i.PARAM&&T!==i.SOURCE&&T!==i.TRACK&&T!==i.WBR){const _=T===i.TEMPLATE&&Q===o.HTML?this.treeAdapter.getTemplateContent(m):m;this._serializeChildNodes(_),this.html+=""}}_serializeAttributes(m){const T=this.treeAdapter.getAttrList(m);for(let Q=0,_=T.length;Q<_;Q++){const v=T[Q],y=h.escapeString(v.value,!0);this.html+=" ",v.namespace?v.namespace===o.XML?this.html+="xml:"+v.name:v.namespace===o.XMLNS?(v.name!=="xmlns"&&(this.html+="xmlns:"),this.html+=v.name):v.namespace===o.XLINK?this.html+="xlink:"+v.name:this.html+=v.prefix+":"+v.name:this.html+=v.name,this.html+='="'+y+'"'}}_serializeTextNode(m){const T=this.treeAdapter.getTextNodeContent(m),Q=this.treeAdapter.getParentNode(m);let _;Q&&this.treeAdapter.isElementNode(Q)&&(_=this.treeAdapter.getTagName(Q)),_===i.STYLE||_===i.SCRIPT||_===i.XMP||_===i.IFRAME||_===i.NOEMBED||_===i.NOFRAMES||_===i.PLAINTEXT||_===i.NOSCRIPT?this.html+=T:this.html+=h.escapeString(T,!1)}_serializeCommentNode(m){this.html+=""}_serializeDocumentTypeNode(m){const T=this.treeAdapter.getDocumentTypeNodeName(m);this.html+="<"+n.serializeContent(T,null,null)+">"}}return h.escapeString=function(f,m){return f=f.replace(a,"&").replace(l," "),m?f=f.replace(c,"""):f=f.replace(u,"<").replace(d,">"),f},Ag=h,Ag}var LN;function pkn(){if(LN)return K3;LN=1;const t=dkn(),e=fkn();return K3.parse=function(r,i){return new t(i).parse(r)},K3.parseFragment=function(r,i,o){return typeof r=="string"&&(o=i,i=r,r=null),new t(o).parseFragment(i,r)},K3.serialize=function(n,r){return new e(n,r).serialize()},K3}var Jt={},CN;function hkn(){if(CN)return Jt;CN=1;const t=ob(),{DOCUMENT_MODE:e}=e1(),n={element:1,text:3,cdata:4,comment:8},r={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"};class i{constructor(c){for(const u of Object.keys(c))this[u]=c[u]}get firstChild(){const c=this.children;return c&&c[0]||null}get lastChild(){const c=this.children;return c&&c[c.length-1]||null}get nodeType(){return n[this.type]||n.element}}Object.keys(r).forEach(l=>{const c=r[l];Object.defineProperty(i.prototype,l,{get:function(){return this[c]||null},set:function(u){return this[c]=u,u}})}),Jt.createDocument=function(){return new i({type:"root",name:"root",parent:null,prev:null,next:null,children:[],"x-mode":e.NO_QUIRKS})},Jt.createDocumentFragment=function(){return new i({type:"root",name:"root",parent:null,prev:null,next:null,children:[]})},Jt.createElement=function(l,c,u){const d=Object.create(null),h=Object.create(null),f=Object.create(null);for(let m=0;m"u"&&(l.attribs[d]=c[u].value,l["x-attribsNamespace"][d]=c[u].namespace,l["x-attribsPrefix"][d]=c[u].prefix)}},Jt.getFirstChild=function(l){return l.children[0]},Jt.getChildNodes=function(l){return l.children},Jt.getParentNode=function(l){return l.parent},Jt.getAttrList=function(l){const c=[];for(const u in l.attribs)c.push({name:u,value:l.attribs[u],namespace:l["x-attribsNamespace"][u],prefix:l["x-attribsPrefix"][u]});return c},Jt.getTagName=function(l){return l.name},Jt.getNamespaceURI=function(l){return l.namespace},Jt.getTextNodeContent=function(l){return l.data},Jt.getCommentNodeContent=function(l){return l.data},Jt.getDocumentTypeNodeName=function(l){return l["x-name"]},Jt.getDocumentTypeNodePublicId=function(l){return l["x-publicId"]},Jt.getDocumentTypeNodeSystemId=function(l){return l["x-systemId"]},Jt.isTextNode=function(l){return l.type==="text"},Jt.isCommentNode=function(l){return l.type==="comment"},Jt.isDocumentTypeNode=function(l){return l.type==="directive"&&l.name==="!doctype"},Jt.isElementNode=function(l){return!!l.attribs},Jt.setNodeSourceCodeLocation=function(l,c){l.sourceCodeLocation=c},Jt.getNodeSourceCodeLocation=function(l){return l.sourceCodeLocation},Jt.updateNodeSourceCodeLocation=function(l,c){l.sourceCodeLocation=Object.assign(l.sourceCodeLocation,c)},Jt}var AN;function JF(){if(AN)return x1;AN=1,Object.defineProperty(x1,"__esModule",{value:!0}),x1.render=x1.parse=void 0;var t=Ja,e=di(),n=pkn(),r=t.__importDefault(hkn());function i(s,a,l){var c={scriptingEnabled:typeof a.scriptingEnabled=="boolean"?a.scriptingEnabled:!0,treeAdapter:r.default,sourceCodeLocationInfo:a.sourceCodeLocationInfo},u=a.context;return l?n.parse(s,c):n.parseFragment(u,s,c)}x1.parse=i;function o(s){for(var a,l=("length"in s)?s:[s],c=0;c/;function l(c){return a.test(c)}return Qr.isHtml=l,Qr}var Kn={},NN;function Tkn(){if(NN)return Kn;NN=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.toggleClass=Kn.removeClass=Kn.addClass=Kn.hasClass=Kn.removeAttr=Kn.val=Kn.data=Kn.prop=Kn.attr=void 0;var t=Z0(),e=Gc(),n=Object.prototype.hasOwnProperty,r=/\s+/,i="data-",o={null:null,true:!0,false:!1},s=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,a=/^{[^]*}$|^\[[^]*]$/;function l(C,A,I){var N;if(!(!C||!e.isTag(C))){if((N=C.attribs)!==null&&N!==void 0||(C.attribs={}),!A)return C.attribs;if(n.call(C.attribs,A))return!I&&s.test(A)?A:C.attribs[A];if(C.name==="option"&&A==="value")return t.text(C.children);if(C.name==="input"&&(C.attribs.type==="radio"||C.attribs.type==="checkbox")&&A==="value")return"on"}}function c(C,A,I){I===null?v(C,A):C.attribs[A]=""+I}function u(C,A){if(typeof C=="object"||A!==void 0){if(typeof A=="function"){if(typeof C!="string")throw new Error("Bad combination of arguments.");return e.domEach(this,function(I,N){e.isTag(I)&&c(I,C,A.call(I,N,I.attribs[C]))})}return e.domEach(this,function(I){e.isTag(I)&&(typeof C=="object"?Object.keys(C).forEach(function(N){var P=C[N];c(I,N,P)}):c(I,C,A))})}return arguments.length>1?this:l(this[0],C,this.options.xmlMode)}Kn.attr=u;function d(C,A,I){if(!(!C||!e.isTag(C)))return A in C?C[A]:!I&&s.test(A)?l(C,A,!1)!==void 0:l(C,A,I)}function h(C,A,I,N){A in C?C[A]=I:c(C,A,!N&&s.test(A)?I?"":null:""+I)}function f(C,A){var I=this;if(typeof C=="string"&&A===void 0)switch(C){case"style":{var N=this.css(),P=Object.keys(N);return P.forEach(function(F,V){N[V]=F}),N.length=P.length,N}case"tagName":case"nodeName":{var O=this[0];return e.isTag(O)?O.name.toUpperCase():void 0}case"outerHTML":return this.clone().wrap("").parent().html();case"innerHTML":return this.html();default:return d(this[0],C,this.options.xmlMode)}if(typeof C=="object"||A!==void 0){if(typeof A=="function"){if(typeof C=="object")throw new Error("Bad combination of arguments.");return e.domEach(this,function(F,V){e.isTag(F)&&h(F,C,A.call(F,V,d(F,C,I.options.xmlMode)),I.options.xmlMode)})}return e.domEach(this,function(F){e.isTag(F)&&(typeof C=="object"?Object.keys(C).forEach(function(V){var U=C[V];h(F,V,U,I.options.xmlMode)}):h(F,C,A,I.options.xmlMode))})}}Kn.prop=f;function m(C,A,I){var N,P=C;(N=P.data)!==null&&N!==void 0||(P.data={}),typeof A=="object"?Object.assign(P.data,A):typeof A=="string"&&I!==void 0&&(P.data[A]=I)}function T(C,A){var I,N,P;A==null?(I=Object.keys(C.attribs).filter(function(U){return U.startsWith(i)}),N=I.map(function(U){return e.camelCase(U.slice(i.length))})):(I=[i+e.cssCase(A)],N=[A]);for(var O=0;O-1;){var P=N+C.length;if((N===0||r.test(I[N-1]))&&(P===I.length||r.test(I[P])))return!0}return!1})}Kn.hasClass=E;function x(C){if(typeof C=="function")return e.domEach(this,function(G,K){if(e.isTag(G)){var W=G.attribs.class||"";x.call([G],C.call(G,K,W))}});if(!C||typeof C!="string")return this;for(var A=C.split(r),I=this.length,N=0;N=0&&(O.splice(U,1),F=!0,V--)}F&&(P.attribs.class=O.join(" "))}})}Kn.removeClass=L;function M(C,A){if(typeof C=="function")return e.domEach(this,function(W,te){e.isTag(W)&&M.call([W],C.call(W,te,W.attribs.class||"",A),A)});if(!C||typeof C!="string")return this;for(var I=C.split(r),N=I.length,P=typeof A=="boolean"?A?1:-1:0,O=this.length,F=0;F=0&&K<0?U.push(I[G]):P<=0&&K>=0&&U.splice(K,1)}V.attribs.class=U.join(" ")}}return this}return Kn.toggleClass=M,Kn}var ft={},DN;function mkn(){if(DN)return ft;DN=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.addBack=ft.add=ft.end=ft.slice=ft.index=ft.toArray=ft.get=ft.eq=ft.last=ft.first=ft.has=ft.not=ft.is=ft.filterArray=ft.filter=ft.map=ft.each=ft.contents=ft.children=ft.siblings=ft.prevUntil=ft.prevAll=ft.prev=ft.nextUntil=ft.nextAll=ft.next=ft.closest=ft.parentsUntil=ft.parents=ft.parent=ft.find=void 0;var t=Ja,e=di(),n=t.__importStar(zF()),r=Gc(),i=Z0(),o=Uc(),s=o.DomUtils.uniqueSort,a=/^\s*[~+]/;function l(G){var K;if(!G)return this._make([]);var W=this.toArray();if(typeof G!="string"){var te=r.isCheerio(G)?G.toArray():[G];return this._make(te.filter(function($){return W.some(function(ce){return i.contains(ce,$)})}))}var de=a.test(G)?W:this.children().toArray(),X={context:W,root:(K=this._root)===null||K===void 0?void 0:K[0],xmlMode:this.options.xmlMode};return this._make(n.select(G,de,X))}ft.find=l;function c(G){return function(K){for(var W=[],te=1;te1&&$.length>1?W.reduce(function(ce,ye){return ye(ce)},$):$)}}}var u=c(function(G,K){for(var W,te=[],de=0;de0})}ft.has=L;function M(){return this.length>1?this._make(this[0]):this}ft.first=M;function C(){return this.length>0?this._make(this[this.length-1]):this}ft.last=C;function A(G){var K;return G=+G,G===0&&this.length<=1?this:(G<0&&(G=this.length+G),this._make((K=this[G])!==null&&K!==void 0?K:[]))}ft.eq=A;function I(G){return G==null?this.toArray():this[G<0?this.length+G:G]}ft.get=I;function N(){return Array.prototype.slice.call(this)}ft.toArray=N;function P(G){var K,W;return G==null?(K=this.parent().children(),W=this[0]):typeof G=="string"?(K=this._make(G),W=this[0]):(K=this,W=r.isCheerio(G)?G[0]:G),Array.prototype.indexOf.call(K,W)}ft.index=P;function O(G,K){return this._make(Array.prototype.slice.call(this,G,K))}ft.slice=O;function F(){var G;return(G=this.prevObject)!==null&&G!==void 0?G:this._make([])}ft.end=F;function V(G,K){var W=this._make(G,K),te=s(t.__spreadArray(t.__spreadArray([],this.get()),W.get()));return this._make(te)}ft.add=V;function U(G){return this.prevObject?this.add(G?this.prevObject.filter(G):this.prevObject):this}return ft.addBack=U,ft}var Vt={},IN;function gkn(){if(IN)return Vt;IN=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.clone=Vt.text=Vt.toString=Vt.html=Vt.empty=Vt.replaceWith=Vt.remove=Vt.insertBefore=Vt.before=Vt.insertAfter=Vt.after=Vt.wrapAll=Vt.unwrap=Vt.wrapInner=Vt.wrap=Vt.prepend=Vt.append=Vt.prependTo=Vt.appendTo=Vt._makeDomArray=void 0;var t=Ja,e=di(),n=di(),r=t.__importStar(sb()),i=Z0(),o=Gc(),s=Uc();function a(A,I){var N=this;return A==null?[]:o.isCheerio(A)?I?o.cloneDom(A.get()):A.get():Array.isArray(A)?A.reduce(function(P,O){return P.concat(N._makeDomArray(O,I))},[]):typeof A=="string"?r.default(A,this.options,!1).children:I?o.cloneDom([A]):[A]}Vt._makeDomArray=a;function l(A){return function(){for(var I=this,N=[],P=0;P-1&&(de.children.splice(X,1),O===de&&I>X&&U[0]--)}te.parent=O,te.prev&&(te.prev.next=(F=te.next)!==null&&F!==void 0?F:null),te.next&&(te.next.prev=(V=te.prev)!==null&&V!==void 0?V:null),te.prev=P[W-1]||G,te.next=P[W+1]||K}return G&&(G.next=P[0]),K&&(K.prev=P[P.length-1]),A.splice.apply(A,U)}function u(A){var I=o.isCheerio(A)?A:this._make(A);return I.append(this),this}Vt.appendTo=u;function d(A){var I=o.isCheerio(A)?A:this._make(A);return I.prepend(this),this}Vt.prependTo=d,Vt.append=l(function(A,I,N){c(I,I.length,0,A,N)}),Vt.prepend=l(function(A,I,N){c(I,0,0,A,N)});function h(A){return function(I){for(var N=this.length-1,P=this.parents().last(),O=0;O0);for(let At=D;At=0;R--){let Ke=this.openElements.items[R];R===0&&(D=!0,this.fragmentContext&&(Ke=this.fragmentContext));const At=this.treeAdapter.getTagName(Ke),gn=z[At];if(gn){this.insertionMode=gn;break}else if(!D&&(At===f.TD||At===f.TH)){this.insertionMode=G;break}else if(!D&&At===f.HEAD){this.insertionMode=L;break}else if(At===f.SELECT){this._resetInsertionModeForSelect(R);break}else if(At===f.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}else if(At===f.HTML){this.insertionMode=this.headElement?C:x;break}else if(D){this.insertionMode=A;break}}}_resetInsertionModeForSelect(R){if(R>0)for(let D=R-1;D>0;D--){const Ke=this.openElements.items[D],At=this.treeAdapter.getTagName(Ke);if(At===f.TEMPLATE)break;if(At===f.TABLE){this.insertionMode=W;return}}this.insertionMode=K}_pushTmplInsertionMode(R){this.tmplInsertionModeStack.push(R),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=R}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop]}_isElementCausesFosterParenting(R){const D=this.treeAdapter.getTagName(R);return D===f.TABLE||D===f.TBODY||D===f.TFOOT||D===f.THEAD||D===f.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const R={parent:null,beforeElement:null};for(let D=this.openElements.stackTop;D>=0;D--){const Ke=this.openElements.items[D],At=this.treeAdapter.getTagName(Ke),gn=this.treeAdapter.getNamespaceURI(Ke);if(At===f.TEMPLATE&&gn===m.HTML){R.parent=this.treeAdapter.getTemplateContent(Ke);break}else if(At===f.TABLE){R.parent=this.treeAdapter.getParentNode(Ke),R.parent?R.beforeElement=Ke:R.parent=this.openElements.items[D-1];break}}return R.parent||(R.parent=this.openElements.items[0]),R}_fosterParentElement(R){const D=this._findFosterParentingLocation();D.beforeElement?this.treeAdapter.insertBefore(D.parent,R,D.beforeElement):this.treeAdapter.appendChild(D.parent,R)}_fosterParentText(R){const D=this._findFosterParentingLocation();D.beforeElement?this.treeAdapter.insertTextBefore(D.parent,R,D.beforeElement):this.treeAdapter.insertText(D.parent,R)}_isSpecialElement(R){const D=this.treeAdapter.getTagName(R),Ke=this.treeAdapter.getNamespaceURI(R);return h.SPECIAL_ELEMENTS[Ke][D]}}Cg=be;function Le(w,R){let D=w.activeFormattingElements.getElementEntryInScopeWithTagName(R.tagName);return D?w.openElements.contains(D.element)?w.openElements.hasInScope(R.tagName)||(D=null):(w.activeFormattingElements.removeEntry(D),D=null):mn(w,R),D}function se(w,R){let D=null;for(let Ke=w.openElements.stackTop;Ke>=0;Ke--){const At=w.openElements.items[Ke];if(At===R.element)break;w._isSpecialElement(At)&&(D=At)}return D||(w.openElements.popUntilElementPopped(R.element),w.activeFormattingElements.removeEntry(R)),D}function Y(w,R,D){let Ke=R,At=w.openElements.getCommonAncestor(R);for(let gn=0,wr=At;wr!==D;gn++,wr=At){At=w.openElements.getCommonAncestor(wr);const t3=w.activeFormattingElements.getElementEntry(wr),EE=t3&&gn>=y;!t3||EE?(EE&&w.activeFormattingElements.removeEntry(t3),w.openElements.remove(wr)):(wr=j(w,t3),Ke===R&&(w.activeFormattingElements.bookmark=t3),w.treeAdapter.detachNode(Ke),w.treeAdapter.appendChild(wr,Ke),Ke=wr)}return Ke}function j(w,R){const D=w.treeAdapter.getNamespaceURI(R.element),Ke=w.treeAdapter.createElement(R.token.tagName,D,R.token.attrs);return w.openElements.replace(R.element,Ke),R.element=Ke,Ke}function ie(w,R,D){if(w._isElementCausesFosterParenting(R))w._fosterParentElement(D);else{const Ke=w.treeAdapter.getTagName(R),At=w.treeAdapter.getNamespaceURI(R);Ke===f.TEMPLATE&&At===m.HTML&&(R=w.treeAdapter.getTemplateContent(R)),w.treeAdapter.appendChild(R,D)}}function Te(w,R,D){const Ke=w.treeAdapter.getNamespaceURI(D.element),At=D.token,gn=w.treeAdapter.createElement(At.tagName,Ke,At.attrs);w._adoptNodes(R,gn),w.treeAdapter.appendChild(R,gn),w.activeFormattingElements.insertElementAfterBookmark(gn,D.token),w.activeFormattingElements.removeEntry(D),w.openElements.remove(D.element),w.openElements.insertAfter(R,gn)}function ve(w,R){let D;for(let Ke=0;Ke0?(w.openElements.generateImpliedEndTagsThoroughly(),w.openElements.currentTagName!==f.TEMPLATE&&w._err(u.closingOfElementWithOpenChildElements),w.openElements.popUntilTagNamePopped(f.TEMPLATE),w.activeFormattingElements.clearToLastMarker(),w._popTmplInsertionMode(),w._resetInsertionMode()):w._err(u.endTagWithoutMatchingOpenElement)}function It(w,R){w.openElements.pop(),w.insertionMode=C,w._processToken(R)}function Tt(w,R){const D=R.tagName;D===f.HTML?Kt(w,R):D===f.BASEFONT||D===f.BGSOUND||D===f.HEAD||D===f.LINK||D===f.META||D===f.NOFRAMES||D===f.STYLE?at(w,R):D===f.NOSCRIPT?w._err(u.nestedNoscriptInHead):dt(w,R)}function mt(w,R){const D=R.tagName;D===f.NOSCRIPT?(w.openElements.pop(),w.insertionMode=L):D===f.BR?dt(w,R):w._err(u.endTagWithoutMatchingOpenElement)}function dt(w,R){const D=R.type===t.EOF_TOKEN?u.openElementsLeftAfterEof:u.disallowedContentInNoscriptInHead;w._err(D),w.openElements.pop(),w.insertionMode=L,w._processToken(R)}function st(w,R){const D=R.tagName;D===f.HTML?Kt(w,R):D===f.BODY?(w._insertElement(R,m.HTML),w.framesetOk=!1,w.insertionMode=A):D===f.FRAMESET?(w._insertElement(R,m.HTML),w.insertionMode=X):D===f.BASE||D===f.BASEFONT||D===f.BGSOUND||D===f.LINK||D===f.META||D===f.NOFRAMES||D===f.SCRIPT||D===f.STYLE||D===f.TEMPLATE||D===f.TITLE?(w._err(u.abandonedHeadElementChild),w.openElements.push(w.headElement),at(w,R),w.openElements.remove(w.headElement)):D===f.HEAD?w._err(u.misplacedStartTagForHeadElement):me(w,R)}function ct(w,R){const D=R.tagName;D===f.BODY||D===f.HTML||D===f.BR?me(w,R):D===f.TEMPLATE?Be(w,R):w._err(u.endTagWithoutMatchingOpenElement)}function me(w,R){w._insertFakeElement(f.BODY),w.insertionMode=A,w._processToken(R)}function Ye(w,R){w._reconstructActiveFormattingElements(),w._insertCharacters(R)}function Ge(w,R){w._reconstructActiveFormattingElements(),w._insertCharacters(R),w.framesetOk=!1}function Pe(w,R){w.openElements.tmplCount===0&&w.treeAdapter.adoptAttributes(w.openElements.items[0],R.attrs)}function Xe(w,R){const D=w.openElements.tryPeekProperlyNestedBodyElement();D&&w.openElements.tmplCount===0&&(w.framesetOk=!1,w.treeAdapter.adoptAttributes(D,R.attrs))}function vt(w,R){const D=w.openElements.tryPeekProperlyNestedBodyElement();w.framesetOk&&D&&(w.treeAdapter.detachNode(D),w.openElements.popAllUpToHtmlElement(),w._insertElement(R,m.HTML),w.insertionMode=X)}function Ot(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML)}function Hn(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement();const D=w.openElements.currentTagName;(D===f.H1||D===f.H2||D===f.H3||D===f.H4||D===f.H5||D===f.H6)&&w.openElements.pop(),w._insertElement(R,m.HTML)}function zn(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML),w.skipNextNewLine=!0,w.framesetOk=!1}function an(w,R){const D=w.openElements.tmplCount>0;(!w.formElement||D)&&(w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML),D||(w.formElement=w.openElements.current))}function Yn(w,R){w.framesetOk=!1;const D=R.tagName;for(let Ke=w.openElements.stackTop;Ke>=0;Ke--){const At=w.openElements.items[Ke],gn=w.treeAdapter.getTagName(At);let wr=null;if(D===f.LI&&gn===f.LI?wr=f.LI:(D===f.DD||D===f.DT)&&(gn===f.DD||gn===f.DT)&&(wr=gn),wr){w.openElements.generateImpliedEndTagsWithExclusion(wr),w.openElements.popUntilTagNamePopped(wr);break}if(gn!==f.ADDRESS&&gn!==f.DIV&&gn!==f.P&&w._isSpecialElement(At))break}w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML)}function Cr(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML),w.tokenizer.state=t.MODE.PLAINTEXT}function Xs(w,R){w.openElements.hasInScope(f.BUTTON)&&(w.openElements.generateImpliedEndTags(),w.openElements.popUntilTagNamePopped(f.BUTTON)),w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML),w.framesetOk=!1}function So(w,R){const D=w.activeFormattingElements.getElementEntryInScopeWithTagName(f.A);D&&(ve(w,R),w.openElements.remove(D.element),w.activeFormattingElements.removeEntry(D)),w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML),w.activeFormattingElements.pushElement(w.openElements.current,R)}function Gt(w,R){w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML),w.activeFormattingElements.pushElement(w.openElements.current,R)}function eo(w,R){w._reconstructActiveFormattingElements(),w.openElements.hasInScope(f.NOBR)&&(ve(w,R),w._reconstructActiveFormattingElements()),w._insertElement(R,m.HTML),w.activeFormattingElements.pushElement(w.openElements.current,R)}function Xn(w,R){w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML),w.activeFormattingElements.insertMarker(),w.framesetOk=!1}function hi(w,R){w.treeAdapter.getDocumentMode(w.document)!==h.DOCUMENT_MODE.QUIRKS&&w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML),w.framesetOk=!1,w.insertionMode=N}function sr(w,R){w._reconstructActiveFormattingElements(),w._appendElement(R,m.HTML),w.framesetOk=!1,R.ackSelfClosing=!0}function Js(w,R){w._reconstructActiveFormattingElements(),w._appendElement(R,m.HTML);const D=t.getTokenAttr(R,T.TYPE);(!D||D.toLowerCase()!==_)&&(w.framesetOk=!1),R.ackSelfClosing=!0}function ea(w,R){w._appendElement(R,m.HTML),R.ackSelfClosing=!0}function r1(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._appendElement(R,m.HTML),w.framesetOk=!1,R.ackSelfClosing=!0}function ee(w,R){R.tagName=f.IMG,sr(w,R)}function xe(w,R){w._insertElement(R,m.HTML),w.skipNextNewLine=!0,w.tokenizer.state=t.MODE.RCDATA,w.originalInsertionMode=w.insertionMode,w.framesetOk=!1,w.insertionMode=I}function Ce(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._reconstructActiveFormattingElements(),w.framesetOk=!1,w._switchToTextParsing(R,t.MODE.RAWTEXT)}function Ne(w,R){w.framesetOk=!1,w._switchToTextParsing(R,t.MODE.RAWTEXT)}function Re(w,R){w._switchToTextParsing(R,t.MODE.RAWTEXT)}function We(w,R){w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML),w.framesetOk=!1,w.insertionMode===N||w.insertionMode===O||w.insertionMode===V||w.insertionMode===U||w.insertionMode===G?w.insertionMode=W:w.insertionMode=K}function Fe(w,R){w.openElements.currentTagName===f.OPTION&&w.openElements.pop(),w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML)}function B(w,R){w.openElements.hasInScope(f.RUBY)&&w.openElements.generateImpliedEndTags(),w._insertElement(R,m.HTML)}function tt(w,R){w.openElements.hasInScope(f.RUBY)&&w.openElements.generateImpliedEndTagsWithExclusion(f.RTC),w._insertElement(R,m.HTML)}function bt(w,R){w.openElements.hasInButtonScope(f.P)&&w._closePElement(),w._insertElement(R,m.HTML)}function gt(w,R){w._reconstructActiveFormattingElements(),c.adjustTokenMathMLAttrs(R),c.adjustTokenXMLAttrs(R),R.selfClosing?w._appendElement(R,m.MATHML):w._insertElement(R,m.MATHML),R.ackSelfClosing=!0}function Qt(w,R){w._reconstructActiveFormattingElements(),c.adjustTokenSVGAttrs(R),c.adjustTokenXMLAttrs(R),R.selfClosing?w._appendElement(R,m.SVG):w._insertElement(R,m.SVG),R.ackSelfClosing=!0}function Ht(w,R){w._reconstructActiveFormattingElements(),w._insertElement(R,m.HTML)}function Kt(w,R){const D=R.tagName;switch(D.length){case 1:D===f.I||D===f.S||D===f.B||D===f.U?Gt(w,R):D===f.P?Ot(w,R):D===f.A?So(w,R):Ht(w,R);break;case 2:D===f.DL||D===f.OL||D===f.UL?Ot(w,R):D===f.H1||D===f.H2||D===f.H3||D===f.H4||D===f.H5||D===f.H6?Hn(w,R):D===f.LI||D===f.DD||D===f.DT?Yn(w,R):D===f.EM||D===f.TT?Gt(w,R):D===f.BR?sr(w,R):D===f.HR?r1(w,R):D===f.RB?B(w,R):D===f.RT||D===f.RP?tt(w,R):D!==f.TH&&D!==f.TD&&D!==f.TR&&Ht(w,R);break;case 3:D===f.DIV||D===f.DIR||D===f.NAV?Ot(w,R):D===f.PRE?zn(w,R):D===f.BIG?Gt(w,R):D===f.IMG||D===f.WBR?sr(w,R):D===f.XMP?Ce(w,R):D===f.SVG?Qt(w,R):D===f.RTC?B(w,R):D!==f.COL&&Ht(w,R);break;case 4:D===f.HTML?Pe(w,R):D===f.BASE||D===f.LINK||D===f.META?at(w,R):D===f.BODY?Xe(w,R):D===f.MAIN||D===f.MENU?Ot(w,R):D===f.FORM?an(w,R):D===f.CODE||D===f.FONT?Gt(w,R):D===f.NOBR?eo(w,R):D===f.AREA?sr(w,R):D===f.MATH?gt(w,R):D===f.MENU?bt(w,R):D!==f.HEAD&&Ht(w,R);break;case 5:D===f.STYLE||D===f.TITLE?at(w,R):D===f.ASIDE?Ot(w,R):D===f.SMALL?Gt(w,R):D===f.TABLE?hi(w,R):D===f.EMBED?sr(w,R):D===f.INPUT?Js(w,R):D===f.PARAM||D===f.TRACK?ea(w,R):D===f.IMAGE?ee(w,R):D!==f.FRAME&&D!==f.TBODY&&D!==f.TFOOT&&D!==f.THEAD&&Ht(w,R);break;case 6:D===f.SCRIPT?at(w,R):D===f.CENTER||D===f.FIGURE||D===f.FOOTER||D===f.HEADER||D===f.HGROUP||D===f.DIALOG?Ot(w,R):D===f.BUTTON?Xs(w,R):D===f.STRIKE||D===f.STRONG?Gt(w,R):D===f.APPLET||D===f.OBJECT?Xn(w,R):D===f.KEYGEN?sr(w,R):D===f.SOURCE?ea(w,R):D===f.IFRAME?Ne(w,R):D===f.SELECT?We(w,R):D===f.OPTION?Fe(w,R):Ht(w,R);break;case 7:D===f.BGSOUND?at(w,R):D===f.DETAILS||D===f.ADDRESS||D===f.ARTICLE||D===f.SECTION||D===f.SUMMARY?Ot(w,R):D===f.LISTING?zn(w,R):D===f.MARQUEE?Xn(w,R):D===f.NOEMBED?Re(w,R):D!==f.CAPTION&&Ht(w,R);break;case 8:D===f.BASEFONT?at(w,R):D===f.FRAMESET?vt(w,R):D===f.FIELDSET?Ot(w,R):D===f.TEXTAREA?xe(w,R):D===f.TEMPLATE?at(w,R):D===f.NOSCRIPT?w.options.scriptingEnabled?Re(w,R):Ht(w,R):D===f.OPTGROUP?Fe(w,R):D!==f.COLGROUP&&Ht(w,R);break;case 9:D===f.PLAINTEXT?Cr(w,R):Ht(w,R);break;case 10:D===f.BLOCKQUOTE||D===f.FIGCAPTION?Ot(w,R):Ht(w,R);break;default:Ht(w,R)}}function un(w){w.openElements.hasInScope(f.BODY)&&(w.insertionMode=de)}function Ar(w,R){w.openElements.hasInScope(f.BODY)&&(w.insertionMode=de,w._processToken(R))}function on(w,R){const D=R.tagName;w.openElements.hasInScope(D)&&(w.openElements.generateImpliedEndTags(),w.openElements.popUntilTagNamePopped(D))}function $t(w){const R=w.openElements.tmplCount>0,D=w.formElement;R||(w.formElement=null),(D||R)&&w.openElements.hasInScope(f.FORM)&&(w.openElements.generateImpliedEndTags(),R?w.openElements.popUntilTagNamePopped(f.FORM):w.openElements.remove(D))}function w2(w){w.openElements.hasInButtonScope(f.P)||w._insertFakeElement(f.P),w._closePElement()}function Dn(w){w.openElements.hasInListItemScope(f.LI)&&(w.openElements.generateImpliedEndTagsWithExclusion(f.LI),w.openElements.popUntilTagNamePopped(f.LI))}function Lo(w,R){const D=R.tagName;w.openElements.hasInScope(D)&&(w.openElements.generateImpliedEndTagsWithExclusion(D),w.openElements.popUntilTagNamePopped(D))}function Xc(w){w.openElements.hasNumberedHeaderInScope()&&(w.openElements.generateImpliedEndTags(),w.openElements.popUntilNumberedHeaderPopped())}function os(w,R){const D=R.tagName;w.openElements.hasInScope(D)&&(w.openElements.generateImpliedEndTags(),w.openElements.popUntilTagNamePopped(D),w.activeFormattingElements.clearToLastMarker())}function M2(w){w._reconstructActiveFormattingElements(),w._insertFakeElement(f.BR),w.openElements.pop(),w.framesetOk=!1}function mn(w,R){const D=R.tagName;for(let Ke=w.openElements.stackTop;Ke>0;Ke--){const At=w.openElements.items[Ke];if(w.treeAdapter.getTagName(At)===D){w.openElements.generateImpliedEndTagsWithExclusion(D),w.openElements.popUntilElementPopped(At);break}if(w._isSpecialElement(At))break}}function Ai(w,R){const D=R.tagName;switch(D.length){case 1:D===f.A||D===f.B||D===f.I||D===f.S||D===f.U?ve(w,R):D===f.P?w2(w):mn(w,R);break;case 2:D===f.DL||D===f.UL||D===f.OL?on(w,R):D===f.LI?Dn(w):D===f.DD||D===f.DT?Lo(w,R):D===f.H1||D===f.H2||D===f.H3||D===f.H4||D===f.H5||D===f.H6?Xc(w):D===f.BR?M2(w):D===f.EM||D===f.TT?ve(w,R):mn(w,R);break;case 3:D===f.BIG?ve(w,R):D===f.DIR||D===f.DIV||D===f.NAV||D===f.PRE?on(w,R):mn(w,R);break;case 4:D===f.BODY?un(w):D===f.HTML?Ar(w,R):D===f.FORM?$t(w):D===f.CODE||D===f.FONT||D===f.NOBR?ve(w,R):D===f.MAIN||D===f.MENU?on(w,R):mn(w,R);break;case 5:D===f.ASIDE?on(w,R):D===f.SMALL?ve(w,R):mn(w,R);break;case 6:D===f.CENTER||D===f.FIGURE||D===f.FOOTER||D===f.HEADER||D===f.HGROUP||D===f.DIALOG?on(w,R):D===f.APPLET||D===f.OBJECT?os(w,R):D===f.STRIKE||D===f.STRONG?ve(w,R):mn(w,R);break;case 7:D===f.ADDRESS||D===f.ARTICLE||D===f.DETAILS||D===f.SECTION||D===f.SUMMARY||D===f.LISTING?on(w,R):D===f.MARQUEE?os(w,R):mn(w,R);break;case 8:D===f.FIELDSET?on(w,R):D===f.TEMPLATE?Be(w,R):mn(w,R);break;case 10:D===f.BLOCKQUOTE||D===f.FIGCAPTION?on(w,R):mn(w,R);break;default:mn(w,R)}}function Jr(w,R){w.tmplInsertionModeStackTop>-1?bE(w,R):w.stopped=!0}function Vr(w,R){R.tagName===f.SCRIPT&&(w.pendingScript=w.openElements.current),w.openElements.pop(),w.insertionMode=w.originalInsertionMode}function O2(w,R){w._err(u.eofInElementThatCanContainOnlyText),w.openElements.pop(),w.insertionMode=w.originalInsertionMode,w._processToken(R)}function wi(w,R){const D=w.openElements.currentTagName;D===f.TABLE||D===f.TBODY||D===f.TFOOT||D===f.THEAD||D===f.TR?(w.pendingCharacterTokens=[],w.hasNonWhitespacePendingCharacterToken=!1,w.originalInsertionMode=w.insertionMode,w.insertionMode=P,w._processToken(R)):Br(w,R)}function Jc(w,R){w.openElements.clearBackToTableContext(),w.activeFormattingElements.insertMarker(),w._insertElement(R,m.HTML),w.insertionMode=O}function O9(w,R){w.openElements.clearBackToTableContext(),w._insertElement(R,m.HTML),w.insertionMode=F}function R9(w,R){w.openElements.clearBackToTableContext(),w._insertFakeElement(f.COLGROUP),w.insertionMode=F,w._processToken(R)}function N9(w,R){w.openElements.clearBackToTableContext(),w._insertElement(R,m.HTML),w.insertionMode=V}function D9(w,R){w.openElements.clearBackToTableContext(),w._insertFakeElement(f.TBODY),w.insertionMode=V,w._processToken(R)}function I9(w,R){w.openElements.hasInTableScope(f.TABLE)&&(w.openElements.popUntilTagNamePopped(f.TABLE),w._resetInsertionMode(),w._processToken(R))}function k9(w,R){const D=t.getTokenAttr(R,T.TYPE);D&&D.toLowerCase()===_?w._appendElement(R,m.HTML):Br(w,R),R.ackSelfClosing=!0}function P9(w,R){!w.formElement&&w.openElements.tmplCount===0&&(w._insertElement(R,m.HTML),w.formElement=w.openElements.current,w.openElements.pop())}function R2(w,R){const D=R.tagName;switch(D.length){case 2:D===f.TD||D===f.TH||D===f.TR?D9(w,R):Br(w,R);break;case 3:D===f.COL?R9(w,R):Br(w,R);break;case 4:D===f.FORM?P9(w,R):Br(w,R);break;case 5:D===f.TABLE?I9(w,R):D===f.STYLE?at(w,R):D===f.TBODY||D===f.TFOOT||D===f.THEAD?N9(w,R):D===f.INPUT?k9(w,R):Br(w,R);break;case 6:D===f.SCRIPT?at(w,R):Br(w,R);break;case 7:D===f.CAPTION?Jc(w,R):Br(w,R);break;case 8:D===f.COLGROUP?O9(w,R):D===f.TEMPLATE?at(w,R):Br(w,R);break;default:Br(w,R)}}function N2(w,R){const D=R.tagName;D===f.TABLE?w.openElements.hasInTableScope(f.TABLE)&&(w.openElements.popUntilTagNamePopped(f.TABLE),w._resetInsertionMode()):D===f.TEMPLATE?Be(w,R):D!==f.BODY&&D!==f.CAPTION&&D!==f.COL&&D!==f.COLGROUP&&D!==f.HTML&&D!==f.TBODY&&D!==f.TD&&D!==f.TFOOT&&D!==f.TH&&D!==f.THEAD&&D!==f.TR&&Br(w,R)}function Br(w,R){const D=w.fosterParentingEnabled;w.fosterParentingEnabled=!0,w._processTokenInBodyMode(R),w.fosterParentingEnabled=D}function H9(w,R){w.pendingCharacterTokens.push(R)}function V9(w,R){w.pendingCharacterTokens.push(R),w.hasNonWhitespacePendingCharacterToken=!0}function ta(w,R){let D=0;if(w.hasNonWhitespacePendingCharacterToken)for(;D0?(w.openElements.popUntilTagNamePopped(f.TEMPLATE),w.activeFormattingElements.clearToLastMarker(),w._popTmplInsertionMode(),w._resetInsertionMode(),w._processToken(R)):w.stopped=!0}function $G(w,R){R.tagName===f.HTML?Kt(w,R):a6(w,R)}function UG(w,R){R.tagName===f.HTML?w.fragmentContext||(w.insertionMode=ce):a6(w,R)}function a6(w,R){w.insertionMode=A,w._processToken(R)}function GG(w,R){const D=R.tagName;D===f.HTML?Kt(w,R):D===f.FRAMESET?w._insertElement(R,m.HTML):D===f.FRAME?(w._appendElement(R,m.HTML),R.ackSelfClosing=!0):D===f.NOFRAMES&&at(w,R)}function qG(w,R){R.tagName===f.FRAMESET&&!w.openElements.isRootHtmlElementCurrent()&&(w.openElements.pop(),!w.fragmentContext&&w.openElements.currentTagName!==f.FRAMESET&&(w.insertionMode=$))}function zG(w,R){const D=R.tagName;D===f.HTML?Kt(w,R):D===f.NOFRAMES&&at(w,R)}function jG(w,R){R.tagName===f.HTML&&(w.insertionMode=ye)}function WG(w,R){R.tagName===f.HTML?Kt(w,R):l6(w,R)}function l6(w,R){w.insertionMode=A,w._processToken(R)}function YG(w,R){const D=R.tagName;D===f.HTML?Kt(w,R):D===f.NOFRAMES&&at(w,R)}function KG(w,R){R.chars=d.REPLACEMENT_CHARACTER,w._insertCharacters(R)}function ZG(w,R){w._insertCharacters(R),w.framesetOk=!1}function XG(w,R){if(c.causesExit(R)&&!w.fragmentContext){for(;w.treeAdapter.getNamespaceURI(w.openElements.current)!==m.HTML&&!w._isIntegrationPoint(w.openElements.current);)w.openElements.pop();w._processToken(R)}else{const D=w._getAdjustedCurrentElement(),Ke=w.treeAdapter.getNamespaceURI(D);Ke===m.MATHML?c.adjustTokenMathMLAttrs(R):Ke===m.SVG&&(c.adjustTokenSVGTagName(R),c.adjustTokenSVGAttrs(R)),c.adjustTokenXMLAttrs(R),R.selfClosing?w._appendElement(R,Ke):w._insertElement(R,Ke),R.ackSelfClosing=!0}}function JG(w,R){for(let D=w.openElements.stackTop;D>0;D--){const Ke=w.openElements.items[D];if(w.treeAdapter.getNamespaceURI(Ke)===m.HTML){w._processToken(R);break}if(w.treeAdapter.getTagName(Ke).toLowerCase()===R.tagName){w.openElements.popUntilElementPopped(Ke);break}}}return Cg}var Ag,SN;function fkn(){if(SN)return Ag;SN=1;const t=ZF(),e=XF(),n=ob(),r=e1(),i=r.TAG_NAMES,o=r.NAMESPACES,s={treeAdapter:t},a=/&/g,l=/\u00a0/g,c=/"/g,u=//g;class h{constructor(m,T){this.options=e(s,T),this.treeAdapter=this.options.treeAdapter,this.html="",this.startNode=m}serialize(){return this._serializeChildNodes(this.startNode),this.html}_serializeChildNodes(m){const T=this.treeAdapter.getChildNodes(m);if(T)for(let Q=0,_=T.length;Q<_;Q++){const v=T[Q];this.treeAdapter.isElementNode(v)?this._serializeElement(v):this.treeAdapter.isTextNode(v)?this._serializeTextNode(v):this.treeAdapter.isCommentNode(v)?this._serializeCommentNode(v):this.treeAdapter.isDocumentTypeNode(v)&&this._serializeDocumentTypeNode(v)}}_serializeElement(m){const T=this.treeAdapter.getTagName(m),Q=this.treeAdapter.getNamespaceURI(m);if(this.html+="<"+T,this._serializeAttributes(m),this.html+=">",T!==i.AREA&&T!==i.BASE&&T!==i.BASEFONT&&T!==i.BGSOUND&&T!==i.BR&&T!==i.COL&&T!==i.EMBED&&T!==i.FRAME&&T!==i.HR&&T!==i.IMG&&T!==i.INPUT&&T!==i.KEYGEN&&T!==i.LINK&&T!==i.META&&T!==i.PARAM&&T!==i.SOURCE&&T!==i.TRACK&&T!==i.WBR){const _=T===i.TEMPLATE&&Q===o.HTML?this.treeAdapter.getTemplateContent(m):m;this._serializeChildNodes(_),this.html+=""}}_serializeAttributes(m){const T=this.treeAdapter.getAttrList(m);for(let Q=0,_=T.length;Q<_;Q++){const v=T[Q],y=h.escapeString(v.value,!0);this.html+=" ",v.namespace?v.namespace===o.XML?this.html+="xml:"+v.name:v.namespace===o.XMLNS?(v.name!=="xmlns"&&(this.html+="xmlns:"),this.html+=v.name):v.namespace===o.XLINK?this.html+="xlink:"+v.name:this.html+=v.prefix+":"+v.name:this.html+=v.name,this.html+='="'+y+'"'}}_serializeTextNode(m){const T=this.treeAdapter.getTextNodeContent(m),Q=this.treeAdapter.getParentNode(m);let _;Q&&this.treeAdapter.isElementNode(Q)&&(_=this.treeAdapter.getTagName(Q)),_===i.STYLE||_===i.SCRIPT||_===i.XMP||_===i.IFRAME||_===i.NOEMBED||_===i.NOFRAMES||_===i.PLAINTEXT||_===i.NOSCRIPT?this.html+=T:this.html+=h.escapeString(T,!1)}_serializeCommentNode(m){this.html+=""}_serializeDocumentTypeNode(m){const T=this.treeAdapter.getDocumentTypeNodeName(m);this.html+="<"+n.serializeContent(T,null,null)+">"}}return h.escapeString=function(f,m){return f=f.replace(a,"&").replace(l," "),m?f=f.replace(c,"""):f=f.replace(u,"<").replace(d,">"),f},Ag=h,Ag}var LN;function pkn(){if(LN)return K3;LN=1;const t=dkn(),e=fkn();return K3.parse=function(r,i){return new t(i).parse(r)},K3.parseFragment=function(r,i,o){return typeof r=="string"&&(o=i,i=r,r=null),new t(o).parseFragment(i,r)},K3.serialize=function(n,r){return new e(n,r).serialize()},K3}var Jt={},CN;function hkn(){if(CN)return Jt;CN=1;const t=ob(),{DOCUMENT_MODE:e}=e1(),n={element:1,text:3,cdata:4,comment:8},r={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"};class i{constructor(c){for(const u of Object.keys(c))this[u]=c[u]}get firstChild(){const c=this.children;return c&&c[0]||null}get lastChild(){const c=this.children;return c&&c[c.length-1]||null}get nodeType(){return n[this.type]||n.element}}Object.keys(r).forEach(l=>{const c=r[l];Object.defineProperty(i.prototype,l,{get:function(){return this[c]||null},set:function(u){return this[c]=u,u}})}),Jt.createDocument=function(){return new i({type:"root",name:"root",parent:null,prev:null,next:null,children:[],"x-mode":e.NO_QUIRKS})},Jt.createDocumentFragment=function(){return new i({type:"root",name:"root",parent:null,prev:null,next:null,children:[]})},Jt.createElement=function(l,c,u){const d=Object.create(null),h=Object.create(null),f=Object.create(null);for(let m=0;m"u"&&(l.attribs[d]=c[u].value,l["x-attribsNamespace"][d]=c[u].namespace,l["x-attribsPrefix"][d]=c[u].prefix)}},Jt.getFirstChild=function(l){return l.children[0]},Jt.getChildNodes=function(l){return l.children},Jt.getParentNode=function(l){return l.parent},Jt.getAttrList=function(l){const c=[];for(const u in l.attribs)c.push({name:u,value:l.attribs[u],namespace:l["x-attribsNamespace"][u],prefix:l["x-attribsPrefix"][u]});return c},Jt.getTagName=function(l){return l.name},Jt.getNamespaceURI=function(l){return l.namespace},Jt.getTextNodeContent=function(l){return l.data},Jt.getCommentNodeContent=function(l){return l.data},Jt.getDocumentTypeNodeName=function(l){return l["x-name"]},Jt.getDocumentTypeNodePublicId=function(l){return l["x-publicId"]},Jt.getDocumentTypeNodeSystemId=function(l){return l["x-systemId"]},Jt.isTextNode=function(l){return l.type==="text"},Jt.isCommentNode=function(l){return l.type==="comment"},Jt.isDocumentTypeNode=function(l){return l.type==="directive"&&l.name==="!doctype"},Jt.isElementNode=function(l){return!!l.attribs},Jt.setNodeSourceCodeLocation=function(l,c){l.sourceCodeLocation=c},Jt.getNodeSourceCodeLocation=function(l){return l.sourceCodeLocation},Jt.updateNodeSourceCodeLocation=function(l,c){l.sourceCodeLocation=Object.assign(l.sourceCodeLocation,c)},Jt}var AN;function JF(){if(AN)return x1;AN=1,Object.defineProperty(x1,"__esModule",{value:!0}),x1.render=x1.parse=void 0;var t=Ja,e=di(),n=pkn(),r=t.__importDefault(hkn());function i(s,a,l){var c={scriptingEnabled:typeof a.scriptingEnabled=="boolean"?a.scriptingEnabled:!0,treeAdapter:r.default,sourceCodeLocationInfo:a.sourceCodeLocationInfo},u=a.context;return l?n.parse(s,c):n.parseFragment(u,s,c)}x1.parse=i;function o(s){for(var a,l=("length"in s)?s:[s],c=0;c/;function l(c){return a.test(c)}return Qr.isHtml=l,Qr}var Kn={},NN;function Tkn(){if(NN)return Kn;NN=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.toggleClass=Kn.removeClass=Kn.addClass=Kn.hasClass=Kn.removeAttr=Kn.val=Kn.data=Kn.prop=Kn.attr=void 0;var t=Z0(),e=Gc(),n=Object.prototype.hasOwnProperty,r=/\s+/,i="data-",o={null:null,true:!0,false:!1},s=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,a=/^{[^]*}$|^\[[^]*]$/;function l(C,A,I){var N;if(!(!C||!e.isTag(C))){if((N=C.attribs)!==null&&N!==void 0||(C.attribs={}),!A)return C.attribs;if(n.call(C.attribs,A))return!I&&s.test(A)?A:C.attribs[A];if(C.name==="option"&&A==="value")return t.text(C.children);if(C.name==="input"&&(C.attribs.type==="radio"||C.attribs.type==="checkbox")&&A==="value")return"on"}}function c(C,A,I){I===null?v(C,A):C.attribs[A]=""+I}function u(C,A){if(typeof C=="object"||A!==void 0){if(typeof A=="function"){if(typeof C!="string")throw new Error("Bad combination of arguments.");return e.domEach(this,function(I,N){e.isTag(I)&&c(I,C,A.call(I,N,I.attribs[C]))})}return e.domEach(this,function(I){e.isTag(I)&&(typeof C=="object"?Object.keys(C).forEach(function(N){var P=C[N];c(I,N,P)}):c(I,C,A))})}return arguments.length>1?this:l(this[0],C,this.options.xmlMode)}Kn.attr=u;function d(C,A,I){if(!(!C||!e.isTag(C)))return A in C?C[A]:!I&&s.test(A)?l(C,A,!1)!==void 0:l(C,A,I)}function h(C,A,I,N){A in C?C[A]=I:c(C,A,!N&&s.test(A)?I?"":null:""+I)}function f(C,A){var I=this;if(typeof C=="string"&&A===void 0)switch(C){case"style":{var N=this.css(),P=Object.keys(N);return P.forEach(function(F,V){N[V]=F}),N.length=P.length,N}case"tagName":case"nodeName":{var O=this[0];return e.isTag(O)?O.name.toUpperCase():void 0}case"outerHTML":return this.clone().wrap("").parent().html();case"innerHTML":return this.html();default:return d(this[0],C,this.options.xmlMode)}if(typeof C=="object"||A!==void 0){if(typeof A=="function"){if(typeof C=="object")throw new Error("Bad combination of arguments.");return e.domEach(this,function(F,V){e.isTag(F)&&h(F,C,A.call(F,V,d(F,C,I.options.xmlMode)),I.options.xmlMode)})}return e.domEach(this,function(F){e.isTag(F)&&(typeof C=="object"?Object.keys(C).forEach(function(V){var U=C[V];h(F,V,U,I.options.xmlMode)}):h(F,C,A,I.options.xmlMode))})}}Kn.prop=f;function m(C,A,I){var N,P=C;(N=P.data)!==null&&N!==void 0||(P.data={}),typeof A=="object"?Object.assign(P.data,A):typeof A=="string"&&I!==void 0&&(P.data[A]=I)}function T(C,A){var I,N,P;A==null?(I=Object.keys(C.attribs).filter(function(U){return U.startsWith(i)}),N=I.map(function(U){return e.camelCase(U.slice(i.length))})):(I=[i+e.cssCase(A)],N=[A]);for(var O=0;O-1;){var P=N+C.length;if((N===0||r.test(I[N-1]))&&(P===I.length||r.test(I[P])))return!0}return!1})}Kn.hasClass=E;function x(C){if(typeof C=="function")return e.domEach(this,function(G,K){if(e.isTag(G)){var W=G.attribs.class||"";x.call([G],C.call(G,K,W))}});if(!C||typeof C!="string")return this;for(var A=C.split(r),I=this.length,N=0;N=0&&(O.splice(U,1),F=!0,V--)}F&&(P.attribs.class=O.join(" "))}})}Kn.removeClass=L;function M(C,A){if(typeof C=="function")return e.domEach(this,function(W,te){e.isTag(W)&&M.call([W],C.call(W,te,W.attribs.class||"",A),A)});if(!C||typeof C!="string")return this;for(var I=C.split(r),N=I.length,P=typeof A=="boolean"?A?1:-1:0,O=this.length,F=0;F=0&&K<0?U.push(I[G]):P<=0&&K>=0&&U.splice(K,1)}V.attribs.class=U.join(" ")}}return this}return Kn.toggleClass=M,Kn}var ft={},DN;function mkn(){if(DN)return ft;DN=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.addBack=ft.add=ft.end=ft.slice=ft.index=ft.toArray=ft.get=ft.eq=ft.last=ft.first=ft.has=ft.not=ft.is=ft.filterArray=ft.filter=ft.map=ft.each=ft.contents=ft.children=ft.siblings=ft.prevUntil=ft.prevAll=ft.prev=ft.nextUntil=ft.nextAll=ft.next=ft.closest=ft.parentsUntil=ft.parents=ft.parent=ft.find=void 0;var t=Ja,e=di(),n=t.__importStar(zF()),r=Gc(),i=Z0(),o=Uc(),s=o.DomUtils.uniqueSort,a=/^\s*[~+]/;function l(G){var K;if(!G)return this._make([]);var W=this.toArray();if(typeof G!="string"){var te=r.isCheerio(G)?G.toArray():[G];return this._make(te.filter(function($){return W.some(function(ce){return i.contains(ce,$)})}))}var de=a.test(G)?W:this.children().toArray(),X={context:W,root:(K=this._root)===null||K===void 0?void 0:K[0],xmlMode:this.options.xmlMode};return this._make(n.select(G,de,X))}ft.find=l;function c(G){return function(K){for(var W=[],te=1;te1&&$.length>1?W.reduce(function(ce,ye){return ye(ce)},$):$)}}}var u=c(function(G,K){for(var W,te=[],de=0;de0})}ft.has=L;function M(){return this.length>1?this._make(this[0]):this}ft.first=M;function C(){return this.length>0?this._make(this[this.length-1]):this}ft.last=C;function A(G){var K;return G=+G,G===0&&this.length<=1?this:(G<0&&(G=this.length+G),this._make((K=this[G])!==null&&K!==void 0?K:[]))}ft.eq=A;function I(G){return G==null?this.toArray():this[G<0?this.length+G:G]}ft.get=I;function N(){return Array.prototype.slice.call(this)}ft.toArray=N;function P(G){var K,W;return G==null?(K=this.parent().children(),W=this[0]):typeof G=="string"?(K=this._make(G),W=this[0]):(K=this,W=r.isCheerio(G)?G[0]:G),Array.prototype.indexOf.call(K,W)}ft.index=P;function O(G,K){return this._make(Array.prototype.slice.call(this,G,K))}ft.slice=O;function F(){var G;return(G=this.prevObject)!==null&&G!==void 0?G:this._make([])}ft.end=F;function V(G,K){var W=this._make(G,K),te=s(t.__spreadArray(t.__spreadArray([],this.get()),W.get()));return this._make(te)}ft.add=V;function U(G){return this.prevObject?this.add(G?this.prevObject.filter(G):this.prevObject):this}return ft.addBack=U,ft}var Vt={},IN;function gkn(){if(IN)return Vt;IN=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.clone=Vt.text=Vt.toString=Vt.html=Vt.empty=Vt.replaceWith=Vt.remove=Vt.insertBefore=Vt.before=Vt.insertAfter=Vt.after=Vt.wrapAll=Vt.unwrap=Vt.wrapInner=Vt.wrap=Vt.prepend=Vt.append=Vt.prependTo=Vt.appendTo=Vt._makeDomArray=void 0;var t=Ja,e=di(),n=di(),r=t.__importStar(sb()),i=Z0(),o=Gc(),s=Uc();function a(A,I){var N=this;return A==null?[]:o.isCheerio(A)?I?o.cloneDom(A.get()):A.get():Array.isArray(A)?A.reduce(function(P,O){return P.concat(N._makeDomArray(O,I))},[]):typeof A=="string"?r.default(A,this.options,!1).children:I?o.cloneDom([A]):[A]}Vt._makeDomArray=a;function l(A){return function(){for(var I=this,N=[],P=0;P-1&&(de.children.splice(X,1),O===de&&I>X&&U[0]--)}te.parent=O,te.prev&&(te.prev.next=(F=te.next)!==null&&F!==void 0?F:null),te.next&&(te.next.prev=(V=te.prev)!==null&&V!==void 0?V:null),te.prev=P[W-1]||G,te.next=P[W+1]||K}return G&&(G.next=P[0]),K&&(K.prev=P[P.length-1]),A.splice.apply(A,U)}function u(A){var I=o.isCheerio(A)?A:this._make(A);return I.append(this),this}Vt.appendTo=u;function d(A){var I=o.isCheerio(A)?A:this._make(A);return I.prepend(this),this}Vt.prependTo=d,Vt.append=l(function(A,I,N){c(I,I.length,0,A,N)}),Vt.prepend=l(function(A,I,N){c(I,0,0,A,N)});function h(A){return function(I){for(var N=this.length-1,P=this.parents().last(),O=0;O0?G:!1}function y(U){return U===b(1)}function b(U){return r[a+(U||1)]}function E(){var U=d.pop();return u=d[d.length-1],U}function x(U){return u=U,d.push(u),d.length}function L(U){var G=u;return d[d.length-1]=u=U,G}function M(U){if((U||1)==1)r[a]==` @@ -164,7 +164,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),W=V,K=U),G===void 0&&( l20.8-20.8c17.6-17.6,26.1-41.8,23.3-66.4l-7-63.5l40.3-40.3l16.2,16.2c6.7,6.7,17.6,6.7,24.3,0l72.6-72.6c3.2-3.2,5-7.6,5-12.1\r s-1.8-8.9-5-12.1L300.625,5.025z M400.425,250.025l-16.2-16.3c-6.4-6.4-17.8-6.4-24.3,0l-58.2,58.3c-3.7,3.7-5.5,8.8-4.9,14\r l7.9,71.6c1.6,14.3-3.3,28.3-13.5,38.4l-8.7,8.7l-217.1-217.1l8.7-8.6c10.1-10.1,24.2-15,38.4-13.5l71.7,7.9\r - c5.2,0.6,10.3-1.2,14-4.9l58.2-58.2c6.7-6.7,6.7-17.6,0-24.3l-16.3-16.3l48.3-48.3l160.3,160.3L400.425,250.025z`})],-1)]),8,lVn))],8,aVn),oe(s),g("div",null,[g("a",cVn,[e[16]||(e[16]=g("svg",{class:"w-5 h-5",viewBox:"0 0 16 16",fill:"currentColor"},[g("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})],-1)),i.starCount?(k(),H("span",uVn,le(i.starCount),1)):re("",!0)])]),g("div",dVn,[o.is_fun_mode?(k(),H("div",{key:0,title:"Fun mode is on, press to turn off",class:"w-10 h-10 cursor-pointer transform transition-all duration-300 hover:scale-110 active:scale-95 bg-yellow-400 rounded-full p-1 hover:bg-yellow-300 dark:hover:bg-yellow-500",onClick:e[2]||(e[2]=T=>o.fun_mode_off())},e[17]||(e[17]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"w-full h-full text-white animate-bounce"},[g("circle",{cx:"12",cy:"12",r:"10",stroke:"black","stroke-width":"1.5"}),g("path",{d:"M7 14c0 3 4 4 5 4s5-1 5-4M9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm8 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z",stroke:"black","stroke-width":"1.5"})],-1)]))):(k(),H("div",{key:1,title:"Fun mode is off, press to turn on",class:"w-10 h-10 cursor-pointer rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transform transition-all duration-300 hover:scale-110 active:scale-95 p-1",onClick:e[3]||(e[3]=T=>o.fun_mode_on())},e[18]||(e[18]=[Fl('',1)]))),g("div",fVn,[e[19]||(e[19]=g("div",{class:"absolute -top-2 left-1/2 transform -translate-x-1/2 border-solid border-4 border-transparent border-b-gray-900"},null,-1)),nt(" "+le(o.is_fun_mode?"Disable fun mode":"Enable fun mode"),1)])]),i.isDarkMode?(k(),H("div",{key:0,class:"text-2xl svg-button hover:text-primary duration-150 cursor-pointer w-50 h-50 ml-2",title:"Switch to Light theme",onClick:e[4]||(e[4]=T=>o.themeSwitch())},e[20]||(e[20]=[g("i",{"data-feather":"sun"},null,-1)]))):(k(),H("div",{key:1,class:"text-2xl svg-button hover:text-primary duration-150 cursor-pointer w-50 h-50 ml-2",title:"Switch to Dark theme",onClick:e[5]||(e[5]=T=>o.themeSwitch())},e[21]||(e[21]=[g("i",{"data-feather":"moon"},null,-1)]))),g("div",pVn,[g("button",{onClick:e[6]||(e[6]=(...T)=>o.toggleLanguageMenu&&o.toggleLanguageMenu(...T)),class:"flex items-center gap-2 px-3 py-2 rounded-md hover:bg-gray-100 transition-colors","aria-haspopup":"true","aria-expanded":i.isLanguageMenuVisible},[g("span",TVn,le(t.$store.state.language.slice(0,2)),1),(k(),H("svg",{class:je(["w-4 h-4 transition-transform",{"rotate-180":i.isLanguageMenuVisible}]),viewBox:"0 0 24 24"},e[22]||(e[22]=[g("path",{d:"M7 10l5 5 5-5z",fill:"currentColor"},null,-1)]),2))],8,hVn),oe(qi,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-150 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:He(()=>[i.isLanguageMenuVisible?(k(),H("div",mVn,[g("ul",gVn,[(k(!0),H(Ue,null,ot(o.languages,T=>(k(),H("li",{key:T,class:"group flex items-center px-3 py-2 hover:bg-gray-50"},[g("button",{onClick:Q=>o.deleteLanguage(T),class:"p-1 rounded-full opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 hover:bg-red-50","aria-label":`Delete ${T}`},e[23]||(e[23]=[g("svg",{class:"w-4 h-4",viewBox:"0 0 24 24"},[g("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 12z",fill:"currentColor"})],-1)]),8,_Vn),g("div",{onClick:Q=>o.selectLanguage(T),class:je(["flex-grow px-3 py-1 cursor-pointer rounded-md transition-colors",T===t.$store.state.language?"bg-blue-50 text-blue-600":"hover:bg-gray-100"]),role:"menuitem"},le(T),11,QVn)]))),128)),g("li",vVn,[J(g("input",{type:"text","onUpdate:modelValue":e[7]||(e[7]=T=>t.customLanguage=T),onKeyup:e[8]||(e[8]=Xr(he((...T)=>o.addCustomLanguage&&o.addCustomLanguage(...T),["prevent"]),["enter"])),placeholder:"Add new language...",class:"w-full px-3 py-2 rounded-md border border-gray-200 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 outline-none transition-all"},null,544),[[we,t.customLanguage]])])])],512)):re("",!0)]),_:1})]),g("div",yVn,[g("button",{onClick:e[9]||(e[9]=he((...T)=>o.toggleThemeDropDown&&o.toggleThemeDropDown(...T),["stop"])),class:"inline-flex items-center justify-between w-40 px-4 py-2 bg-gradient-to-r from-blue-500/10 to-purple-500/10 dark:from-blue-400/20 dark:to-purple-400/20 border border-blue-200 dark:border-blue-700 rounded-lg shadow-sm hover:from-blue-500/20 hover:to-purple-500/20 dark:hover:from-blue-400/30 dark:hover:to-purple-400/30 hover:border-blue-300 dark:hover:border-blue-600 hover:shadow-md focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all duration-300 ease-in-out backdrop-blur-sm"},[g("div",bVn,[e[24]||(e[24]=g("svg",{class:"w-5 h-5 flex-shrink-0",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01"})],-1)),g("span",EVn,le(i.currentTheme),1)]),(k(),H("svg",{class:je(["w-5 h-5 flex-shrink-0 text-blue-500 dark:text-blue-400 transition-transform duration-300",{"rotate-180":i.themeDropdownOpen}]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},e[25]||(e[25]=[g("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)]),2))]),oe(qi,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:He(()=>[i.themeDropdownOpen?(k(),H("div",xVn,[g("div",SVn,[(k(!0),H(Ue,null,ot(i.availableThemes,T=>(k(),H("a",{key:T,onClick:Q=>{o.loadTheme(T),i.currentTheme=T,i.themeDropdownOpen=!1},class:"flex items-center space-x-3 px-4 py-3 text-gray-700 dark:text-gray-200 hover:bg-gradient-to-r hover:from-blue-50 hover:to-purple-50 dark:hover:from-blue-900/30 dark:hover:to-purple-900/30 cursor-pointer transition-colors duration-150 group"},[e[26]||(e[26]=g("div",{class:"w-2 h-2 rounded-full bg-blue-400 group-hover:bg-blue-500 transition-colors duration-150"},null,-1)),g("span",CVn,le(T),1)],8,LVn))),128))])])):re("",!0)]),_:1})]),g("div",{class:"toolbar-button",onMouseleave:e[13]||(e[13]=(...T)=>o.hideInfosMenu&&o.hideInfosMenu(...T))},[g("div",AVn,[i.isInfosMenuVisible?(k(),H("div",{key:0,onMouseenter:e[11]||(e[11]=(...T)=>o.showInfosMenu&&o.showInfosMenu(...T)),class:"absolute context-menu m-0 p-0 z-50 top-full right-0 transform rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",wVn,[g("div",MVn,[o.isModelOK?(k(),H("div",OVn,e[27]||(e[27]=[g("svg",{class:"w-8 h-8",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M9 12L11 14L15 10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):(k(),H("div",RVn,e[28]||(e[28]=[g("svg",{class:"w-8 h-8",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M15 9L9 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M9 9L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))),o.isGenerating?(k(),H("div",DVn,e[30]||(e[30]=[g("svg",{class:"w-6 h-6 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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)]))):(k(),H("div",NVn,e[29]||(e[29]=[g("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 21v-4m0 0V5a2 2 0 012-2h6.5l1 1H21l-3 6 3 6h-8.5l-1-1H5a2 2 0 00-2 2zm9-13.5V9"})],-1)]))),o.isConnected?(k(),H("div",IVn,e[31]||(e[31]=[g("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1)]))):(k(),H("div",kVn,e[32]||(e[32]=[g("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})],-1)])))]),g("div",PVn,[oe(a,{onClick:t.restartProgram,icon:"power",title:"restart program"},null,8,["onClick"]),oe(a,{onClick:o.refreshPage,icon:"refresh-ccw",title:"refresh page"},null,8,["onClick"]),oe(a,{href:"/docs",icon:"file-text",title:"Fast API doc"})]),oe(l,{href:"https://github.com/ParisNeo/lollms-webui",icon:"github"}),oe(l,{href:"https://www.youtube.com/channel/UCJzrg0cyQV2Z30SQ1v2FdSQ",icon:"youtube"}),oe(l,{href:"https://x.com/ParisNeo_AI",icon:"x"}),oe(l,{href:"https://discord.com/channels/1092918764925882418",icon:"discord"}),g("div",HVn,[g("div",{onClick:e[10]||(e[10]=T=>o.showNews()),class:"text-2xl w-8 h-8 cursor-pointer transition-colors duration-300 svg-button"},e[33]||(e[33]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-full h-full"},[g("path",{d:"M19 20H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v1m2 13a2 2 0 0 1-2-2V7m2 13a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"})],-1)])),e[34]||(e[34]=g("span",{class:"absolute hidden group-hover:block text-xs rounded py-1 px-2 top-full left-1/2 transform -translate-x-1/2 mt-2 whitespace-nowrap"}," Lollms News ",-1))])])],32)):re("",!0),g("div",{onMouseenter:e[12]||(e[12]=(...T)=>o.showInfosMenu&&o.showInfosMenu(...T)),class:"infos-hover-area"},e[35]||(e[35]=[Fl('',1)]),32)])],32)])],34)],2),J(g("div",VVn,[oe(c,{ref:"progress",progress:t.progress_value,class:"w-full h-4"},null,8,["progress"]),g("p",BVn,le(t.loading_infos)+" ...",1)],512),[[Pt,t.progress_visibility]]),oe(u,{"prompt-text":"Enter the url to the page to use as discussion support",onOk:t.addWebpage,ref:"web_url_input_box"},null,8,["onOk"]),oe(d,{ref:"toast"},null,512),oe(h,{ref:"messageBox"},null,512),oe(f,{ref:"yesNoDialog",class:"z-20"},null,512),oe(m,{ref:"universalForm",class:"z-20"},null,512)],64)}const $Vn=yt(oVn,[["render",FVn],["__scopeId","data-v-d8eb826d"]]),UVn={class:"flex overflow-hidden flex-grow w-full"},GVn={__name:"App",setup(t){return(e,n)=>(k(),H("div",{class:je([e.currentTheme,"flex flex-col h-screen font-sans background-color text-slate-950 dark:bg-bg-dark dark:text-slate-50 w-full overflow-hidden"])},[oe($Vn),g("div",UVn,[oe(Bt(BH),null,{default:He(({Component:r})=>[(k(),wt(cz,null,[(k(),wt(Rd(r)))],1024))]),_:1})])],2))}},Yo=Object.create(null);Yo.open="0";Yo.close="1";Yo.ping="2";Yo.pong="3";Yo.message="4";Yo.upgrade="5";Yo.noop="6";const W5=Object.create(null);Object.keys(Yo).forEach(t=>{W5[Yo[t]]=t});const AQ={type:"error",data:"parser error"},f$=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",p$=typeof ArrayBuffer=="function",h$=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,fb=({type:t,data:e},n,r)=>f$&&e instanceof Blob?n?r(e):zN(e,r):p$&&(e instanceof ArrayBuffer||h$(e))?n?r(e):zN(new Blob([e]),r):r(Yo[t]+(e||"")),zN=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function jN(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Rg;function qVn(t,e){if(f$&&t.data instanceof Blob)return t.data.arrayBuffer().then(jN).then(e);if(p$&&(t.data instanceof ArrayBuffer||h$(t.data)))return e(jN(t.data));fb(t,!1,n=>{Rg||(Rg=new TextEncoder),e(Rg.encode(n))})}const WN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T4=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,n=t.length,r,i=0,o,s,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const c=new ArrayBuffer(e),u=new Uint8Array(c);for(r=0;r>4,u[i++]=(s&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c},jVn=typeof ArrayBuffer=="function",pb=(t,e)=>{if(typeof t!="string")return{type:"message",data:T$(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:WVn(t.substring(1),e)}:W5[n]?t.length>1?{type:W5[n],data:t.substring(1)}:{type:W5[n]}:AQ},WVn=(t,e)=>{if(jVn){const n=zVn(t);return T$(n,e)}else return{base64:!0,data:t}},T$=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},m$="",YVn=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{fb(o,!1,a=>{r[s]=a,++i===n&&e(r.join(m$))})})},KVn=(t,e)=>{const n=t.split(m$),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(n)})}})}let Ng;function n5(t){return t.reduce((e,n)=>e+n.length,0)}function r5(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let i=0;iMath.pow(2,21)-1){a.enqueue(AQ);break}i=u*Math.pow(2,32)+c.getUint32(4),r=3}else{if(n5(n)t){a.enqueue(AQ);break}}}})}const g$=4;function nr(t){if(t)return JVn(t)}function JVn(t){for(var e in nr.prototype)t[e]=nr.prototype[e];return t}nr.prototype.on=nr.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};nr.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};nr.prototype.off=nr.prototype.removeListener=nr.prototype.removeAllListeners=nr.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,i=0;iPromise.resolve().then(e):(e,n)=>n(e,0),ki=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),eBn="arraybuffer";function _$(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const tBn=ki.setTimeout,nBn=ki.clearTimeout;function g9(t,e){e.useNativeTimers?(t.setTimeoutFn=tBn.bind(ki),t.clearTimeoutFn=nBn.bind(ki)):(t.setTimeoutFn=ki.setTimeout.bind(ki),t.clearTimeoutFn=ki.clearTimeout.bind(ki))}const rBn=1.33;function iBn(t){return typeof t=="string"?oBn(t):Math.ceil((t.byteLength||t.size)*rBn)}function oBn(t){let e=0,n=0;for(let r=0,i=t.length;r=57344?n+=3:(r++,n+=4);return n}function Q$(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function sBn(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function aBn(t){let e={},n=t.split("&");for(let r=0,i=n.length;r{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};KVn(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,YVn(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Q$()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}let v$=!1;try{v$=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const uBn=v$;function dBn(){}class fBn extends cBn{constructor(e){if(super(e),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}let kl=class Y5 extends nr{constructor(e,n,r){super(),this.createRequest=e,g9(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var e;const n=_$(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Y5.requestsCount++,Y5.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=dBn,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Y5.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};kl.requestsCount=0;kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",YN);else if(typeof addEventListener=="function"){const t="onpagehide"in ki?"pagehide":"unload";addEventListener(t,YN,!1)}}function YN(){for(let t in kl.requests)kl.requests.hasOwnProperty(t)&&kl.requests[t].abort()}const pBn=function(){const t=y$({xdomain:!1});return t&&t.responseType!==null}();class hBn extends fBn{constructor(e){super(e);const n=e&&e.forceBase64;this.supportsBinary=pBn&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new kl(y$,this.uri(),e)}}function y$(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||uBn))return new XMLHttpRequest}catch{}if(!e)try{return new ki[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const b$=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class TBn extends hb{get name(){return"websocket"}doOpen(){const e=this.uri(),n=this.opts.protocols,r=b$?{}:_$(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n{try{this.doWrite(r,o)}catch{}i&&m9(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Q$()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}}const Dg=ki.WebSocket||ki.MozWebSocket;class mBn extends TBn{createSocket(e,n,r){return b$?new Dg(e,n,r):n?new Dg(e,n):new Dg(e)}doWrite(e,n){this.ws.send(n)}}class gBn extends hb{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const n=XVn(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=ZVn();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n{i&&m9(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const _Bn={websocket:mBn,webtransport:gBn,polling:hBn},QBn=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vBn=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function wQ(t){if(t.length>8e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=QBn.exec(t||""),o={},s=14;for(;s--;)o[vBn[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=yBn(o,o.path),o.queryKey=bBn(o,o.query),o}function yBn(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function bBn(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}const MQ=typeof addEventListener=="function"&&typeof removeEventListener=="function",K5=[];MQ&&addEventListener("offline",()=>{K5.forEach(t=>t())},!1);class Ia extends nr{constructor(e,n){if(super(),this.binaryType=eBn,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){const r=wQ(e);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=wQ(n.host).host);g9(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=aBn(this.opts.query)),MQ&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},K5.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=g$,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Ia.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ia.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,m9(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,r){return this._sendPacket("message",e,n,r),this}send(e,n,r){return this._sendPacket("message",e,n,r),this}_sendPacket(e,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:e,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(Ia.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),MQ&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=K5.indexOf(this._offlineEventListener);r!==-1&&K5.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ia.protocol=g$;class EBn extends Ia{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ia.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function o(){r||(r=!0,u(),n.close(),n=null)}const s=d=>{const h=new Error("probe error: "+d);h.transport=n.name,o(),this.emitReserved("upgradeError",h)};function a(){s("transport closed")}function l(){s("socket closed")}function c(d){n&&d.name!==n.name&&o()}const u=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const n=[];for(let r=0;r_Bn[i]).filter(i=>!!i)),super(e,r)}};function SBn(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=wQ(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const LBn=typeof ArrayBuffer=="function",CBn=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,E$=Object.prototype.toString,ABn=typeof Blob=="function"||typeof Blob<"u"&&E$.call(Blob)==="[object BlobConstructor]",wBn=typeof File=="function"||typeof File<"u"&&E$.call(File)==="[object FileConstructor]";function Tb(t){return LBn&&(t instanceof ArrayBuffer||CBn(t))||ABn&&t instanceof Blob||wBn&&t instanceof File}function Z5(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n=0&&t.num{delete this.acks[e];for(let a=0;a{this.io.clearTimeoutFn(o),n.apply(this,a)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...n){return new Promise((r,i)=>{const o=(s,a)=>s?i(s):r(a);o.withError=!0,n.push(o),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:tn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case tn.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tn.EVENT:case tn.BINARY_EVENT:this.onevent(e);break;case tn.ACK:case tn.BINARY_ACK:this.onack(e);break;case tn.DISCONNECT:this.ondisconnect();break;case tn.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:tn.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}qc.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0};qc.prototype.reset=function(){this.attempts=0};qc.prototype.setMin=function(t){this.ms=t};qc.prototype.setMax=function(t){this.max=t};qc.prototype.setJitter=function(t){this.jitter=t};class NQ extends nr{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,g9(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new qc({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||kBn;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new xBn(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=oo(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},s=oo(n,"error",o);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(oo(e,"ping",this.onping.bind(this)),oo(e,"data",this.ondata.bind(this)),oo(e,"error",this.onerror.bind(this)),oo(e,"close",this.onclose.bind(this)),oo(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){m9(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new x$(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;re()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const e4={};function X5(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=SBn(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=e4[i]&&o in e4[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let l;return a?l=new NQ(r,e):(e4[i]||(e4[i]=new NQ(r,e)),l=e4[i]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(X5,{Manager:NQ,Socket:x$,io:X5,connect:X5});const S$="/";console.log(S$);const tt=new X5(S$,{reconnection:!0,reconnectionAttempts:10,reconnectionDelay:1e3}),HBn={props:{value:String,inputType:{type:String,default:"text",validator:t=>["text","email","password","file","path","integer","float"].includes(t)},fileAccept:String},data(){return{inputValue:this.value,placeholderText:this.getPlaceholderText()}},watch:{value(t){console.log("Changing value to ",t),this.inputValue=t}},mounted(){ze(()=>{Ze.replace()}),console.log("Changing value to ",this.value),this.inputValue=this.value},methods:{handleSliderInput(t){this.inputValue=t.target.value,this.$emit("input",t.target.value)},getPlaceholderText(){switch(this.inputType){case"text":return"Enter text here";case"email":return"Enter your email";case"password":return"Enter your password";case"file":case"path":return"Choose a file";case"integer":return"Enter an integer";case"float":return"Enter a float";default:return"Enter value here"}},handleInput(t){if(this.inputType==="integer"){const e=t.target.value.replace(/[^0-9]/g,"");this.inputValue=e}console.log("handling input : ",t.target.value),this.$emit("input",t.target.value)},async pasteFromClipboard(){try{const t=await navigator.clipboard.readText();this.handleClipboardData(t)}catch(t){console.error("Failed to read from clipboard:",t)}},handlePaste(t){const e=t.clipboardData.getData("text");this.handleClipboardData(e)},handleClipboardData(t){switch(this.inputType){case"email":this.inputValue=this.isValidEmail(t)?t:"";break;case"password":this.inputValue=t;break;case"file":case"path":this.inputValue="";break;case"integer":this.inputValue=this.parseInteger(t);break;case"float":this.inputValue=this.parseFloat(t);break;default:this.inputValue=t;break}},isValidEmail(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)},parseInteger(t){const e=parseInt(t);return isNaN(e)?"":e},parseFloat(t){const e=parseFloat(t);return isNaN(e)?"":e},openFileInput(){this.$refs.fileInput.click()},handleFileInputChange(t){const e=t.target.files[0];e&&(this.inputValue=e.name)}}},VBn={class:"flex items-center space-x-2"},BBn=["value","type","placeholder"],FBn=["value","min","max"],$Bn=["accept"];function UBn(t,e,n,r,i,o){return k(),H("div",VBn,[t.useSlider?(k(),H("input",{key:1,type:"range",value:parseInt(i.inputValue),min:t.minSliderValue,max:t.maxSliderValue,onInput:e[2]||(e[2]=(...s)=>o.handleSliderInput&&o.handleSliderInput(...s)),class:"flex-1 px-4 py-2 text-lg border dark:bg-gray-600 border-gray-300 rounded-md focus:outline-none focus:ring focus:border-blue-500"},null,40,FBn)):(k(),H("input",{key:0,value:i.inputValue,type:n.inputType,placeholder:i.placeholderText,onInput:e[0]||(e[0]=(...s)=>o.handleInput&&o.handleInput(...s)),onPaste:e[1]||(e[1]=(...s)=>o.handlePaste&&o.handlePaste(...s)),class:"flex-1 px-4 py-2 text-lg dark:bg-gray-600 border border-gray-300 rounded-md focus:outline-none focus:ring focus:border-blue-500"},null,40,BBn)),g("button",{onClick:e[3]||(e[3]=(...s)=>o.pasteFromClipboard&&o.pasteFromClipboard(...s)),class:"p-2 bg-blue-500 dark:bg-gray-600 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring focus:border-blue-300"},e[6]||(e[6]=[g("i",{"data-feather":"clipboard"},null,-1)])),n.inputType==="file"?(k(),H("button",{key:2,onClick:e[4]||(e[4]=(...s)=>o.openFileInput&&o.openFileInput(...s)),class:"p-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring focus:border-blue-300"},e[7]||(e[7]=[g("i",{"data-feather":"upload"},null,-1)]))):re("",!0),n.inputType==="file"?(k(),H("input",{key:3,ref:"fileInput",type:"file",style:{display:"none"},accept:n.fileAccept,onChange:e[5]||(e[5]=(...s)=>o.handleFileInputChange&&o.handleFileInputChange(...s))},null,40,$Bn)):re("",!0)])}const gb=yt(HBn,[["render",UBn]]),GBn={name:"TokensHighlighter",props:{namedTokens:{type:Object,required:!0}},data(){return{colors:["#FF6633","#FFB399","#FF33FF","#FFFF99","#00B3E6","#E6B333","#3366E6","#999966","#99FF99","#B34D4D","#80B300","#809900","#E6B3B3","#6680B3","#66991A","#FF99E6","#CCFF1A","#FF1A66","#E6331A","#33FFCC","#66994D","#B366CC","#4D8000","#B33300","#CC80CC","#66664D","#991AFF","#E666FF","#4DB3FF","#1AB399","#E666B3","#33991A","#CC9999","#B3B31A","#00E680","#4D8066","#809980","#E6FF80","#1AFF33","#999933","#FF3380","#CCCC00","#66E64D","#4D80CC","#9900B3","#E64D66","#4DB380","#FF4D4D","#99E6E6","#6666FF"]}}},qBn={class:"w-full"},zBn={class:"break-words"},jBn={class:"break-words mt-2"},WBn={class:"mt-4"};function YBn(t,e,n,r,i,o){return k(),H("div",qBn,[g("div",zBn,[(k(!0),H(Ue,null,ot(n.namedTokens,(s,a)=>(k(),H("span",{key:a},[g("span",{class:"inline-block whitespace-pre-wrap",style:xn({backgroundColor:i.colors[a%i.colors.length]})},le(s[0]),5)]))),128))]),g("div",jBn,[(k(!0),H(Ue,null,ot(n.namedTokens,(s,a)=>(k(),H("span",{key:a},[g("span",{class:"inline-block px-1 whitespace-pre-wrap",style:xn({backgroundColor:i.colors[a%i.colors.length]})},le(s[1]),5)]))),128))]),g("div",WBn,[g("strong",null,"Total Tokens: "+le(n.namedTokens.length),1)])])}const KBn=yt(GBn,[["render",YBn]]),ZBn={name:"ChatBarButton"};function XBn(t,e,n,r,i,o){return k(),H("button",DP({class:"svg-button"},t.$attrs,Qz(t.$listeners)),[er(t.$slots,"icon"),er(t.$slots,"default")],16)}const _9=yt(ZBn,[["render",XBn]]),JBn={props:{is_subcard:{type:Boolean,default:!1},is_shrunk:{type:Boolean,default:!1},title:{type:String,default:""},isHorizontal:{type:Boolean,default:!1},cardWidth:{type:String,default:"w-3/4"},disableHoverAnimation:{type:Boolean,default:!0},disableFocus:{type:Boolean,default:!1}},data(){return{shrink:this.is_shrunk,isHovered:!1,isActive:!1}},computed:{cardClass(){return["bg-gray-50","border","border-gray-300","text-gray-900","text-sm","rounded-lg","focus:ring-blue-500","focus:border-blue-500","w-full","p-2.5","dark:bg-gray-500","dark:border-gray-600","dark:placeholder-gray-400","dark:text-white","dark:focus:ring-blue-500","dark:focus:border-blue-500",{"cursor-pointer":!this.isActive&&!this.disableFocus,"w-auto":!this.isActive}]},cardWidthClass(){return this.isActive?this.cardWidth:""}},methods:{toggleCard(){this.disableFocus||(this.isActive=!this.isActive)}}},eFn={key:1,class:"flex flex-wrap"},tFn={key:2,class:"mb-2"};function nFn(t,e,n,r,i,o){return k(),H("div",null,[i.isActive?(k(),H("div",{key:0,class:"overlay",onClick:e[0]||(e[0]=(...s)=>o.toggleCard&&o.toggleCard(...s))})):re("",!0),J(g("div",{class:je(["border-blue-300 rounded-lg shadow-lg p-2",o.cardWidthClass,"m-2",{subcard:n.is_subcard},{"bg-white dark:bg-gray-900":!n.is_subcard},{hovered:!n.disableHoverAnimation&&i.isHovered,active:i.isActive}]),onMouseenter:e[2]||(e[2]=s=>i.isHovered=!0),onMouseleave:e[3]||(e[3]=s=>i.isHovered=!1),onClick:e[4]||(e[4]=he((...s)=>o.toggleCard&&o.toggleCard(...s),["self"])),style:xn({cursor:this.disableFocus?"":"pointer"})},[n.title?(k(),H("div",{key:0,onClick:e[1]||(e[1]=s=>i.shrink=!0),class:je([{"text-center p-2 m-2 bg-gray-200":!n.is_subcard},"bg-gray-100 dark:bg-gray-500 rounded-lg pl-2 pr-2 mb-2 font-bold cursor-pointer"])},le(n.title),3)):re("",!0),n.isHorizontal?(k(),H("div",eFn,[er(t.$slots,"default")])):(k(),H("div",tFn,[er(t.$slots,"default")]))],38),[[Pt,i.shrink===!1]]),n.is_subcard?J((k(),H("div",{key:1,onClick:e[5]||(e[5]=s=>i.shrink=!1),class:"bg-white text-center text-xl bold dark:bg-gray-500 border-blue-300 rounded-lg shadow-lg p-2 h-10 cursor-pointer m-2"},le(n.title),513)),[[Pt,i.shrink===!0]]):J((k(),H("div",{key:2,onClick:e[6]||(e[6]=s=>i.shrink=!1),class:"bg-white text-center text-2xl dark:bg-gray-500 border-2 border-blue-300 rounded-lg shadow-lg p-0 h-7 cursor-pointer hover:h-8 hover:bg-blue-300"}," + ",512)),[[Pt,i.shrink===!0]])])}const Q9=yt(JBn,[["render",nFn]]),L$="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%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%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%203H4c-1.103%200-2%20.897-2%202v14c0%201.103.897%202%202%202h16c1.103%200%202-.897%202-2V5c0-1.103-.897-2-2-2zM4%2019V7h16l.002%2012H4z'/%3e%3cpath%20d='M9.293%209.293%205.586%2013l3.707%203.707%201.414-1.414L8.414%2013l2.293-2.293zm5.414%200-1.414%201.414L15.586%2013l-2.293%202.293%201.414%201.414L18.414%2013z'/%3e%3c/svg%3e",C$="/assets/python_block-Bt12VGEE.png",A$="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.3.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20630%20630'%20style='enable-background:new%200%200%20630%20630;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23EDBF4A;}%20.st1{fill:%230C0C0C;}%20%3c/style%3e%3crect%20class='st0'%20width='630'%20height='630'/%3e%3cpath%20class='st1'%20d='M423.2,492.2c12.7,20.7,29.2,36,58.4,36c24.5,0,40.2-12.3,40.2-29.2c0-20.3-16.1-27.5-43.1-39.3l-14.8-6.4%20c-42.7-18.2-71.1-41-71.1-89.2c0-44.4,33.8-78.2,86.7-78.2c37.6,0,64.7,13.1,84.2,47.4l-46.1,29.6c-10.1-18.2-21.1-25.4-38.1-25.4%20c-17.3,0-28.3,11-28.3,25.4c0,17.8,11,25,36.4,36l14.8,6.3c50.3,21.6,78.7,43.6,78.7,93c0,53.3-41.9,82.5-98.1,82.5%20c-55,0-90.5-26.2-107.9-60.5L423.2,492.2z%20M214.1,497.3c9.3,16.5,17.8,30.5,38.1,30.5c19.5,0,31.7-7.6,31.7-37.2V289.3h59.2v202.1%20c0,61.3-35.9,89.2-88.4,89.2c-47.4,0-74.9-24.5-88.8-54.1L214.1,497.3z'/%3e%3c/svg%3e",w$="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAOeSURBVGhD7ZhNaBNBGIZHW/EPbSioRSpi0FRpVdRSjQfxkFilB5UciuChIL0JLaKIhR5KIYKIiBSF0mLVS7AIavUgPQjiT4+KB0EP3gwS8VDBgj8d33d2ZrNJt2lCppKWfeBh5pvdncyXmZ3sZokQQsIFz1JdLni8M8L6QkSNf9HMSJBIpREkUmkEiVQaQSKVRpCIH8lkUtbW1sre3l7fB9FoNCrD4fC8PaSyYyudNzU1yZGRkYJ9dXV1yUQiYTMZNX6rM5LJZERHR0fBh0/MmJDSZh4OVhOZmprStf+P1UQmJyd1zaGvr09NuxM5VFVViYmJCR3Zw1oiPT09koP00tjYKNrb23XkEIlERHV1tY7sMuNbK5XR0VGJwcnBwcGi+uns7Cz7Mz24fVnpdGhoSDY0NBTbjxweHi77MzXu+N2KBebsh7PW0tJi6/OIGr/Vm72mpkbXssTj8ZxBp9NpUV9fryN7WE0kn1QqJcfHx3U0v1hNJBQKqXtFh2JsbEx0d3frKMv09LSu2UWtMadaHm1tberxQ+9Koq6uLqff1tZW2dzcLPXviy3c8bsVG/T398+6I8ViMTkwMGDtszRq/MEfdJVGkEilESRSaZSSyCa43anmsAPGII/7wWd7nnMEbmaDD2G41anmsA76tfui9mGnWpAPkOftVpEQuyDfkMz19Bv0cg56j9NP8AQ07IXm2Es2eHgK2b5RRf6Ya7OVOchP5D1kfA0m4GX4CxouQR7/A6/DC/CObqNRSA5A00Y7oeG/JMJBM65TUS7rIV/gefw4GzzchWx/rKJsIu90+REaik6knJv9hy5vw4NO1WU/XAG/w0ds8MABk326NLyGL+A2eJYNpVBOIhd1eRS+gs/hTjYAc4M+06WX+7rkt7zKqbrc0OV5WNIjUzmJDME9MKUiIQ5DvnyshOZfCL/+l+uSz/I/narLA8gvhLsb77miKScR8haegqfhb7gBcoa4M5G4Lr0069Kck88VXZ6B+TNWEHWzONWCpCHPM78lZhkZ3kAePwa36DpthQYulwxke5INwNzst1Tk8ASa66mVXYtLgFPOc7iVroUtOh6F3Gbv6fgLXAPJVWj65vU3IW9oxl+hWWJ+iRyC5lpqJZHP0JxjbnBO+UP4F5pjXNsnoRf+IJqZpNySmRSXoMEvEeL9Iqwkwm20Cfqt12UwAleraHZCcLbHEzLz75fiUeMP3hArjUWTiHdpLWgWyYwI8Q8rrSjH5vAr6AAAAABJRU5ErkJggg==",M$="/assets/cpp_block-kkmuBJ_E.png",O$="/assets/html5_block-beC_-Wtz.png",R$="/assets/LaTeX_block-BNFNi2yr.png",N$="/assets/bash_block-DZNRrwlz.png",rFn="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTAgNTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQogIDxjaXJjbGUgY3g9IjI1IiBjeT0iMjUiIHI9IjI1IiBmaWxsPSJkZWVwc2t5Ymx1ZSIvPg0KICA8dGV4dCB4PSIyNSIgeT0iMzciIGZvbnQtc2l6ZT0iMzYiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IndoaXRlIiBmb250LXdlaWdodD0iYm9sZCI+VDwvdGV4dD4NCjwvc3ZnPg0K",iFn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='red'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3ccircle%20cx='12'%20cy='12'%20r='10'%3e%3c/circle%3e%3cpath%20d='M16%2016s-1.5-2-4-2-4%202-4%202'%20stroke='currentColor'%3e%3c/path%3e%3cline%20x1='9'%20y1='9'%20x2='15'%20y2='15'%20stroke='currentColor'%3e%3c/line%3e%3c/svg%3e",oFn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3ccircle%20cx='12'%20cy='12'%20r='10'%3e%3c/circle%3e%3cpath%20d='M16%2016s-1.5-2-4-2-4%202-4%202'%3e%3c/path%3e%3cline%20x1='9'%20y1='9'%20x2='15'%20y2='15'%3e%3c/line%3e%3c/svg%3e",sFn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%3e%3ccircle%20cx='25'%20cy='25'%20r='24'%20fill='white'%20stroke='black'%20stroke-width='2'/%3e%3ccircle%20id='heartbeat'%20cx='25'%20cy='25'%20r='20'%20fill='red'%3e%3canimate%20attributeName='r'%20dur='1s'%20repeatCount='indefinite'%20keyTimes='0;0.25;0.5;0.75;1'%20values='20;24;20;22;20'/%3e%3c/circle%3e%3c/svg%3e",aFn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%3e%3ccircle%20cx='25'%20cy='25'%20r='24'%20fill='white'%20stroke='black'%20stroke-width='2'/%3e%3ccircle%20cx='25'%20cy='25'%20r='20'%20fill='red'/%3e%3c/svg%3e",D$="data:image/svg+xml,%3csvg%20viewBox='0%200%2050%2050'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20transform='translate(25,25)'%3e%3ccircle%20cx='0'%20cy='-15'%20r='3'%20fill='%23f00'%3e%3canimateTransform%20attributeName='transform'%20type='rotate'%20from='0'%20to='360'%20dur='1s'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3ccircle%20cx='0'%20cy='-15'%20r='3'%20fill='%230f0'%20transform='rotate(90)'%3e%3canimateTransform%20attributeName='transform'%20type='rotate'%20from='0'%20to='360'%20dur='1.2s'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3ccircle%20cx='0'%20cy='-15'%20r='3'%20fill='%2300f'%20transform='rotate(180)'%3e%3canimateTransform%20attributeName='transform'%20type='rotate'%20from='0'%20to='360'%20dur='1.4s'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3ccircle%20cx='0'%20cy='-15'%20r='3'%20fill='%23ff0'%20transform='rotate(270)'%3e%3canimateTransform%20attributeName='transform'%20type='rotate'%20from='0'%20to='360'%20dur='1.6s'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3c/g%3e%3c/svg%3e",lFn={props:{icon:{type:String,required:!0},title:{type:String,required:!0}},computed:{iconPath(){return this.getIconPath()}},methods:{getIconPath(){switch(this.icon){case"x":return'';case"check":return'';case"code":return'';case"python":return'';case"js":return'JS';case"typescript":return'TS';case"braces":return'';case"cplusplus":case"c++":return'C++';case"csharp":return'C#';case"go":return'Go';case"r-project":return'R';case"rust":return'';case"swift":return'';case"kotlin":return'';case"java":return'';case"html5":return'';case"css3":return'';case"vuejs":return'';case"react":return'';case"angular":return'';case"xml":return'';case"json":return'';case"yaml":return'';case"markdown":return'';case"latex":return'TEX';case"bash":return'';case"powershell":return'';case"perl":return'';case"mermaid":return'';case"graphviz":return'';case"plantuml":return'';case"sql":return'';case"mongodb":return'';case"mathFunction":return'';case"terminal":return'';case"edit":return'';case"copy":return'';case"send":return'';case"globe":return'';case"fastForward":return'';case"sendSimple":return'';default:return""}}}},cFn=["title"],uFn={class:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},dFn=["innerHTML"];function fFn(t,e,n,r,i,o){return k(),H("button",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:n.title,onClick:e[0]||(e[0]=s=>t.$emit("click"))},[(k(),H("svg",uFn,[g("g",{innerHTML:o.iconPath},null,8,dFn)]))],8,cFn)}const _b=yt(lFn,[["render",fFn]]);var li="top",Zi="bottom",Xi="right",ci="left",Qb="auto",X0=[li,Zi,Xi,ci],oc="start",r0="end",pFn="clippingParents",I$="viewport",t4="popper",hFn="reference",ZN=X0.reduce(function(t,e){return t.concat([e+"-"+oc,e+"-"+r0])},[]),k$=[].concat(X0,[Qb]).reduce(function(t,e){return t.concat([e,e+"-"+oc,e+"-"+r0])},[]),TFn="beforeRead",mFn="read",gFn="afterRead",_Fn="beforeMain",QFn="main",vFn="afterMain",yFn="beforeWrite",bFn="write",EFn="afterWrite",xFn=[TFn,mFn,gFn,_Fn,QFn,vFn,yFn,bFn,EFn];function Ko(t){return t?(t.nodeName||"").toLowerCase():null}function Si(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function h2(t){var e=Si(t).Element;return t instanceof e||t instanceof Element}function ji(t){var e=Si(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function vb(t){if(typeof ShadowRoot>"u")return!1;var e=Si(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function SFn(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!ji(o)||!Ko(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function LFn(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!ji(i)||!Ko(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const CFn={name:"applyStyles",enabled:!0,phase:"write",fn:SFn,effect:LFn,requires:["computeStyles"]};function jo(t){return t.split("-")[0]}var K1=Math.max,Xu=Math.min,sc=Math.round;function DQ(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function P$(){return!/^((?!chrome|android).)*safari/i.test(DQ())}function ac(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&ji(t)&&(i=t.offsetWidth>0&&sc(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&sc(r.height)/t.offsetHeight||1);var s=h2(t)?Si(t):window,a=s.visualViewport,l=!P$()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/o,d=r.width/i,h=r.height/o;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function yb(t){var e=ac(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function H$(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&vb(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function $s(t){return Si(t).getComputedStyle(t)}function AFn(t){return["table","td","th"].indexOf(Ko(t))>=0}function t1(t){return((h2(t)?t.ownerDocument:t.document)||window.document).documentElement}function v9(t){return Ko(t)==="html"?t:t.assignedSlot||t.parentNode||(vb(t)?t.host:null)||t1(t)}function XN(t){return!ji(t)||$s(t).position==="fixed"?null:t.offsetParent}function wFn(t){var e=/firefox/i.test(DQ()),n=/Trident/i.test(DQ());if(n&&ji(t)){var r=$s(t);if(r.position==="fixed")return null}var i=v9(t);for(vb(i)&&(i=i.host);ji(i)&&["html","body"].indexOf(Ko(i))<0;){var o=$s(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function J0(t){for(var e=Si(t),n=XN(t);n&&AFn(n)&&$s(n).position==="static";)n=XN(n);return n&&(Ko(n)==="html"||Ko(n)==="body"&&$s(n).position==="static")?e:n||wFn(t)||e}function bb(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function L4(t,e,n){return K1(t,Xu(e,n))}function MFn(t,e,n){var r=L4(t,e,n);return r>n?n:r}function V$(){return{top:0,right:0,bottom:0,left:0}}function B$(t){return Object.assign({},V$(),t)}function F$(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var OFn=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,B$(typeof e!="number"?e:F$(e,X0))};function RFn(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=jo(n.placement),l=bb(a),c=[ci,Xi].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var d=OFn(i.padding,n),h=yb(o),f=l==="y"?li:ci,m=l==="y"?Zi:Xi,T=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],Q=s[l]-n.rects.reference[l],_=J0(o),v=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,y=T/2-Q/2,b=d[f],E=v-h[u]-d[m],x=v/2-h[u]/2+y,L=L4(b,x,E),M=l;n.modifiersData[r]=(e={},e[M]=L,e.centerOffset=L-x,e)}}function NFn(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||H$(e.elements.popper,i)&&(e.elements.arrow=i))}const DFn={name:"arrow",enabled:!0,phase:"main",fn:RFn,effect:NFn,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function lc(t){return t.split("-")[1]}var IFn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kFn(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:sc(n*i)/i||0,y:sc(r*i)/i||0}}function JN(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,h=s.x,f=h===void 0?0:h,m=s.y,T=m===void 0?0:m,Q=typeof u=="function"?u({x:f,y:T}):{x:f,y:T};f=Q.x,T=Q.y;var _=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),y=ci,b=li,E=window;if(c){var x=J0(n),L="clientHeight",M="clientWidth";if(x===Si(n)&&(x=t1(n),$s(x).position!=="static"&&a==="absolute"&&(L="scrollHeight",M="scrollWidth")),x=x,i===li||(i===ci||i===Xi)&&o===r0){b=Zi;var C=d&&x===E&&E.visualViewport?E.visualViewport.height:x[L];T-=C-r.height,T*=l?1:-1}if(i===ci||(i===li||i===Zi)&&o===r0){y=Xi;var A=d&&x===E&&E.visualViewport?E.visualViewport.width:x[M];f-=A-r.width,f*=l?1:-1}}var I=Object.assign({position:a},c&&IFn),N=u===!0?kFn({x:f,y:T},Si(n)):{x:f,y:T};if(f=N.x,T=N.y,l){var P;return Object.assign({},I,(P={},P[b]=v?"0":"",P[y]=_?"0":"",P.transform=(E.devicePixelRatio||1)<=1?"translate("+f+"px, "+T+"px)":"translate3d("+f+"px, "+T+"px, 0)",P))}return Object.assign({},I,(e={},e[b]=v?T+"px":"",e[y]=_?f+"px":"",e.transform="",e))}function PFn(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:jo(e.placement),variation:lc(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,JN(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,JN(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const HFn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:PFn,data:{}};var i5={passive:!0};function VFn(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=Si(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,i5)}),a&&l.addEventListener("resize",n.update,i5),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,i5)}),a&&l.removeEventListener("resize",n.update,i5)}}const BFn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:VFn,data:{}};var FFn={left:"right",right:"left",bottom:"top",top:"bottom"};function J5(t){return t.replace(/left|right|bottom|top/g,function(e){return FFn[e]})}var $Fn={start:"end",end:"start"};function eD(t){return t.replace(/start|end/g,function(e){return $Fn[e]})}function Eb(t){var e=Si(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function xb(t){return ac(t1(t)).left+Eb(t).scrollLeft}function UFn(t,e){var n=Si(t),r=t1(t),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=P$();(c||!c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+xb(t),y:l}}function GFn(t){var e,n=t1(t),r=Eb(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=K1(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=K1(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+xb(t),l=-r.scrollTop;return $s(i||n).direction==="rtl"&&(a+=K1(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Sb(t){var e=$s(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function $$(t){return["html","body","#document"].indexOf(Ko(t))>=0?t.ownerDocument.body:ji(t)&&Sb(t)?t:$$(v9(t))}function C4(t,e){var n;e===void 0&&(e=[]);var r=$$(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=Si(r),s=i?[o].concat(o.visualViewport||[],Sb(r)?r:[]):r,a=e.concat(s);return i?a:a.concat(C4(v9(s)))}function IQ(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function qFn(t,e){var n=ac(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function tD(t,e,n){return e===I$?IQ(UFn(t,n)):h2(e)?qFn(e,n):IQ(GFn(t1(t)))}function zFn(t){var e=C4(v9(t)),n=["absolute","fixed"].indexOf($s(t).position)>=0,r=n&&ji(t)?J0(t):t;return h2(r)?e.filter(function(i){return h2(i)&&H$(i,r)&&Ko(i)!=="body"}):[]}function jFn(t,e,n,r){var i=e==="clippingParents"?zFn(t):[].concat(e),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var u=tD(t,c,r);return l.top=K1(u.top,l.top),l.right=Xu(u.right,l.right),l.bottom=Xu(u.bottom,l.bottom),l.left=K1(u.left,l.left),l},tD(t,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function U$(t){var e=t.reference,n=t.element,r=t.placement,i=r?jo(r):null,o=r?lc(r):null,s=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(i){case li:l={x:s,y:e.y-n.height};break;case Zi:l={x:s,y:e.y+e.height};break;case Xi:l={x:e.x+e.width,y:a};break;case ci:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=i?bb(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case oc:l[c]=l[c]-(e[u]/2-n[u]/2);break;case r0:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function i0(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.strategy,s=o===void 0?t.strategy:o,a=n.boundary,l=a===void 0?pFn:a,c=n.rootBoundary,u=c===void 0?I$:c,d=n.elementContext,h=d===void 0?t4:d,f=n.altBoundary,m=f===void 0?!1:f,T=n.padding,Q=T===void 0?0:T,_=B$(typeof Q!="number"?Q:F$(Q,X0)),v=h===t4?hFn:t4,y=t.rects.popper,b=t.elements[m?v:h],E=jFn(h2(b)?b:b.contextElement||t1(t.elements.popper),l,u,s),x=ac(t.elements.reference),L=U$({reference:x,element:y,strategy:"absolute",placement:i}),M=IQ(Object.assign({},y,L)),C=h===t4?M:x,A={top:E.top-C.top+_.top,bottom:C.bottom-E.bottom+_.bottom,left:E.left-C.left+_.left,right:C.right-E.right+_.right},I=t.modifiersData.offset;if(h===t4&&I){var N=I[i];Object.keys(A).forEach(function(P){var O=[Xi,Zi].indexOf(P)>=0?1:-1,F=[li,Zi].indexOf(P)>=0?"y":"x";A[P]+=N[F]*O})}return A}function WFn(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?k$:l,u=lc(r),d=u?a?ZN:ZN.filter(function(m){return lc(m)===u}):X0,h=d.filter(function(m){return c.indexOf(m)>=0});h.length===0&&(h=d);var f=h.reduce(function(m,T){return m[T]=i0(t,{placement:T,boundary:i,rootBoundary:o,padding:s})[jo(T)],m},{});return Object.keys(f).sort(function(m,T){return f[m]-f[T]})}function YFn(t){if(jo(t)===Qb)return[];var e=J5(t);return[eD(t),e,eD(e)]}function KFn(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,m=f===void 0?!0:f,T=n.allowedAutoPlacements,Q=e.options.placement,_=jo(Q),v=_===Q,y=l||(v||!m?[J5(Q)]:YFn(Q)),b=[Q].concat(y).reduce(function($,ce){return $.concat(jo(ce)===Qb?WFn(e,{placement:ce,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:T}):ce)},[]),E=e.rects.reference,x=e.rects.popper,L=new Map,M=!0,C=b[0],A=0;A=0,F=O?"width":"height",V=i0(e,{placement:I,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),U=O?P?Xi:ci:P?Zi:li;E[F]>x[F]&&(U=J5(U));var G=J5(U),K=[];if(o&&K.push(V[N]<=0),a&&K.push(V[U]<=0,V[G]<=0),K.every(function($){return $})){C=I,M=!1;break}L.set(I,K)}if(M)for(var W=m?3:1,te=function(ce){var ye=b.find(function(z){var ne=L.get(z);if(ne)return ne.slice(0,ce).every(function(fe){return fe})});if(ye)return C=ye,"break"},de=W;de>0;de--){var X=te(de);if(X==="break")break}e.placement!==C&&(e.modifiersData[r]._skip=!0,e.placement=C,e.reset=!0)}}const ZFn={name:"flip",enabled:!0,phase:"main",fn:KFn,requiresIfExists:["offset"],data:{_skip:!1}};function nD(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function rD(t){return[li,Xi,Zi,ci].some(function(e){return t[e]>=0})}function XFn(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=i0(e,{elementContext:"reference"}),a=i0(e,{altBoundary:!0}),l=nD(s,r),c=nD(a,i,o),u=rD(l),d=rD(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const JFn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:XFn};function e$n(t,e,n){var r=jo(t),i=[ci,li].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[ci,Xi].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function t$n(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,s=k$.reduce(function(u,d){return u[d]=e$n(d,e.rects,o),u},{}),a=s[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}const n$n={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:t$n};function r$n(t){var e=t.state,n=t.name;e.modifiersData[n]=U$({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const i$n={name:"popperOffsets",enabled:!0,phase:"read",fn:r$n,data:{}};function o$n(t){return t==="x"?"y":"x"}function s$n(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,m=n.tetherOffset,T=m===void 0?0:m,Q=i0(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),_=jo(e.placement),v=lc(e.placement),y=!v,b=bb(_),E=o$n(b),x=e.modifiersData.popperOffsets,L=e.rects.reference,M=e.rects.popper,C=typeof T=="function"?T(Object.assign({},e.rects,{placement:e.placement})):T,A=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),I=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,N={x:0,y:0};if(x){if(o){var P,O=b==="y"?li:ci,F=b==="y"?Zi:Xi,V=b==="y"?"height":"width",U=x[b],G=U+Q[O],K=U-Q[F],W=f?-M[V]/2:0,te=v===oc?L[V]:M[V],de=v===oc?-M[V]:-L[V],X=e.elements.arrow,$=f&&X?yb(X):{width:0,height:0},ce=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:V$(),ye=ce[O],z=ce[F],ne=L4(0,L[V],$[V]),fe=y?L[V]/2-W-ne-ye-A.mainAxis:te-ne-ye-A.mainAxis,be=y?-L[V]/2+W+ne+z+A.mainAxis:de+ne+z+A.mainAxis,Le=e.elements.arrow&&J0(e.elements.arrow),se=Le?b==="y"?Le.clientTop||0:Le.clientLeft||0:0,Y=(P=I==null?void 0:I[b])!=null?P:0,j=U+fe-Y-se,ie=U+be-Y,Te=L4(f?Xu(G,j):G,U,f?K1(K,ie):K);x[b]=Te,N[b]=Te-U}if(a){var ve,ae=b==="x"?li:ci,Oe=b==="x"?Zi:Xi,Se=x[E],Me=E==="y"?"height":"width",ke=Se+Q[ae],Z=Se-Q[Oe],q=[li,ci].indexOf(_)!==-1,pe=(ve=I==null?void 0:I[E])!=null?ve:0,ue=q?ke:Se-L[Me]-M[Me]-pe+A.altAxis,_e=q?Se+L[Me]+M[Me]-pe-A.altAxis:Z,Ae=f&&q?MFn(ue,Se,_e):L4(f?ue:ke,Se,f?_e:Z);x[E]=Ae,N[E]=Ae-Se}e.modifiersData[r]=N}}const a$n={name:"preventOverflow",enabled:!0,phase:"main",fn:s$n,requiresIfExists:["offset"]};function l$n(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function c$n(t){return t===Si(t)||!ji(t)?Eb(t):l$n(t)}function u$n(t){var e=t.getBoundingClientRect(),n=sc(e.width)/t.offsetWidth||1,r=sc(e.height)/t.offsetHeight||1;return n!==1||r!==1}function d$n(t,e,n){n===void 0&&(n=!1);var r=ji(e),i=ji(e)&&u$n(e),o=t1(e),s=ac(t,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Ko(e)!=="body"||Sb(o))&&(a=c$n(e)),ji(e)?(l=ac(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=xb(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function f$n(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&i(l)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function p$n(t){var e=f$n(t);return xFn.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function h$n(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function T$n(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var iD={placement:"bottom",modifiers:[],strategy:"absolute"};function oD(){for(var t=arguments.length,e=new Array(t),n=0;n{this.createPopper()})},closeMenu(t){var e;!this.$el.contains(t.target)&&!((e=this.$refs.dropdown)!=null&&e.contains(t.target))&&(this.isOpen=!1)},createPopper(){const t=this.$el.querySelector("button"),e=this.$refs.dropdown;t&&e&&(this.popperInstance=y9(t,e,{placement:"bottom-end",modifiers:[{name:"flip",options:{fallbackPlacements:["top-end","bottom-start","top-start"]}},{name:"preventOverflow",options:{boundary:document.body}}]}))}}},Q$n={class:"relative inline-block text-left"},v$n={key:0,ref:"dropdown",class:"z-50 w-56 rounded-md shadow-lg bg-white dark:bg-gray-800 ring-1 ring-black ring-opacity-5 dark:ring-white dark:ring-opacity-20 focus:outline-none dropdown-shadow text-gray-700 dark:text-white"},y$n={class:"py-1",role:"menu","aria-orientation":"vertical","aria-labelledby":"options-menu"};function b$n(t,e,n,r,i,o){const s=pt("ToolbarButton");return k(),H("div",Q$n,[g("div",null,[oe(s,{onClick:he(o.toggleMenu,["stop"]),title:n.title,icon:"code"},null,8,["onClick","title"])]),(k(),wt(oz,{to:"body"},[i.isOpen?(k(),H("div",v$n,[g("div",y$n,[er(t.$slots,"default",{},void 0,!0)])],512)):re("",!0)]))])}const G$=yt(_$n,[["render",b$n],["__scopeId","data-v-6c3ea3a5"]]);async function sD(t,e="",n=[]){return new Promise((r,i)=>{const o=document.createElement("div");o.className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50",n.length===0?o.innerHTML=` + c5.2,0.6,10.3-1.2,14-4.9l58.2-58.2c6.7-6.7,6.7-17.6,0-24.3l-16.3-16.3l48.3-48.3l160.3,160.3L400.425,250.025z`})],-1)]),8,lVn))],8,aVn),oe(s),g("div",null,[g("a",cVn,[e[16]||(e[16]=g("svg",{class:"w-5 h-5",viewBox:"0 0 16 16",fill:"currentColor"},[g("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})],-1)),i.starCount?(k(),H("span",uVn,le(i.starCount),1)):re("",!0)])]),g("div",dVn,[o.is_fun_mode?(k(),H("div",{key:0,title:"Fun mode is on, press to turn off",class:"w-10 h-10 cursor-pointer transform transition-all duration-300 hover:scale-110 active:scale-95 bg-yellow-400 rounded-full p-1 hover:bg-yellow-300 dark:hover:bg-yellow-500",onClick:e[2]||(e[2]=T=>o.fun_mode_off())},e[17]||(e[17]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"w-full h-full text-white animate-bounce"},[g("circle",{cx:"12",cy:"12",r:"10",stroke:"black","stroke-width":"1.5"}),g("path",{d:"M7 14c0 3 4 4 5 4s5-1 5-4M9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm8 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z",stroke:"black","stroke-width":"1.5"})],-1)]))):(k(),H("div",{key:1,title:"Fun mode is off, press to turn on",class:"w-10 h-10 cursor-pointer rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transform transition-all duration-300 hover:scale-110 active:scale-95 p-1",onClick:e[3]||(e[3]=T=>o.fun_mode_on())},e[18]||(e[18]=[Fl('',1)]))),g("div",fVn,[e[19]||(e[19]=g("div",{class:"absolute -top-2 left-1/2 transform -translate-x-1/2 border-solid border-4 border-transparent border-b-gray-900"},null,-1)),nt(" "+le(o.is_fun_mode?"Disable fun mode":"Enable fun mode"),1)])]),i.isDarkMode?(k(),H("div",{key:0,class:"text-2xl svg-button hover:text-primary duration-150 cursor-pointer w-50 h-50 ml-2",title:"Switch to Light theme",onClick:e[4]||(e[4]=T=>o.themeSwitch())},e[20]||(e[20]=[g("i",{"data-feather":"sun"},null,-1)]))):(k(),H("div",{key:1,class:"text-2xl svg-button hover:text-primary duration-150 cursor-pointer w-50 h-50 ml-2",title:"Switch to Dark theme",onClick:e[5]||(e[5]=T=>o.themeSwitch())},e[21]||(e[21]=[g("i",{"data-feather":"moon"},null,-1)]))),g("div",pVn,[g("button",{onClick:e[6]||(e[6]=(...T)=>o.toggleLanguageMenu&&o.toggleLanguageMenu(...T)),class:"flex items-center gap-2 px-3 py-2 rounded-md hover:bg-gray-100 transition-colors","aria-haspopup":"true","aria-expanded":i.isLanguageMenuVisible},[g("span",TVn,le(t.$store.state.language.slice(0,2)),1),(k(),H("svg",{class:je(["w-4 h-4 transition-transform",{"rotate-180":i.isLanguageMenuVisible}]),viewBox:"0 0 24 24"},e[22]||(e[22]=[g("path",{d:"M7 10l5 5 5-5z",fill:"currentColor"},null,-1)]),2))],8,hVn),oe(qi,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-150 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:He(()=>[i.isLanguageMenuVisible?(k(),H("div",mVn,[g("ul",gVn,[(k(!0),H(Ue,null,ot(o.languages,T=>(k(),H("li",{key:T,class:"group flex items-center px-3 py-2 hover:bg-gray-50"},[g("button",{onClick:Q=>o.deleteLanguage(T),class:"p-1 rounded-full opacity-0 group-hover:opacity-100 transition-opacity text-gray-400 hover:text-red-500 hover:bg-red-50","aria-label":`Delete ${T}`},e[23]||(e[23]=[g("svg",{class:"w-4 h-4",viewBox:"0 0 24 24"},[g("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 12z",fill:"currentColor"})],-1)]),8,_Vn),g("div",{onClick:Q=>o.selectLanguage(T),class:je(["flex-grow px-3 py-1 cursor-pointer rounded-md transition-colors",T===t.$store.state.language?"bg-blue-50 text-blue-600":"hover:bg-gray-100"]),role:"menuitem"},le(T),11,QVn)]))),128)),g("li",vVn,[J(g("input",{type:"text","onUpdate:modelValue":e[7]||(e[7]=T=>t.customLanguage=T),onKeyup:e[8]||(e[8]=Xr(he((...T)=>o.addCustomLanguage&&o.addCustomLanguage(...T),["prevent"]),["enter"])),placeholder:"Add new language...",class:"w-full px-3 py-2 rounded-md border border-gray-200 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 outline-none transition-all"},null,544),[[we,t.customLanguage]])])])],512)):re("",!0)]),_:1})]),g("div",yVn,[g("button",{onClick:e[9]||(e[9]=he((...T)=>o.toggleThemeDropDown&&o.toggleThemeDropDown(...T),["stop"])),class:"inline-flex items-center justify-between w-40 px-4 py-2 bg-gradient-to-r from-blue-500/10 to-purple-500/10 dark:from-blue-400/20 dark:to-purple-400/20 border border-blue-200 dark:border-blue-700 rounded-lg shadow-sm hover:from-blue-500/20 hover:to-purple-500/20 dark:hover:from-blue-400/30 dark:hover:to-purple-400/30 hover:border-blue-300 dark:hover:border-blue-600 hover:shadow-md focus:outline-none focus:ring-2 focus:ring-blue-500/50 transition-all duration-300 ease-in-out backdrop-blur-sm"},[g("div",bVn,[e[24]||(e[24]=g("svg",{class:"w-5 h-5 flex-shrink-0",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01"})],-1)),g("span",EVn,le(i.currentTheme),1)]),(k(),H("svg",{class:je(["w-5 h-5 flex-shrink-0 text-blue-500 dark:text-blue-400 transition-transform duration-300",{"rotate-180":i.themeDropdownOpen}]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},e[25]||(e[25]=[g("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)]),2))]),oe(qi,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:He(()=>[i.themeDropdownOpen?(k(),H("div",xVn,[g("div",SVn,[(k(!0),H(Ue,null,ot(i.availableThemes,T=>(k(),H("a",{key:T,onClick:Q=>{o.loadTheme(T),i.currentTheme=T,i.themeDropdownOpen=!1},class:"flex items-center space-x-3 px-4 py-3 text-gray-700 dark:text-gray-200 hover:bg-gradient-to-r hover:from-blue-50 hover:to-purple-50 dark:hover:from-blue-900/30 dark:hover:to-purple-900/30 cursor-pointer transition-colors duration-150 group"},[e[26]||(e[26]=g("div",{class:"w-2 h-2 rounded-full bg-blue-400 group-hover:bg-blue-500 transition-colors duration-150"},null,-1)),g("span",CVn,le(T),1)],8,LVn))),128))])])):re("",!0)]),_:1})]),g("div",{class:"toolbar-button",onMouseleave:e[13]||(e[13]=(...T)=>o.hideInfosMenu&&o.hideInfosMenu(...T))},[g("div",AVn,[i.isInfosMenuVisible?(k(),H("div",{key:0,onMouseenter:e[11]||(e[11]=(...T)=>o.showInfosMenu&&o.showInfosMenu(...T)),class:"absolute context-menu m-0 p-0 z-50 top-full right-0 transform rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none transition-all duration-300 ease-out mb-2"},[g("div",wVn,[g("div",MVn,[o.isModelOK?(k(),H("div",OVn,e[27]||(e[27]=[g("svg",{class:"w-8 h-8",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M9 12L11 14L15 10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):(k(),H("div",RVn,e[28]||(e[28]=[g("svg",{class:"w-8 h-8",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M15 9L9 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M9 9L15 15",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))),o.isGenerating?(k(),H("div",DVn,e[30]||(e[30]=[g("svg",{class:"w-6 h-6 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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)]))):(k(),H("div",NVn,e[29]||(e[29]=[g("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 21v-4m0 0V5a2 2 0 012-2h6.5l1 1H21l-3 6 3 6h-8.5l-1-1H5a2 2 0 00-2 2zm9-13.5V9"})],-1)]))),o.isConnected?(k(),H("div",IVn,e[31]||(e[31]=[g("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1)]))):(k(),H("div",kVn,e[32]||(e[32]=[g("svg",{class:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})],-1)])))]),g("div",PVn,[oe(a,{onClick:t.restartProgram,icon:"power",title:"restart program"},null,8,["onClick"]),oe(a,{onClick:o.refreshPage,icon:"refresh-ccw",title:"refresh page"},null,8,["onClick"]),oe(a,{href:"/docs",icon:"file-text",title:"Fast API doc"})]),oe(l,{href:"https://github.com/ParisNeo/lollms-webui",icon:"github"}),oe(l,{href:"https://www.youtube.com/channel/UCJzrg0cyQV2Z30SQ1v2FdSQ",icon:"youtube"}),oe(l,{href:"https://x.com/ParisNeo_AI",icon:"x"}),oe(l,{href:"https://discord.com/channels/1092918764925882418",icon:"discord"}),g("div",HVn,[g("div",{onClick:e[10]||(e[10]=T=>o.showNews()),class:"text-2xl w-8 h-8 cursor-pointer transition-colors duration-300 svg-button"},e[33]||(e[33]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"w-full h-full"},[g("path",{d:"M19 20H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v1m2 13a2 2 0 0 1-2-2V7m2 13a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"})],-1)])),e[34]||(e[34]=g("span",{class:"absolute hidden group-hover:block text-xs rounded py-1 px-2 top-full left-1/2 transform -translate-x-1/2 mt-2 whitespace-nowrap"}," Lollms News ",-1))])])],32)):re("",!0),g("div",{onMouseenter:e[12]||(e[12]=(...T)=>o.showInfosMenu&&o.showInfosMenu(...T)),class:"infos-hover-area"},e[35]||(e[35]=[Fl('',1)]),32)])],32)])],34)],2),J(g("div",VVn,[oe(c,{ref:"progress",progress:t.progress_value,class:"w-full h-4"},null,8,["progress"]),g("p",BVn,le(t.loading_infos)+" ...",1)],512),[[Pt,t.progress_visibility]]),oe(u,{"prompt-text":"Enter the url to the page to use as discussion support",onOk:t.addWebpage,ref:"web_url_input_box"},null,8,["onOk"]),oe(d,{ref:"toast"},null,512),oe(h,{ref:"messageBox"},null,512),oe(f,{ref:"yesNoDialog",class:"z-20"},null,512),oe(m,{ref:"universalForm",class:"z-20"},null,512)],64)}const $Vn=yt(oVn,[["render",FVn],["__scopeId","data-v-d8eb826d"]]),UVn={class:"flex overflow-hidden flex-grow w-full"},GVn={__name:"App",setup(t){return(e,n)=>(k(),H("div",{class:je([e.currentTheme,"flex flex-col h-screen font-sans background-color text-slate-950 dark:bg-bg-dark dark:text-slate-50 w-full overflow-hidden"])},[oe($Vn),g("div",UVn,[oe(Bt(BH),null,{default:He(({Component:r})=>[(k(),wt(cz,null,[(k(),wt(Rd(r)))],1024))]),_:1})])],2))}},Yo=Object.create(null);Yo.open="0";Yo.close="1";Yo.ping="2";Yo.pong="3";Yo.message="4";Yo.upgrade="5";Yo.noop="6";const W5=Object.create(null);Object.keys(Yo).forEach(t=>{W5[Yo[t]]=t});const AQ={type:"error",data:"parser error"},f$=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",p$=typeof ArrayBuffer=="function",h$=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,fb=({type:t,data:e},n,r)=>f$&&e instanceof Blob?n?r(e):zN(e,r):p$&&(e instanceof ArrayBuffer||h$(e))?n?r(e):zN(new Blob([e]),r):r(Yo[t]+(e||"")),zN=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function jN(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Rg;function qVn(t,e){if(f$&&t.data instanceof Blob)return t.data.arrayBuffer().then(jN).then(e);if(p$&&(t.data instanceof ArrayBuffer||h$(t.data)))return e(jN(t.data));fb(t,!1,n=>{Rg||(Rg=new TextEncoder),e(Rg.encode(n))})}const WN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T4=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,n=t.length,r,i=0,o,s,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const c=new ArrayBuffer(e),u=new Uint8Array(c);for(r=0;r>4,u[i++]=(s&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c},jVn=typeof ArrayBuffer=="function",pb=(t,e)=>{if(typeof t!="string")return{type:"message",data:T$(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:WVn(t.substring(1),e)}:W5[n]?t.length>1?{type:W5[n],data:t.substring(1)}:{type:W5[n]}:AQ},WVn=(t,e)=>{if(jVn){const n=zVn(t);return T$(n,e)}else return{base64:!0,data:t}},T$=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},m$="",YVn=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{fb(o,!1,a=>{r[s]=a,++i===n&&e(r.join(m$))})})},KVn=(t,e)=>{const n=t.split(m$),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(n)})}})}let Ng;function n5(t){return t.reduce((e,n)=>e+n.length,0)}function r5(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let i=0;iMath.pow(2,21)-1){a.enqueue(AQ);break}i=u*Math.pow(2,32)+c.getUint32(4),r=3}else{if(n5(n)t){a.enqueue(AQ);break}}}})}const g$=4;function nr(t){if(t)return JVn(t)}function JVn(t){for(var e in nr.prototype)t[e]=nr.prototype[e];return t}nr.prototype.on=nr.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};nr.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};nr.prototype.off=nr.prototype.removeListener=nr.prototype.removeAllListeners=nr.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,i=0;iPromise.resolve().then(e):(e,n)=>n(e,0),ki=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),eBn="arraybuffer";function _$(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const tBn=ki.setTimeout,nBn=ki.clearTimeout;function g9(t,e){e.useNativeTimers?(t.setTimeoutFn=tBn.bind(ki),t.clearTimeoutFn=nBn.bind(ki)):(t.setTimeoutFn=ki.setTimeout.bind(ki),t.clearTimeoutFn=ki.clearTimeout.bind(ki))}const rBn=1.33;function iBn(t){return typeof t=="string"?oBn(t):Math.ceil((t.byteLength||t.size)*rBn)}function oBn(t){let e=0,n=0;for(let r=0,i=t.length;r=57344?n+=3:(r++,n+=4);return n}function Q$(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function sBn(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function aBn(t){let e={},n=t.split("&");for(let r=0,i=n.length;r{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};KVn(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,YVn(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Q$()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}let v$=!1;try{v$=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const uBn=v$;function dBn(){}class fBn extends cBn{constructor(e){if(super(e),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}let kl=class Y5 extends nr{constructor(e,n,r){super(),this.createRequest=e,g9(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var e;const n=_$(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Y5.requestsCount++,Y5.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=dBn,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Y5.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};kl.requestsCount=0;kl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",YN);else if(typeof addEventListener=="function"){const t="onpagehide"in ki?"pagehide":"unload";addEventListener(t,YN,!1)}}function YN(){for(let t in kl.requests)kl.requests.hasOwnProperty(t)&&kl.requests[t].abort()}const pBn=function(){const t=y$({xdomain:!1});return t&&t.responseType!==null}();class hBn extends fBn{constructor(e){super(e);const n=e&&e.forceBase64;this.supportsBinary=pBn&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new kl(y$,this.uri(),e)}}function y$(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||uBn))return new XMLHttpRequest}catch{}if(!e)try{return new ki[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const b$=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class TBn extends hb{get name(){return"websocket"}doOpen(){const e=this.uri(),n=this.opts.protocols,r=b$?{}:_$(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n{try{this.doWrite(r,o)}catch{}i&&m9(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Q$()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}}const Dg=ki.WebSocket||ki.MozWebSocket;class mBn extends TBn{createSocket(e,n,r){return b$?new Dg(e,n,r):n?new Dg(e,n):new Dg(e)}doWrite(e,n){this.ws.send(n)}}class gBn extends hb{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const n=XVn(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=ZVn();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n{i&&m9(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const _Bn={websocket:mBn,webtransport:gBn,polling:hBn},QBn=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vBn=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function wQ(t){if(t.length>8e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=QBn.exec(t||""),o={},s=14;for(;s--;)o[vBn[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=yBn(o,o.path),o.queryKey=bBn(o,o.query),o}function yBn(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function bBn(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}const MQ=typeof addEventListener=="function"&&typeof removeEventListener=="function",K5=[];MQ&&addEventListener("offline",()=>{K5.forEach(t=>t())},!1);class Ia extends nr{constructor(e,n){if(super(),this.binaryType=eBn,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){const r=wQ(e);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=wQ(n.host).host);g9(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=aBn(this.opts.query)),MQ&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},K5.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=g$,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Ia.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ia.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,m9(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,r){return this._sendPacket("message",e,n,r),this}send(e,n,r){return this._sendPacket("message",e,n,r),this}_sendPacket(e,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:e,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(Ia.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),MQ&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=K5.indexOf(this._offlineEventListener);r!==-1&&K5.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ia.protocol=g$;class EBn extends Ia{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ia.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function o(){r||(r=!0,u(),n.close(),n=null)}const s=d=>{const h=new Error("probe error: "+d);h.transport=n.name,o(),this.emitReserved("upgradeError",h)};function a(){s("transport closed")}function l(){s("socket closed")}function c(d){n&&d.name!==n.name&&o()}const u=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const n=[];for(let r=0;r_Bn[i]).filter(i=>!!i)),super(e,r)}};function SBn(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=wQ(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const LBn=typeof ArrayBuffer=="function",CBn=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,E$=Object.prototype.toString,ABn=typeof Blob=="function"||typeof Blob<"u"&&E$.call(Blob)==="[object BlobConstructor]",wBn=typeof File=="function"||typeof File<"u"&&E$.call(File)==="[object FileConstructor]";function Tb(t){return LBn&&(t instanceof ArrayBuffer||CBn(t))||ABn&&t instanceof Blob||wBn&&t instanceof File}function Z5(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n=0&&t.num{delete this.acks[e];for(let a=0;a{this.io.clearTimeoutFn(o),n.apply(this,a)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...n){return new Promise((r,i)=>{const o=(s,a)=>s?i(s):r(a);o.withError=!0,n.push(o),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:tn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case tn.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tn.EVENT:case tn.BINARY_EVENT:this.onevent(e);break;case tn.ACK:case tn.BINARY_ACK:this.onack(e);break;case tn.DISCONNECT:this.ondisconnect();break;case tn.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:tn.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}qc.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0};qc.prototype.reset=function(){this.attempts=0};qc.prototype.setMin=function(t){this.ms=t};qc.prototype.setMax=function(t){this.max=t};qc.prototype.setJitter=function(t){this.jitter=t};class NQ extends nr{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,g9(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new qc({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||kBn;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new xBn(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=oo(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},s=oo(n,"error",o);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(oo(e,"ping",this.onping.bind(this)),oo(e,"data",this.ondata.bind(this)),oo(e,"error",this.onerror.bind(this)),oo(e,"close",this.onclose.bind(this)),oo(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){m9(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new x$(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;re()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const e4={};function X5(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=SBn(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=e4[i]&&o in e4[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let l;return a?l=new NQ(r,e):(e4[i]||(e4[i]=new NQ(r,e)),l=e4[i]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(X5,{Manager:NQ,Socket:x$,io:X5,connect:X5});const S$="/";console.log(S$);const Je=new X5(S$,{reconnection:!0,reconnectionAttempts:10,reconnectionDelay:1e3}),HBn={props:{value:String,inputType:{type:String,default:"text",validator:t=>["text","email","password","file","path","integer","float"].includes(t)},fileAccept:String},data(){return{inputValue:this.value,placeholderText:this.getPlaceholderText()}},watch:{value(t){console.log("Changing value to ",t),this.inputValue=t}},mounted(){ze(()=>{Ze.replace()}),console.log("Changing value to ",this.value),this.inputValue=this.value},methods:{handleSliderInput(t){this.inputValue=t.target.value,this.$emit("input",t.target.value)},getPlaceholderText(){switch(this.inputType){case"text":return"Enter text here";case"email":return"Enter your email";case"password":return"Enter your password";case"file":case"path":return"Choose a file";case"integer":return"Enter an integer";case"float":return"Enter a float";default:return"Enter value here"}},handleInput(t){if(this.inputType==="integer"){const e=t.target.value.replace(/[^0-9]/g,"");this.inputValue=e}console.log("handling input : ",t.target.value),this.$emit("input",t.target.value)},async pasteFromClipboard(){try{const t=await navigator.clipboard.readText();this.handleClipboardData(t)}catch(t){console.error("Failed to read from clipboard:",t)}},handlePaste(t){const e=t.clipboardData.getData("text");this.handleClipboardData(e)},handleClipboardData(t){switch(this.inputType){case"email":this.inputValue=this.isValidEmail(t)?t:"";break;case"password":this.inputValue=t;break;case"file":case"path":this.inputValue="";break;case"integer":this.inputValue=this.parseInteger(t);break;case"float":this.inputValue=this.parseFloat(t);break;default:this.inputValue=t;break}},isValidEmail(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)},parseInteger(t){const e=parseInt(t);return isNaN(e)?"":e},parseFloat(t){const e=parseFloat(t);return isNaN(e)?"":e},openFileInput(){this.$refs.fileInput.click()},handleFileInputChange(t){const e=t.target.files[0];e&&(this.inputValue=e.name)}}},VBn={class:"flex items-center space-x-2"},BBn=["value","type","placeholder"],FBn=["value","min","max"],$Bn=["accept"];function UBn(t,e,n,r,i,o){return k(),H("div",VBn,[t.useSlider?(k(),H("input",{key:1,type:"range",value:parseInt(i.inputValue),min:t.minSliderValue,max:t.maxSliderValue,onInput:e[2]||(e[2]=(...s)=>o.handleSliderInput&&o.handleSliderInput(...s)),class:"flex-1 px-4 py-2 text-lg border dark:bg-gray-600 border-gray-300 rounded-md focus:outline-none focus:ring focus:border-blue-500"},null,40,FBn)):(k(),H("input",{key:0,value:i.inputValue,type:n.inputType,placeholder:i.placeholderText,onInput:e[0]||(e[0]=(...s)=>o.handleInput&&o.handleInput(...s)),onPaste:e[1]||(e[1]=(...s)=>o.handlePaste&&o.handlePaste(...s)),class:"flex-1 px-4 py-2 text-lg dark:bg-gray-600 border border-gray-300 rounded-md focus:outline-none focus:ring focus:border-blue-500"},null,40,BBn)),g("button",{onClick:e[3]||(e[3]=(...s)=>o.pasteFromClipboard&&o.pasteFromClipboard(...s)),class:"p-2 bg-blue-500 dark:bg-gray-600 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring focus:border-blue-300"},e[6]||(e[6]=[g("i",{"data-feather":"clipboard"},null,-1)])),n.inputType==="file"?(k(),H("button",{key:2,onClick:e[4]||(e[4]=(...s)=>o.openFileInput&&o.openFileInput(...s)),class:"p-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring focus:border-blue-300"},e[7]||(e[7]=[g("i",{"data-feather":"upload"},null,-1)]))):re("",!0),n.inputType==="file"?(k(),H("input",{key:3,ref:"fileInput",type:"file",style:{display:"none"},accept:n.fileAccept,onChange:e[5]||(e[5]=(...s)=>o.handleFileInputChange&&o.handleFileInputChange(...s))},null,40,$Bn)):re("",!0)])}const gb=yt(HBn,[["render",UBn]]),GBn={name:"TokensHighlighter",props:{namedTokens:{type:Object,required:!0}},data(){return{colors:["#FF6633","#FFB399","#FF33FF","#FFFF99","#00B3E6","#E6B333","#3366E6","#999966","#99FF99","#B34D4D","#80B300","#809900","#E6B3B3","#6680B3","#66991A","#FF99E6","#CCFF1A","#FF1A66","#E6331A","#33FFCC","#66994D","#B366CC","#4D8000","#B33300","#CC80CC","#66664D","#991AFF","#E666FF","#4DB3FF","#1AB399","#E666B3","#33991A","#CC9999","#B3B31A","#00E680","#4D8066","#809980","#E6FF80","#1AFF33","#999933","#FF3380","#CCCC00","#66E64D","#4D80CC","#9900B3","#E64D66","#4DB380","#FF4D4D","#99E6E6","#6666FF"]}}},qBn={class:"w-full"},zBn={class:"break-words"},jBn={class:"break-words mt-2"},WBn={class:"mt-4"};function YBn(t,e,n,r,i,o){return k(),H("div",qBn,[g("div",zBn,[(k(!0),H(Ue,null,ot(n.namedTokens,(s,a)=>(k(),H("span",{key:a},[g("span",{class:"inline-block whitespace-pre-wrap",style:xn({backgroundColor:i.colors[a%i.colors.length]})},le(s[0]),5)]))),128))]),g("div",jBn,[(k(!0),H(Ue,null,ot(n.namedTokens,(s,a)=>(k(),H("span",{key:a},[g("span",{class:"inline-block px-1 whitespace-pre-wrap",style:xn({backgroundColor:i.colors[a%i.colors.length]})},le(s[1]),5)]))),128))]),g("div",WBn,[g("strong",null,"Total Tokens: "+le(n.namedTokens.length),1)])])}const KBn=yt(GBn,[["render",YBn]]),ZBn={name:"ChatBarButton"};function XBn(t,e,n,r,i,o){return k(),H("button",DP({class:"svg-button"},t.$attrs,Qz(t.$listeners)),[er(t.$slots,"icon"),er(t.$slots,"default")],16)}const _9=yt(ZBn,[["render",XBn]]),JBn={props:{is_subcard:{type:Boolean,default:!1},is_shrunk:{type:Boolean,default:!1},title:{type:String,default:""},isHorizontal:{type:Boolean,default:!1},cardWidth:{type:String,default:"w-3/4"},disableHoverAnimation:{type:Boolean,default:!0},disableFocus:{type:Boolean,default:!1}},data(){return{shrink:this.is_shrunk,isHovered:!1,isActive:!1}},computed:{cardClass(){return["bg-gray-50","border","border-gray-300","text-gray-900","text-sm","rounded-lg","focus:ring-blue-500","focus:border-blue-500","w-full","p-2.5","dark:bg-gray-500","dark:border-gray-600","dark:placeholder-gray-400","dark:text-white","dark:focus:ring-blue-500","dark:focus:border-blue-500",{"cursor-pointer":!this.isActive&&!this.disableFocus,"w-auto":!this.isActive}]},cardWidthClass(){return this.isActive?this.cardWidth:""}},methods:{toggleCard(){this.disableFocus||(this.isActive=!this.isActive)}}},eFn={key:1,class:"flex flex-wrap"},tFn={key:2,class:"mb-2"};function nFn(t,e,n,r,i,o){return k(),H("div",null,[i.isActive?(k(),H("div",{key:0,class:"overlay",onClick:e[0]||(e[0]=(...s)=>o.toggleCard&&o.toggleCard(...s))})):re("",!0),J(g("div",{class:je(["border-blue-300 rounded-lg shadow-lg p-2",o.cardWidthClass,"m-2",{subcard:n.is_subcard},{"bg-white dark:bg-gray-900":!n.is_subcard},{hovered:!n.disableHoverAnimation&&i.isHovered,active:i.isActive}]),onMouseenter:e[2]||(e[2]=s=>i.isHovered=!0),onMouseleave:e[3]||(e[3]=s=>i.isHovered=!1),onClick:e[4]||(e[4]=he((...s)=>o.toggleCard&&o.toggleCard(...s),["self"])),style:xn({cursor:this.disableFocus?"":"pointer"})},[n.title?(k(),H("div",{key:0,onClick:e[1]||(e[1]=s=>i.shrink=!0),class:je([{"text-center p-2 m-2 bg-gray-200":!n.is_subcard},"bg-gray-100 dark:bg-gray-500 rounded-lg pl-2 pr-2 mb-2 font-bold cursor-pointer"])},le(n.title),3)):re("",!0),n.isHorizontal?(k(),H("div",eFn,[er(t.$slots,"default")])):(k(),H("div",tFn,[er(t.$slots,"default")]))],38),[[Pt,i.shrink===!1]]),n.is_subcard?J((k(),H("div",{key:1,onClick:e[5]||(e[5]=s=>i.shrink=!1),class:"bg-white text-center text-xl bold dark:bg-gray-500 border-blue-300 rounded-lg shadow-lg p-2 h-10 cursor-pointer m-2"},le(n.title),513)),[[Pt,i.shrink===!0]]):J((k(),H("div",{key:2,onClick:e[6]||(e[6]=s=>i.shrink=!1),class:"bg-white text-center text-2xl dark:bg-gray-500 border-2 border-blue-300 rounded-lg shadow-lg p-0 h-7 cursor-pointer hover:h-8 hover:bg-blue-300"}," + ",512)),[[Pt,i.shrink===!0]])])}const Q9=yt(JBn,[["render",nFn]]),L$="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%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%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%203H4c-1.103%200-2%20.897-2%202v14c0%201.103.897%202%202%202h16c1.103%200%202-.897%202-2V5c0-1.103-.897-2-2-2zM4%2019V7h16l.002%2012H4z'/%3e%3cpath%20d='M9.293%209.293%205.586%2013l3.707%203.707%201.414-1.414L8.414%2013l2.293-2.293zm5.414%200-1.414%201.414L15.586%2013l-2.293%202.293%201.414%201.414L18.414%2013z'/%3e%3c/svg%3e",C$="/assets/python_block-Bt12VGEE.png",A$="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2024.3.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20630%20630'%20style='enable-background:new%200%200%20630%20630;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23EDBF4A;}%20.st1{fill:%230C0C0C;}%20%3c/style%3e%3crect%20class='st0'%20width='630'%20height='630'/%3e%3cpath%20class='st1'%20d='M423.2,492.2c12.7,20.7,29.2,36,58.4,36c24.5,0,40.2-12.3,40.2-29.2c0-20.3-16.1-27.5-43.1-39.3l-14.8-6.4%20c-42.7-18.2-71.1-41-71.1-89.2c0-44.4,33.8-78.2,86.7-78.2c37.6,0,64.7,13.1,84.2,47.4l-46.1,29.6c-10.1-18.2-21.1-25.4-38.1-25.4%20c-17.3,0-28.3,11-28.3,25.4c0,17.8,11,25,36.4,36l14.8,6.3c50.3,21.6,78.7,43.6,78.7,93c0,53.3-41.9,82.5-98.1,82.5%20c-55,0-90.5-26.2-107.9-60.5L423.2,492.2z%20M214.1,497.3c9.3,16.5,17.8,30.5,38.1,30.5c19.5,0,31.7-7.6,31.7-37.2V289.3h59.2v202.1%20c0,61.3-35.9,89.2-88.4,89.2c-47.4,0-74.9-24.5-88.8-54.1L214.1,497.3z'/%3e%3c/svg%3e",w$="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAOeSURBVGhD7ZhNaBNBGIZHW/EPbSioRSpi0FRpVdRSjQfxkFilB5UciuChIL0JLaKIhR5KIYKIiBSF0mLVS7AIavUgPQjiT4+KB0EP3gwS8VDBgj8d33d2ZrNJt2lCppKWfeBh5pvdncyXmZ3sZokQQsIFz1JdLni8M8L6QkSNf9HMSJBIpREkUmkEiVQaQSKVRpCIH8lkUtbW1sre3l7fB9FoNCrD4fC8PaSyYyudNzU1yZGRkYJ9dXV1yUQiYTMZNX6rM5LJZERHR0fBh0/MmJDSZh4OVhOZmprStf+P1UQmJyd1zaGvr09NuxM5VFVViYmJCR3Zw1oiPT09koP00tjYKNrb23XkEIlERHV1tY7sMuNbK5XR0VGJwcnBwcGi+uns7Cz7Mz24fVnpdGhoSDY0NBTbjxweHi77MzXu+N2KBebsh7PW0tJi6/OIGr/Vm72mpkbXssTj8ZxBp9NpUV9fryN7WE0kn1QqJcfHx3U0v1hNJBQKqXtFh2JsbEx0d3frKMv09LSu2UWtMadaHm1tberxQ+9Koq6uLqff1tZW2dzcLPXviy3c8bsVG/T398+6I8ViMTkwMGDtszRq/MEfdJVGkEilESRSaZSSyCa43anmsAPGII/7wWd7nnMEbmaDD2G41anmsA76tfui9mGnWpAPkOftVpEQuyDfkMz19Bv0cg56j9NP8AQ07IXm2Es2eHgK2b5RRf6Ya7OVOchP5D1kfA0m4GX4CxouQR7/A6/DC/CObqNRSA5A00Y7oeG/JMJBM65TUS7rIV/gefw4GzzchWx/rKJsIu90+REaik6knJv9hy5vw4NO1WU/XAG/w0ds8MABk326NLyGL+A2eJYNpVBOIhd1eRS+gs/hTjYAc4M+06WX+7rkt7zKqbrc0OV5WNIjUzmJDME9MKUiIQ5DvnyshOZfCL/+l+uSz/I/narLA8gvhLsb77miKScR8haegqfhb7gBcoa4M5G4Lr0069Kck88VXZ6B+TNWEHWzONWCpCHPM78lZhkZ3kAePwa36DpthQYulwxke5INwNzst1Tk8ASa66mVXYtLgFPOc7iVroUtOh6F3Gbv6fgLXAPJVWj65vU3IW9oxl+hWWJ+iRyC5lpqJZHP0JxjbnBO+UP4F5pjXNsnoRf+IJqZpNySmRSXoMEvEeL9Iqwkwm20Cfqt12UwAleraHZCcLbHEzLz75fiUeMP3hArjUWTiHdpLWgWyYwI8Q8rrSjH5vAr6AAAAABJRU5ErkJggg==",M$="/assets/cpp_block-kkmuBJ_E.png",O$="/assets/html5_block-beC_-Wtz.png",R$="/assets/LaTeX_block-BNFNi2yr.png",N$="/assets/bash_block-DZNRrwlz.png",rFn="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTAgNTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQogIDxjaXJjbGUgY3g9IjI1IiBjeT0iMjUiIHI9IjI1IiBmaWxsPSJkZWVwc2t5Ymx1ZSIvPg0KICA8dGV4dCB4PSIyNSIgeT0iMzciIGZvbnQtc2l6ZT0iMzYiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IndoaXRlIiBmb250LXdlaWdodD0iYm9sZCI+VDwvdGV4dD4NCjwvc3ZnPg0K",iFn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='red'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3ccircle%20cx='12'%20cy='12'%20r='10'%3e%3c/circle%3e%3cpath%20d='M16%2016s-1.5-2-4-2-4%202-4%202'%20stroke='currentColor'%3e%3c/path%3e%3cline%20x1='9'%20y1='9'%20x2='15'%20y2='15'%20stroke='currentColor'%3e%3c/line%3e%3c/svg%3e",oFn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3ccircle%20cx='12'%20cy='12'%20r='10'%3e%3c/circle%3e%3cpath%20d='M16%2016s-1.5-2-4-2-4%202-4%202'%3e%3c/path%3e%3cline%20x1='9'%20y1='9'%20x2='15'%20y2='15'%3e%3c/line%3e%3c/svg%3e",sFn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%3e%3ccircle%20cx='25'%20cy='25'%20r='24'%20fill='white'%20stroke='black'%20stroke-width='2'/%3e%3ccircle%20id='heartbeat'%20cx='25'%20cy='25'%20r='20'%20fill='red'%3e%3canimate%20attributeName='r'%20dur='1s'%20repeatCount='indefinite'%20keyTimes='0;0.25;0.5;0.75;1'%20values='20;24;20;22;20'/%3e%3c/circle%3e%3c/svg%3e",aFn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='50'%20height='50'%20viewBox='0%200%2050%2050'%3e%3ccircle%20cx='25'%20cy='25'%20r='24'%20fill='white'%20stroke='black'%20stroke-width='2'/%3e%3ccircle%20cx='25'%20cy='25'%20r='20'%20fill='red'/%3e%3c/svg%3e",D$="data:image/svg+xml,%3csvg%20viewBox='0%200%2050%2050'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20transform='translate(25,25)'%3e%3ccircle%20cx='0'%20cy='-15'%20r='3'%20fill='%23f00'%3e%3canimateTransform%20attributeName='transform'%20type='rotate'%20from='0'%20to='360'%20dur='1s'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3ccircle%20cx='0'%20cy='-15'%20r='3'%20fill='%230f0'%20transform='rotate(90)'%3e%3canimateTransform%20attributeName='transform'%20type='rotate'%20from='0'%20to='360'%20dur='1.2s'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3ccircle%20cx='0'%20cy='-15'%20r='3'%20fill='%2300f'%20transform='rotate(180)'%3e%3canimateTransform%20attributeName='transform'%20type='rotate'%20from='0'%20to='360'%20dur='1.4s'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3ccircle%20cx='0'%20cy='-15'%20r='3'%20fill='%23ff0'%20transform='rotate(270)'%3e%3canimateTransform%20attributeName='transform'%20type='rotate'%20from='0'%20to='360'%20dur='1.6s'%20repeatCount='indefinite'%20/%3e%3c/circle%3e%3c/g%3e%3c/svg%3e",lFn={props:{icon:{type:String,required:!0},title:{type:String,required:!0}},computed:{iconPath(){return this.getIconPath()}},methods:{getIconPath(){switch(this.icon){case"x":return'';case"check":return'';case"code":return'';case"python":return'';case"js":return'JS';case"typescript":return'TS';case"braces":return'';case"cplusplus":case"c++":return'C++';case"csharp":return'C#';case"go":return'Go';case"r-project":return'R';case"rust":return'';case"swift":return'';case"kotlin":return'';case"java":return'';case"html5":return'';case"css3":return'';case"vuejs":return'';case"react":return'';case"angular":return'';case"xml":return'';case"json":return'';case"yaml":return'';case"markdown":return'';case"latex":return'TEX';case"bash":return'';case"powershell":return'';case"perl":return'';case"mermaid":return'';case"graphviz":return'';case"plantuml":return'';case"sql":return'';case"mongodb":return'';case"mathFunction":return'';case"terminal":return'';case"edit":return'';case"copy":return'';case"send":return'';case"globe":return'';case"fastForward":return'';case"sendSimple":return'';default:return""}}}},cFn=["title"],uFn={class:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},dFn=["innerHTML"];function fFn(t,e,n,r,i,o){return k(),H("button",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:n.title,onClick:e[0]||(e[0]=s=>t.$emit("click"))},[(k(),H("svg",uFn,[g("g",{innerHTML:o.iconPath},null,8,dFn)]))],8,cFn)}const _b=yt(lFn,[["render",fFn]]);var li="top",Zi="bottom",Xi="right",ci="left",Qb="auto",X0=[li,Zi,Xi,ci],oc="start",r0="end",pFn="clippingParents",I$="viewport",t4="popper",hFn="reference",ZN=X0.reduce(function(t,e){return t.concat([e+"-"+oc,e+"-"+r0])},[]),k$=[].concat(X0,[Qb]).reduce(function(t,e){return t.concat([e,e+"-"+oc,e+"-"+r0])},[]),TFn="beforeRead",mFn="read",gFn="afterRead",_Fn="beforeMain",QFn="main",vFn="afterMain",yFn="beforeWrite",bFn="write",EFn="afterWrite",xFn=[TFn,mFn,gFn,_Fn,QFn,vFn,yFn,bFn,EFn];function Ko(t){return t?(t.nodeName||"").toLowerCase():null}function Si(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function h2(t){var e=Si(t).Element;return t instanceof e||t instanceof Element}function ji(t){var e=Si(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function vb(t){if(typeof ShadowRoot>"u")return!1;var e=Si(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function SFn(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!ji(o)||!Ko(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function LFn(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!ji(i)||!Ko(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const CFn={name:"applyStyles",enabled:!0,phase:"write",fn:SFn,effect:LFn,requires:["computeStyles"]};function jo(t){return t.split("-")[0]}var K1=Math.max,Xu=Math.min,sc=Math.round;function DQ(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function P$(){return!/^((?!chrome|android).)*safari/i.test(DQ())}function ac(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&ji(t)&&(i=t.offsetWidth>0&&sc(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&sc(r.height)/t.offsetHeight||1);var s=h2(t)?Si(t):window,a=s.visualViewport,l=!P$()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/o,d=r.width/i,h=r.height/o;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function yb(t){var e=ac(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function H$(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&vb(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function $s(t){return Si(t).getComputedStyle(t)}function AFn(t){return["table","td","th"].indexOf(Ko(t))>=0}function t1(t){return((h2(t)?t.ownerDocument:t.document)||window.document).documentElement}function v9(t){return Ko(t)==="html"?t:t.assignedSlot||t.parentNode||(vb(t)?t.host:null)||t1(t)}function XN(t){return!ji(t)||$s(t).position==="fixed"?null:t.offsetParent}function wFn(t){var e=/firefox/i.test(DQ()),n=/Trident/i.test(DQ());if(n&&ji(t)){var r=$s(t);if(r.position==="fixed")return null}var i=v9(t);for(vb(i)&&(i=i.host);ji(i)&&["html","body"].indexOf(Ko(i))<0;){var o=$s(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function J0(t){for(var e=Si(t),n=XN(t);n&&AFn(n)&&$s(n).position==="static";)n=XN(n);return n&&(Ko(n)==="html"||Ko(n)==="body"&&$s(n).position==="static")?e:n||wFn(t)||e}function bb(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function L4(t,e,n){return K1(t,Xu(e,n))}function MFn(t,e,n){var r=L4(t,e,n);return r>n?n:r}function V$(){return{top:0,right:0,bottom:0,left:0}}function B$(t){return Object.assign({},V$(),t)}function F$(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var OFn=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,B$(typeof e!="number"?e:F$(e,X0))};function RFn(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=jo(n.placement),l=bb(a),c=[ci,Xi].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var d=OFn(i.padding,n),h=yb(o),f=l==="y"?li:ci,m=l==="y"?Zi:Xi,T=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],Q=s[l]-n.rects.reference[l],_=J0(o),v=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,y=T/2-Q/2,b=d[f],E=v-h[u]-d[m],x=v/2-h[u]/2+y,L=L4(b,x,E),M=l;n.modifiersData[r]=(e={},e[M]=L,e.centerOffset=L-x,e)}}function NFn(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||H$(e.elements.popper,i)&&(e.elements.arrow=i))}const DFn={name:"arrow",enabled:!0,phase:"main",fn:RFn,effect:NFn,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function lc(t){return t.split("-")[1]}var IFn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kFn(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:sc(n*i)/i||0,y:sc(r*i)/i||0}}function JN(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,h=s.x,f=h===void 0?0:h,m=s.y,T=m===void 0?0:m,Q=typeof u=="function"?u({x:f,y:T}):{x:f,y:T};f=Q.x,T=Q.y;var _=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),y=ci,b=li,E=window;if(c){var x=J0(n),L="clientHeight",M="clientWidth";if(x===Si(n)&&(x=t1(n),$s(x).position!=="static"&&a==="absolute"&&(L="scrollHeight",M="scrollWidth")),x=x,i===li||(i===ci||i===Xi)&&o===r0){b=Zi;var C=d&&x===E&&E.visualViewport?E.visualViewport.height:x[L];T-=C-r.height,T*=l?1:-1}if(i===ci||(i===li||i===Zi)&&o===r0){y=Xi;var A=d&&x===E&&E.visualViewport?E.visualViewport.width:x[M];f-=A-r.width,f*=l?1:-1}}var I=Object.assign({position:a},c&&IFn),N=u===!0?kFn({x:f,y:T},Si(n)):{x:f,y:T};if(f=N.x,T=N.y,l){var P;return Object.assign({},I,(P={},P[b]=v?"0":"",P[y]=_?"0":"",P.transform=(E.devicePixelRatio||1)<=1?"translate("+f+"px, "+T+"px)":"translate3d("+f+"px, "+T+"px, 0)",P))}return Object.assign({},I,(e={},e[b]=v?T+"px":"",e[y]=_?f+"px":"",e.transform="",e))}function PFn(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:jo(e.placement),variation:lc(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,JN(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,JN(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const HFn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:PFn,data:{}};var i5={passive:!0};function VFn(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=Si(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,i5)}),a&&l.addEventListener("resize",n.update,i5),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,i5)}),a&&l.removeEventListener("resize",n.update,i5)}}const BFn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:VFn,data:{}};var FFn={left:"right",right:"left",bottom:"top",top:"bottom"};function J5(t){return t.replace(/left|right|bottom|top/g,function(e){return FFn[e]})}var $Fn={start:"end",end:"start"};function eD(t){return t.replace(/start|end/g,function(e){return $Fn[e]})}function Eb(t){var e=Si(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function xb(t){return ac(t1(t)).left+Eb(t).scrollLeft}function UFn(t,e){var n=Si(t),r=t1(t),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=P$();(c||!c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+xb(t),y:l}}function GFn(t){var e,n=t1(t),r=Eb(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=K1(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=K1(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+xb(t),l=-r.scrollTop;return $s(i||n).direction==="rtl"&&(a+=K1(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Sb(t){var e=$s(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function $$(t){return["html","body","#document"].indexOf(Ko(t))>=0?t.ownerDocument.body:ji(t)&&Sb(t)?t:$$(v9(t))}function C4(t,e){var n;e===void 0&&(e=[]);var r=$$(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=Si(r),s=i?[o].concat(o.visualViewport||[],Sb(r)?r:[]):r,a=e.concat(s);return i?a:a.concat(C4(v9(s)))}function IQ(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function qFn(t,e){var n=ac(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function tD(t,e,n){return e===I$?IQ(UFn(t,n)):h2(e)?qFn(e,n):IQ(GFn(t1(t)))}function zFn(t){var e=C4(v9(t)),n=["absolute","fixed"].indexOf($s(t).position)>=0,r=n&&ji(t)?J0(t):t;return h2(r)?e.filter(function(i){return h2(i)&&H$(i,r)&&Ko(i)!=="body"}):[]}function jFn(t,e,n,r){var i=e==="clippingParents"?zFn(t):[].concat(e),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var u=tD(t,c,r);return l.top=K1(u.top,l.top),l.right=Xu(u.right,l.right),l.bottom=Xu(u.bottom,l.bottom),l.left=K1(u.left,l.left),l},tD(t,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function U$(t){var e=t.reference,n=t.element,r=t.placement,i=r?jo(r):null,o=r?lc(r):null,s=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(i){case li:l={x:s,y:e.y-n.height};break;case Zi:l={x:s,y:e.y+e.height};break;case Xi:l={x:e.x+e.width,y:a};break;case ci:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=i?bb(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case oc:l[c]=l[c]-(e[u]/2-n[u]/2);break;case r0:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function i0(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.strategy,s=o===void 0?t.strategy:o,a=n.boundary,l=a===void 0?pFn:a,c=n.rootBoundary,u=c===void 0?I$:c,d=n.elementContext,h=d===void 0?t4:d,f=n.altBoundary,m=f===void 0?!1:f,T=n.padding,Q=T===void 0?0:T,_=B$(typeof Q!="number"?Q:F$(Q,X0)),v=h===t4?hFn:t4,y=t.rects.popper,b=t.elements[m?v:h],E=jFn(h2(b)?b:b.contextElement||t1(t.elements.popper),l,u,s),x=ac(t.elements.reference),L=U$({reference:x,element:y,strategy:"absolute",placement:i}),M=IQ(Object.assign({},y,L)),C=h===t4?M:x,A={top:E.top-C.top+_.top,bottom:C.bottom-E.bottom+_.bottom,left:E.left-C.left+_.left,right:C.right-E.right+_.right},I=t.modifiersData.offset;if(h===t4&&I){var N=I[i];Object.keys(A).forEach(function(P){var O=[Xi,Zi].indexOf(P)>=0?1:-1,F=[li,Zi].indexOf(P)>=0?"y":"x";A[P]+=N[F]*O})}return A}function WFn(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?k$:l,u=lc(r),d=u?a?ZN:ZN.filter(function(m){return lc(m)===u}):X0,h=d.filter(function(m){return c.indexOf(m)>=0});h.length===0&&(h=d);var f=h.reduce(function(m,T){return m[T]=i0(t,{placement:T,boundary:i,rootBoundary:o,padding:s})[jo(T)],m},{});return Object.keys(f).sort(function(m,T){return f[m]-f[T]})}function YFn(t){if(jo(t)===Qb)return[];var e=J5(t);return[eD(t),e,eD(e)]}function KFn(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,m=f===void 0?!0:f,T=n.allowedAutoPlacements,Q=e.options.placement,_=jo(Q),v=_===Q,y=l||(v||!m?[J5(Q)]:YFn(Q)),b=[Q].concat(y).reduce(function($,ce){return $.concat(jo(ce)===Qb?WFn(e,{placement:ce,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:T}):ce)},[]),E=e.rects.reference,x=e.rects.popper,L=new Map,M=!0,C=b[0],A=0;A=0,F=O?"width":"height",V=i0(e,{placement:I,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),U=O?P?Xi:ci:P?Zi:li;E[F]>x[F]&&(U=J5(U));var G=J5(U),K=[];if(o&&K.push(V[N]<=0),a&&K.push(V[U]<=0,V[G]<=0),K.every(function($){return $})){C=I,M=!1;break}L.set(I,K)}if(M)for(var W=m?3:1,te=function(ce){var ye=b.find(function(z){var ne=L.get(z);if(ne)return ne.slice(0,ce).every(function(fe){return fe})});if(ye)return C=ye,"break"},de=W;de>0;de--){var X=te(de);if(X==="break")break}e.placement!==C&&(e.modifiersData[r]._skip=!0,e.placement=C,e.reset=!0)}}const ZFn={name:"flip",enabled:!0,phase:"main",fn:KFn,requiresIfExists:["offset"],data:{_skip:!1}};function nD(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function rD(t){return[li,Xi,Zi,ci].some(function(e){return t[e]>=0})}function XFn(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=i0(e,{elementContext:"reference"}),a=i0(e,{altBoundary:!0}),l=nD(s,r),c=nD(a,i,o),u=rD(l),d=rD(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const JFn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:XFn};function e$n(t,e,n){var r=jo(t),i=[ci,li].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[ci,Xi].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function t$n(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,s=k$.reduce(function(u,d){return u[d]=e$n(d,e.rects,o),u},{}),a=s[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}const n$n={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:t$n};function r$n(t){var e=t.state,n=t.name;e.modifiersData[n]=U$({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const i$n={name:"popperOffsets",enabled:!0,phase:"read",fn:r$n,data:{}};function o$n(t){return t==="x"?"y":"x"}function s$n(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,m=n.tetherOffset,T=m===void 0?0:m,Q=i0(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),_=jo(e.placement),v=lc(e.placement),y=!v,b=bb(_),E=o$n(b),x=e.modifiersData.popperOffsets,L=e.rects.reference,M=e.rects.popper,C=typeof T=="function"?T(Object.assign({},e.rects,{placement:e.placement})):T,A=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),I=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,N={x:0,y:0};if(x){if(o){var P,O=b==="y"?li:ci,F=b==="y"?Zi:Xi,V=b==="y"?"height":"width",U=x[b],G=U+Q[O],K=U-Q[F],W=f?-M[V]/2:0,te=v===oc?L[V]:M[V],de=v===oc?-M[V]:-L[V],X=e.elements.arrow,$=f&&X?yb(X):{width:0,height:0},ce=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:V$(),ye=ce[O],z=ce[F],ne=L4(0,L[V],$[V]),fe=y?L[V]/2-W-ne-ye-A.mainAxis:te-ne-ye-A.mainAxis,be=y?-L[V]/2+W+ne+z+A.mainAxis:de+ne+z+A.mainAxis,Le=e.elements.arrow&&J0(e.elements.arrow),se=Le?b==="y"?Le.clientTop||0:Le.clientLeft||0:0,Y=(P=I==null?void 0:I[b])!=null?P:0,j=U+fe-Y-se,ie=U+be-Y,Te=L4(f?Xu(G,j):G,U,f?K1(K,ie):K);x[b]=Te,N[b]=Te-U}if(a){var ve,ae=b==="x"?li:ci,Oe=b==="x"?Zi:Xi,Se=x[E],Me=E==="y"?"height":"width",ke=Se+Q[ae],Z=Se-Q[Oe],q=[li,ci].indexOf(_)!==-1,pe=(ve=I==null?void 0:I[E])!=null?ve:0,ue=q?ke:Se-L[Me]-M[Me]-pe+A.altAxis,_e=q?Se+L[Me]+M[Me]-pe-A.altAxis:Z,Ae=f&&q?MFn(ue,Se,_e):L4(f?ue:ke,Se,f?_e:Z);x[E]=Ae,N[E]=Ae-Se}e.modifiersData[r]=N}}const a$n={name:"preventOverflow",enabled:!0,phase:"main",fn:s$n,requiresIfExists:["offset"]};function l$n(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function c$n(t){return t===Si(t)||!ji(t)?Eb(t):l$n(t)}function u$n(t){var e=t.getBoundingClientRect(),n=sc(e.width)/t.offsetWidth||1,r=sc(e.height)/t.offsetHeight||1;return n!==1||r!==1}function d$n(t,e,n){n===void 0&&(n=!1);var r=ji(e),i=ji(e)&&u$n(e),o=t1(e),s=ac(t,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Ko(e)!=="body"||Sb(o))&&(a=c$n(e)),ji(e)?(l=ac(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=xb(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function f$n(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&i(l)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function p$n(t){var e=f$n(t);return xFn.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function h$n(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function T$n(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var iD={placement:"bottom",modifiers:[],strategy:"absolute"};function oD(){for(var t=arguments.length,e=new Array(t),n=0;n{this.createPopper()})},closeMenu(t){var e;!this.$el.contains(t.target)&&!((e=this.$refs.dropdown)!=null&&e.contains(t.target))&&(this.isOpen=!1)},createPopper(){const t=this.$el.querySelector("button"),e=this.$refs.dropdown;t&&e&&(this.popperInstance=y9(t,e,{placement:"bottom-end",modifiers:[{name:"flip",options:{fallbackPlacements:["top-end","bottom-start","top-start"]}},{name:"preventOverflow",options:{boundary:document.body}}]}))}}},Q$n={class:"relative inline-block text-left"},v$n={key:0,ref:"dropdown",class:"z-50 w-56 rounded-md shadow-lg bg-white dark:bg-gray-800 ring-1 ring-black ring-opacity-5 dark:ring-white dark:ring-opacity-20 focus:outline-none dropdown-shadow text-gray-700 dark:text-white"},y$n={class:"py-1",role:"menu","aria-orientation":"vertical","aria-labelledby":"options-menu"};function b$n(t,e,n,r,i,o){const s=pt("ToolbarButton");return k(),H("div",Q$n,[g("div",null,[oe(s,{onClick:he(o.toggleMenu,["stop"]),title:n.title,icon:"code"},null,8,["onClick","title"])]),(k(),wt(oz,{to:"body"},[i.isOpen?(k(),H("div",v$n,[g("div",y$n,[er(t.$slots,"default",{},void 0,!0)])],512)):re("",!0)]))])}const G$=yt(_$n,[["render",b$n],["__scopeId","data-v-6c3ea3a5"]]);async function sD(t,e="",n=[]){return new Promise((r,i)=>{const o=document.createElement("div");o.className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50",n.length===0?o.innerHTML=`

${t}

@@ -184,12 +184,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`),W=V,K=U),G===void 0&&(
- `,document.body.appendChild(o);const s=o.querySelector("#cancelButton"),a=o.querySelector("#okButton");s.addEventListener("click",()=>{document.body.removeChild(o),r(null)}),a.addEventListener("click",()=>{if(n.length===0){const c=o.querySelector("#replacementInput").value.trim();document.body.removeChild(o),r(c)}else{const c=o.querySelector("#options_selector").value.trim();document.body.removeChild(o),r(c)}})})}function E$n(t,e){console.log(t);let n={},r=/@<([^>]+)>@/g,i=[],o;for(;(o=r.exec(t))!==null;)i.push("@<"+o[1]+">@");console.log("matches"),console.log(i),i=[...new Set(i)];async function s(l){console.log(l);let c=l.toLowerCase().substring(2,l.length-2);if(c!=="generation_placeholder")if(c.includes(":")){Object.entries({all_language_options:"english:french:german:chinese:japanese:spanish:italian:russian:portuguese:swedish:danish:dutch:norwegian:slovak:czech:hungarian:polish:ukrainian:bulgarian:latvian:lithuanian:estonian:maltese:irish:galician:basque:welsh:breton:georgian:turkmen:kazakh:uzbek:tajik:afghan:sri-lankan:filipino:vietnamese:lao:cambodian:thai:burmese:kenyan:botswanan:zimbabwean:malawian:mozambican:angolan:namibian:south-african:madagascan:seychellois:mauritian:haitian:peruvian:ecuadorian:bolivian:paraguayan:chilean:argentinean:uruguayan:brazilian:colombian:venezuelan:puerto-rican:cuban:dominican:honduran:nicaraguan:salvadorean:guatemalan:el-salvadoran:belizean:panamanian:costa-rican:antiguan:barbudan:dominica's:grenada's:st-lucia's:st-vincent's:gibraltarian:faroe-islander:greenlandic:icelandic:jamaican:trinidadian:tobagonian:barbadian:anguillan:british-virgin-islander:us-virgin-islander:turkish:israeli:palestinian:lebanese:egyptian:libyan:tunisian:algerian:moroccan:bahraini:kuwaiti:saudi-arabian:yemeni:omani:irani:iraqi:afghanistan's:pakistani:indian:nepalese:sri-lankan:maldivan:burmese:thai:lao:vietnamese:kampuchean:malaysian:bruneian:indonesian:australian:new-zealanders:fijians:tongans:samoans:vanuatuans:wallisians:kiribatians:tuvaluans:solomon-islanders:marshallese:micronesians:hawaiians",all_programming_language_options:"python:c:c++:java:javascript:php:ruby:go:swift:kotlin:rust:haskell:erlang:lisp:scheme:prolog:cobol:fortran:pascal:delphi:d:eiffel:h:basic:visual_basic:smalltalk:objective-c:html5:node.js:vue.js:svelte:react:angular:ember:clipper:stex:arduino:brainfuck:r:assembly:mason:lepton:seacat:bbc_microbit:raspberry_pi_gpio:raspberry_pi_spi:raspberry_pi_i2c:raspberry_pi_uart:raspberry_pi_adc:raspberry_pi_ddio"}).forEach(([Q,_])=>{console.log(`Key: ${Q}, Value: ${_}`);function v(E){return E.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const y=v(Q),b=new RegExp(y,"g");c=c.replace(b,_)});let d=c.split(":"),h=d[0],f=d[1]||"",m=[];d.length>2&&(m=d.slice(1));let T=await sD(h,f,m);T!==null&&(n[l]=T)}else{let u=await sD(c);u!==null&&(n[l]=u)}}let a=Promise.resolve();i.forEach(l=>{a=a.then(()=>s(l)).then(c=>{console.log(c)})}),a.then(()=>{Object.entries(n).forEach(([l,c])=>{console.log(`Key: ${l}, Value: ${c}`);function u(f){return f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const d=u(l),h=new RegExp(d,"g");t=t.replace(h,c)}),e(t)})}const x$n={name:"PlayGroundView",data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},showSettings:!1,pending:!1,is_recording:!1,is_deaf_transcribing:!1,cpp_block:M$,html5_block:O$,LaTeX_block:R$,javascript_block:A$,json_block:w$,code_block:L$,python_block:C$,bash_block:N$,tokenize_icon:rFn,deaf_off:oFn,deaf_on:iFn,rec_off:aFn,rec_on:sFn,loading_icon:D$,isSynthesizingVoice:!1,audio_url:null,mdRenderHeight:300,selecting_model:!1,tab_id:"source",generating:!1,isSpeaking:!1,voices:[],isLesteningToVoice:!1,presets:[],selectedPreset:"",cursorPosition:0,namedTokens:[],text:"",pre_text:"",post_text:"",temperature:.1,top_k:50,top_p:.9,repeat_penalty:1.3,repeat_last_n:50,n_crop:-1,n_predicts:2e3,seed:-1,silenceTimeout:5e3}},components:{Toast:db,MarkdownRenderer:T9,ClipBoardTextInput:gb,TokensHilighter:KBn,ChatBarButton:_9,Card:Q9,ToolbarButton:_b,DropdownMenu:G$},mounted(){Qe.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}),tt.on("text_chunk",t=>{this.appendToOutput(t.chunk)}),tt.on("text_generated",t=>{this.generating=!1}),tt.on("generation_error",t=>{console.log("generation_error:",t),this.$refs.toast.showToast(`Error: ${t}`,4,!1),this.generating=!1}),tt.on("connect",()=>{console.log("Connected to LoLLMs server"),this.$store.state.isConnected=!0,this.generating=!1}),tt.on("buzzy",t=>{console.error("Server is busy. Wait for your turn",t),this.$refs.toast.showToast(`Error: ${t.message}`,4,!1),this.generating=!1}),tt.on("generation_canceled",t=>{this.generating=!1,console.log("Generation canceled OK")}),this.$nextTick(()=>{Ze.replace()}),"speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0&&this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged)):console.error("Speech synthesis is not supported in this browser.")},created(){},watch:{audio_url(t){t&&(console.log("Audio changed url to :",t),this.$refs.audio_player.src=t)}},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}},isTalking:{get(){return this.isSpeaking}}},methods:{triggerFileUpload(){this.$refs.fileInput.click()},handleFileUpload(t){this.file=this.$refs.fileInput.files[0],this.buttonText=this.file.name,this.uploadFile()},uploadFile(){console.log("sending file");const t=new FormData;t.append("file",this.file),Qe.post("/upload_voice/",t,{headers:{"Content-Type":"multipart/form-data"}}).then(e=>{console.log(e),this.buttonText="Upload a voice"}).catch(e=>{console.error(e)})},addBlock(t){let e=this.$refs.mdTextarea.selectionStart,n=this.$refs.mdTextarea.selectionEnd;e==n?speechSynthesis==0||this.text[e-1]==` + `,document.body.appendChild(o);const s=o.querySelector("#cancelButton"),a=o.querySelector("#okButton");s.addEventListener("click",()=>{document.body.removeChild(o),r(null)}),a.addEventListener("click",()=>{if(n.length===0){const c=o.querySelector("#replacementInput").value.trim();document.body.removeChild(o),r(c)}else{const c=o.querySelector("#options_selector").value.trim();document.body.removeChild(o),r(c)}})})}function E$n(t,e){console.log(t);let n={},r=/@<([^>]+)>@/g,i=[],o;for(;(o=r.exec(t))!==null;)i.push("@<"+o[1]+">@");console.log("matches"),console.log(i),i=[...new Set(i)];async function s(l){console.log(l);let c=l.toLowerCase().substring(2,l.length-2);if(c!=="generation_placeholder")if(c.includes(":")){Object.entries({all_language_options:"english:french:german:chinese:japanese:spanish:italian:russian:portuguese:swedish:danish:dutch:norwegian:slovak:czech:hungarian:polish:ukrainian:bulgarian:latvian:lithuanian:estonian:maltese:irish:galician:basque:welsh:breton:georgian:turkmen:kazakh:uzbek:tajik:afghan:sri-lankan:filipino:vietnamese:lao:cambodian:thai:burmese:kenyan:botswanan:zimbabwean:malawian:mozambican:angolan:namibian:south-african:madagascan:seychellois:mauritian:haitian:peruvian:ecuadorian:bolivian:paraguayan:chilean:argentinean:uruguayan:brazilian:colombian:venezuelan:puerto-rican:cuban:dominican:honduran:nicaraguan:salvadorean:guatemalan:el-salvadoran:belizean:panamanian:costa-rican:antiguan:barbudan:dominica's:grenada's:st-lucia's:st-vincent's:gibraltarian:faroe-islander:greenlandic:icelandic:jamaican:trinidadian:tobagonian:barbadian:anguillan:british-virgin-islander:us-virgin-islander:turkish:israeli:palestinian:lebanese:egyptian:libyan:tunisian:algerian:moroccan:bahraini:kuwaiti:saudi-arabian:yemeni:omani:irani:iraqi:afghanistan's:pakistani:indian:nepalese:sri-lankan:maldivan:burmese:thai:lao:vietnamese:kampuchean:malaysian:bruneian:indonesian:australian:new-zealanders:fijians:tongans:samoans:vanuatuans:wallisians:kiribatians:tuvaluans:solomon-islanders:marshallese:micronesians:hawaiians",all_programming_language_options:"python:c:c++:java:javascript:php:ruby:go:swift:kotlin:rust:haskell:erlang:lisp:scheme:prolog:cobol:fortran:pascal:delphi:d:eiffel:h:basic:visual_basic:smalltalk:objective-c:html5:node.js:vue.js:svelte:react:angular:ember:clipper:stex:arduino:brainfuck:r:assembly:mason:lepton:seacat:bbc_microbit:raspberry_pi_gpio:raspberry_pi_spi:raspberry_pi_i2c:raspberry_pi_uart:raspberry_pi_adc:raspberry_pi_ddio"}).forEach(([Q,_])=>{console.log(`Key: ${Q}, Value: ${_}`);function v(E){return E.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const y=v(Q),b=new RegExp(y,"g");c=c.replace(b,_)});let d=c.split(":"),h=d[0],f=d[1]||"",m=[];d.length>2&&(m=d.slice(1));let T=await sD(h,f,m);T!==null&&(n[l]=T)}else{let u=await sD(c);u!==null&&(n[l]=u)}}let a=Promise.resolve();i.forEach(l=>{a=a.then(()=>s(l)).then(c=>{console.log(c)})}),a.then(()=>{Object.entries(n).forEach(([l,c])=>{console.log(`Key: ${l}, Value: ${c}`);function u(f){return f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const d=u(l),h=new RegExp(d,"g");t=t.replace(h,c)}),e(t)})}const x$n={name:"PlayGroundView",data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},showSettings:!1,pending:!1,is_recording:!1,is_deaf_transcribing:!1,cpp_block:M$,html5_block:O$,LaTeX_block:R$,javascript_block:A$,json_block:w$,code_block:L$,python_block:C$,bash_block:N$,tokenize_icon:rFn,deaf_off:oFn,deaf_on:iFn,rec_off:aFn,rec_on:sFn,loading_icon:D$,isSynthesizingVoice:!1,audio_url:null,mdRenderHeight:300,selecting_model:!1,tab_id:"source",generating:!1,isSpeaking:!1,voices:[],isLesteningToVoice:!1,presets:[],selectedPreset:"",cursorPosition:0,namedTokens:[],text:"",pre_text:"",post_text:"",temperature:.1,top_k:50,top_p:.9,repeat_penalty:1.3,repeat_last_n:50,n_crop:-1,n_predicts:2e3,seed:-1,silenceTimeout:5e3}},components:{Toast:db,MarkdownRenderer:T9,ClipBoardTextInput:gb,TokensHilighter:KBn,ChatBarButton:_9,Card:Q9,ToolbarButton:_b,DropdownMenu:G$},mounted(){Qe.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}),Je.on("text_chunk",t=>{this.appendToOutput(t.chunk)}),Je.on("text_generated",t=>{this.generating=!1}),Je.on("generation_error",t=>{console.log("generation_error:",t),this.$refs.toast.showToast(`Error: ${t}`,4,!1),this.generating=!1}),Je.on("connect",()=>{console.log("Connected to LoLLMs server"),this.$store.state.isConnected=!0,this.generating=!1}),Je.on("buzzy",t=>{console.error("Server is busy. Wait for your turn",t),this.$refs.toast.showToast(`Error: ${t.message}`,4,!1),this.generating=!1}),Je.on("generation_canceled",t=>{this.generating=!1,console.log("Generation canceled OK")}),this.$nextTick(()=>{Ze.replace()}),"speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0&&this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged)):console.error("Speech synthesis is not supported in this browser.")},created(){},watch:{audio_url(t){t&&(console.log("Audio changed url to :",t),this.$refs.audio_player.src=t)}},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}},isTalking:{get(){return this.isSpeaking}}},methods:{triggerFileUpload(){this.$refs.fileInput.click()},handleFileUpload(t){this.file=this.$refs.fileInput.files[0],this.buttonText=this.file.name,this.uploadFile()},uploadFile(){console.log("sending file");const t=new FormData;t.append("file",this.file),Qe.post("/upload_voice/",t,{headers:{"Content-Type":"multipart/form-data"}}).then(e=>{console.log(e),this.buttonText="Upload a voice"}).catch(e=>{console.error(e)})},addBlock(t){let e=this.$refs.mdTextarea.selectionStart,n=this.$refs.mdTextarea.selectionEnd;e==n?speechSynthesis==0||this.text[e-1]==` `?(this.text=this.text.slice(0,e)+"```"+t+"\n\n```\n"+this.text.slice(e),e=e+4+t.length):(this.text=this.text.slice(0,e)+"\n```"+t+"\n\n```\n"+this.text.slice(e),e=e+3+t.length):speechSynthesis==0||this.text[e-1]==` `?(this.text=this.text.slice(0,e)+"```"+t+` `+this.text.slice(e,n)+"\n```\n"+this.text.slice(n),e=e+4+t.length):(this.text=this.text.slice(0,e)+"\n```"+t+` `+this.text.slice(e,n)+"\n```\n"+this.text.slice(n),e=e+3+t.length),this.$refs.mdTextarea.focus(),this.$refs.mdTextarea.selectionStart=this.$refs.mdTextarea.selectionEnd=p},insertTab(t){const e=t.target,n=e.selectionStart,r=e.selectionEnd,i=e.value.substring(0,n),o=e.value.substring(r),s=i+" "+o;this.text=s,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4}),t.preventDefault()},mdTextarea_changed(){console.log("mdTextarea_changed"),this.cursorPosition=this.$refs.mdTextarea.selectionStart},mdTextarea_clicked(){console.log(`mdTextarea_clicked: ${this.$refs.mdTextarea.selectionStart}`),this.cursorPosition=this.$refs.mdTextarea.selectionStart},setModel(){this.selecting_model=!0,Qe.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:this.selectedModel}).then(t=>{console.log(t),t.status&&this.$refs.toast.showToast(`Model changed to ${this.selectedModel}`,4,!0),this.selecting_model=!1}).catch(t=>{this.$refs.toast.showToast(`Error ${t}`,4,!0),this.selecting_model=!1})},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},read(){console.log("READING..."),this.isSynthesizingVoice=!0;let t=this.$refs.mdTextarea.selectionStart,e=this.$refs.mdTextarea.selectionEnd,n=this.text;t!=e&&(n=n.slice(t,e)),Qe.post("./text2Wave",{client_id:this.$store.state.client_id,text:n}).then(r=>{console.log(r.data.url);let i=r.data.url;this.audio_url=i,this.isSynthesizingVoice=!1,ze(()=>{Ze.replace()})}).catch(r=>{this.$refs.toast.showToast(`Error: ${r}`,4,!1),this.isSynthesizingVoice=!1,ze(()=>{Ze.replace()})})},speak(){if(this.msg){this.speechSynthesis.cancel(),this.msg=null,this.isSpeaking=!1;return}let t=0;console.log("voice on"),this.isSpeaking=!0;const e=200;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 n=i=>{let o=this.text.substring(i,i+e);const s=[".","!","?",` -`];let a=-1;return s.forEach(l=>{const c=o.lastIndexOf(l);c>a&&(a=c)}),a==-1&&(a=o.length),console.log(a),a+i+1},r=()=>{const i=n(t),o=this.text.substring(t,i);this.msg.text=o,t=i+1,this.msg.onend=s=>{t{r()},1):(this.isSpeaking=!1,console.log("voice off :",this.text.length," ",i))},this.speechSynthesis.speak(this.msg)};r()},getCursorPosition(){return this.$refs.mdTextarea.selectionStart},appendToOutput(t){this.pre_text+=t,this.text=this.pre_text+this.post_text},generate_in_placeholder(){console.log("Finding cursor position");let t=this.text.indexOf("@@");if(t<0){this.$refs.toast.showToast("No generation placeholder found",4,!1);return}this.text=this.text.substring(0,t)+this.text.substring(t+26,this.text.length),this.pre_text=this.text.substring(0,t),this.post_text=this.text.substring(t,this.text.length);var e=this.text.substring(0,t);console.log(e),tt.emit("generate_text",{prompt:e,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},async tokenize_text(){const t=await Qe.post("/lollms_tokenize",{prompt:this.text,return_named:!0},{headers:this.posts_headers});console.log(t.data),this.namedTokens=t.data.named_tokens},generate(){console.log("Finding cursor position"),this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length);var t=this.text.substring(0,this.getCursorPosition());console.log(this.text),console.log(`cursor position :${this.getCursorPosition()}`),console.log(`pretext:${this.pre_text}`),console.log(`post_text:${this.post_text}`),console.log(`prompt:${t}`),tt.emit("generate_text",{prompt:t,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},stopGeneration(){tt.emit("cancel_text_generation",{})},exportText(){const t=this.text,e=document.createElement("a"),n=new Blob([t],{type:"text/plain"});e.href=URL.createObjectURL(n),e.download="exported_text.txt",document.body.appendChild(e),e.click(),document.body.removeChild(e)},importText(){const t=document.getElementById("import-input");t&&(t.addEventListener("change",e=>{if(e.target.files&&e.target.files[0]){const n=new FileReader;n.onload=()=>{this.text=n.result},n.readAsText(e.target.files[0])}else alert("Please select a file.")}),t.click())},setPreset(){console.log("Setting preset"),console.log(this.selectedPreset),this.tab_id="render",this.text=E$n(this.selectedPreset.content,t=>{console.log("Done"),console.log(t),this.text=t})},addPreset(){let t=prompt("Enter the title of the preset:");this.presets[t]={client_id:this.$store.state.client_id,name:t,content:this.text},Qe.post("./add_preset",this.presets[t]).then(e=>{console.log(e.data)}).catch(e=>{this.$refs.toast.showToast(`Error: ${e}`,4,!1)})},removePreset(){this.selectedPreset&&delete this.presets[this.selectedPreset.name]},reloadPresets(){Qe.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},startRecording(){this.pending=!0,this.is_recording?Qe.post("/stop_recording",{client_id:this.$store.state.client_id}).then(t=>{this.is_recording=!1,this.pending=!1,console.log(t),this.text+=t.data,console.log("text"),console.log(this.text),console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}):Qe.post("/start_recording",{client_id:this.$store.state.client_id}).then(t=>{this.is_recording=!0,this.pending=!1,console.log(t.data)}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},startRecordingAndTranscribing(){this.pending=!0,this.is_deaf_transcribing?Qe.get("/stop_recording").then(t=>{this.is_deaf_transcribing=!1,this.pending=!1,this.text=t.data.text,this.read()}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}):Qe.get("/start_recording").then(t=>{this.is_deaf_transcribing=!0,this.pending=!1}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},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.isLesteningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length),this.recognition.onresult=t=>{this.generated="";for(let e=t.resultIndex;e{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,this.pre_text=this.pre_text+this.generated,this.cursorPosition=this.pre_text.length,clearTimeout(this.silenceTimer)},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")}}},S$n={class:"container w-full background-color shadow-lg 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"},L$n={class:"container flex flex-row m-2 w-full"},C$n={class:"flex-grow w-full m-2"},A$n={class:"flex panels-color gap-3 flex-1 items-center flex-grow flex-row rounded-md border-2 border-blue-300 m-2 p-4"},w$n={class:"flex items-center space-x-2"},M$n=["src"],O$n=["src"],R$n=["src"],N$n=["src"],D$n=["src"],I$n={key:1,class:"w-6 h-6"},k$n={class:"flex gap-3 flex-1 items-center flex-grow justify-end"},P$n={key:0},H$n=["src"],V$n={key:2},B$n={key:0,class:"settings scrollbar bg-white dark:bg-gray-800 rounded-lg shadow-md p-6"},F$n=["value"],$$n={key:0,title:"Selecting model",class:"flex flex-row flex-grow justify-end"},U$n=["value"],G$n={class:"slider-container ml-2 mr-2"},q$n={class:"slider-value text-gray-500"},z$n={class:"slider-container ml-2 mr-2"},j$n={class:"slider-value text-gray-500"},W$n={class:"slider-container ml-2 mr-2"},Y$n={class:"slider-value text-gray-500"},K$n={class:"slider-container ml-2 mr-2"},Z$n={class:"slider-value text-gray-500"},X$n={class:"slider-container ml-2 mr-2"},J$n={class:"slider-value text-gray-500"},eUn={class:"slider-container ml-2 mr-2"},tUn={class:"slider-value text-gray-500"},nUn={class:"slider-container ml-2 mr-2"},rUn={class:"slider-value text-gray-500"},iUn={class:"slider-container ml-2 mr-2"},oUn={class:"slider-value text-gray-500"};function sUn(t,e,n,r,i,o){const s=pt("ChatBarButton"),a=pt("ToolbarButton"),l=pt("DropdownSubmenu"),c=pt("DropdownMenu"),u=pt("tokens-hilighter"),d=pt("MarkdownRenderer"),h=pt("Card"),f=pt("Toast");return k(),H(Ue,null,[g("div",S$n,[g("div",L$n,[g("div",C$n,[g("div",A$n,[g("div",w$n,[J(oe(s,{onClick:o.generate,title:"Generate from the current cursor position"},{icon:He(()=>e[54]||(e[54]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})],-1)])),_:1},8,["onClick"]),[[Pt,!i.generating]]),J(oe(s,{onClick:o.generate_in_placeholder,title:"Generate from the next placeholder"},{icon:He(()=>e[55]||(e[55]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"})],-1)])),_:1},8,["onClick"]),[[Pt,!i.generating]]),J(oe(s,{onClick:o.tokenize_text,title:"Tokenize the text"},{icon:He(()=>[g("img",{src:i.tokenize_icon,alt:"Tokenize",class:"h-5 w-5"},null,8,M$n)]),_:1},8,["onClick"]),[[Pt,!i.generating]]),e[65]||(e[65]=g("span",{class:"w-80"},null,-1)),J(oe(s,{onClick:o.stopGeneration,title:"Stop generation"},{icon:He(()=>e[56]||(e[56]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])),_:1},8,["onClick"]),[[Pt,i.generating]]),oe(s,{onClick:o.startSpeechRecognition,class:je({"text-red-500":t.isListeningToVoice}),title:"Dictate (using your browser's transcription)"},{icon:He(()=>e[57]||(e[57]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),oe(s,{onClick:o.speak,class:je({"text-red-500":o.isTalking}),title:"Convert text to audio (not saved, uses your browser's TTS service)"},{icon:He(()=>e[58]||(e[58]=[nt(" 🪶 ")])),_:1},8,["onClick","class"]),oe(s,{onClick:o.triggerFileUpload,title:"Upload a voice"},{icon:He(()=>e[59]||(e[59]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),oe(s,{onClick:o.startRecordingAndTranscribing,class:je({"text-green-500":i.isLesteningToVoice}),title:"Start audio to audio"},{icon:He(()=>[i.pending?(k(),H("img",{key:1,src:i.loading_icon,alt:"Loading",class:"h-5 w-5"},null,8,R$n)):(k(),H("img",{key:0,src:i.is_deaf_transcribing?i.deaf_on:i.deaf_off,alt:"Deaf",class:"h-5 w-5"},null,8,O$n))]),_:1},8,["onClick","class"]),oe(s,{onClick:o.startRecording,class:je({"text-green-500":i.isLesteningToVoice}),title:"Start audio recording"},{icon:He(()=>[i.pending?(k(),H("img",{key:1,src:i.loading_icon,alt:"Loading",class:"h-5 w-5"},null,8,D$n)):(k(),H("img",{key:0,src:i.is_recording?i.rec_on:i.rec_off,alt:"Record",class:"h-5 w-5"},null,8,N$n))]),_:1},8,["onClick","class"]),i.isSynthesizingVoice?(k(),H("div",I$n,e[61]||(e[61]=[g("svg",{class:"animate-spin h-5 w-5 text-secondary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[g("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),g("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)]))):(k(),wt(s,{key:0,onClick:o.read,title:"Generate audio from text"},{icon:He(()=>e[60]||(e[60]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"])),J(oe(s,{onClick:o.exportText,title:"Export text"},{icon:He(()=>e[62]||(e[62]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1)])),_:1},8,["onClick"]),[[Pt,!i.generating]]),J(oe(s,{onClick:o.importText,title:"Import text"},{icon:He(()=>e[63]||(e[63]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)])),_:1},8,["onClick"]),[[Pt,!i.generating]]),oe(s,{onClick:e[0]||(e[0]=m=>i.showSettings=!i.showSettings),title:"Settings"},{icon:He(()=>e[64]||(e[64]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"}),g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)])),_:1})]),g("input",{type:"file",ref:"fileInput",onChange:e[1]||(e[1]=(...m)=>o.handleFileUpload&&o.handleFileUpload(...m)),style:{display:"none"},accept:".wav"},null,544),g("div",k$n,[g("button",{class:je(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":i.tab_id=="source"}]),onClick:e[2]||(e[2]=m=>i.tab_id="source")}," Source ",2),g("button",{class:je(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":i.tab_id=="render"}]),onClick:e[3]||(e[3]=m=>i.tab_id="render")}," Render ",2)]),e[66]||(e[66]=g("input",{type:"file",id:"import-input",class:"hidden"},null,-1))]),g("div",{class:je(["flex-grow m-2 p-2 border panels-color border-blue-300 rounded-md",{"border-red-500":i.generating}])},[i.tab_id==="source"?(k(),H("div",P$n,[oe(c,{title:"Add Block"},{default:He(()=>[oe(l,{title:"Programming Languages",icon:"code"},{default:He(()=>[oe(a,{onClick:e[4]||(e[4]=he(m=>o.addBlock("python"),["stop"])),title:"Python",icon:"python"}),oe(a,{onClick:e[5]||(e[5]=he(m=>o.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),oe(a,{onClick:e[6]||(e[6]=he(m=>o.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),oe(a,{onClick:e[7]||(e[7]=he(m=>o.addBlock("java"),["stop"])),title:"Java",icon:"java"}),oe(a,{onClick:e[8]||(e[8]=he(m=>o.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),oe(a,{onClick:e[9]||(e[9]=he(m=>o.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),oe(a,{onClick:e[10]||(e[10]=he(m=>o.addBlock("go"),["stop"])),title:"Go",icon:"go"}),oe(a,{onClick:e[11]||(e[11]=he(m=>o.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),oe(a,{onClick:e[12]||(e[12]=he(m=>o.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),oe(a,{onClick:e[13]||(e[13]=he(m=>o.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),oe(a,{onClick:e[14]||(e[14]=he(m=>o.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),oe(l,{title:"Web Technologies",icon:"web"},{default:He(()=>[oe(a,{onClick:e[15]||(e[15]=he(m=>o.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),oe(a,{onClick:e[16]||(e[16]=he(m=>o.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),oe(a,{onClick:e[17]||(e[17]=he(m=>o.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),oe(a,{onClick:e[18]||(e[18]=he(m=>o.addBlock("react"),["stop"])),title:"React",icon:"react"}),oe(a,{onClick:e[19]||(e[19]=he(m=>o.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),oe(l,{title:"Markup and Data",icon:"file-code"},{default:He(()=>[oe(a,{onClick:e[20]||(e[20]=he(m=>o.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),oe(a,{onClick:e[21]||(e[21]=he(m=>o.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),oe(a,{onClick:e[22]||(e[22]=he(m=>o.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),oe(a,{onClick:e[23]||(e[23]=he(m=>o.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),oe(a,{onClick:e[24]||(e[24]=he(m=>o.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),oe(l,{title:"Scripting and Shell",icon:"terminal"},{default:He(()=>[oe(a,{onClick:e[25]||(e[25]=he(m=>o.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),oe(a,{onClick:e[26]||(e[26]=he(m=>o.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),oe(a,{onClick:e[27]||(e[27]=he(m=>o.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),oe(l,{title:"Diagramming",icon:"sitemap"},{default:He(()=>[oe(a,{onClick:e[28]||(e[28]=he(m=>o.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),oe(a,{onClick:e[29]||(e[29]=he(m=>o.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),oe(a,{onClick:e[30]||(e[30]=he(m=>o.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),oe(l,{title:"Database",icon:"database"},{default:He(()=>[oe(a,{onClick:e[31]||(e[31]=he(m=>o.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),oe(a,{onClick:e[32]||(e[32]=he(m=>o.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),oe(a,{onClick:e[33]||(e[33]=he(m=>o.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1}),oe(a,{onClick:e[34]||(e[34]=he(m=>t.copyContentToClipboard(),["stop"])),title:"Copy message to clipboard",icon:"copy"}),J(g("textarea",{ref:"mdTextarea",onKeydown:e[35]||(e[35]=Xr(he((...m)=>o.insertTab&&o.insertTab(...m),["prevent"]),["tab"])),class:"block min-h-500 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,style:xn({minHeight:i.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[36]||(e[36]=m=>i.text=m),onClick:e[37]||(e[37]=he((...m)=>o.mdTextarea_clicked&&o.mdTextarea_clicked(...m),["prevent"])),onChange:e[38]||(e[38]=he((...m)=>o.mdTextarea_changed&&o.mdTextarea_changed(...m),["prevent"]))}," ",36),[[we,i.text]]),g("span",null,"Cursor position "+le(i.cursorPosition),1)])):re("",!0),i.audio_url!=null?(k(),H("audio",{controls:"",key:i.audio_url},[g("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,H$n),e[67]||(e[67]=nt(" Your browser does not support the audio element. "))])):re("",!0),oe(u,{namedTokens:i.namedTokens},null,8,["namedTokens"]),i.tab_id==="render"?(k(),H("div",V$n,[oe(d,{ref:"mdRender",client_id:this.$store.state.client_id,message_id:0,discussion_id:0,"markdown-text":i.text,class:"mt-4 p-2 rounded shadow-lg dark:bg-bg-dark"},null,8,["client_id","markdown-text"])])):re("",!0)],2)]),i.showSettings?(k(),H("div",B$n,[e[82]||(e[82]=g("h2",{class:"text-2xl font-bold text-gray-900 dark:text-white mb-4"},"Settings",-1)),oe(h,{title:"Model",class:"slider-container ml-0 mr-0",isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[J(g("select",{"onUpdate:modelValue":e[39]||(e[39]=m=>this.$store.state.selectedModel=m),onChange:e[40]||(e[40]=(...m)=>o.setModel&&o.setModel(...m)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(k(!0),H(Ue,null,ot(o.models,m=>(k(),H("option",{key:m,value:m},le(m),9,F$n))),128))],544),[[pn,this.$store.state.selectedModel]]),i.selecting_model?(k(),H("div",$$n,e[68]||(e[68]=[g("div",{role:"status"},[g("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"},[g("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"}),g("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"})]),g("span",{class:"sr-only"},"Selecting model...")],-1)]))):re("",!0)]),_:1}),oe(h,{title:"Presets",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[J(g("select",{"onUpdate:modelValue":e[41]||(e[41]=m=>i.selectedPreset=m),class:"bg-white dark:bg-black mb-2 border-2 rounded-md shadow-sm w-full"},[(k(!0),H(Ue,null,ot(i.presets,m=>(k(),H("option",{key:m,value:m},le(m.name),9,U$n))),128))],512),[[pn,i.selectedPreset]]),e[73]||(e[73]=g("br",null,null,-1)),g("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[42]||(e[42]=(...m)=>o.setPreset&&o.setPreset(...m)),title:"Use preset"},e[69]||(e[69]=[g("i",{"data-feather":"check"},null,-1)])),g("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[43]||(e[43]=(...m)=>o.addPreset&&o.addPreset(...m)),title:"Add this text as a preset"},e[70]||(e[70]=[g("i",{"data-feather":"plus"},null,-1)])),g("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[44]||(e[44]=(...m)=>o.removePreset&&o.removePreset(...m)),title:"Remove preset"},e[71]||(e[71]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[45]||(e[45]=(...m)=>o.reloadPresets&&o.reloadPresets(...m)),title:"Reload presets list"},e[72]||(e[72]=[g("i",{"data-feather":"refresh-ccw"},null,-1)]))]),_:1}),oe(h,{title:"Generation params",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[g("div",G$n,[e[74]||(e[74]=g("h3",{class:"text-gray-600"},"Temperature",-1)),J(g("input",{type:"range","onUpdate:modelValue":e[46]||(e[46]=m=>i.temperature=m),min:"0",max:"5",step:"0.1",class:"w-full"},null,512),[[we,i.temperature]]),g("span",q$n,"Current value: "+le(i.temperature),1)]),g("div",z$n,[e[75]||(e[75]=g("h3",{class:"text-gray-600"},"Top K",-1)),J(g("input",{type:"range","onUpdate:modelValue":e[47]||(e[47]=m=>i.top_k=m),min:"1",max:"100",step:"1",class:"w-full"},null,512),[[we,i.top_k]]),g("span",j$n,"Current value: "+le(i.top_k),1)]),g("div",W$n,[e[76]||(e[76]=g("h3",{class:"text-gray-600"},"Top P",-1)),J(g("input",{type:"range","onUpdate:modelValue":e[48]||(e[48]=m=>i.top_p=m),min:"0",max:"1",step:"0.1",class:"w-full"},null,512),[[we,i.top_p]]),g("span",Y$n,"Current value: "+le(i.top_p),1)]),g("div",K$n,[e[77]||(e[77]=g("h3",{class:"text-gray-600"},"Repeat Penalty",-1)),J(g("input",{type:"range","onUpdate:modelValue":e[49]||(e[49]=m=>i.repeat_penalty=m),min:"0",max:"5",step:"0.1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[we,i.repeat_penalty]]),g("span",Z$n,"Current value: "+le(i.repeat_penalty),1)]),g("div",X$n,[e[78]||(e[78]=g("h3",{class:"text-gray-600"},"Repeat Last N",-1)),J(g("input",{type:"range","onUpdate:modelValue":e[50]||(e[50]=m=>i.repeat_last_n=m),min:"0",max:"100",step:"1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[we,i.repeat_last_n]]),g("span",J$n,"Current value: "+le(i.repeat_last_n),1)]),g("div",eUn,[e[79]||(e[79]=g("h3",{class:"text-gray-600"},"Number of tokens to crop the text to",-1)),J(g("input",{type:"number","onUpdate:modelValue":e[51]||(e[51]=m=>i.n_crop=m),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[we,i.n_crop]]),g("span",tUn,"Current value: "+le(i.n_crop),1)]),g("div",nUn,[e[80]||(e[80]=g("h3",{class:"text-gray-600"},"Number of tokens to generate",-1)),J(g("input",{type:"number","onUpdate:modelValue":e[52]||(e[52]=m=>i.n_predicts=m),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[we,i.n_predicts]]),g("span",rUn,"Current value: "+le(i.n_predicts),1)]),g("div",iUn,[e[81]||(e[81]=g("h3",{class:"text-gray-600"},"Seed",-1)),J(g("input",{type:"number","onUpdate:modelValue":e[53]||(e[53]=m=>i.seed=m),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[we,i.seed]]),g("span",oUn,"Current value: "+le(i.seed),1)])]),_:1})])):re("",!0)])]),oe(f,{ref:"toast"},null,512)],64)}const aUn=yt(x$n,[["render",sUn]]),lUn={data(){return{activeExtension:null}},computed:{activeExtensions(){return console.log(this.$store.state.extensionsZoo),console.log(NG(this.$store.state.extensionsZoo)),this.$store.state.extensionsZoo}},methods:{showExtensionPage(t){this.activeExtension=t}}},cUn={class:"container overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 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"},uUn={key:0},dUn=["onClick"],fUn={key:0},pUn=["src"],hUn={key:1};function TUn(t,e,n,r,i,o){return k(),H("div",cUn,[o.activeExtensions.length>0?(k(),H("div",uUn,[(k(!0),H(Ue,null,ot(o.activeExtensions,s=>(k(),H("div",{key:s.name,onClick:a=>o.showExtensionPage(s)},[g("div",{class:je({"active-tab":s===i.activeExtension})},le(s.name),3)],8,dUn))),128)),i.activeExtension?(k(),H("div",fUn,[g("iframe",{src:i.activeExtension.page,width:"100%",height:"500px",frameborder:"0"},null,8,pUn)])):re("",!0)])):(k(),H("div",hUn,e[0]||(e[0]=[g("p",null,"No extension is active. Please install and activate an extension.",-1)])))])}const mUn=yt(lUn,[["render",TUn]]);function Lb(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let A2=Lb();function q$(t){A2=t}const z$=/[&<>"']/,gUn=new RegExp(z$.source,"g"),j$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,_Un=new RegExp(j$.source,"g"),QUn={"&":"&","<":"<",">":">",'"':""","'":"'"},aD=t=>QUn[t];function vi(t,e){if(e){if(z$.test(t))return t.replace(gUn,aD)}else if(j$.test(t))return t.replace(_Un,aD);return t}const vUn=/(^|[^\[])\^/g;function Ln(t,e){let n=typeof t=="string"?t:t.source;e=e||"";const r={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(vUn,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,e)};return r}function lD(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const A4={exec:()=>null};function cD(t,e){const n=t.replace(/\|/g,(o,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length{const c=o.lastIndexOf(l);c>a&&(a=c)}),a==-1&&(a=o.length),console.log(a),a+i+1},r=()=>{const i=n(t),o=this.text.substring(t,i);this.msg.text=o,t=i+1,this.msg.onend=s=>{t{r()},1):(this.isSpeaking=!1,console.log("voice off :",this.text.length," ",i))},this.speechSynthesis.speak(this.msg)};r()},getCursorPosition(){return this.$refs.mdTextarea.selectionStart},appendToOutput(t){this.pre_text+=t,this.text=this.pre_text+this.post_text},generate_in_placeholder(){console.log("Finding cursor position");let t=this.text.indexOf("@@");if(t<0){this.$refs.toast.showToast("No generation placeholder found",4,!1);return}this.text=this.text.substring(0,t)+this.text.substring(t+26,this.text.length),this.pre_text=this.text.substring(0,t),this.post_text=this.text.substring(t,this.text.length);var e=this.text.substring(0,t);console.log(e),Je.emit("generate_text",{prompt:e,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},async tokenize_text(){const t=await Qe.post("/lollms_tokenize",{prompt:this.text,return_named:!0},{headers:this.posts_headers});console.log(t.data),this.namedTokens=t.data},generate(){console.log("Finding cursor position"),this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length);var t=this.text.substring(0,this.getCursorPosition());console.log(this.text),console.log(`cursor position :${this.getCursorPosition()}`),console.log(`pretext:${this.pre_text}`),console.log(`post_text:${this.post_text}`),console.log(`prompt:${t}`),Je.emit("generate_text",{prompt:t,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},stopGeneration(){Je.emit("cancel_text_generation",{})},exportText(){const t=this.text,e=document.createElement("a"),n=new Blob([t],{type:"text/plain"});e.href=URL.createObjectURL(n),e.download="exported_text.txt",document.body.appendChild(e),e.click(),document.body.removeChild(e)},importText(){const t=document.getElementById("import-input");t&&(t.addEventListener("change",e=>{if(e.target.files&&e.target.files[0]){const n=new FileReader;n.onload=()=>{this.text=n.result},n.readAsText(e.target.files[0])}else alert("Please select a file.")}),t.click())},setPreset(){console.log("Setting preset"),console.log(this.selectedPreset),this.tab_id="render",this.text=E$n(this.selectedPreset.content,t=>{console.log("Done"),console.log(t),this.text=t})},addPreset(){let t=prompt("Enter the title of the preset:");this.presets[t]={client_id:this.$store.state.client_id,name:t,content:this.text},Qe.post("./add_preset",this.presets[t]).then(e=>{console.log(e.data)}).catch(e=>{this.$refs.toast.showToast(`Error: ${e}`,4,!1)})},removePreset(){this.selectedPreset&&delete this.presets[this.selectedPreset.name]},reloadPresets(){Qe.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},startRecording(){this.pending=!0,this.is_recording?Qe.post("/stop_recording",{client_id:this.$store.state.client_id}).then(t=>{this.is_recording=!1,this.pending=!1,console.log(t),this.text+=t.data,console.log("text"),console.log(this.text),console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}):Qe.post("/start_recording",{client_id:this.$store.state.client_id}).then(t=>{this.is_recording=!0,this.pending=!1,console.log(t.data)}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},startRecordingAndTranscribing(){this.pending=!0,this.is_deaf_transcribing?Qe.get("/stop_recording").then(t=>{this.is_deaf_transcribing=!1,this.pending=!1,this.text=t.data.text,this.read()}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)}):Qe.get("/start_recording").then(t=>{this.is_deaf_transcribing=!0,this.pending=!1}).catch(t=>{this.$refs.toast.showToast(`Error: ${t}`,4,!1)})},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.isLesteningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length),this.recognition.onresult=t=>{this.generated="";for(let e=t.resultIndex;e{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,this.pre_text=this.pre_text+this.generated,this.cursorPosition=this.pre_text.length,clearTimeout(this.silenceTimer)},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")}}},S$n={class:"container w-full background-color shadow-lg 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"},L$n={class:"container flex flex-row m-2 w-full"},C$n={class:"flex-grow w-full m-2"},A$n={class:"flex panels-color gap-3 flex-1 items-center flex-grow flex-row rounded-md border-2 border-blue-300 m-2 p-4"},w$n={class:"flex items-center space-x-2"},M$n=["src"],O$n=["src"],R$n=["src"],N$n=["src"],D$n=["src"],I$n={key:1,class:"w-6 h-6"},k$n={class:"flex gap-3 flex-1 items-center flex-grow justify-end"},P$n={key:0},H$n=["src"],V$n={key:2},B$n={key:0,class:"settings scrollbar bg-white dark:bg-gray-800 rounded-lg shadow-md p-6"},F$n=["value"],$$n={key:0,title:"Selecting model",class:"flex flex-row flex-grow justify-end"},U$n=["value"],G$n={class:"slider-container ml-2 mr-2"},q$n={class:"slider-value text-gray-500"},z$n={class:"slider-container ml-2 mr-2"},j$n={class:"slider-value text-gray-500"},W$n={class:"slider-container ml-2 mr-2"},Y$n={class:"slider-value text-gray-500"},K$n={class:"slider-container ml-2 mr-2"},Z$n={class:"slider-value text-gray-500"},X$n={class:"slider-container ml-2 mr-2"},J$n={class:"slider-value text-gray-500"},eUn={class:"slider-container ml-2 mr-2"},tUn={class:"slider-value text-gray-500"},nUn={class:"slider-container ml-2 mr-2"},rUn={class:"slider-value text-gray-500"},iUn={class:"slider-container ml-2 mr-2"},oUn={class:"slider-value text-gray-500"};function sUn(t,e,n,r,i,o){const s=pt("ChatBarButton"),a=pt("ToolbarButton"),l=pt("DropdownSubmenu"),c=pt("DropdownMenu"),u=pt("tokens-hilighter"),d=pt("MarkdownRenderer"),h=pt("Card"),f=pt("Toast");return k(),H(Ue,null,[g("div",S$n,[g("div",L$n,[g("div",C$n,[g("div",A$n,[g("div",w$n,[J(oe(s,{onClick:o.generate,title:"Generate from the current cursor position"},{icon:He(()=>e[54]||(e[54]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})],-1)])),_:1},8,["onClick"]),[[Pt,!i.generating]]),J(oe(s,{onClick:o.generate_in_placeholder,title:"Generate from the next placeholder"},{icon:He(()=>e[55]||(e[55]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"})],-1)])),_:1},8,["onClick"]),[[Pt,!i.generating]]),J(oe(s,{onClick:o.tokenize_text,title:"Tokenize the text"},{icon:He(()=>[g("img",{src:i.tokenize_icon,alt:"Tokenize",class:"h-5 w-5"},null,8,M$n)]),_:1},8,["onClick"]),[[Pt,!i.generating]]),e[65]||(e[65]=g("span",{class:"w-80"},null,-1)),J(oe(s,{onClick:o.stopGeneration,title:"Stop generation"},{icon:He(()=>e[56]||(e[56]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])),_:1},8,["onClick"]),[[Pt,i.generating]]),oe(s,{onClick:o.startSpeechRecognition,class:je({"text-red-500":t.isListeningToVoice}),title:"Dictate (using your browser's transcription)"},{icon:He(()=>e[57]||(e[57]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),oe(s,{onClick:o.speak,class:je({"text-red-500":o.isTalking}),title:"Convert text to audio (not saved, uses your browser's TTS service)"},{icon:He(()=>e[58]||(e[58]=[nt(" 🪶 ")])),_:1},8,["onClick","class"]),oe(s,{onClick:o.triggerFileUpload,title:"Upload a voice"},{icon:He(()=>e[59]||(e[59]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),oe(s,{onClick:o.startRecordingAndTranscribing,class:je({"text-green-500":i.isLesteningToVoice}),title:"Start audio to audio"},{icon:He(()=>[i.pending?(k(),H("img",{key:1,src:i.loading_icon,alt:"Loading",class:"h-5 w-5"},null,8,R$n)):(k(),H("img",{key:0,src:i.is_deaf_transcribing?i.deaf_on:i.deaf_off,alt:"Deaf",class:"h-5 w-5"},null,8,O$n))]),_:1},8,["onClick","class"]),oe(s,{onClick:o.startRecording,class:je({"text-green-500":i.isLesteningToVoice}),title:"Start audio recording"},{icon:He(()=>[i.pending?(k(),H("img",{key:1,src:i.loading_icon,alt:"Loading",class:"h-5 w-5"},null,8,D$n)):(k(),H("img",{key:0,src:i.is_recording?i.rec_on:i.rec_off,alt:"Record",class:"h-5 w-5"},null,8,N$n))]),_:1},8,["onClick","class"]),i.isSynthesizingVoice?(k(),H("div",I$n,e[61]||(e[61]=[g("svg",{class:"animate-spin h-5 w-5 text-secondary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[g("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),g("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)]))):(k(),wt(s,{key:0,onClick:o.read,title:"Generate audio from text"},{icon:He(()=>e[60]||(e[60]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"])),J(oe(s,{onClick:o.exportText,title:"Export text"},{icon:He(()=>e[62]||(e[62]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1)])),_:1},8,["onClick"]),[[Pt,!i.generating]]),J(oe(s,{onClick:o.importText,title:"Import text"},{icon:He(()=>e[63]||(e[63]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)])),_:1},8,["onClick"]),[[Pt,!i.generating]]),oe(s,{onClick:e[0]||(e[0]=m=>i.showSettings=!i.showSettings),title:"Settings"},{icon:He(()=>e[64]||(e[64]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"}),g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1)])),_:1})]),g("input",{type:"file",ref:"fileInput",onChange:e[1]||(e[1]=(...m)=>o.handleFileUpload&&o.handleFileUpload(...m)),style:{display:"none"},accept:".wav"},null,544),g("div",k$n,[g("button",{class:je(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":i.tab_id=="source"}]),onClick:e[2]||(e[2]=m=>i.tab_id="source")}," Source ",2),g("button",{class:je(["border-2 text-blue-600 dark:text-white border-blue-300 p-2 rounded shadow-lg hover:border-gray-600 dark:link-item-dark cursor-pointer",{"bg-blue-200 dark:bg-blue-500":i.tab_id=="render"}]),onClick:e[3]||(e[3]=m=>i.tab_id="render")}," Render ",2)]),e[66]||(e[66]=g("input",{type:"file",id:"import-input",class:"hidden"},null,-1))]),g("div",{class:je(["flex-grow m-2 p-2 border panels-color border-blue-300 rounded-md",{"border-red-500":i.generating}])},[i.tab_id==="source"?(k(),H("div",P$n,[oe(c,{title:"Add Block"},{default:He(()=>[oe(l,{title:"Programming Languages",icon:"code"},{default:He(()=>[oe(a,{onClick:e[4]||(e[4]=he(m=>o.addBlock("python"),["stop"])),title:"Python",icon:"python"}),oe(a,{onClick:e[5]||(e[5]=he(m=>o.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),oe(a,{onClick:e[6]||(e[6]=he(m=>o.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),oe(a,{onClick:e[7]||(e[7]=he(m=>o.addBlock("java"),["stop"])),title:"Java",icon:"java"}),oe(a,{onClick:e[8]||(e[8]=he(m=>o.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),oe(a,{onClick:e[9]||(e[9]=he(m=>o.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),oe(a,{onClick:e[10]||(e[10]=he(m=>o.addBlock("go"),["stop"])),title:"Go",icon:"go"}),oe(a,{onClick:e[11]||(e[11]=he(m=>o.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),oe(a,{onClick:e[12]||(e[12]=he(m=>o.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),oe(a,{onClick:e[13]||(e[13]=he(m=>o.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),oe(a,{onClick:e[14]||(e[14]=he(m=>o.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),oe(l,{title:"Web Technologies",icon:"web"},{default:He(()=>[oe(a,{onClick:e[15]||(e[15]=he(m=>o.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),oe(a,{onClick:e[16]||(e[16]=he(m=>o.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),oe(a,{onClick:e[17]||(e[17]=he(m=>o.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),oe(a,{onClick:e[18]||(e[18]=he(m=>o.addBlock("react"),["stop"])),title:"React",icon:"react"}),oe(a,{onClick:e[19]||(e[19]=he(m=>o.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),oe(l,{title:"Markup and Data",icon:"file-code"},{default:He(()=>[oe(a,{onClick:e[20]||(e[20]=he(m=>o.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),oe(a,{onClick:e[21]||(e[21]=he(m=>o.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),oe(a,{onClick:e[22]||(e[22]=he(m=>o.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),oe(a,{onClick:e[23]||(e[23]=he(m=>o.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),oe(a,{onClick:e[24]||(e[24]=he(m=>o.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),oe(l,{title:"Scripting and Shell",icon:"terminal"},{default:He(()=>[oe(a,{onClick:e[25]||(e[25]=he(m=>o.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),oe(a,{onClick:e[26]||(e[26]=he(m=>o.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),oe(a,{onClick:e[27]||(e[27]=he(m=>o.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),oe(l,{title:"Diagramming",icon:"sitemap"},{default:He(()=>[oe(a,{onClick:e[28]||(e[28]=he(m=>o.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),oe(a,{onClick:e[29]||(e[29]=he(m=>o.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),oe(a,{onClick:e[30]||(e[30]=he(m=>o.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),oe(l,{title:"Database",icon:"database"},{default:He(()=>[oe(a,{onClick:e[31]||(e[31]=he(m=>o.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),oe(a,{onClick:e[32]||(e[32]=he(m=>o.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),oe(a,{onClick:e[33]||(e[33]=he(m=>o.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1}),oe(a,{onClick:e[34]||(e[34]=he(m=>t.copyContentToClipboard(),["stop"])),title:"Copy message to clipboard",icon:"copy"}),J(g("textarea",{ref:"mdTextarea",onKeydown:e[35]||(e[35]=Xr(he((...m)=>o.insertTab&&o.insertTab(...m),["prevent"]),["tab"])),class:"block min-h-500 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,style:xn({minHeight:i.mdRenderHeight+"px"}),placeholder:"Enter message here...","onUpdate:modelValue":e[36]||(e[36]=m=>i.text=m),onClick:e[37]||(e[37]=he((...m)=>o.mdTextarea_clicked&&o.mdTextarea_clicked(...m),["prevent"])),onChange:e[38]||(e[38]=he((...m)=>o.mdTextarea_changed&&o.mdTextarea_changed(...m),["prevent"]))}," ",36),[[we,i.text]]),g("span",null,"Cursor position "+le(i.cursorPosition),1)])):re("",!0),i.audio_url!=null?(k(),H("audio",{controls:"",key:i.audio_url},[g("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,H$n),e[67]||(e[67]=nt(" Your browser does not support the audio element. "))])):re("",!0),oe(u,{namedTokens:i.namedTokens},null,8,["namedTokens"]),i.tab_id==="render"?(k(),H("div",V$n,[oe(d,{ref:"mdRender",client_id:this.$store.state.client_id,message_id:0,discussion_id:0,"markdown-text":i.text,class:"mt-4 p-2 rounded shadow-lg dark:bg-bg-dark"},null,8,["client_id","markdown-text"])])):re("",!0)],2)]),i.showSettings?(k(),H("div",B$n,[e[82]||(e[82]=g("h2",{class:"text-2xl font-bold text-gray-900 dark:text-white mb-4"},"Settings",-1)),oe(h,{title:"Model",class:"slider-container ml-0 mr-0",isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[J(g("select",{"onUpdate:modelValue":e[39]||(e[39]=m=>this.$store.state.selectedModel=m),onChange:e[40]||(e[40]=(...m)=>o.setModel&&o.setModel(...m)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(k(!0),H(Ue,null,ot(o.models,m=>(k(),H("option",{key:m,value:m},le(m),9,F$n))),128))],544),[[pn,this.$store.state.selectedModel]]),i.selecting_model?(k(),H("div",$$n,e[68]||(e[68]=[g("div",{role:"status"},[g("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"},[g("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"}),g("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"})]),g("span",{class:"sr-only"},"Selecting model...")],-1)]))):re("",!0)]),_:1}),oe(h,{title:"Presets",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[J(g("select",{"onUpdate:modelValue":e[41]||(e[41]=m=>i.selectedPreset=m),class:"bg-white dark:bg-black mb-2 border-2 rounded-md shadow-sm w-full"},[(k(!0),H(Ue,null,ot(i.presets,m=>(k(),H("option",{key:m,value:m},le(m.name),9,U$n))),128))],512),[[pn,i.selectedPreset]]),e[73]||(e[73]=g("br",null,null,-1)),g("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[42]||(e[42]=(...m)=>o.setPreset&&o.setPreset(...m)),title:"Use preset"},e[69]||(e[69]=[g("i",{"data-feather":"check"},null,-1)])),g("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[43]||(e[43]=(...m)=>o.addPreset&&o.addPreset(...m)),title:"Add this text as a preset"},e[70]||(e[70]=[g("i",{"data-feather":"plus"},null,-1)])),g("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[44]||(e[44]=(...m)=>o.removePreset&&o.removePreset(...m)),title:"Remove preset"},e[71]||(e[71]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[45]||(e[45]=(...m)=>o.reloadPresets&&o.reloadPresets(...m)),title:"Reload presets list"},e[72]||(e[72]=[g("i",{"data-feather":"refresh-ccw"},null,-1)]))]),_:1}),oe(h,{title:"Generation params",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[g("div",G$n,[e[74]||(e[74]=g("h3",{class:"text-gray-600"},"Temperature",-1)),J(g("input",{type:"range","onUpdate:modelValue":e[46]||(e[46]=m=>i.temperature=m),min:"0",max:"5",step:"0.1",class:"w-full"},null,512),[[we,i.temperature]]),g("span",q$n,"Current value: "+le(i.temperature),1)]),g("div",z$n,[e[75]||(e[75]=g("h3",{class:"text-gray-600"},"Top K",-1)),J(g("input",{type:"range","onUpdate:modelValue":e[47]||(e[47]=m=>i.top_k=m),min:"1",max:"100",step:"1",class:"w-full"},null,512),[[we,i.top_k]]),g("span",j$n,"Current value: "+le(i.top_k),1)]),g("div",W$n,[e[76]||(e[76]=g("h3",{class:"text-gray-600"},"Top P",-1)),J(g("input",{type:"range","onUpdate:modelValue":e[48]||(e[48]=m=>i.top_p=m),min:"0",max:"1",step:"0.1",class:"w-full"},null,512),[[we,i.top_p]]),g("span",Y$n,"Current value: "+le(i.top_p),1)]),g("div",K$n,[e[77]||(e[77]=g("h3",{class:"text-gray-600"},"Repeat Penalty",-1)),J(g("input",{type:"range","onUpdate:modelValue":e[49]||(e[49]=m=>i.repeat_penalty=m),min:"0",max:"5",step:"0.1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[we,i.repeat_penalty]]),g("span",Z$n,"Current value: "+le(i.repeat_penalty),1)]),g("div",X$n,[e[78]||(e[78]=g("h3",{class:"text-gray-600"},"Repeat Last N",-1)),J(g("input",{type:"range","onUpdate:modelValue":e[50]||(e[50]=m=>i.repeat_last_n=m),min:"0",max:"100",step:"1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[we,i.repeat_last_n]]),g("span",J$n,"Current value: "+le(i.repeat_last_n),1)]),g("div",eUn,[e[79]||(e[79]=g("h3",{class:"text-gray-600"},"Number of tokens to crop the text to",-1)),J(g("input",{type:"number","onUpdate:modelValue":e[51]||(e[51]=m=>i.n_crop=m),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[we,i.n_crop]]),g("span",tUn,"Current value: "+le(i.n_crop),1)]),g("div",nUn,[e[80]||(e[80]=g("h3",{class:"text-gray-600"},"Number of tokens to generate",-1)),J(g("input",{type:"number","onUpdate:modelValue":e[52]||(e[52]=m=>i.n_predicts=m),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[we,i.n_predicts]]),g("span",rUn,"Current value: "+le(i.n_predicts),1)]),g("div",iUn,[e[81]||(e[81]=g("h3",{class:"text-gray-600"},"Seed",-1)),J(g("input",{type:"number","onUpdate:modelValue":e[53]||(e[53]=m=>i.seed=m),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[we,i.seed]]),g("span",oUn,"Current value: "+le(i.seed),1)])]),_:1})])):re("",!0)])]),oe(f,{ref:"toast"},null,512)],64)}const aUn=yt(x$n,[["render",sUn]]),lUn={data(){return{activeExtension:null}},computed:{activeExtensions(){return console.log(this.$store.state.extensionsZoo),console.log(NG(this.$store.state.extensionsZoo)),this.$store.state.extensionsZoo}},methods:{showExtensionPage(t){this.activeExtension=t}}},cUn={class:"container overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 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"},uUn={key:0},dUn=["onClick"],fUn={key:0},pUn=["src"],hUn={key:1};function TUn(t,e,n,r,i,o){return k(),H("div",cUn,[o.activeExtensions.length>0?(k(),H("div",uUn,[(k(!0),H(Ue,null,ot(o.activeExtensions,s=>(k(),H("div",{key:s.name,onClick:a=>o.showExtensionPage(s)},[g("div",{class:je({"active-tab":s===i.activeExtension})},le(s.name),3)],8,dUn))),128)),i.activeExtension?(k(),H("div",fUn,[g("iframe",{src:i.activeExtension.page,width:"100%",height:"500px",frameborder:"0"},null,8,pUn)])):re("",!0)])):(k(),H("div",hUn,e[0]||(e[0]=[g("p",null,"No extension is active. Please install and activate an extension.",-1)])))])}const mUn=yt(lUn,[["render",TUn]]);function Lb(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let A2=Lb();function q$(t){A2=t}const z$=/[&<>"']/,gUn=new RegExp(z$.source,"g"),j$=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,_Un=new RegExp(j$.source,"g"),QUn={"&":"&","<":"<",">":">",'"':""","'":"'"},aD=t=>QUn[t];function vi(t,e){if(e){if(z$.test(t))return t.replace(gUn,aD)}else if(j$.test(t))return t.replace(_Un,aD);return t}const vUn=/(^|[^\[])\^/g;function Ln(t,e){let n=typeof t=="string"?t:t.source;e=e||"";const r={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(vUn,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,e)};return r}function lD(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const A4={exec:()=>null};function cD(t,e){const n=t.replace(/\|/g,(o,s,a)=>{let l=!1,c=s;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length{const o=i.match(/^\s+/);if(o===null)return i;const[s]=o;return s.length>=r.length?i.slice(r.length):i}).join(` `)}class Ju{constructor(e){Cn(this,"options");Cn(this,"rules");Cn(this,"lexer");this.options=e||A2}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:n4(r,` `)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],i=bUn(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=n4(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n4(n[0],` @@ -244,20 +244,20 @@ ${e} `}tablecell(e){const n=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+n+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
"}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:n,tokens:r}){const i=this.parser.parseInline(r),o=lD(e);if(o===null)return i;e=o;let s='",s}image({href:e,title:n,text:r}){const i=lD(e);if(i===null)return r;e=i;let o=`${r}{const c=a[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const s=n.renderers[o.name];s?n.renderers[o.name]=function(...a){let l=o.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=n[o.level];s?s.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),i.extensions=n),r.renderer){const o=this.defaults.renderer||new td(this.defaults);for(const s in r.renderer){if(!(s in o))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;const a=s,l=r.renderer[a],c=o[a];o[a]=(...u)=>{let d=l.apply(o,u);return d===!1&&(d=c.apply(o,u)),d||""}}i.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new Ju(this.defaults);for(const s in r.tokenizer){if(!(s in o))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const a=s,l=r.tokenizer[a],c=o[a];o[a]=(...u)=>{let d=l.apply(o,u);return d===!1&&(d=c.apply(o,u)),d}}i.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new w4;for(const s in r.hooks){if(!(s in o))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;const a=s,l=r.hooks[a],c=o[a];w4.passThroughHooks.has(s)?o[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(o,u)).then(h=>c.call(o,h));const d=l.call(o,u);return c.call(o,d)}:o[a]=(...u)=>{let d=l.apply(o,u);return d===!1&&(d=c.apply(o,u)),d}}i.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,s=r.walkTokens;i.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),o&&(l=l.concat(o.call(this,a))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return Fi.lex(e,n??this.defaults)}parser(e,n){return $i.parse(e,n??this.defaults)}parseMarkdown(e){return(r,i)=>{const o={...i},s={...this.defaults,...o},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&o.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=e);const l=s.hooks?s.hooks.provideLexer():e?Fi.lex:Fi.lexInline,c=s.hooks?s.hooks.provideParser():e?$i.parse:$i.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then(u=>l(u,s)).then(u=>s.hooks?s.hooks.processAllTokens(u):u).then(u=>s.walkTokens?Promise.all(this.walkTokens(u,s.walkTokens)).then(()=>u):u).then(u=>c(u,s)).then(u=>s.hooks?s.hooks.postprocess(u):u).catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let u=l(r,s);s.hooks&&(u=s.hooks.processAllTokens(u)),s.walkTokens&&this.walkTokens(u,s.walkTokens);let d=c(u,s);return s.hooks&&(d=s.hooks.postprocess(d)),d}catch(u){return a(u)}}}onError(e,n){return r=>{if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const i="

An error occurred:

"+vi(r.message+"",!0)+"
";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}}const T2=new YUn;function dn(t,e){return T2.parse(t,e)}dn.options=dn.setOptions=function(t){return T2.setOptions(t),dn.defaults=T2.defaults,q$(dn.defaults),dn};dn.getDefaults=Lb;dn.defaults=A2;dn.use=function(...t){return T2.use(...t),dn.defaults=T2.defaults,q$(dn.defaults),dn};dn.walkTokens=function(t,e){return T2.walkTokens(t,e)};dn.parseInline=T2.parseInline;dn.Parser=$i;dn.parser=$i.parse;dn.Renderer=td;dn.TextRenderer=Rb;dn.Lexer=Fi;dn.lexer=Fi.lex;dn.Tokenizer=Ju;dn.Hooks=w4;dn.parse=dn;dn.options;dn.setOptions;dn.use;dn.walkTokens;dn.parseInline;$i.parse;Fi.lex;const KUn={name:"HelpView",data(){return{helpSections:[]}},methods:{toggleSection(t){this.helpSections[t].isOpen=!this.helpSections[t].isOpen},async loadMarkdownFile(t){try{const n=await(await fetch(`/help/${t}`)).text();return dn(n)}catch(e){return console.error("Error loading markdown file:",e),"Error loading help content."}},async loadHelpSections(){const t=[{title:"About LoLLMs",file:"lollms-context.md"},{title:"Getting Started",file:"getting-started.md"},{title:"Uploading Files",file:"uploading-files.md"},{title:"Sending Images",file:"sending-images.md"},{title:"Using Code Interpreter",file:"code-interpreter.md"},{title:"Internet Search",file:"internet-search.md"}];for(const e of t){const n=await this.loadMarkdownFile(e.file);this.helpSections.push({title:e.title,content:n,isOpen:!1})}}},mounted(){this.loadHelpSections()}},ZUn={class:"help-view background-color p-6 w-full"},XUn={class:"big-card w-full"},JUn={class:"help-sections-container"},eGn={class:"help-sections space-y-4"},tGn=["onClick"],nGn={class:"toggle-icon"},rGn={key:0,class:"help-content mt-4"},iGn=["innerHTML"];function oGn(t,e,n,r,i,o){return k(),H("div",ZUn,[g("div",XUn,[e[0]||(e[0]=g("h1",{class:"text-4xl md:text-5xl font-bold text-gray-800 dark:text-gray-100 mb-6"},"LoLLMs Help",-1)),g("div",JUn,[g("div",eGn,[(k(!0),H(Ue,null,ot(i.helpSections,(s,a)=>(k(),H("div",{key:a,class:"help-section message"},[g("h2",{onClick:l=>o.toggleSection(a),class:"menu-item cursor-pointer flex justify-between items-center"},[nt(le(s.title)+" ",1),g("span",nGn,le(s.isOpen?"▼":"▶"),1)],8,tGn),s.isOpen?(k(),H("div",rGn,[g("div",{innerHTML:s.content,class:"prose dark:prose-invert"},null,8,iGn)])):re("",!0)]))),128))])])])])}const sGn=yt(KUn,[["render",oGn],["__scopeId","data-v-8c1798f3"]]);function $o(t,e=!0,n=1){const r=e?1e3:1024;if(Math.abs(t)=r&&o{Ze.replace()})},executeCommand(t){this.isMenuOpen=!1,console.log("Selected"),console.log(t.value),typeof t.value=="function"&&(console.log("Command detected",t),t.value()),this.execute_cmd&&(console.log("executing generic command"),this.execute_cmd(t))},positionMenu(){var t;if(this.$refs.menuButton!=null){if(this.force_position==0||this.force_position==null){const e=this.$refs.menuButton.getBoundingClientRect(),n=window.innerHeight;t=e.bottom>n/2}else this.force_position==1?t=!0:t=!1;this.menuPosition.top=t?"auto":"calc(100% + 10px)",this.menuPosition.bottom=t?"100%":"auto"}}},mounted(){window.addEventListener("resize",this.positionMenu),this.positionMenu(),ze(()=>{Ze.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},lGn={class:"menu-container"},cGn=["title"],uGn=["src"],dGn=["data-feather"],fGn={key:2,class:"w-5 h-5"},pGn={key:3,"data-feather":"menu"},hGn={class:"flex-grow menu-ul"},TGn=["onClick"],mGn={key:0,"data-feather":"check"},gGn=["src","alt"],_Gn=["data-feather"],QGn={key:3,class:"menu-icon"};function vGn(t,e,n,r,i,o){return k(),H("div",lGn,[g("button",{onClick:e[0]||(e[0]=he((...s)=>o.toggleMenu&&o.toggleMenu(...s),["prevent"])),title:n.title,class:je([n.menuIconClass,"menu-button m-0 p-0 bg-blue-500 text-white dark:bg-blue-200 dark:text-gray-800 rounded flex items-center justify-center w-6 h-6 border-none cursor-pointer hover:bg-blue-400 w-8 h-8 object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-gray-300 border-secondary cursor-pointer"]),ref:"menuButton"},[n.icon&&!n.icon.includes("#")&&!n.icon.includes("feather")?(k(),H("img",{key:0,src:n.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,uGn)):n.icon&&n.icon.includes("feather")?(k(),H("i",{key:1,"data-feather":n.icon.split(":")[1],class:"w-5 h-5"},null,8,dGn)):n.icon&&n.icon.includes("#")?(k(),H("p",fGn,le(n.icon.split("#")[1]),1)):(k(),H("i",pGn))],10,cGn),oe(qi,{name:"slide"},{default:He(()=>[i.isMenuOpen?(k(),H("div",{key:0,class:"menu-list flex-grow",style:xn(i.menuPosition),ref:"menu"},[g("ul",hGn,[(k(!0),H(Ue,null,ot(n.commands,(s,a)=>(k(),H("li",{key:a,onClick:he(l=>o.executeCommand(s),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[n.selected_entry==s.name?(k(),H("i",mGn)):s.icon&&!s.icon.includes("feather")&&!s.is_file?(k(),H("img",{key:1,src:s.icon,alt:s.name,class:"menu-icon"},null,8,gGn)):re("",!0),s.icon&&s.icon.includes("feather")&&!s.is_file?(k(),H("i",{key:2,"data-feather":s.icon.split(":")[1],class:"mr-2"},null,8,_Gn)):(k(),H("span",QGn)),g("span",null,le(s.name),1)],8,TGn))),128))])],4)):re("",!0)]),_:1})])}const Nb=yt(aGn,[["render",vGn]]),yGn={components:{InteractiveMenu:Nb},props:{isInstalled:Boolean,onInstall:Function,onCancelInstall:Function,onUninstall:Function,onSelected:Function,onCopy:Function,onCopyLink:Function,selected:Boolean,model:Object,model_type:String},data(){return{progress:0,speed:0,total_size:0,downloaded_size:0,start_time:"",installing:!1,uninstalling:!1,failedToLoad:!1,linkNotValid:!1,selected_variant:""}},async mounted(){ze(()=>{Ze.replace()})},methods:{formatFileSize(t){return t<1024?t+" bytes":t<1024*1024?(t/1024).toFixed(2)+" KB":t<1024*1024*1024?(t/(1024*1024)).toFixed(2)+" MB":(t/(1024*1024*1024)).toFixed(2)+" GB"},computedFileSize(t){return $o(t)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?ri:this.model.icon},defaultImg(t){t.target.src=ri},install(){this.onInstall(this)},uninstall(){this.isInstalled&&this.onUninstall(this)},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(t){if(console.log("event.target.tagName.toLowerCase()"),console.log(t.target.tagName.toLowerCase()),t.target.tagName.toLowerCase()==="button"||t.target.tagName.toLowerCase()==="svg"){t.stopPropagation();return}this.onSelected(this),this.model.selected=!0,ze(()=>{Ze.replace()})},toggleCopy(){this.onCopy(this)},toggleCopyLink(){this.onCopyLink(this)},toggleCancelInstall(){this.onCancelInstall(this),this.installing=!1},handleSelection(){this.isInstalled&&!this.selected&&this.onSelected(this)},copyContentToClipboard(){this.$emit("copy","this.message.content")}},computed:{computed_classes(){return this.model.isInstalled?this.selected?"border-4 border-gray-200 bg-primary cursor-pointer":"border-0 border-primary bg-primary cursor-pointer":"border-transparent"},commandsList(){let t=[{name:this.model.isInstalled?"Install Extra":"Install",icon:"feather:settings",is_file:!1,value:this.install},{name:"Copy model info to clipboard",icon:"feather:settings",is_file:!1,value:this.toggleCopy}];return this.model.isInstalled&&t.push({name:"UnInstall",icon:"feather:settings",is_file:!1,value:this.uninstall}),this.selected&&t.push({name:"Reload",icon:"feather:refresh-ccw",is_file:!1,value:this.toggleSelected}),t},selected_computed(){return this.selected},fileSize:{get(){if(this.model&&this.model.variants&&this.model.variants.length>0){const t=this.model.variants[0].size;return this.formatFileSize(t)}return null}},speed_computed(){return $o(this.speed)},total_size_computed(){return $o(this.total_size)},downloaded_size_computed(){return $o(this.downloaded_size)}},watch:{linkNotValid(){ze(()=>{Ze.replace()})}}},bGn=["title"],EGn={key:0,class:"flex flex-row"},xGn={class:"max-w-[300px] overflow-x-auto"},SGn={class:"flex gap-3 items-center grow"},LGn=["href"],CGn=["src"],AGn={class:"flex-1 overflow-hidden"},wGn={class:"font-bold font-large text-lg truncate"},MGn={key:1,class:"flex items-center flex-row gap-2 my-1"},OGn={class:"flex grow items-center"},RGn={key:2,class:"absolute z-10 -m-4 p-5 shadow-md text-center rounded-lg w-full h-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel bg-opacity-70 dark:bg-opacity-70 flex justify-center items-center"},NGn={class:"relative flex flex-col items-center justify-center flex-grow h-full"},DGn={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},IGn={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},kGn={class:"flex justify-between mb-1"},PGn={class:"text-sm font-medium text-blue-700 dark:text-white"},HGn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},VGn={class:"flex justify-between mb-1"},BGn={class:"text-base font-medium text-blue-700 dark:text-white"},FGn={class:"text-sm font-medium text-blue-700 dark:text-white"},$Gn={class:"flex flex-grow"},UGn={class:"flex flex-row flex-grow gap-3"},GGn={class:"p-2 text-center grow"},qGn={key:3},zGn={class:"flex flex-row items-center gap-3"},jGn=["src"],WGn={class:"font-bold font-large text-lg truncate"},YGn={class:"flex items-center flex-row-reverse gap-2 my-1"},KGn={class:"flex flex-row items-center"},ZGn={key:0,class:"text-base text-red-600 flex items-center mt-1"},XGn=["title"],JGn={class:""},eqn={class:"flex flex-row items-center"},tqn=["href","title"],nqn={class:"flex items-center"},rqn={class:"flex items-center"},iqn={key:0,class:"flex items-center"},oqn=["href"],sqn={class:"flex items-center"},aqn=["href"],lqn={class:"flex items-center"},cqn={class:"flex items-center"},uqn=["href"];function dqn(t,e,n,r,i,o){const s=pt("InteractiveMenu");return k(),H("div",{class:je(["relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",o.computed_classes]),title:n.model.name,onClick:e[10]||(e[10]=he(a=>o.toggleSelected(a),["prevent"]))},[n.model.isCustomModel?(k(),H("div",EGn,[g("div",xGn,[g("div",SGn,[g("a",{href:n.model.model_creator_link,target:"_blank"},[g("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,CGn)],8,LGn),g("div",AGn,[g("h3",wGn,le(n.model.name),1)])])])])):re("",!0),n.model.isCustomModel?(k(),H("div",MGn,[g("div",OGn,[g("button",{type:"button",title:"Custom model / local model",class:"font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",onClick:e[1]||(e[1]=he(()=>{},["stop"]))},e[11]||(e[11]=[g("i",{"data-feather":"box",class:"w-5"},null,-1),g("span",{class:"sr-only"},"Custom model / local model",-1)])),e[12]||(e[12]=nt(" Custom model "))]),g("div",null,[n.model.isInstalled?(k(),H("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[2]||(e[2]=he((...a)=>o.uninstall&&o.uninstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},e[13]||(e[13]=[nt(" Uninstall "),g("span",{class:"sr-only"},"Remove",-1)]))):re("",!0)])])):re("",!0),i.installing?(k(),H("div",RGn,[g("div",NGn,[e[15]||(e[15]=g("div",{role:"status",class:"justify-center"},[g("svg",{"aria-hidden":"true",class:"w-24 h-24 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"},[g("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"}),g("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"})]),g("span",{class:"sr-only"},"Loading...")],-1)),g("div",DGn,[g("div",IGn,[g("div",kGn,[e[14]||(e[14]=g("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1)),g("span",PGn,le(Math.floor(i.progress))+"%",1)]),g("div",HGn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn({width:i.progress+"%"})},null,4)]),g("div",VGn,[g("span",BGn,"Download speed: "+le(o.speed_computed)+"/s",1),g("span",FGn,le(o.downloaded_size_computed)+"/"+le(o.total_size_computed),1)])])]),g("div",$Gn,[g("div",UGn,[g("div",GGn,[g("button",{onClick:e[3]||(e[3]=he((...a)=>o.toggleCancelInstall&&o.toggleCancelInstall(...a),["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 ")])])])])])):re("",!0),n.model.isCustomModel?re("",!0):(k(),H("div",qGn,[g("div",zGn,[g("img",{ref:"imgElement",src:o.getImgUrl(),onError:e[4]||(e[4]=a=>o.defaultImg(a)),class:je(["w-10 h-10 rounded-lg object-fill",i.linkNotValid?"grayscale":""])},null,42,jGn),g("h3",WGn,le(n.model.name),1),e[16]||(e[16]=g("div",{class:"grow"},null,-1)),oe(s,{commands:o.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),g("div",YGn,[g("div",KGn,[i.linkNotValid?(k(),H("div",ZGn,e[17]||(e[17]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),nt(" Link is not valid ")]))):re("",!0)])]),g("div",{class:"",title:n.model.isInstalled?n.model.name:"Not installed"},[g("div",JGn,[g("div",eqn,[e[19]||(e[19]=g("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1)),e[20]||(e[20]=g("b",null,"Card: ",-1)),g("a",{href:"https://huggingface.co/"+n.model.quantizer+"/"+n.model.name,target:"_blank",onClick:e[5]||(e[5]=he(()=>{},["stop"])),class:"m-1 flex items-center hover:text-secondary duration-75 active:scale-90 truncate",title:i.linkNotValid?"Link is not valid":"Download this manually (faster) and put it in the models/ folder then refresh"}," View full model card ",8,tqn),e[21]||(e[21]=g("div",{class:"grow"},null,-1)),g("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[6]||(e[6]=he(a=>o.toggleCopyLink(),["stop"]))},e[18]||(e[18]=[g("i",{"data-feather":"clipboard",class:"w-5"},null,-1)]))]),g("div",nqn,[g("div",{class:je(["flex flex-shrink-0 items-center",i.linkNotValid?"text-red-600":""])},[e[22]||(e[22]=g("i",{"data-feather":"file",class:"w-5 m-1"},null,-1)),e[23]||(e[23]=g("b",null,"File size: ",-1)),nt(" "+le(o.fileSize),1)],2)]),g("div",rqn,[e[24]||(e[24]=g("i",{"data-feather":"key",class:"w-5 m-1"},null,-1)),e[25]||(e[25]=g("b",null,"License: ",-1)),nt(" "+le(n.model.license),1)]),n.model.quantizer!="None"&&n.model.type!="transformers"?(k(),H("div",iqn,[e[26]||(e[26]=g("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[27]||(e[27]=g("b",null,"quantizer: ",-1)),g("a",{href:"https://huggingface.co/"+n.model.quantizer,target:"_blank",rel:"noopener noreferrer",onClick:e[7]||(e[7]=he(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},le(n.model.quantizer),9,oqn)])):re("",!0),g("div",sqn,[e[28]||(e[28]=g("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[29]||(e[29]=g("b",null,"Model creator: ",-1)),g("a",{href:n.model.model_creator_link,target:"_blank",rel:"noopener noreferrer",onClick:e[8]||(e[8]=he(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},le(n.model.model_creator),9,aqn)]),g("div",lqn,[e[30]||(e[30]=g("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1)),e[31]||(e[31]=g("b",null,"Release date: ",-1)),nt(" "+le(n.model.last_commit_time),1)]),g("div",cqn,[e[32]||(e[32]=g("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1)),e[33]||(e[33]=g("b",null,"Category: ",-1)),g("a",{href:"https://huggingface.co/"+n.model.model_creator,target:"_blank",rel:"noopener noreferrer",onClick:e[9]||(e[9]=he(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},le(n.model.category),9,uqn)])])],8,XGn)]))],10,bGn)}const fqn=yt(yGn,[["render",dqn]]),pqn={data(){return{editMode:!1,avatar:"path/to/avatar.jpg",personalityName:"Personality Name",personalityAuthor:"Author Name",personalityDescription:"Personality Description",personalityCategory:"Category",disclaimer:"Disclaimer text",conditioningText:"Conditioning Text",aiPrefix:"AI Prefix",userPrefix:"User Prefix",antipromptsList:[{id:1,text:"Antiprompt 1"},{id:2,text:"Antiprompt 2"},{id:3,text:"Antiprompt 3"}]}},methods:{commitChanges(){console.log("Personality changes committed"),this.editMode=!1}}},hqn={class:"p-4"},Tqn={class:"flex items-center mb-4"},mqn=["src"],gqn={class:"text-lg font-semibold"},_qn={key:0};function Qqn(t,e,n,r,i,o){return k(),H("div",hqn,[g("div",Tqn,[g("img",{src:i.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,mqn),g("h2",gqn,le(i.personalityName),1)]),g("p",null,[e[2]||(e[2]=g("strong",null,"Author:",-1)),nt(" "+le(i.personalityAuthor),1)]),g("p",null,[e[3]||(e[3]=g("strong",null,"Description:",-1)),nt(" "+le(i.personalityDescription),1)]),g("p",null,[e[4]||(e[4]=g("strong",null,"Category:",-1)),nt(" "+le(i.personalityCategory),1)]),i.disclaimer?(k(),H("p",_qn,[e[5]||(e[5]=g("strong",null,"Disclaimer:",-1)),nt(" "+le(i.disclaimer),1)])):re("",!0),g("p",null,[e[6]||(e[6]=g("strong",null,"Conditioning Text:",-1)),nt(" "+le(i.conditioningText),1)]),g("p",null,[e[7]||(e[7]=g("strong",null,"AI Prefix:",-1)),nt(" "+le(i.aiPrefix),1)]),g("p",null,[e[8]||(e[8]=g("strong",null,"User Prefix:",-1)),nt(" "+le(i.userPrefix),1)]),g("div",null,[e[9]||(e[9]=g("strong",null,"Antiprompts:",-1)),g("ul",null,[(k(!0),H(Ue,null,ot(i.antipromptsList,s=>(k(),H("li",{key:s.id},le(s.text),1))),128))])]),g("button",{onClick:e[0]||(e[0]=s=>i.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),i.editMode?(k(),H("button",{key:1,onClick:e[1]||(e[1]=(...s)=>o.commitChanges&&o.commitChanges(...s)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):re("",!0)])}const vqn=yt(pqn,[["render",Qqn]]),Db="/assets/logo-CQZwS0X1.svg",yqn="/",bqn={props:{personality:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onOpenFolder:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onCopyToCustom:Function,onEdit:Function,onReinstall:Function,onSettings:Function,onCopyPersonalityName:Function,onToggleFavorite:Function},components:{InteractiveMenu:Nb},data(){return{isMounted:!1,name:this.personality.name,thumbnailVisible:!1,thumbnailPosition:{x:0,y:0},showHelpPopup:!1,renderedHelp:""}},computed:{commandsList(){let t=[{name:this.isMounted?"unmount":"mount",icon:"feather:settings",is_file:!1,value:this.isMounted?this.unmount:this.mount},{name:"reinstall",icon:"feather:terminal",is_file:!1,value:this.toggleReinstall}];return console.log("this.category",this.personality.category),this.personality.category=="custom_personalities"?t.push({name:"edit",icon:"feather:settings",is_file:!1,value:this.edit}):t.push({name:"Copy to custom personas folder for editing",icon:"feather:copy",is_file:!1,value:this.copyToCustom}),this.isMounted&&t.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),this.selected&&this.personality.has_scripts&&t.push({name:"settings",icon:"feather:settings",is_file:!1,value:this.toggleSettings}),t},selected_computed(){return this.selected}},mounted(){this.isMounted=this.personality.isMounted,console.log(this.personality),ze(()=>{Ze.replace()})},methods:{formatDate(t){const e={year:"numeric",month:"short",day:"numeric"};return new Date(t).toLocaleDateString(void 0,e)},showThumbnail(){this.thumbnailVisible=!0},hideThumbnail(){this.thumbnailVisible=!1},updateThumbnailPosition(t){this.thumbnailPosition={x:t.clientX+10,y:t.clientY+10}},getImgUrl(){return yqn+this.personality.avatar},defaultImg(t){t.target.src=Db},toggleFavorite(){this.onToggleFavorite(this)},showFolder(){this.onOpenFolder(this)},toggleTalk(){this.onTalk(this)},toggleCopyLink(){this.onCopyPersonalityName(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},edit(){this.onEdit(this)},copyToCustom(){this.onCopyToCustom(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this),this.isMounted=!1},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)},showHelp(){this.renderedHelp=dn(this.personality.help),this.showHelpPopup=!0},closeHelp(){this.showHelpPopup=!1}},watch:{selected(){ze(()=>{Ze.replace()})}}},Eqn=["title"],xqn={class:"flex-grow"},Sqn={class:"flex items-center mb-4"},Lqn=["src"],Cqn={class:"text-sm text-gray-600"},Aqn={class:"text-sm text-gray-600"},wqn={class:"text-sm text-gray-600"},Mqn={key:0,class:"text-sm text-gray-600"},Oqn={key:1,class:"text-sm text-gray-600"},Rqn={class:"mb-4"},Nqn=["innerHTML"],Dqn={class:"mt-auto pt-4 border-t"},Iqn={class:"flex justify-between items-center flex-wrap"},kqn=["title"],Pqn=["fill"],Hqn=["src"],Vqn={key:1,class:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center"},Bqn={class:"bg-white p-4 rounded-lg shadow-lg w-[500px] h-[400px] flex flex-col"},Fqn={class:"flex justify-between items-center mb-2"},$qn={class:"flex-grow overflow-auto"},Uqn=["innerHTML"];function Gqn(t,e,n,r,i,o){const s=pt("InteractiveMenu");return k(),H("div",{class:je(["app-card flex flex-col h-full",o.selected_computed?"border-primary-light":"border-transparent",i.isMounted?"bg-blue-200 dark:bg-blue-700":""]),title:n.personality.installed?"":"Not installed"},[g("div",xqn,[g("div",Sqn,[g("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),alt:"Personality Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4 cursor-pointer",onClick:e[1]||(e[1]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),onMouseover:e[2]||(e[2]=(...a)=>o.showThumbnail&&o.showThumbnail(...a)),onMousemove:e[3]||(e[3]=(...a)=>o.updateThumbnailPosition&&o.updateThumbnailPosition(...a)),onMouseleave:e[4]||(e[4]=(...a)=>o.hideThumbnail&&o.hideThumbnail(...a))},null,40,Lqn),g("div",null,[g("h3",{class:"font-bold text-xl text-gray-800 cursor-pointer",onClick:e[5]||(e[5]=(...a)=>o.toggleSelected&&o.toggleSelected(...a))},le(n.personality.name),1),g("p",Cqn,"Author: "+le(n.personality.author),1),g("p",Aqn,"Version: "+le(n.personality.version),1),g("p",wqn,"Category: "+le(n.personality.category),1),n.personality.creation_date?(k(),H("p",Mqn,"Creation Date: "+le(o.formatDate(n.personality.creation_date)),1)):re("",!0),n.personality.last_update_date?(k(),H("p",Oqn,"Last update Date: "+le(o.formatDate(n.personality.last_update_date)),1)):re("",!0)]),n.personality.help?(k(),H("button",{key:0,onClick:e[6]||(e[6]=(...a)=>o.showHelp&&o.showHelp(...a)),class:"ml-2 text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Help"},e[12]||(e[12]=[g("i",{"data-feather":"help-circle",class:"h-6 w-6"},null,-1)]))):re("",!0)]),g("div",Rqn,[e[13]||(e[13]=g("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),g("p",{class:"text-sm text-gray-600 h-20 overflow-y-auto",innerHTML:n.personality.description},null,8,Nqn)])]),g("div",Dqn,[g("div",Iqn,[g("button",{onClick:e[7]||(e[7]=(...a)=>o.toggleFavorite&&o.toggleFavorite(...a)),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:t.isFavorite?"Remove from favorites":"Add to favorites"},[(k(),H("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[14]||(e[14]=[g("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,Pqn))],8,kqn),i.isMounted?(k(),H("button",{key:0,onClick:e[8]||(e[8]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Select"},e[15]||(e[15]=[g("i",{"data-feather":"check",class:"h-6 w-6"},null,-1)]))):re("",!0),i.isMounted?(k(),H("button",{key:1,onClick:e[9]||(e[9]=(...a)=>o.toggleTalk&&o.toggleTalk(...a)),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Talk"},e[16]||(e[16]=[g("i",{"data-feather":"send",class:"h-6 w-6"},null,-1)]))):re("",!0),g("button",{onClick:e[10]||(e[10]=(...a)=>o.showFolder&&o.showFolder(...a)),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Show Folder"},e[17]||(e[17]=[g("i",{"data-feather":"folder",class:"h-6 w-6"},null,-1)])),oe(s,{commands:o.commandsList,force_position:2,title:"Menu",class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out"},null,8,["commands"])])]),i.thumbnailVisible?(k(),H("div",{key:0,style:xn({top:i.thumbnailPosition.y+"px",left:i.thumbnailPosition.x+"px"}),class:"fixed z-50 w-20 h-20 rounded-full overflow-hidden"},[g("img",{src:o.getImgUrl(),class:"w-full h-full object-fill"},null,8,Hqn)],4)):re("",!0),i.showHelpPopup?(k(),H("div",Vqn,[g("div",Bqn,[g("div",Fqn,[e[18]||(e[18]=g("h2",{class:"text-lg font-bold"},"Help",-1)),g("button",{onClick:e[11]||(e[11]=(...a)=>o.closeHelp&&o.closeHelp(...a)),class:"text-red-500 hover:text-red-600"},"Close")]),g("div",$qn,[g("div",{innerHTML:i.renderedHelp},null,8,Uqn)])])])):re("",!0)],10,Eqn)}const tU=yt(bqn,[["render",Gqn]]),qqn={name:"DynamicUIRenderer",props:{ui:{type:String,required:!0},instanceId:{type:String,required:!0}},data(){return{containerId:`dynamic-ui-${this.instanceId}`}},watch:{ui:{immediate:!0,handler(t){console.log(`UI prop changed for instance ${this.instanceId}:`,t),this.$nextTick(()=>{this.renderContent()})}}},methods:{renderContent(){console.log(`Rendering content for instance ${this.instanceId}...`);const t=this.$refs.container,n=new DOMParser().parseFromString(this.ui,"text/html"),r=n.getElementsByTagName("style");Array.from(r).forEach(o=>{const s=document.createElement("style");s.textContent=this.scopeCSS(o.textContent),document.head.appendChild(s)}),t.innerHTML=n.body.innerHTML;const i=n.getElementsByTagName("script");Array.from(i).forEach(o=>{const s=document.createElement("script");s.textContent=o.textContent,t.appendChild(s)})},scopeCSS(t){return t.replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,`#${this.containerId} $1$2`)}}},zqn=["id"];function jqn(t,e,n,r,i,o){return k(),H("div",{id:i.containerId,ref:"container"},null,8,zqn)}const nU=yt(qqn,[["render",jqn]]),Wqn="/",Yqn={components:{DynamicUIRenderer:nU},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onUnInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){ze(()=>{Ze.replace()})},methods:{copyToClipBoard(t){console.log("Copying to clipboard :",t),navigator.clipboard.writeText(t)},getImgUrl(){return Wqn+this.binding.icon},defaultImg(t){t.target.src=Db},toggleSelected(){this.onSelected(this)},toggleInstall(){this.onInstall(this)},toggleUnInstall(){this.onUnInstall(this)},toggleReinstall(){this.onReinstall(this)},toggleReloadBinding(){this.onReloadBinding(this)},toggleSettings(){this.onSettings(this)},getStatus(){(this.binding.folder==="backend_template"||this.binding.folder==="binding_template")&&(this.isTemplate=!0)}},watch:{selected(){ze(()=>{Ze.replace()})}}},Kqn=["title"],Zqn={class:"flex flex-row items-center gap-3"},Xqn=["src"],Jqn={class:"font-bold font-large text-lg truncate"},ezn={class:"flex-none gap-1"},tzn={class:"flex items-center flex-row-reverse gap-2 my-1"},nzn={class:""},rzn={class:""},izn={class:"flex items-center"},ozn={class:"flex items-center"},szn={class:"flex items-center"},azn={class:"flex items-center"},lzn=["href"],czn=["title","innerHTML"];function uzn(t,e,n,r,i,o){const s=pt("DynamicUIRenderer");return k(),H("div",{class:je(["items-start p-4 hover:bg-primary-light hover:border-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",n.selected?" border-primary bg-primary":"border-transparent"]),onClick:e[8]||(e[8]=he((...a)=>o.toggleSelected&&o.toggleSelected(...a),["stop"])),title:n.binding.installed?n.binding.name:"Not installed"},[g("div",null,[g("div",Zqn,[g("img",{ref:"imgElement",src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-blue-700"},null,40,Xqn),g("h3",Jqn,le(n.binding.name),1),e[10]||(e[10]=g("div",{class:"grow"},null,-1)),g("div",ezn,[n.selected?(k(),H("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>o.toggleReloadBinding&&o.toggleReloadBinding(...a)),e[2]||(e[2]=he(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},e[9]||(e[9]=[g("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),g("span",{class:"sr-only"},"Help",-1)]))):re("",!0)])]),g("div",tzn,[n.binding.installed?re("",!0):(k(),H("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=he((...a)=>o.toggleInstall&&o.toggleInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},e[11]||(e[11]=[nt(" Install "),g("span",{class:"sr-only"},"Click to install",-1)]))),n.binding.installed?(k(),H("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=he((...a)=>o.toggleReinstall&&o.toggleReinstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-green-700 hover:bg-red-800 focus:ring-4 focus:ring-green-300 rounded-lg dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-red-900"},e[12]||(e[12]=[nt(" Reinstall "),g("span",{class:"sr-only"},"Reinstall",-1)]))):re("",!0),n.binding.installed?(k(),H("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[5]||(e[5]=he((...a)=>o.toggleUnInstall&&o.toggleUnInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},e[13]||(e[13]=[nt(" Uninstall "),g("span",{class:"sr-only"},"UnInstall",-1)]))):re("",!0),n.selected?(k(),H("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[6]||(e[6]=he((...a)=>o.toggleSettings&&o.toggleSettings(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},e[14]||(e[14]=[nt(" Settings "),g("span",{class:"sr-only"},"Settings",-1)]))):re("",!0)]),n.binding.ui?(k(),wt(s,{key:0,class:"w-full h-full",code:n.binding.ui},null,8,["code"])):re("",!0),g("div",nzn,[g("div",rzn,[g("div",izn,[e[15]||(e[15]=g("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[16]||(e[16]=g("b",null,"Author: ",-1)),nt(" "+le(n.binding.author),1)]),g("div",ozn,[e[18]||(e[18]=g("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1)),e[19]||(e[19]=g("b",null,"Folder: ",-1)),nt(" "+le(n.binding.folder)+" ",1),e[20]||(e[20]=g("div",{class:"grow"},null,-1)),g("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[7]||(e[7]=he(a=>o.copyToClipBoard(this.binding.folder),["stop"]))},e[17]||(e[17]=[g("i",{"data-feather":"clipboard",class:"w-5"},null,-1)]))]),g("div",szn,[e[21]||(e[21]=g("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1)),e[22]||(e[22]=g("b",null,"Version: ",-1)),nt(" "+le(n.binding.version),1)]),g("div",azn,[e[23]||(e[23]=g("i",{"data-feather":"github",class:"w-5 m-1"},null,-1)),e[24]||(e[24]=g("b",null,"Link: ",-1)),g("a",{href:n.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},le(n.binding.link),9,lzn)])]),e[25]||(e[25]=g("div",{class:"flex items-center"},[g("i",{"data-feather":"info",class:"w-5 m-1"}),g("b",null,"Description: "),g("br")],-1)),g("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description,innerHTML:n.binding.description},null,8,czn)])])],10,Kqn)}const dzn=yt(Yqn,[["render",uzn]]),co="/assets/logo-PFou_X4V.png",fzn={data(){return{show:!1,model_path:"",resolve:null}},methods:{cancel(){this.resolve(null)},openInputBox(){return new Promise(t=>{this.resolve=t})},hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},showDialog(t){return new Promise(e=>{this.model_path=t,this.show=!0,this.resolve=e})}}},pzn={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},hzn={class:"relative w-full max-w-md max-h-full"},Tzn={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},mzn={class:"p-4 text-center"},gzn={class:"p-4 text-center mx-auto mb-4"};function _zn(t,e,n,r,i,o){return i.show?(k(),H("div",pzn,[g("div",hzn,[g("div",Tzn,[g("button",{type:"button",onClick:e[0]||(e[0]=s=>o.hide(!1)),class:"absolute top-3 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[4]||(e[4]=[g("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[g("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),g("span",{class:"sr-only"},"Close modal",-1)])),g("div",mzn,[e[6]||(e[6]=g("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),g("div",gzn,[e[5]||(e[5]=g("label",{class:"mr-2"},"Model path",-1)),J(g("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>i.model_path=s),class:"px-4 py-2 border border-gray-300 rounded-lg",type:"text"},null,512),[[we,i.model_path]])]),g("button",{onClick:e[2]||(e[2]=s=>o.hide(!0)),type:"button",class:"text-white bg-green-600 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center mr-2"}," Add "),g("button",{onClick:e[3]||(e[3]=s=>o.hide(!1)),type:"button",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"},"No, cancel")])])])])):re("",!0)}const Qzn=yt(fzn,[["render",_zn]]),vzn={props:{show:{type:Boolean,default:!1},can_remove:{type:Boolean,default:!1},title:{type:String,default:"Select an option"},choices:{type:Array,required:!0}},data(){return{selectedChoice:null,showInput:!1,newFilename:""}},methods:{displayName(t){return typeof t=="string"?t:t&&t.name?t.name:""},selectChoice(t){this.selectedChoice=t,this.$emit("choice-selected",t)},closeDialog(){this.$emit("close-dialog")},validateChoice(){this.$emit("choice-validated",this.selectedChoice)},formatSize(t){const e=["bytes","KB","MB","GB"];let n=0;for(;t>=1024&&n[n.show?(k(),H("div",yzn,[g("div",bzn,[g("h2",Ezn,[e[5]||(e[5]=g("svg",{class:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"})],-1)),nt(" "+le(n.title),1)]),g("div",xzn,[g("ul",null,[(k(!0),H(Ue,null,ot(n.choices,(s,a)=>(k(),H("li",{key:a,class:"py-2 px-4 hover:bg-gray-200 dark:hover:bg-gray-600 transition duration-150 ease-in-out"},[g("div",Szn,[g("div",Lzn,[s.isEditing?J((k(),H("input",{key:1,"onUpdate:modelValue":l=>s.editName=l,onBlur:l=>o.finishEditing(s),onKeyup:Xr(l=>o.finishEditing(s),["enter"]),class:"bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded px-2 py-1 text-sm",autofocus:""},null,40,Azn)),[[we,s.editName]]):(k(),H("span",{key:0,onClick:l=>o.selectChoice(s),class:je([{"font-semibold":s===i.selectedChoice},"text-gray-800 dark:text-white cursor-pointer"])},le(o.displayName(s)),11,Czn)),s.size?(k(),H("span",wzn,le(o.formatSize(s.size)),1)):re("",!0)]),g("div",Mzn,[g("button",{onClick:l=>o.editChoice(s),class:"text-blue-500 hover:text-blue-600 mr-2"},e[6]||(e[6]=[g("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})],-1)]),8,Ozn),n.can_remove?(k(),H("button",{key:0,onClick:l=>o.removeChoice(s,a),class:"text-red-500 hover:text-red-600"},e[7]||(e[7]=[g("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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)]),8,Rzn)):re("",!0)])])]))),128))])]),i.showInput?(k(),H("div",Nzn,[J(g("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>i.newFilename=s),placeholder:"Enter a filename",class:"border border-gray-300 dark:border-gray-600 p-2 rounded-lg w-full mb-2 bg-white dark:bg-gray-700 text-gray-800 dark:text-white"},null,512),[[we,i.newFilename]]),g("button",{onClick:e[1]||(e[1]=(...s)=>o.addNewFilename&&o.addNewFilename(...s)),class:"bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add ")])):re("",!0),g("div",Dzn,[g("button",{onClick:e[2]||(e[2]=(...s)=>o.closeDialog&&o.closeDialog(...s)),class:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded-lg transition duration-300"}," Cancel "),g("button",{onClick:e[3]||(e[3]=(...s)=>o.validateChoice&&o.validateChoice(...s)),disabled:!i.selectedChoice,class:je([{"bg-blue-500 hover:bg-blue-600":i.selectedChoice,"bg-gray-400 cursor-not-allowed":!i.selectedChoice},"text-white font-bold py-2 px-4 rounded-lg transition duration-300"])}," Validate ",10,Izn),g("button",{onClick:e[4]||(e[4]=(...s)=>o.toggleInput&&o.toggleInput(...s)),class:"bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add New ")])])])):re("",!0)]),_:1})}const Ib=yt(vzn,[["render",kzn],["__scopeId","data-v-f43216be"]]),Pzn={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:"0"}},data(){return{selectedValue:this.defaultValue}},computed:{selectedLabel(){const t=this.radioOptions.find(e=>e.value===this.selectedValue);return t?t.label:""}},watch:{selectedValue(t,e){this.$emit("radio-selected",t)}},methods:{handleRadioChange(){}}},Hzn={class:"flex space-x-4"},Vzn=["value","aria-checked"],Bzn={class:"text-gray-700"};function Fzn(t,e,n,r,i,o){return k(),H("div",Hzn,[(k(!0),H(Ue,null,ot(n.radioOptions,(s,a)=>(k(),H("label",{key:s.value,class:"flex items-center space-x-2"},[J(g("input",{type:"radio",value:s.value,"onUpdate:modelValue":e[0]||(e[0]=l=>i.selectedValue=l),onChange:e[1]||(e[1]=(...l)=>o.handleRadioChange&&o.handleRadioChange(...l)),class:"text-blue-500 focus:ring-2 focus:ring-blue-200","aria-checked":i.selectedValue===s.value.toString(),role:"radio"},null,40,Vzn),[[Nj,i.selectedValue]]),g("span",Bzn,le(s.label),1)]))),128))])}const $zn=yt(Pzn,[["render",Fzn]]),Uzn="/assets/gpu-BWVOYg-D.svg",Gzn={name:"StringListManager",props:{modelValue:{type:Array,default:()=>[]},placeholder:{type:String,default:"Enter an item"}},emits:["update:modelValue","change"],data(){return{newItem:"",draggingIndex:null}},methods:{addItem(){if(this.newItem.trim()){const t=[...this.modelValue,this.newItem.trim()];this.$emit("update:modelValue",t),this.$emit("change"),this.newItem=""}},removeItem(t){const e=this.modelValue.filter((n,r)=>r!==t);this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",[]),this.$emit("change")},startDragging(t){this.draggingIndex=t},dragItem(t){if(this.draggingIndex!==null){const e=[...this.modelValue],n=e.splice(this.draggingIndex,1)[0];e.splice(t,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},stopDragging(){this.draggingIndex=null},moveUp(t){if(t>0){const e=[...this.modelValue],n=e.splice(t,1)[0];e.splice(t-1,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},moveDown(t){if(ti.newItem=s),placeholder:n.placeholder,onKeyup:e[1]||(e[1]=Xr((...s)=>o.addItem&&o.addItem(...s),["enter"])),class:"flex-grow mr-4 px-4 py-2 border border-gray-300 rounded dark:bg-gray-600 text-lg"},null,40,zzn),[[we,i.newItem]]),g("button",{onClick:e[2]||(e[2]=(...s)=>o.addItem&&o.addItem(...s)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg"},"Add")]),n.modelValue.length>0?(k(),H("ul",jzn,[(k(!0),H(Ue,null,ot(n.modelValue,(s,a)=>(k(),H("li",{key:a,class:je(["flex items-center mb-2 relative",{"bg-gray-200":i.draggingIndex===a}])},[g("span",Wzn,le(s),1),g("div",Yzn,[g("button",{onClick:l=>o.removeItem(a),class:"text-red-500 hover:text-red-700 p-2"},e[5]||(e[5]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)]),8,Kzn),a>0?(k(),H("button",{key:0,onClick:l=>o.moveUp(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded mr-2"},e[6]||(e[6]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1)]),8,Zzn)):re("",!0),ao.moveDown(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded"},e[7]||(e[7]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,Xzn)):re("",!0)]),i.draggingIndex===a?(k(),H("div",{key:0,class:"absolute top-0 left-0 w-full h-full bg-gray-200 opacity-50 cursor-move",onMousedown:l=>o.startDragging(a),onMousemove:l=>o.dragItem(a),onMouseup:e[3]||(e[3]=(...l)=>o.stopDragging&&o.stopDragging(...l))},null,40,Jzn)):re("",!0)],2))),128))])):re("",!0),n.modelValue.length>0?(k(),H("div",ejn,[g("button",{onClick:e[4]||(e[4]=(...s)=>o.removeAll&&o.removeAll(...s)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg"},"Remove All")])):re("",!0)])}const njn=yt(Gzn,[["render",tjn]]),rjn={name:"DictionaryManager",props:{modelValue:{type:Object,default:()=>({})},keyName:{type:String,default:"Key"},valueName:{type:String,default:"Value"}},emits:["update:modelValue","change"],data(){return{newKey:"",newValue:"",draggingKey:null}},methods:{addItem(){if(this.newKey.trim()){const t={...this.modelValue};t[this.newKey.trim()]=this.newValue,this.$emit("update:modelValue",t),this.$emit("change"),this.newKey="",this.newValue=""}},removeItem(t){const e={...this.modelValue};delete e[t],this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",{}),this.$emit("change")},updateKey(t,e){if(e.trim()&&e!==t){const n={...this.modelValue};n[e.trim()]=n[t],delete n[t],this.$emit("update:modelValue",n),this.$emit("change")}},updateValue(t,e){const n={...this.modelValue};n[t]=e,this.$emit("update:modelValue",n),this.$emit("change")},moveUp(t){const e=Object.keys(this.modelValue),n=e.indexOf(t);if(n>0){const r={};e.forEach((i,o)=>{o===n-1&&(r[t]=this.modelValue[t]),i!==t&&(r[i]=this.modelValue[i])}),this.$emit("update:modelValue",r),this.$emit("change")}},moveDown(t){const e=Object.keys(this.modelValue),n=e.indexOf(t);if(n{i!==t&&(r[i]=this.modelValue[i]),o===n+1&&(r[t]=this.modelValue[t])}),this.$emit("update:modelValue",r),this.$emit("change")}}}},ijn={class:"max-w-4xl mx-auto p-4"},ojn={class:"flex flex-col sm:flex-row mb-4 gap-2"},sjn=["placeholder"],ajn=["placeholder"],ljn={key:0,class:"space-y-4"},cjn={class:"flex-grow mb-2 sm:mb-0 sm:mr-4 w-full sm:w-auto"},ujn=["for"],djn=["id","value","onInput"],fjn={class:"flex-grow mb-2 sm:mb-0 sm:mr-4 w-full sm:w-auto"},pjn=["for"],hjn=["id","value","onInput"],Tjn={class:"flex items-center space-x-2"},mjn=["onClick"],gjn=["onClick"],_jn=["onClick"],Qjn={key:1,class:"mt-6"};function vjn(t,e,n,r,i,o){return k(),H("div",ijn,[g("div",ojn,[J(g("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=s=>i.newKey=s),placeholder:n.keyName,onKeyup:e[1]||(e[1]=Xr((...s)=>o.addItem&&o.addItem(...s),["enter"])),class:"flex-grow px-4 py-2 border border-gray-300 rounded dark:bg-gray-700 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,sjn),[[we,i.newKey]]),J(g("input",{type:"text","onUpdate:modelValue":e[2]||(e[2]=s=>i.newValue=s),placeholder:n.valueName,onKeyup:e[3]||(e[3]=Xr((...s)=>o.addItem&&o.addItem(...s),["enter"])),class:"flex-grow px-4 py-2 border border-gray-300 rounded dark:bg-gray-700 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,ajn),[[we,i.newValue]]),g("button",{onClick:e[4]||(e[4]=(...s)=>o.addItem&&o.addItem(...s)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg transition duration-300 ease-in-out"},"Add")]),Object.keys(n.modelValue).length>0?(k(),H("ul",ljn,[(k(!0),H(Ue,null,ot(n.modelValue,(s,a)=>(k(),H("li",{key:a,class:je(["flex flex-col sm:flex-row items-center p-4 bg-white dark:bg-gray-800 rounded-lg shadow-md hover:shadow-lg transition duration-300 ease-in-out",{"bg-gray-100 dark:bg-gray-700":i.draggingKey===a}])},[g("div",cjn,[g("label",{for:"key-"+a,class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},le(n.keyName),9,ujn),g("input",{id:"key-"+a,value:a,onInput:l=>o.updateKey(a,l.target.value),class:"w-full px-3 py-2 border border-gray-300 rounded dark:bg-gray-600 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,djn)]),g("div",fjn,[g("label",{for:"value-"+a,class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},le(n.valueName),9,pjn),g("input",{id:"value-"+a,value:s,onInput:l=>o.updateValue(a,l.target.value),class:"w-full px-3 py-2 border border-gray-300 rounded dark:bg-gray-600 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,hjn)]),g("div",Tjn,[g("button",{onClick:l=>o.removeItem(a),class:"text-red-500 hover:text-red-700 p-2 rounded-full hover:bg-red-100 dark:hover:bg-red-900 transition duration-300 ease-in-out"},e[6]||(e[6]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)]),8,mjn),g("button",{onClick:l=>o.moveUp(a),class:"bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-500 p-2 rounded-full transition duration-300 ease-in-out"},e[7]||(e[7]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1)]),8,gjn),g("button",{onClick:l=>o.moveDown(a),class:"bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-500 p-2 rounded-full transition duration-300 ease-in-out"},e[8]||(e[8]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,_jn)])],2))),128))])):re("",!0),Object.keys(n.modelValue).length>0?(k(),H("div",Qjn,[g("button",{onClick:e[5]||(e[5]=(...s)=>o.removeAll&&o.removeAll(...s)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg transition duration-300 ease-in-out"},"Remove All")])):re("",!0)])}const yjn=yt(rjn,[["render",vjn]]),bjn="/";Qe.defaults.baseURL="/";const Ejn={components:{AddModelDialog:Qzn,ModelEntry:fqn,PersonalityViewer:vqn,PersonalityEntry:tU,BindingEntry:dzn,ChoiceDialog:Ib,Card:Q9,StringListManager:njn,DictManager:yjn,RadioOptions:$zn},data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},isUploading:!1,defaultModelImgPlaceholder:ri,snd_input_devices:[],snd_input_devices_indexes:[],snd_output_devices:[],snd_output_devices_indexes:[],voices:[],voice_languages:{Arabic:"ar","Brazilian Portuguese":"pt",Chinese:"zh-cn",Czech:"cs",Dutch:"nl",English:"en",French:"fr",German:"de",Italian:"it",Polish:"pl",Russian:"ru",Spanish:"es",Turkish:"tr",Japanese:"ja",Korean:"ko",Hungarian:"hu",Hindi:"hi"},storeLogo:co,binding_changed:!1,SVGGPU:Uzn,models_zoo:[],models_zoo_initialLoadCount:10,models_zoo_loadMoreCount:5,models_zoo_loadedEntries:[],models_zoo_scrollThreshold:200,sortOptions:[{label:"Sort by Date",value:0},{label:"Sort by Rank",value:1},{label:"Sort by Name",value:2},{label:"Sort by Maker",value:3},{label:"Sort by Quantizer",value:4}],comfyui_models:[],show_only_installed_models:!1,reference_path:"",audioVoices:[],has_updates:!1,variant_choices:[],variantSelectionDialogVisible:!1,currenModelToInstall:null,loading_text:"",personality_category:null,addModelDialogVisibility:!1,modelPath:"",personalitiesFiltered:[],modelsFiltered:[],collapsedArr:[],all_collapsed:!0,data_conf_collapsed:!0,internet_conf_collapsed:!0,servers_conf_collapsed:!0,mainconf_collapsed:!0,smartrouterconf_collapsed:!0,bec_collapsed:!0,sort_type:0,is_loading_zoo:!1,mzc_collapsed:!0,mzdc_collapsed:!0,pzc_collapsed:!0,bzc_collapsed:!0,pc_collapsed:!0,mc_collapsed:!0,sc_collapsed:!0,mzl_collapsed:!1,pzl_collapsed:!1,ezl_collapsed:!1,bzl_collapsed:!1,extCatgArr:[],persCatgArr:[],persArr:[],showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,isMounted:!1,bUrl:bjn,searchPersonality:"",searchModel:"",searchPersonalityTimer:{},searchPersonalityTimerInterval:1500,searchModelTimerInterval:1500,searchPersonalityInProgress:!1,searchModelInProgress:!1,addModel:{},modelDownlaodInProgress:!1,uploadData:[]}},async created(){try{this.$store.state.loading_infos="Getting Hardware usage",await this.refreshHardwareUsage(this.$store)}catch(t){console.log("Error cought:",t)}tt.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{triggerFileInput(){this.$refs.fileInput.click()},async handleFileUpload(t){const e=t.target.files;if(!e.length)return;this.isUploading=!0;const n=new FormData;n.append("database_name",this.databaseName),Array.from(e).forEach(r=>{n.append("files",r)});try{const r=await Qe.post("/upload_files_2_rag_db",n,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:i=>{const o=Math.round(i.loaded*100/i.total);this.$emit("upload-progress",o)}});this.$emit("upload-success",r.data)}catch(r){console.error("Upload failed:",r),this.$emit("upload-error",r)}finally{this.isUploading=!1,t.target.value=""}},updateRagDatabase(t,e,n){n&&(n==="mounted"?this.configFile.datalakes[t][n]=!!e:this.configFile.datalakes[t][n]=e,this.settingsChanged=!0)},getServedDatabaseAlias(t){return this.configFile.rag_local_services[t].alias},getServedDatabaseType(t){return this.configFile.rag_local_services[t].type},getServedDatabaseUrl(t){return this.configFile.rag_local_services[t].url},getServedDatabaseStatus(t){return this.configFile.rag_local_services[t].start_at_startup||!1},getServedDatabaseKey(t){return this.configFile.rag_local_services[t].key||""},getDataLakeAlias(t){return this.configFile.datalakes[t].alias},getDataLakeType(t){return this.configFile.datalakes[t].type},getDataLakeUrl(t){return this.configFile.datalakes[t].url},getDataLakePath(t){return this.configFile.datalakes[t].path},getDataLakeKey(t){return this.configFile.datalakes[t].key||""},getDataLakeStatus(t){return this.configFile.datalakes[t].mounted||!1},updateAlias(t,e){this.configFile.datalakes[t].alias=e,this.settingsChanged=!0},updateDatabaseType(t,e){this.configFile.datalakes[t].type=e,this.settingsChanged=!0},updateDataLakeUrl(t,e){this.configFile.datalakes[t].url=e,this.settingsChanged=!0},updateDataLakePath(t,e){this.configFile.datalakes[t].path=e,this.settingsChanged=!0},updateDatabaseKey(t,e){this.configFile.datalakes[t].key=e,this.settingsChanged=!0},updateMounted(t,e){this.configFile.datalakes[t].mounted=e,this.settingsChanged=!0},updateStartAtStartup(t,e){this.configFile.datalakes[t].start_at_startup=e,this.settingsChanged=!0},addDatabaseService(){this.configFile.rag_local_services||(this.configFile.rag_local_services=[]),this.configFile.rag_local_services.push({alias:"datalake",type:"lightrag",url:"http://localhost:9621/",path:"",key:"",start_at_startup:!1}),this.settingsChanged=!0},addDataLake(){this.configFile.datalakes||(this.configFile.datalakes=[]),this.configFile.datalakes.push({alias:"datalake",type:"lightrag",url:"http://localhost:9621/",path:"",key:"",mounted:!1}),this.settingsChanged=!0},removeDataLake(t){console.log("Removing remote database"),this.configFile.datalakes.splice(t,1),console.log(this.configFile.datalakes),this.settingsChanged=!0},removeServedDataBase(t){console.log("Removing remote database"),this.configFile.rag_local_services.splice(t,1),console.log(this.configFile.rag_local_services),this.settingsChanged=!0},fetchElevenLabsVoices(){fetch("https://api.elevenlabs.io/v1/voices").then(t=>t.json()).then(t=>{this.voices=t.voices}).catch(t=>console.error("Error fetching voices:",t))},async refreshHardwareUsage(t){await t.dispatch("refreshDiskUsage"),await t.dispatch("refreshRamUsage"),await t.dispatch("refreshVramUsage")},addDataSource(){this.$store.state.config.datalakes.push({alias:"",is_local:!0,path:"",mounted:!1,key:""}),this.settingsChanged=!0},removeDataSource(t){this.$store.state.config.datalakes.splice(t,1),this.settingsChanged=!0},async vectorize_folder(t){await Qe.post("/vectorize_folder",{client_id:this.$store.state.client_id,rag_database:this.$store.state.config.datalakes[t]},this.posts_headers)},async select_folder(t){try{tt.on("rag_db_added",e=>{console.log("rag_db_added"),console.log(e),e?(console.log(this.$store.state.config.datalakes),console.log(t),this.$store.state.config.datalakes[t]={alias:e.datalake_name,type:"lollmsvectordb",path:e.path,mounted:!1,key:""},this.settingsChanged=!0):this.$store.state.toast.showToast("Failed to select a folder",4,!1)}),await Qe.post("/add_rag_database",{client_id:this.$store.state.client_id},this.posts_headers)}catch{this.$store.state.toast.showToast("Failed to select a folder",4,!1)}},handleTemplateSelection(t){console.log("handleTemplateSelection");const e=t.target.value;console.log("handleTemplateSelection: ",e),e==="lollms"?(console.log("Using lollms template"),this.configFile.start_header_id_template="!@>",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` +Please report this to https://github.com/markedjs/marked.`,e){const i="

An error occurred:

"+vi(r.message+"",!0)+"
";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}}const T2=new YUn;function dn(t,e){return T2.parse(t,e)}dn.options=dn.setOptions=function(t){return T2.setOptions(t),dn.defaults=T2.defaults,q$(dn.defaults),dn};dn.getDefaults=Lb;dn.defaults=A2;dn.use=function(...t){return T2.use(...t),dn.defaults=T2.defaults,q$(dn.defaults),dn};dn.walkTokens=function(t,e){return T2.walkTokens(t,e)};dn.parseInline=T2.parseInline;dn.Parser=$i;dn.parser=$i.parse;dn.Renderer=td;dn.TextRenderer=Rb;dn.Lexer=Fi;dn.lexer=Fi.lex;dn.Tokenizer=Ju;dn.Hooks=w4;dn.parse=dn;dn.options;dn.setOptions;dn.use;dn.walkTokens;dn.parseInline;$i.parse;Fi.lex;const KUn={name:"HelpView",data(){return{helpSections:[]}},methods:{toggleSection(t){this.helpSections[t].isOpen=!this.helpSections[t].isOpen},async loadMarkdownFile(t){try{const n=await(await fetch(`/help/${t}`)).text();return dn(n)}catch(e){return console.error("Error loading markdown file:",e),"Error loading help content."}},async loadHelpSections(){const t=[{title:"About LoLLMs",file:"lollms-context.md"},{title:"Getting Started",file:"getting-started.md"},{title:"Uploading Files",file:"uploading-files.md"},{title:"Sending Images",file:"sending-images.md"},{title:"Using Code Interpreter",file:"code-interpreter.md"},{title:"Internet Search",file:"internet-search.md"}];for(const e of t){const n=await this.loadMarkdownFile(e.file);this.helpSections.push({title:e.title,content:n,isOpen:!1})}}},mounted(){this.loadHelpSections()}},ZUn={class:"help-view background-color p-6 w-full"},XUn={class:"big-card w-full"},JUn={class:"help-sections-container"},eGn={class:"help-sections space-y-4"},tGn=["onClick"],nGn={class:"toggle-icon"},rGn={key:0,class:"help-content mt-4"},iGn=["innerHTML"];function oGn(t,e,n,r,i,o){return k(),H("div",ZUn,[g("div",XUn,[e[0]||(e[0]=g("h1",{class:"text-4xl md:text-5xl font-bold text-gray-800 dark:text-gray-100 mb-6"},"LoLLMs Help",-1)),g("div",JUn,[g("div",eGn,[(k(!0),H(Ue,null,ot(i.helpSections,(s,a)=>(k(),H("div",{key:a,class:"help-section message"},[g("h2",{onClick:l=>o.toggleSection(a),class:"menu-item cursor-pointer flex justify-between items-center"},[nt(le(s.title)+" ",1),g("span",nGn,le(s.isOpen?"▼":"▶"),1)],8,tGn),s.isOpen?(k(),H("div",rGn,[g("div",{innerHTML:s.content,class:"prose dark:prose-invert"},null,8,iGn)])):re("",!0)]))),128))])])])])}const sGn=yt(KUn,[["render",oGn],["__scopeId","data-v-8c1798f3"]]);function $o(t,e=!0,n=1){const r=e?1e3:1024;if(Math.abs(t)=r&&o{Ze.replace()})},executeCommand(t){this.isMenuOpen=!1,console.log("Selected"),console.log(t.value),typeof t.value=="function"&&(console.log("Command detected",t),t.value()),this.execute_cmd&&(console.log("executing generic command"),this.execute_cmd(t))},positionMenu(){var t;if(this.$refs.menuButton!=null){if(this.force_position==0||this.force_position==null){const e=this.$refs.menuButton.getBoundingClientRect(),n=window.innerHeight;t=e.bottom>n/2}else this.force_position==1?t=!0:t=!1;this.menuPosition.top=t?"auto":"calc(100% + 10px)",this.menuPosition.bottom=t?"100%":"auto"}}},mounted(){window.addEventListener("resize",this.positionMenu),this.positionMenu(),ze(()=>{Ze.replace()})},beforeDestroy(){window.removeEventListener("resize",this.positionMenu)},watch:{isMenuOpen:"positionMenu"}},lGn={class:"menu-container"},cGn=["title"],uGn=["src"],dGn=["data-feather"],fGn={key:2,class:"w-5 h-5"},pGn={key:3,"data-feather":"menu"},hGn={class:"flex-grow menu-ul"},TGn=["onClick"],mGn={key:0,"data-feather":"check"},gGn=["src","alt"],_Gn=["data-feather"],QGn={key:3,class:"menu-icon"};function vGn(t,e,n,r,i,o){return k(),H("div",lGn,[g("button",{onClick:e[0]||(e[0]=he((...s)=>o.toggleMenu&&o.toggleMenu(...s),["prevent"])),title:n.title,class:je([n.menuIconClass,"menu-button m-0 p-0 bg-blue-500 text-white dark:bg-blue-200 dark:text-gray-800 rounded flex items-center justify-center w-6 h-6 border-none cursor-pointer hover:bg-blue-400 w-8 h-8 object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-gray-300 border-secondary cursor-pointer"]),ref:"menuButton"},[n.icon&&!n.icon.includes("#")&&!n.icon.includes("feather")?(k(),H("img",{key:0,src:n.icon,class:"w-5 h-5 p-0 m-0 shadow-lg bold"},null,8,uGn)):n.icon&&n.icon.includes("feather")?(k(),H("i",{key:1,"data-feather":n.icon.split(":")[1],class:"w-5 h-5"},null,8,dGn)):n.icon&&n.icon.includes("#")?(k(),H("p",fGn,le(n.icon.split("#")[1]),1)):(k(),H("i",pGn))],10,cGn),oe(qi,{name:"slide"},{default:He(()=>[i.isMenuOpen?(k(),H("div",{key:0,class:"menu-list flex-grow",style:xn(i.menuPosition),ref:"menu"},[g("ul",hGn,[(k(!0),H(Ue,null,ot(n.commands,(s,a)=>(k(),H("li",{key:a,onClick:he(l=>o.executeCommand(s),["prevent"]),class:"menu-command menu-li flex-grow hover:bg-blue-400"},[n.selected_entry==s.name?(k(),H("i",mGn)):s.icon&&!s.icon.includes("feather")&&!s.is_file?(k(),H("img",{key:1,src:s.icon,alt:s.name,class:"menu-icon"},null,8,gGn)):re("",!0),s.icon&&s.icon.includes("feather")&&!s.is_file?(k(),H("i",{key:2,"data-feather":s.icon.split(":")[1],class:"mr-2"},null,8,_Gn)):(k(),H("span",QGn)),g("span",null,le(s.name),1)],8,TGn))),128))])],4)):re("",!0)]),_:1})])}const Nb=yt(aGn,[["render",vGn]]),yGn={components:{InteractiveMenu:Nb},props:{isInstalled:Boolean,onInstall:Function,onCancelInstall:Function,onUninstall:Function,onSelected:Function,onCopy:Function,onCopyLink:Function,selected:Boolean,model:Object,model_type:String},data(){return{progress:0,speed:0,total_size:0,downloaded_size:0,start_time:"",installing:!1,uninstalling:!1,failedToLoad:!1,linkNotValid:!1,selected_variant:""}},async mounted(){ze(()=>{Ze.replace()})},methods:{formatFileSize(t){return t<1024?t+" bytes":t<1024*1024?(t/1024).toFixed(2)+" KB":t<1024*1024*1024?(t/(1024*1024)).toFixed(2)+" MB":(t/(1024*1024*1024)).toFixed(2)+" GB"},computedFileSize(t){return $o(t)},getImgUrl(){return this.model.icon==null||this.model.icon==="/images/default_model.png"?ri:this.model.icon},defaultImg(t){t.target.src=ri},install(){this.onInstall(this)},uninstall(){this.isInstalled&&this.onUninstall(this)},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):this.onInstall(this)},toggleSelected(t){if(console.log("event.target.tagName.toLowerCase()"),console.log(t.target.tagName.toLowerCase()),t.target.tagName.toLowerCase()==="button"||t.target.tagName.toLowerCase()==="svg"){t.stopPropagation();return}this.onSelected(this),this.model.selected=!0,ze(()=>{Ze.replace()})},toggleCopy(){this.onCopy(this)},toggleCopyLink(){this.onCopyLink(this)},toggleCancelInstall(){this.onCancelInstall(this),this.installing=!1},handleSelection(){this.isInstalled&&!this.selected&&this.onSelected(this)},copyContentToClipboard(){this.$emit("copy","this.message.content")}},computed:{computed_classes(){return this.model.isInstalled?this.selected?"border-4 border-gray-200 bg-primary cursor-pointer":"border-0 border-primary bg-primary cursor-pointer":"border-transparent"},commandsList(){let t=[{name:this.model.isInstalled?"Install Extra":"Install",icon:"feather:settings",is_file:!1,value:this.install},{name:"Copy model info to clipboard",icon:"feather:settings",is_file:!1,value:this.toggleCopy}];return this.model.isInstalled&&t.push({name:"UnInstall",icon:"feather:settings",is_file:!1,value:this.uninstall}),this.selected&&t.push({name:"Reload",icon:"feather:refresh-ccw",is_file:!1,value:this.toggleSelected}),t},selected_computed(){return this.selected},fileSize:{get(){if(this.model&&this.model.variants&&this.model.variants.length>0){const t=this.model.variants[0].size;return this.formatFileSize(t)}return null}},speed_computed(){return $o(this.speed)},total_size_computed(){return $o(this.total_size)},downloaded_size_computed(){return $o(this.downloaded_size)}},watch:{linkNotValid(){ze(()=>{Ze.replace()})}}},bGn=["title"],EGn={key:0,class:"flex flex-row"},xGn={class:"max-w-[300px] overflow-x-auto"},SGn={class:"flex gap-3 items-center grow"},LGn=["href"],CGn=["src"],AGn={class:"flex-1 overflow-hidden"},wGn={class:"font-bold font-large text-lg truncate"},MGn={key:1,class:"flex items-center flex-row gap-2 my-1"},OGn={class:"flex grow items-center"},RGn={key:2,class:"absolute z-10 -m-4 p-5 shadow-md text-center rounded-lg w-full h-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel bg-opacity-70 dark:bg-opacity-70 flex justify-center items-center"},NGn={class:"relative flex flex-col items-center justify-center flex-grow h-full"},DGn={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},IGn={class:"w-full bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel rounded-lg p-2"},kGn={class:"flex justify-between mb-1"},PGn={class:"text-sm font-medium text-blue-700 dark:text-white"},HGn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},VGn={class:"flex justify-between mb-1"},BGn={class:"text-base font-medium text-blue-700 dark:text-white"},FGn={class:"text-sm font-medium text-blue-700 dark:text-white"},$Gn={class:"flex flex-grow"},UGn={class:"flex flex-row flex-grow gap-3"},GGn={class:"p-2 text-center grow"},qGn={key:3},zGn={class:"flex flex-row items-center gap-3"},jGn=["src"],WGn={class:"font-bold font-large text-lg truncate"},YGn={class:"flex items-center flex-row-reverse gap-2 my-1"},KGn={class:"flex flex-row items-center"},ZGn={key:0,class:"text-base text-red-600 flex items-center mt-1"},XGn=["title"],JGn={class:""},eqn={class:"flex flex-row items-center"},tqn=["href","title"],nqn={class:"flex items-center"},rqn={class:"flex items-center"},iqn={key:0,class:"flex items-center"},oqn=["href"],sqn={class:"flex items-center"},aqn=["href"],lqn={class:"flex items-center"},cqn={class:"flex items-center"},uqn=["href"];function dqn(t,e,n,r,i,o){const s=pt("InteractiveMenu");return k(),H("div",{class:je(["relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",o.computed_classes]),title:n.model.name,onClick:e[10]||(e[10]=he(a=>o.toggleSelected(a),["prevent"]))},[n.model.isCustomModel?(k(),H("div",EGn,[g("div",xGn,[g("div",SGn,[g("a",{href:n.model.model_creator_link,target:"_blank"},[g("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-lg object-fill"},null,40,CGn)],8,LGn),g("div",AGn,[g("h3",wGn,le(n.model.name),1)])])])])):re("",!0),n.model.isCustomModel?(k(),H("div",MGn,[g("div",OGn,[g("button",{type:"button",title:"Custom model / local model",class:"font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",onClick:e[1]||(e[1]=he(()=>{},["stop"]))},e[11]||(e[11]=[g("i",{"data-feather":"box",class:"w-5"},null,-1),g("span",{class:"sr-only"},"Custom model / local model",-1)])),e[12]||(e[12]=nt(" Custom model "))]),g("div",null,[n.model.isInstalled?(k(),H("button",{key:0,title:"Delete file from disk",type:"button",onClick:e[2]||(e[2]=he((...a)=>o.uninstall&&o.uninstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},e[13]||(e[13]=[nt(" Uninstall "),g("span",{class:"sr-only"},"Remove",-1)]))):re("",!0)])])):re("",!0),i.installing?(k(),H("div",RGn,[g("div",NGn,[e[15]||(e[15]=g("div",{role:"status",class:"justify-center"},[g("svg",{"aria-hidden":"true",class:"w-24 h-24 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"},[g("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"}),g("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"})]),g("span",{class:"sr-only"},"Loading...")],-1)),g("div",DGn,[g("div",IGn,[g("div",kGn,[e[14]||(e[14]=g("span",{class:"text-base font-medium text-blue-700 dark:text-white"},"Downloading",-1)),g("span",PGn,le(Math.floor(i.progress))+"%",1)]),g("div",HGn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn({width:i.progress+"%"})},null,4)]),g("div",VGn,[g("span",BGn,"Download speed: "+le(o.speed_computed)+"/s",1),g("span",FGn,le(o.downloaded_size_computed)+"/"+le(o.total_size_computed),1)])])]),g("div",$Gn,[g("div",UGn,[g("div",GGn,[g("button",{onClick:e[3]||(e[3]=he((...a)=>o.toggleCancelInstall&&o.toggleCancelInstall(...a),["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 ")])])])])])):re("",!0),n.model.isCustomModel?re("",!0):(k(),H("div",qGn,[g("div",zGn,[g("img",{ref:"imgElement",src:o.getImgUrl(),onError:e[4]||(e[4]=a=>o.defaultImg(a)),class:je(["w-10 h-10 rounded-lg object-fill",i.linkNotValid?"grayscale":""])},null,42,jGn),g("h3",WGn,le(n.model.name),1),e[16]||(e[16]=g("div",{class:"grow"},null,-1)),oe(s,{commands:o.commandsList,force_position:2,title:"Menu"},null,8,["commands"])]),g("div",YGn,[g("div",KGn,[i.linkNotValid?(k(),H("div",ZGn,e[17]||(e[17]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0 mx-1"},null,-1),nt(" Link is not valid ")]))):re("",!0)])]),g("div",{class:"",title:n.model.isInstalled?n.model.name:"Not installed"},[g("div",JGn,[g("div",eqn,[e[19]||(e[19]=g("i",{"data-feather":"download",class:"w-5 m-1 flex-shrink-0"},null,-1)),e[20]||(e[20]=g("b",null,"Card: ",-1)),g("a",{href:"https://huggingface.co/"+n.model.quantizer+"/"+n.model.name,target:"_blank",onClick:e[5]||(e[5]=he(()=>{},["stop"])),class:"m-1 flex items-center hover:text-secondary duration-75 active:scale-90 truncate",title:i.linkNotValid?"Link is not valid":"Download this manually (faster) and put it in the models/ folder then refresh"}," View full model card ",8,tqn),e[21]||(e[21]=g("div",{class:"grow"},null,-1)),g("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[6]||(e[6]=he(a=>o.toggleCopyLink(),["stop"]))},e[18]||(e[18]=[g("i",{"data-feather":"clipboard",class:"w-5"},null,-1)]))]),g("div",nqn,[g("div",{class:je(["flex flex-shrink-0 items-center",i.linkNotValid?"text-red-600":""])},[e[22]||(e[22]=g("i",{"data-feather":"file",class:"w-5 m-1"},null,-1)),e[23]||(e[23]=g("b",null,"File size: ",-1)),nt(" "+le(o.fileSize),1)],2)]),g("div",rqn,[e[24]||(e[24]=g("i",{"data-feather":"key",class:"w-5 m-1"},null,-1)),e[25]||(e[25]=g("b",null,"License: ",-1)),nt(" "+le(n.model.license),1)]),n.model.quantizer!="None"&&n.model.type!="transformers"?(k(),H("div",iqn,[e[26]||(e[26]=g("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[27]||(e[27]=g("b",null,"quantizer: ",-1)),g("a",{href:"https://huggingface.co/"+n.model.quantizer,target:"_blank",rel:"noopener noreferrer",onClick:e[7]||(e[7]=he(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},le(n.model.quantizer),9,oqn)])):re("",!0),g("div",sqn,[e[28]||(e[28]=g("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[29]||(e[29]=g("b",null,"Model creator: ",-1)),g("a",{href:n.model.model_creator_link,target:"_blank",rel:"noopener noreferrer",onClick:e[8]||(e[8]=he(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},le(n.model.model_creator),9,aqn)]),g("div",lqn,[e[30]||(e[30]=g("i",{"data-feather":"clock",class:"w-5 m-1"},null,-1)),e[31]||(e[31]=g("b",null,"Release date: ",-1)),nt(" "+le(n.model.last_commit_time),1)]),g("div",cqn,[e[32]||(e[32]=g("i",{"data-feather":"grid",class:"w-5 m-1"},null,-1)),e[33]||(e[33]=g("b",null,"Category: ",-1)),g("a",{href:"https://huggingface.co/"+n.model.model_creator,target:"_blank",rel:"noopener noreferrer",onClick:e[9]||(e[9]=he(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"quantizer's profile"},le(n.model.category),9,uqn)])])],8,XGn)]))],10,bGn)}const fqn=yt(yGn,[["render",dqn]]),pqn={data(){return{editMode:!1,avatar:"path/to/avatar.jpg",personalityName:"Personality Name",personalityAuthor:"Author Name",personalityDescription:"Personality Description",personalityCategory:"Category",disclaimer:"Disclaimer text",conditioningText:"Conditioning Text",aiPrefix:"AI Prefix",userPrefix:"User Prefix",antipromptsList:[{id:1,text:"Antiprompt 1"},{id:2,text:"Antiprompt 2"},{id:3,text:"Antiprompt 3"}]}},methods:{commitChanges(){console.log("Personality changes committed"),this.editMode=!1}}},hqn={class:"p-4"},Tqn={class:"flex items-center mb-4"},mqn=["src"],gqn={class:"text-lg font-semibold"},_qn={key:0};function Qqn(t,e,n,r,i,o){return k(),H("div",hqn,[g("div",Tqn,[g("img",{src:i.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,mqn),g("h2",gqn,le(i.personalityName),1)]),g("p",null,[e[2]||(e[2]=g("strong",null,"Author:",-1)),nt(" "+le(i.personalityAuthor),1)]),g("p",null,[e[3]||(e[3]=g("strong",null,"Description:",-1)),nt(" "+le(i.personalityDescription),1)]),g("p",null,[e[4]||(e[4]=g("strong",null,"Category:",-1)),nt(" "+le(i.personalityCategory),1)]),i.disclaimer?(k(),H("p",_qn,[e[5]||(e[5]=g("strong",null,"Disclaimer:",-1)),nt(" "+le(i.disclaimer),1)])):re("",!0),g("p",null,[e[6]||(e[6]=g("strong",null,"Conditioning Text:",-1)),nt(" "+le(i.conditioningText),1)]),g("p",null,[e[7]||(e[7]=g("strong",null,"AI Prefix:",-1)),nt(" "+le(i.aiPrefix),1)]),g("p",null,[e[8]||(e[8]=g("strong",null,"User Prefix:",-1)),nt(" "+le(i.userPrefix),1)]),g("div",null,[e[9]||(e[9]=g("strong",null,"Antiprompts:",-1)),g("ul",null,[(k(!0),H(Ue,null,ot(i.antipromptsList,s=>(k(),H("li",{key:s.id},le(s.text),1))),128))])]),g("button",{onClick:e[0]||(e[0]=s=>i.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),i.editMode?(k(),H("button",{key:1,onClick:e[1]||(e[1]=(...s)=>o.commitChanges&&o.commitChanges(...s)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):re("",!0)])}const vqn=yt(pqn,[["render",Qqn]]),Db="/assets/logo-CQZwS0X1.svg",yqn="/",bqn={props:{personality:{},select_language:Boolean,selected:Boolean,full_path:String,onTalk:Function,onOpenFolder:Function,onSelected:Function,onMount:Function,onUnMount:Function,onRemount:Function,onCopyToCustom:Function,onEdit:Function,onReinstall:Function,onSettings:Function,onCopyPersonalityName:Function,onToggleFavorite:Function},components:{InteractiveMenu:Nb},data(){return{isMounted:!1,name:this.personality.name,thumbnailVisible:!1,thumbnailPosition:{x:0,y:0},showHelpPopup:!1,renderedHelp:""}},computed:{commandsList(){let t=[{name:this.isMounted?"unmount":"mount",icon:"feather:settings",is_file:!1,value:this.isMounted?this.unmount:this.mount},{name:"reinstall",icon:"feather:terminal",is_file:!1,value:this.toggleReinstall}];return console.log("this.category",this.personality.category),this.personality.category=="custom_personalities"?t.push({name:"edit",icon:"feather:settings",is_file:!1,value:this.edit}):t.push({name:"Copy to custom personas folder for editing",icon:"feather:copy",is_file:!1,value:this.copyToCustom}),this.isMounted&&t.push({name:"remount",icon:"feather:refresh-ccw",is_file:!1,value:this.reMount}),this.selected&&this.personality.has_scripts&&t.push({name:"settings",icon:"feather:settings",is_file:!1,value:this.toggleSettings}),t},selected_computed(){return this.selected}},mounted(){this.isMounted=this.personality.isMounted,console.log(this.personality),ze(()=>{Ze.replace()})},methods:{formatDate(t){const e={year:"numeric",month:"short",day:"numeric"};return new Date(t).toLocaleDateString(void 0,e)},showThumbnail(){this.thumbnailVisible=!0},hideThumbnail(){this.thumbnailVisible=!1},updateThumbnailPosition(t){this.thumbnailPosition={x:t.clientX+10,y:t.clientY+10}},getImgUrl(){return yqn+this.personality.avatar},defaultImg(t){t.target.src=Db},toggleFavorite(){this.onToggleFavorite(this)},showFolder(){this.onOpenFolder(this)},toggleTalk(){this.onTalk(this)},toggleCopyLink(){this.onCopyPersonalityName(this)},toggleSelected(){this.isMounted&&this.onSelected(this)},edit(){this.onEdit(this)},copyToCustom(){this.onCopyToCustom(this)},reMount(){this.onRemount(this)},mount(){console.log("Mounting"),this.onMount(this)},unmount(){console.log("Unmounting"),console.log(this.onUnMount),this.onUnMount(this),this.isMounted=!1},toggleSettings(){this.onSettings(this)},toggleReinstall(){this.onReinstall(this)},showHelp(){this.renderedHelp=dn(this.personality.help),this.showHelpPopup=!0},closeHelp(){this.showHelpPopup=!1}},watch:{selected(){ze(()=>{Ze.replace()})}}},Eqn=["title"],xqn={class:"flex-grow"},Sqn={class:"flex items-center mb-4"},Lqn=["src"],Cqn={class:"text-sm text-gray-600"},Aqn={class:"text-sm text-gray-600"},wqn={class:"text-sm text-gray-600"},Mqn={key:0,class:"text-sm text-gray-600"},Oqn={key:1,class:"text-sm text-gray-600"},Rqn={class:"mb-4"},Nqn=["innerHTML"],Dqn={class:"mt-auto pt-4 border-t"},Iqn={class:"flex justify-between items-center flex-wrap"},kqn=["title"],Pqn=["fill"],Hqn=["src"],Vqn={key:1,class:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center"},Bqn={class:"bg-white p-4 rounded-lg shadow-lg w-[500px] h-[400px] flex flex-col"},Fqn={class:"flex justify-between items-center mb-2"},$qn={class:"flex-grow overflow-auto"},Uqn=["innerHTML"];function Gqn(t,e,n,r,i,o){const s=pt("InteractiveMenu");return k(),H("div",{class:je(["app-card flex flex-col h-full",o.selected_computed?"border-primary-light":"border-transparent",i.isMounted?"bg-blue-200 dark:bg-blue-700":""]),title:n.personality.installed?"":"Not installed"},[g("div",xqn,[g("div",Sqn,[g("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),alt:"Personality Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4 cursor-pointer",onClick:e[1]||(e[1]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),onMouseover:e[2]||(e[2]=(...a)=>o.showThumbnail&&o.showThumbnail(...a)),onMousemove:e[3]||(e[3]=(...a)=>o.updateThumbnailPosition&&o.updateThumbnailPosition(...a)),onMouseleave:e[4]||(e[4]=(...a)=>o.hideThumbnail&&o.hideThumbnail(...a))},null,40,Lqn),g("div",null,[g("h3",{class:"font-bold text-xl text-gray-800 cursor-pointer",onClick:e[5]||(e[5]=(...a)=>o.toggleSelected&&o.toggleSelected(...a))},le(n.personality.name),1),g("p",Cqn,"Author: "+le(n.personality.author),1),g("p",Aqn,"Version: "+le(n.personality.version),1),g("p",wqn,"Category: "+le(n.personality.category),1),n.personality.creation_date?(k(),H("p",Mqn,"Creation Date: "+le(o.formatDate(n.personality.creation_date)),1)):re("",!0),n.personality.last_update_date?(k(),H("p",Oqn,"Last update Date: "+le(o.formatDate(n.personality.last_update_date)),1)):re("",!0)]),n.personality.help?(k(),H("button",{key:0,onClick:e[6]||(e[6]=(...a)=>o.showHelp&&o.showHelp(...a)),class:"ml-2 text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Help"},e[12]||(e[12]=[g("i",{"data-feather":"help-circle",class:"h-6 w-6"},null,-1)]))):re("",!0)]),g("div",Rqn,[e[13]||(e[13]=g("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),g("p",{class:"text-sm text-gray-600 h-20 overflow-y-auto",innerHTML:n.personality.description},null,8,Nqn)])]),g("div",Dqn,[g("div",Iqn,[g("button",{onClick:e[7]||(e[7]=(...a)=>o.toggleFavorite&&o.toggleFavorite(...a)),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:t.isFavorite?"Remove from favorites":"Add to favorites"},[(k(),H("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[14]||(e[14]=[g("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,Pqn))],8,kqn),i.isMounted?(k(),H("button",{key:0,onClick:e[8]||(e[8]=(...a)=>o.toggleSelected&&o.toggleSelected(...a)),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Select"},e[15]||(e[15]=[g("i",{"data-feather":"check",class:"h-6 w-6"},null,-1)]))):re("",!0),i.isMounted?(k(),H("button",{key:1,onClick:e[9]||(e[9]=(...a)=>o.toggleTalk&&o.toggleTalk(...a)),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Talk"},e[16]||(e[16]=[g("i",{"data-feather":"send",class:"h-6 w-6"},null,-1)]))):re("",!0),g("button",{onClick:e[10]||(e[10]=(...a)=>o.showFolder&&o.showFolder(...a)),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Show Folder"},e[17]||(e[17]=[g("i",{"data-feather":"folder",class:"h-6 w-6"},null,-1)])),oe(s,{commands:o.commandsList,force_position:2,title:"Menu",class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out"},null,8,["commands"])])]),i.thumbnailVisible?(k(),H("div",{key:0,style:xn({top:i.thumbnailPosition.y+"px",left:i.thumbnailPosition.x+"px"}),class:"fixed z-50 w-20 h-20 rounded-full overflow-hidden"},[g("img",{src:o.getImgUrl(),class:"w-full h-full object-fill"},null,8,Hqn)],4)):re("",!0),i.showHelpPopup?(k(),H("div",Vqn,[g("div",Bqn,[g("div",Fqn,[e[18]||(e[18]=g("h2",{class:"text-lg font-bold"},"Help",-1)),g("button",{onClick:e[11]||(e[11]=(...a)=>o.closeHelp&&o.closeHelp(...a)),class:"text-red-500 hover:text-red-600"},"Close")]),g("div",$qn,[g("div",{innerHTML:i.renderedHelp},null,8,Uqn)])])])):re("",!0)],10,Eqn)}const tU=yt(bqn,[["render",Gqn]]),qqn={name:"DynamicUIRenderer",props:{ui:{type:String,required:!0},instanceId:{type:String,required:!0}},data(){return{containerId:`dynamic-ui-${this.instanceId}`}},watch:{ui:{immediate:!0,handler(t){console.log(`UI prop changed for instance ${this.instanceId}:`,t),this.$nextTick(()=>{this.renderContent()})}}},methods:{renderContent(){console.log(`Rendering content for instance ${this.instanceId}...`);const t=this.$refs.container,n=new DOMParser().parseFromString(this.ui,"text/html"),r=n.getElementsByTagName("style");Array.from(r).forEach(o=>{const s=document.createElement("style");s.textContent=this.scopeCSS(o.textContent),document.head.appendChild(s)}),t.innerHTML=n.body.innerHTML;const i=n.getElementsByTagName("script");Array.from(i).forEach(o=>{const s=document.createElement("script");s.textContent=o.textContent,t.appendChild(s)})},scopeCSS(t){return t.replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,`#${this.containerId} $1$2`)}}},zqn=["id"];function jqn(t,e,n,r,i,o){return k(),H("div",{id:i.containerId,ref:"container"},null,8,zqn)}const nU=yt(qqn,[["render",jqn]]),Wqn="/",Yqn={components:{DynamicUIRenderer:nU},props:{binding:{},onSelected:Function,onReinstall:Function,onInstall:Function,onUnInstall:Function,onSettings:Function,onReloadBinding:Function,selected:Boolean},data(){return{isTemplate:!1}},mounted(){ze(()=>{Ze.replace()})},methods:{copyToClipBoard(t){console.log("Copying to clipboard :",t),navigator.clipboard.writeText(t)},getImgUrl(){return Wqn+this.binding.icon},defaultImg(t){t.target.src=Db},toggleSelected(){this.onSelected(this)},toggleInstall(){this.onInstall(this)},toggleUnInstall(){this.onUnInstall(this)},toggleReinstall(){this.onReinstall(this)},toggleReloadBinding(){this.onReloadBinding(this)},toggleSettings(){this.onSettings(this)},getStatus(){(this.binding.folder==="backend_template"||this.binding.folder==="binding_template")&&(this.isTemplate=!0)}},watch:{selected(){ze(()=>{Ze.replace()})}}},Kqn=["title"],Zqn={class:"flex flex-row items-center gap-3"},Xqn=["src"],Jqn={class:"font-bold font-large text-lg truncate"},ezn={class:"flex-none gap-1"},tzn={class:"flex items-center flex-row-reverse gap-2 my-1"},nzn={class:""},rzn={class:""},izn={class:"flex items-center"},ozn={class:"flex items-center"},szn={class:"flex items-center"},azn={class:"flex items-center"},lzn=["href"],czn=["title","innerHTML"];function uzn(t,e,n,r,i,o){const s=pt("DynamicUIRenderer");return k(),H("div",{class:je(["items-start p-4 hover:bg-primary-light hover:border-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer select-none",n.selected?" border-primary bg-primary":"border-transparent"]),onClick:e[8]||(e[8]=he((...a)=>o.toggleSelected&&o.toggleSelected(...a),["stop"])),title:n.binding.installed?n.binding.name:"Not installed"},[g("div",null,[g("div",Zqn,[g("img",{ref:"imgElement",src:o.getImgUrl(),onError:e[0]||(e[0]=a=>o.defaultImg(a)),class:"w-10 h-10 rounded-full object-fill text-blue-700"},null,40,Xqn),g("h3",Jqn,le(n.binding.name),1),e[10]||(e[10]=g("div",{class:"grow"},null,-1)),g("div",ezn,[n.selected?(k(),H("button",{key:0,type:"button",title:"Reload binding",onClick:[e[1]||(e[1]=(...a)=>o.toggleReloadBinding&&o.toggleReloadBinding(...a)),e[2]||(e[2]=he(()=>{},["stop"]))],class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center"},e[9]||(e[9]=[g("i",{"data-feather":"refresh-cw",class:"w-5"},null,-1),g("span",{class:"sr-only"},"Help",-1)]))):re("",!0)])]),g("div",tzn,[n.binding.installed?re("",!0):(k(),H("button",{key:0,title:"Click to install",type:"button",onClick:e[3]||(e[3]=he((...a)=>o.toggleInstall&&o.toggleInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},e[11]||(e[11]=[nt(" Install "),g("span",{class:"sr-only"},"Click to install",-1)]))),n.binding.installed?(k(),H("button",{key:1,title:"Click to Reinstall binding",type:"button",onClick:e[4]||(e[4]=he((...a)=>o.toggleReinstall&&o.toggleReinstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-green-700 hover:bg-red-800 focus:ring-4 focus:ring-green-300 rounded-lg dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-red-900"},e[12]||(e[12]=[nt(" Reinstall "),g("span",{class:"sr-only"},"Reinstall",-1)]))):re("",!0),n.binding.installed?(k(),H("button",{key:2,title:"Click to Reinstall binding",type:"button",onClick:e[5]||(e[5]=he((...a)=>o.toggleUnInstall&&o.toggleUnInstall(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center focus:outline-none text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 rounded-lg dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900"},e[13]||(e[13]=[nt(" Uninstall "),g("span",{class:"sr-only"},"UnInstall",-1)]))):re("",!0),n.selected?(k(),H("button",{key:3,title:"Click to open Settings",type:"button",onClick:e[6]||(e[6]=he((...a)=>o.toggleSettings&&o.toggleSettings(...a),["stop"])),class:"inline-flex items-center gap-2 px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},e[14]||(e[14]=[nt(" Settings "),g("span",{class:"sr-only"},"Settings",-1)]))):re("",!0)]),n.binding.ui?(k(),wt(s,{key:0,class:"w-full h-full",code:n.binding.ui},null,8,["code"])):re("",!0),g("div",nzn,[g("div",rzn,[g("div",izn,[e[15]||(e[15]=g("i",{"data-feather":"user",class:"w-5 m-1"},null,-1)),e[16]||(e[16]=g("b",null,"Author: ",-1)),nt(" "+le(n.binding.author),1)]),g("div",ozn,[e[18]||(e[18]=g("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1)),e[19]||(e[19]=g("b",null,"Folder: ",-1)),nt(" "+le(n.binding.folder)+" ",1),e[20]||(e[20]=g("div",{class:"grow"},null,-1)),g("button",{class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",title:"Copy link to clipboard",onClick:e[7]||(e[7]=he(a=>o.copyToClipBoard(this.binding.folder),["stop"]))},e[17]||(e[17]=[g("i",{"data-feather":"clipboard",class:"w-5"},null,-1)]))]),g("div",szn,[e[21]||(e[21]=g("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1)),e[22]||(e[22]=g("b",null,"Version: ",-1)),nt(" "+le(n.binding.version),1)]),g("div",azn,[e[23]||(e[23]=g("i",{"data-feather":"github",class:"w-5 m-1"},null,-1)),e[24]||(e[24]=g("b",null,"Link: ",-1)),g("a",{href:n.binding.link,target:"_blank",class:"flex items-center hover:text-secondary duration-75 active:scale-90"},le(n.binding.link),9,lzn)])]),e[25]||(e[25]=g("div",{class:"flex items-center"},[g("i",{"data-feather":"info",class:"w-5 m-1"}),g("b",null,"Description: "),g("br")],-1)),g("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description,innerHTML:n.binding.description},null,8,czn)])])],10,Kqn)}const dzn=yt(Yqn,[["render",uzn]]),co="/assets/logo-PFou_X4V.png",fzn={data(){return{show:!1,model_path:"",resolve:null}},methods:{cancel(){this.resolve(null)},openInputBox(){return new Promise(t=>{this.resolve=t})},hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},showDialog(t){return new Promise(e=>{this.model_path=t,this.show=!0,this.resolve=e})}}},pzn={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},hzn={class:"relative w-full max-w-md max-h-full"},Tzn={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},mzn={class:"p-4 text-center"},gzn={class:"p-4 text-center mx-auto mb-4"};function _zn(t,e,n,r,i,o){return i.show?(k(),H("div",pzn,[g("div",hzn,[g("div",Tzn,[g("button",{type:"button",onClick:e[0]||(e[0]=s=>o.hide(!1)),class:"absolute top-3 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[4]||(e[4]=[g("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[g("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),g("span",{class:"sr-only"},"Close modal",-1)])),g("div",mzn,[e[6]||(e[6]=g("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),g("div",gzn,[e[5]||(e[5]=g("label",{class:"mr-2"},"Model path",-1)),J(g("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>i.model_path=s),class:"px-4 py-2 border border-gray-300 rounded-lg",type:"text"},null,512),[[we,i.model_path]])]),g("button",{onClick:e[2]||(e[2]=s=>o.hide(!0)),type:"button",class:"text-white bg-green-600 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center mr-2"}," Add "),g("button",{onClick:e[3]||(e[3]=s=>o.hide(!1)),type:"button",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"},"No, cancel")])])])])):re("",!0)}const Qzn=yt(fzn,[["render",_zn]]),vzn={props:{show:{type:Boolean,default:!1},can_remove:{type:Boolean,default:!1},title:{type:String,default:"Select an option"},choices:{type:Array,required:!0}},data(){return{selectedChoice:null,showInput:!1,newFilename:""}},methods:{displayName(t){return typeof t=="string"?t:t&&t.name?t.name:""},selectChoice(t){this.selectedChoice=t,this.$emit("choice-selected",t)},closeDialog(){this.$emit("close-dialog")},validateChoice(){this.$emit("choice-validated",this.selectedChoice)},formatSize(t){const e=["bytes","KB","MB","GB"];let n=0;for(;t>=1024&&n[n.show?(k(),H("div",yzn,[g("div",bzn,[g("h2",Ezn,[e[5]||(e[5]=g("svg",{class:"w-6 h-6 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"})],-1)),nt(" "+le(n.title),1)]),g("div",xzn,[g("ul",null,[(k(!0),H(Ue,null,ot(n.choices,(s,a)=>(k(),H("li",{key:a,class:"py-2 px-4 hover:bg-gray-200 dark:hover:bg-gray-600 transition duration-150 ease-in-out"},[g("div",Szn,[g("div",Lzn,[s.isEditing?J((k(),H("input",{key:1,"onUpdate:modelValue":l=>s.editName=l,onBlur:l=>o.finishEditing(s),onKeyup:Xr(l=>o.finishEditing(s),["enter"]),class:"bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded px-2 py-1 text-sm",autofocus:""},null,40,Azn)),[[we,s.editName]]):(k(),H("span",{key:0,onClick:l=>o.selectChoice(s),class:je([{"font-semibold":s===i.selectedChoice},"text-gray-800 dark:text-white cursor-pointer"])},le(o.displayName(s)),11,Czn)),s.size?(k(),H("span",wzn,le(o.formatSize(s.size)),1)):re("",!0)]),g("div",Mzn,[g("button",{onClick:l=>o.editChoice(s),class:"text-blue-500 hover:text-blue-600 mr-2"},e[6]||(e[6]=[g("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})],-1)]),8,Ozn),n.can_remove?(k(),H("button",{key:0,onClick:l=>o.removeChoice(s,a),class:"text-red-500 hover:text-red-600"},e[7]||(e[7]=[g("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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)]),8,Rzn)):re("",!0)])])]))),128))])]),i.showInput?(k(),H("div",Nzn,[J(g("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>i.newFilename=s),placeholder:"Enter a filename",class:"border border-gray-300 dark:border-gray-600 p-2 rounded-lg w-full mb-2 bg-white dark:bg-gray-700 text-gray-800 dark:text-white"},null,512),[[we,i.newFilename]]),g("button",{onClick:e[1]||(e[1]=(...s)=>o.addNewFilename&&o.addNewFilename(...s)),class:"bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add ")])):re("",!0),g("div",Dzn,[g("button",{onClick:e[2]||(e[2]=(...s)=>o.closeDialog&&o.closeDialog(...s)),class:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded-lg transition duration-300"}," Cancel "),g("button",{onClick:e[3]||(e[3]=(...s)=>o.validateChoice&&o.validateChoice(...s)),disabled:!i.selectedChoice,class:je([{"bg-blue-500 hover:bg-blue-600":i.selectedChoice,"bg-gray-400 cursor-not-allowed":!i.selectedChoice},"text-white font-bold py-2 px-4 rounded-lg transition duration-300"])}," Validate ",10,Izn),g("button",{onClick:e[4]||(e[4]=(...s)=>o.toggleInput&&o.toggleInput(...s)),class:"bg-green-500 hover:bg-green-600 text-white font-bold py-2 px-4 rounded-lg transition duration-300"}," Add New ")])])])):re("",!0)]),_:1})}const Ib=yt(vzn,[["render",kzn],["__scopeId","data-v-f43216be"]]),Pzn={props:{radioOptions:{type:Array,required:!0},defaultValue:{type:String,default:"0"}},data(){return{selectedValue:this.defaultValue}},computed:{selectedLabel(){const t=this.radioOptions.find(e=>e.value===this.selectedValue);return t?t.label:""}},watch:{selectedValue(t,e){this.$emit("radio-selected",t)}},methods:{handleRadioChange(){}}},Hzn={class:"flex space-x-4"},Vzn=["value","aria-checked"],Bzn={class:"text-gray-700"};function Fzn(t,e,n,r,i,o){return k(),H("div",Hzn,[(k(!0),H(Ue,null,ot(n.radioOptions,(s,a)=>(k(),H("label",{key:s.value,class:"flex items-center space-x-2"},[J(g("input",{type:"radio",value:s.value,"onUpdate:modelValue":e[0]||(e[0]=l=>i.selectedValue=l),onChange:e[1]||(e[1]=(...l)=>o.handleRadioChange&&o.handleRadioChange(...l)),class:"text-blue-500 focus:ring-2 focus:ring-blue-200","aria-checked":i.selectedValue===s.value.toString(),role:"radio"},null,40,Vzn),[[Nj,i.selectedValue]]),g("span",Bzn,le(s.label),1)]))),128))])}const $zn=yt(Pzn,[["render",Fzn]]),Uzn="/assets/gpu-BWVOYg-D.svg",Gzn={name:"StringListManager",props:{modelValue:{type:Array,default:()=>[]},placeholder:{type:String,default:"Enter an item"}},emits:["update:modelValue","change"],data(){return{newItem:"",draggingIndex:null}},methods:{addItem(){if(this.newItem.trim()){const t=[...this.modelValue,this.newItem.trim()];this.$emit("update:modelValue",t),this.$emit("change"),this.newItem=""}},removeItem(t){const e=this.modelValue.filter((n,r)=>r!==t);this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",[]),this.$emit("change")},startDragging(t){this.draggingIndex=t},dragItem(t){if(this.draggingIndex!==null){const e=[...this.modelValue],n=e.splice(this.draggingIndex,1)[0];e.splice(t,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},stopDragging(){this.draggingIndex=null},moveUp(t){if(t>0){const e=[...this.modelValue],n=e.splice(t,1)[0];e.splice(t-1,0,n),this.$emit("update:modelValue",e),this.$emit("change")}},moveDown(t){if(ti.newItem=s),placeholder:n.placeholder,onKeyup:e[1]||(e[1]=Xr((...s)=>o.addItem&&o.addItem(...s),["enter"])),class:"flex-grow mr-4 px-4 py-2 border border-gray-300 rounded dark:bg-gray-600 text-lg"},null,40,zzn),[[we,i.newItem]]),g("button",{onClick:e[2]||(e[2]=(...s)=>o.addItem&&o.addItem(...s)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg"},"Add")]),n.modelValue.length>0?(k(),H("ul",jzn,[(k(!0),H(Ue,null,ot(n.modelValue,(s,a)=>(k(),H("li",{key:a,class:je(["flex items-center mb-2 relative",{"bg-gray-200":i.draggingIndex===a}])},[g("span",Wzn,le(s),1),g("div",Yzn,[g("button",{onClick:l=>o.removeItem(a),class:"text-red-500 hover:text-red-700 p-2"},e[5]||(e[5]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)]),8,Kzn),a>0?(k(),H("button",{key:0,onClick:l=>o.moveUp(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded mr-2"},e[6]||(e[6]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1)]),8,Zzn)):re("",!0),ao.moveDown(a),class:"bg-gray-300 hover:bg-gray-400 p-2 rounded"},e[7]||(e[7]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,Xzn)):re("",!0)]),i.draggingIndex===a?(k(),H("div",{key:0,class:"absolute top-0 left-0 w-full h-full bg-gray-200 opacity-50 cursor-move",onMousedown:l=>o.startDragging(a),onMousemove:l=>o.dragItem(a),onMouseup:e[3]||(e[3]=(...l)=>o.stopDragging&&o.stopDragging(...l))},null,40,Jzn)):re("",!0)],2))),128))])):re("",!0),n.modelValue.length>0?(k(),H("div",ejn,[g("button",{onClick:e[4]||(e[4]=(...s)=>o.removeAll&&o.removeAll(...s)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg"},"Remove All")])):re("",!0)])}const njn=yt(Gzn,[["render",tjn]]),rjn={name:"DictionaryManager",props:{modelValue:{type:Object,default:()=>({})},keyName:{type:String,default:"Key"},valueName:{type:String,default:"Value"}},emits:["update:modelValue","change"],data(){return{newKey:"",newValue:"",draggingKey:null}},methods:{addItem(){if(this.newKey.trim()){const t={...this.modelValue};t[this.newKey.trim()]=this.newValue,this.$emit("update:modelValue",t),this.$emit("change"),this.newKey="",this.newValue=""}},removeItem(t){const e={...this.modelValue};delete e[t],this.$emit("update:modelValue",e),this.$emit("change")},removeAll(){this.$emit("update:modelValue",{}),this.$emit("change")},updateKey(t,e){if(e.trim()&&e!==t){const n={...this.modelValue};n[e.trim()]=n[t],delete n[t],this.$emit("update:modelValue",n),this.$emit("change")}},updateValue(t,e){const n={...this.modelValue};n[t]=e,this.$emit("update:modelValue",n),this.$emit("change")},moveUp(t){const e=Object.keys(this.modelValue),n=e.indexOf(t);if(n>0){const r={};e.forEach((i,o)=>{o===n-1&&(r[t]=this.modelValue[t]),i!==t&&(r[i]=this.modelValue[i])}),this.$emit("update:modelValue",r),this.$emit("change")}},moveDown(t){const e=Object.keys(this.modelValue),n=e.indexOf(t);if(n{i!==t&&(r[i]=this.modelValue[i]),o===n+1&&(r[t]=this.modelValue[t])}),this.$emit("update:modelValue",r),this.$emit("change")}}}},ijn={class:"max-w-4xl mx-auto p-4"},ojn={class:"flex flex-col sm:flex-row mb-4 gap-2"},sjn=["placeholder"],ajn=["placeholder"],ljn={key:0,class:"space-y-4"},cjn={class:"flex-grow mb-2 sm:mb-0 sm:mr-4 w-full sm:w-auto"},ujn=["for"],djn=["id","value","onInput"],fjn={class:"flex-grow mb-2 sm:mb-0 sm:mr-4 w-full sm:w-auto"},pjn=["for"],hjn=["id","value","onInput"],Tjn={class:"flex items-center space-x-2"},mjn=["onClick"],gjn=["onClick"],_jn=["onClick"],Qjn={key:1,class:"mt-6"};function vjn(t,e,n,r,i,o){return k(),H("div",ijn,[g("div",ojn,[J(g("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=s=>i.newKey=s),placeholder:n.keyName,onKeyup:e[1]||(e[1]=Xr((...s)=>o.addItem&&o.addItem(...s),["enter"])),class:"flex-grow px-4 py-2 border border-gray-300 rounded dark:bg-gray-700 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,sjn),[[we,i.newKey]]),J(g("input",{type:"text","onUpdate:modelValue":e[2]||(e[2]=s=>i.newValue=s),placeholder:n.valueName,onKeyup:e[3]||(e[3]=Xr((...s)=>o.addItem&&o.addItem(...s),["enter"])),class:"flex-grow px-4 py-2 border border-gray-300 rounded dark:bg-gray-700 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,ajn),[[we,i.newValue]]),g("button",{onClick:e[4]||(e[4]=(...s)=>o.addItem&&o.addItem(...s)),class:"bg-blue-500 text-white px-6 py-2 rounded hover:bg-blue-600 text-lg transition duration-300 ease-in-out"},"Add")]),Object.keys(n.modelValue).length>0?(k(),H("ul",ljn,[(k(!0),H(Ue,null,ot(n.modelValue,(s,a)=>(k(),H("li",{key:a,class:je(["flex flex-col sm:flex-row items-center p-4 bg-white dark:bg-gray-800 rounded-lg shadow-md hover:shadow-lg transition duration-300 ease-in-out",{"bg-gray-100 dark:bg-gray-700":i.draggingKey===a}])},[g("div",cjn,[g("label",{for:"key-"+a,class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},le(n.keyName),9,ujn),g("input",{id:"key-"+a,value:a,onInput:l=>o.updateKey(a,l.target.value),class:"w-full px-3 py-2 border border-gray-300 rounded dark:bg-gray-600 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,djn)]),g("div",fjn,[g("label",{for:"value-"+a,class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},le(n.valueName),9,pjn),g("input",{id:"value-"+a,value:s,onInput:l=>o.updateValue(a,l.target.value),class:"w-full px-3 py-2 border border-gray-300 rounded dark:bg-gray-600 dark:text-white text-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,40,hjn)]),g("div",Tjn,[g("button",{onClick:l=>o.removeItem(a),class:"text-red-500 hover:text-red-700 p-2 rounded-full hover:bg-red-100 dark:hover:bg-red-900 transition duration-300 ease-in-out"},e[6]||(e[6]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1)]),8,mjn),g("button",{onClick:l=>o.moveUp(a),class:"bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-500 p-2 rounded-full transition duration-300 ease-in-out"},e[7]||(e[7]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1)]),8,gjn),g("button",{onClick:l=>o.moveDown(a),class:"bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-500 p-2 rounded-full transition duration-300 ease-in-out"},e[8]||(e[8]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,_jn)])],2))),128))])):re("",!0),Object.keys(n.modelValue).length>0?(k(),H("div",Qjn,[g("button",{onClick:e[5]||(e[5]=(...s)=>o.removeAll&&o.removeAll(...s)),class:"bg-red-500 text-white px-6 py-2 rounded hover:bg-red-600 text-lg transition duration-300 ease-in-out"},"Remove All")])):re("",!0)])}const yjn=yt(rjn,[["render",vjn]]),bjn="/";Qe.defaults.baseURL="/";const Ejn={components:{AddModelDialog:Qzn,ModelEntry:fqn,PersonalityViewer:vqn,PersonalityEntry:tU,BindingEntry:dzn,ChoiceDialog:Ib,Card:Q9,StringListManager:njn,DictManager:yjn,RadioOptions:$zn},data(){return{posts_headers:{accept:"application/json","Content-Type":"application/json"},isUploading:!1,defaultModelImgPlaceholder:ri,snd_input_devices:[],snd_input_devices_indexes:[],snd_output_devices:[],snd_output_devices_indexes:[],voices:[],voice_languages:{Arabic:"ar","Brazilian Portuguese":"pt",Chinese:"zh-cn",Czech:"cs",Dutch:"nl",English:"en",French:"fr",German:"de",Italian:"it",Polish:"pl",Russian:"ru",Spanish:"es",Turkish:"tr",Japanese:"ja",Korean:"ko",Hungarian:"hu",Hindi:"hi"},storeLogo:co,binding_changed:!1,SVGGPU:Uzn,models_zoo:[],models_zoo_initialLoadCount:10,models_zoo_loadMoreCount:5,models_zoo_loadedEntries:[],models_zoo_scrollThreshold:200,sortOptions:[{label:"Sort by Date",value:0},{label:"Sort by Rank",value:1},{label:"Sort by Name",value:2},{label:"Sort by Maker",value:3},{label:"Sort by Quantizer",value:4}],comfyui_models:[],show_only_installed_models:!1,reference_path:"",audioVoices:[],has_updates:!1,variant_choices:[],variantSelectionDialogVisible:!1,currenModelToInstall:null,loading_text:"",personality_category:null,addModelDialogVisibility:!1,modelPath:"",personalitiesFiltered:[],modelsFiltered:[],collapsedArr:[],all_collapsed:!0,data_conf_collapsed:!0,internet_conf_collapsed:!0,servers_conf_collapsed:!0,mainconf_collapsed:!0,smartrouterconf_collapsed:!0,bec_collapsed:!0,sort_type:0,is_loading_zoo:!1,mzc_collapsed:!0,mzdc_collapsed:!0,pzc_collapsed:!0,bzc_collapsed:!0,pc_collapsed:!0,mc_collapsed:!0,sc_collapsed:!0,mzl_collapsed:!1,pzl_collapsed:!1,ezl_collapsed:!1,bzl_collapsed:!1,extCatgArr:[],persCatgArr:[],persArr:[],showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,isMounted:!1,bUrl:bjn,searchPersonality:"",searchModel:"",searchPersonalityTimer:{},searchPersonalityTimerInterval:1500,searchModelTimerInterval:1500,searchPersonalityInProgress:!1,searchModelInProgress:!1,addModel:{},modelDownlaodInProgress:!1,uploadData:[]}},async created(){try{this.$store.state.loading_infos="Getting Hardware usage",await this.refreshHardwareUsage(this.$store)}catch(t){console.log("Error cought:",t)}Je.on("loading_text",this.on_loading_text),this.updateHasUpdates()},methods:{triggerFileInput(){this.$refs.fileInput.click()},async handleFileUpload(t){const e=t.target.files;if(!e.length)return;this.isUploading=!0;const n=new FormData;n.append("database_name",this.databaseName),Array.from(e).forEach(r=>{n.append("files",r)});try{const r=await Qe.post("/upload_files_2_rag_db",n,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:i=>{const o=Math.round(i.loaded*100/i.total);this.$emit("upload-progress",o)}});this.$emit("upload-success",r.data)}catch(r){console.error("Upload failed:",r),this.$emit("upload-error",r)}finally{this.isUploading=!1,t.target.value=""}},updateRagDatabase(t,e,n){n&&(n==="mounted"?this.configFile.datalakes[t][n]=!!e:this.configFile.datalakes[t][n]=e,this.settingsChanged=!0)},getServedDatabaseAlias(t){return this.configFile.rag_local_services[t].alias},getServedDatabaseType(t){return this.configFile.rag_local_services[t].type},getServedDatabaseUrl(t){return this.configFile.rag_local_services[t].url},getServedDatabaseStatus(t){return this.configFile.rag_local_services[t].start_at_startup||!1},getServedDatabaseKey(t){return this.configFile.rag_local_services[t].key||""},getDataLakeAlias(t){return this.configFile.datalakes[t].alias},getDataLakeType(t){return this.configFile.datalakes[t].type},getDataLakeUrl(t){return this.configFile.datalakes[t].url},getDataLakePath(t){return this.configFile.datalakes[t].path},getDataLakeKey(t){return this.configFile.datalakes[t].key||""},getDataLakeStatus(t){return this.configFile.datalakes[t].mounted||!1},updateAlias(t,e){this.configFile.datalakes[t].alias=e,this.settingsChanged=!0},updateDatabaseType(t,e){this.configFile.datalakes[t].type=e,this.settingsChanged=!0},updateDataLakeUrl(t,e){this.configFile.datalakes[t].url=e,this.settingsChanged=!0},updateDataLakePath(t,e){this.configFile.datalakes[t].path=e,this.settingsChanged=!0},updateDatabaseKey(t,e){this.configFile.datalakes[t].key=e,this.settingsChanged=!0},updateMounted(t,e){this.configFile.datalakes[t].mounted=e,this.settingsChanged=!0},updateStartAtStartup(t,e){this.configFile.datalakes[t].start_at_startup=e,this.settingsChanged=!0},addDatabaseService(){this.configFile.rag_local_services||(this.configFile.rag_local_services=[]),this.configFile.rag_local_services.push({alias:"datalake",type:"lightrag",url:"http://localhost:9621/",path:"",input_path:"",working_path:"",key:"",start_at_startup:!1}),this.settingsChanged=!0},addDataLake(){this.configFile.datalakes||(this.configFile.datalakes=[]),this.configFile.datalakes.push({alias:"datalake",type:"lightrag",url:"http://localhost:9621/",path:"",key:"",mounted:!1}),this.settingsChanged=!0},removeDataLake(t){console.log("Removing remote database"),this.configFile.datalakes.splice(t,1),console.log(this.configFile.datalakes),this.settingsChanged=!0},removeServedDataBase(t){console.log("Removing remote database"),this.configFile.rag_local_services.splice(t,1),console.log(this.configFile.rag_local_services),this.settingsChanged=!0},fetchElevenLabsVoices(){fetch("https://api.elevenlabs.io/v1/voices").then(t=>t.json()).then(t=>{this.voices=t.voices}).catch(t=>console.error("Error fetching voices:",t))},async refreshHardwareUsage(t){await t.dispatch("refreshDiskUsage"),await t.dispatch("refreshRamUsage"),await t.dispatch("refreshVramUsage")},addDataSource(){this.$store.state.config.datalakes.push({alias:"",is_local:!0,path:"",mounted:!1,key:""}),this.settingsChanged=!0},removeDataSource(t){this.$store.state.config.datalakes.splice(t,1),this.settingsChanged=!0},async vectorize_folder(t){await Qe.post("/vectorize_folder",{client_id:this.$store.state.client_id,rag_database:this.$store.state.config.datalakes[t]},this.posts_headers)},async lightrag_select_input_folder(t){try{Je.on("lightrag_input_folder_added",e=>{console.log("lightrag_input_folder_added"),console.log(e),e?(console.log(this.$store.state.config.rag_local_services),console.log(t),this.$store.state.config.rag_local_services[t].input_path=e.path,this.settingsChanged=!0):this.$store.state.toast.showToast("Failed to select a folder",4,!1)}),await Qe.post("/select_lightrag_input_folder",{client_id:this.$store.state.client_id},this.posts_headers)}catch{this.$store.state.toast.showToast("Failed to select a folder",4,!1)}},async lightrag_select_output_folder(t){try{Je.on("lightrag_output_folder_added",e=>{console.log("lightrag_output_folder_added"),console.log(e),e?(console.log(this.$store.state.config.rag_local_services),console.log(t),this.$store.state.config.rag_local_services[t].working_path=e.path,this.settingsChanged=!0):this.$store.state.toast.showToast("Failed to select a folder",4,!1)}),await Qe.post("/select_lightrag_output_folder",{client_id:this.$store.state.client_id},this.posts_headers)}catch{this.$store.state.toast.showToast("Failed to select a folder",4,!1)}},async lollms_vectordb_select_folder(t){try{Je.on("lollmsvectordb_datalake_added",e=>{console.log("lollmsvectordb_datalake_added"),console.log(e),e?(console.log(this.$store.state.config.datalakes),console.log(t),this.$store.state.config.datalakes[t]={alias:e.datalake_name,type:"lollmsvectordb",path:e.path,mounted:!1,key:""},this.settingsChanged=!0):this.$store.state.toast.showToast("Failed to select a folder",4,!1)}),await Qe.post("/select_lollmsvectordb_input_folder",{client_id:this.$store.state.client_id},this.posts_headers)}catch{this.$store.state.toast.showToast("Failed to select a folder",4,!1)}},handleTemplateSelection(t){console.log("handleTemplateSelection");const e=t.target.value;console.log("handleTemplateSelection: ",e),e==="lollms"?(console.log("Using lollms template"),this.configFile.start_header_id_template="!@>",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="!@>",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="!@>",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="lollms_simplified"?(console.log("Using lollms template"),this.configFile.start_header_id_template="@>",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="@>",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="@>",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="bare"?(console.log("Using lollms template"),this.configFile.start_header_id_template="",this.configFile.system_message_template="system",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="llama3"?(console.log("Using llama3 template"),this.configFile.start_header_id_template="<|start_header_id|>",this.configFile.system_message_template="system",this.configFile.end_header_id_template="<|end_header_id|>",this.configFile.separator_template="<|eot_id|>",this.configFile.start_user_header_id_template="<|start_header_id|>",this.configFile.end_user_header_id_template="<|end_header_id|>",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="<|start_header_id|>",this.configFile.end_ai_header_id_template="<|end_header_id|>",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0):e==="mistral"?(console.log("Using mistral template"),this.configFile.start_header_id_template="[INST]",this.configFile.system_message_template=" Using this information",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` `,this.configFile.start_user_header_id_template="[INST]",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="[/INST]",this.configFile.start_ai_header_id_template="[INST]",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="[/INST]",this.settingsChanged=!0):e==="deepseek"&&(console.log("Using deepseek template"),this.configFile.start_header_id_template="",this.configFile.system_message_template=" Using this information",this.configFile.end_header_id_template=": ",this.configFile.separator_template=` -`,this.configFile.start_user_header_id_template="",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0)},install_model(){},reinstallDiffusersService(){Qe.post("/install_diffusers",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},upgradeDiffusersService(){Qe.post("install_diffusers",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},reinstallXTTSService(){Qe.post("install_xtts",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},reinstallWhisperService(){Qe.post("install_whisper",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},reinstallSDService(){Qe.post("/install_sd",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},upgradeSDService(){Qe.post("upgrade_sd",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},startSDService(){Qe.post("start_sd",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},showSD(){Qe.post("show_sd",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},reinstallComfyUIService(){Qe.post("install_comfyui",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},upgradeComfyUIService(){Qe.post("upgrade_comfyui",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},startComfyUIService(){Qe.post("start_comfyui",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},showComfyui(){Qe.post("show_comfyui",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},reinstallvLLMService(){Qe.post("install_vllm",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},startvLLMService(){Qe.post("start_vllm",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},startollamaService(){Qe.post("start_ollama",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},reinstallPetalsService(){Qe.post("install_petals",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},reinstallOLLAMAService(){Qe.post("install_ollama",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},reinstallElasticSearchService(){Qe.post("install_vllm",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},getSeviceVoices(){Qe.get("list_voices").then(t=>{this.voices=t.data.voices}).catch(t=>{console.error(t)})},load_more_models(){this.models_zoo_initialLoadCount+10{Ze.replace()}),this.binding_changed&&!this.mzc_collapsed&&(this.modelsZoo==null||this.modelsZoo.length==0)&&(console.log("Refreshing models"),await this.$store.dispatch("refreshConfig"),this.models_zoo=[],this.refreshModelsZoo(),this.binding_changed=!1)},async selectSortOption(t){this.$store.state.sort_type=t,this.updateModelsZoo(),console.log(`Selected sorting:${t}`),console.log(`models:${this.models_zoo}`)},handleRadioSelected(t){this.isLoading=!0,this.selectSortOption(t).then(()=>{this.isLoading=!1})},filter_installed(t){return console.log("filtering"),t.filter(e=>e.isInstalled===!0)},getVoices(){"speechSynthesis"in window&&(console.log("voice synthesis"),this.audioVoices=speechSynthesis.getVoices(),console.log("Voices:"+this.audioVoices),!this.audio_out_voice&&this.audioVoices.length>0&&(this.audio_out_voice=this.audioVoices[0].name),speechSynthesis.onvoiceschanged=()=>{})},async updateHasUpdates(){let t=await this.api_get_req("check_update");this.has_updates=t.update_availability,console.log("has_updates",this.has_updates)},onVariantChoiceSelected(t){this.selected_variant=t},oncloseVariantChoiceDialog(){this.variantSelectionDialogVisible=!1},onvalidateVariantChoice(t){this.variantSelectionDialogVisible=!1,this.currenModelToInstall.installing=!0;let e=this.currenModelToInstall;if(e.linkNotValid){e.installing=!1,this.$store.state.toast.showToast("Link is not valid, file does not exist",4,!1);return}let n="https://huggingface.co/"+e.model.quantizer+"/"+e.model.name+"/resolve/main/"+this.selected_variant.name;this.showProgress=!0,this.progress=0,this.addModel={model_name:this.selected_variant.name,binding_folder:this.configFile.binding_name,model_url:n},console.log("installing...",this.addModel);const r=i=>{if(console.log("received something"),i.status&&i.progress<=100){if(this.addModel=i,console.log("Progress",i),e.progress=i.progress,e.speed=i.speed,e.total_size=i.total_size,e.downloaded_size=i.downloaded_size,e.start_time=i.start_time,e.installing=!0,e.progress==100){const o=this.models_zoo.findIndex(s=>s.name===e.model.name);this.models_zoo[o].isInstalled=!0,this.showProgress=!1,e.installing=!1,console.log("Received succeeded"),tt.off("install_progress",r),console.log("Installed successfully"),this.$store.state.toast.showToast(`Model: +`,this.configFile.start_user_header_id_template="",this.configFile.end_user_header_id_template=": ",this.configFile.end_user_message_id_template="",this.configFile.start_ai_header_id_template="",this.configFile.end_ai_header_id_template=": ",this.configFile.end_ai_message_id_template="",this.settingsChanged=!0)},install_model(){},reinstallDiffusersService(){Qe.post("/install_diffusers",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},upgradeDiffusersService(){Qe.post("install_diffusers",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},reinstallXTTSService(){Qe.post("install_xtts",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},reinstallWhisperService(){Qe.post("install_whisper",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},reinstallSDService(){Qe.post("/install_sd",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},upgradeSDService(){Qe.post("upgrade_sd",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},startSDService(){Qe.post("start_sd",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},showSD(){Qe.post("show_sd",{client_id:this.$store.state.client_id},this.posts_headers).then(t=>{}).catch(t=>{console.error(t)})},reinstallComfyUIService(){Qe.post("install_comfyui",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},upgradeComfyUIService(){Qe.post("upgrade_comfyui",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},startComfyUIService(){Qe.post("start_comfyui",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},showComfyui(){Qe.post("show_comfyui",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},reinstallvLLMService(){Qe.post("install_vllm",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},startvLLMService(){Qe.post("start_vllm",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},startollamaService(){Qe.post("start_ollama",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},reinstallPetalsService(){Qe.post("install_petals",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},reinstallOLLAMAService(){Qe.post("install_ollama",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},reinstallElasticSearchService(){Qe.post("install_vllm",{client_id:this.$store.state.client_id}).then(t=>{}).catch(t=>{console.error(t)})},getSeviceVoices(){Qe.get("list_voices").then(t=>{this.voices=t.data.voices}).catch(t=>{console.error(t)})},load_more_models(){this.models_zoo_initialLoadCount+10{Ze.replace()}),this.binding_changed&&!this.mzc_collapsed&&(this.modelsZoo==null||this.modelsZoo.length==0)&&(console.log("Refreshing models"),await this.$store.dispatch("refreshConfig"),this.models_zoo=[],this.refreshModelsZoo(),this.binding_changed=!1)},async selectSortOption(t){this.$store.state.sort_type=t,this.updateModelsZoo(),console.log(`Selected sorting:${t}`),console.log(`models:${this.models_zoo}`)},handleRadioSelected(t){this.isLoading=!0,this.selectSortOption(t).then(()=>{this.isLoading=!1})},filter_installed(t){return console.log("filtering"),t.filter(e=>e.isInstalled===!0)},getVoices(){"speechSynthesis"in window&&(console.log("voice synthesis"),this.audioVoices=speechSynthesis.getVoices(),console.log("Voices:"+this.audioVoices),!this.audio_out_voice&&this.audioVoices.length>0&&(this.audio_out_voice=this.audioVoices[0].name),speechSynthesis.onvoiceschanged=()=>{})},async updateHasUpdates(){let t=await this.api_get_req("check_update");this.has_updates=t.update_availability,console.log("has_updates",this.has_updates)},onVariantChoiceSelected(t){this.selected_variant=t},oncloseVariantChoiceDialog(){this.variantSelectionDialogVisible=!1},onvalidateVariantChoice(t){this.variantSelectionDialogVisible=!1,this.currenModelToInstall.installing=!0;let e=this.currenModelToInstall;if(e.linkNotValid){e.installing=!1,this.$store.state.toast.showToast("Link is not valid, file does not exist",4,!1);return}let n="https://huggingface.co/"+e.model.quantizer+"/"+e.model.name+"/resolve/main/"+this.selected_variant.name;this.showProgress=!0,this.progress=0,this.addModel={model_name:this.selected_variant.name,binding_folder:this.configFile.binding_name,model_url:n},console.log("installing...",this.addModel);const r=i=>{if(console.log("received something"),i.status&&i.progress<=100){if(this.addModel=i,console.log("Progress",i),e.progress=i.progress,e.speed=i.speed,e.total_size=i.total_size,e.downloaded_size=i.downloaded_size,e.start_time=i.start_time,e.installing=!0,e.progress==100){const o=this.models_zoo.findIndex(s=>s.name===e.model.name);this.models_zoo[o].isInstalled=!0,this.showProgress=!1,e.installing=!1,console.log("Received succeeded"),Je.off("install_progress",r),console.log("Installed successfully"),this.$store.state.toast.showToast(`Model: `+e.model.name+` -installed!`,4,!0),this.$store.dispatch("refreshDiskUsage")}}else tt.off("install_progress",r),console.log("Install failed"),e.installing=!1,this.showProgress=!1,console.error("Installation failed:",i.error),this.$store.state.toast.showToast(`Model: +installed!`,4,!0),this.$store.dispatch("refreshDiskUsage")}}else Je.off("install_progress",r),console.log("Install failed"),e.installing=!1,this.showProgress=!1,console.error("Installation failed:",i.error),this.$store.state.toast.showToast(`Model: `+e.model.name+` -failed to install!`,4,!1),this.$store.dispatch("refreshDiskUsage");console.log("Here")};tt.on("install_progress",r),tt.emit("install_model",{path:n,name:e.model.name,variant_name:this.selected_variant.name,type:e.model.type}),console.log("Started installation, please wait")},resetLogo(){this.configFile.app_custom_logo="",this.settingsChanged=!0},resetAvatar(){this.configFile.user_avatar="",this.settingsChanged=!0},uploadLogo(t){const e=t.target.files[0],n=new FormData;n.append("logo",e),console.log("Uploading logo"),Qe.post("/upload_logo",n).then(r=>{console.log("Logo uploaded successfully"),this.$store.state.toast.showToast("Avatar uploaded successfully!",4,!0);const i=r.data.fileName;console.log("response",r),this.app_custom_logo=i,this.$store.state.config.app_custom_logo=i,this.settingsChanged=!0}).catch(r=>{console.error("Error uploading avatar:",r)})},uploadAvatar(t){const e=t.target.files[0],n=new FormData;n.append("avatar",e),console.log("Uploading avatar"),Qe.post("/upload_avatar",n).then(r=>{console.log("Avatar uploaded successfully"),this.$store.state.toast.showToast("Avatar uploaded successfully!",4,!0);const i=r.data.fileName;console.log("response",r),this.user_avatar=i,this.$store.state.config.user_avatar=i,this.settingsChanged=!0}).catch(r=>{console.error("Error uploading avatar:",r)})},async update_software(){console.log("Posting");const t=await this.api_post_req("update_software");console.log("Posting done"),t.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Failure!",4,!1)},async restart_software(){console.log("Posting");const t=await this.api_post_req("restart_program");console.log("Posting done"),t.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Failure!",4,!1)},on_loading_text(t){console.log("Loading text",t),this.loading_text=t},async load_everything(){for(this.isLoading=!0,ze(()=>{Ze.replace()});this.isReady===!1;)await new Promise(t=>setTimeout(t,100));this.refresh(),console.log("Ready"),this.configFile.model_name&&(this.isModelSelected=!0),this.persCatgArr=await this.api_get_req("list_personalities_categories"),this.persArr=await this.api_get_req("list_personalities?category="+this.configFile.personality_category),console.log("category"),this.personality_category=this.configFile.personality_category,this.personalitiesFiltered=this.$store.state.personalities.filter(t=>t.category===this.configFile.personality_category),this.modelsFiltered=[],this.updateModelsZoo(),this.isLoading=!1,this.isMounted=!0,console.log("READY Stuff")},async open_mzl(){this.mzl_collapsed=!this.mzl_collapsed,console.log("Fetching models")},async getVramUsage(){await this.api_get_req("vram_usage")},async progressListener(t){if(console.log("received something"),t.status==="progress"){if(this.$refs.modelZoo){const e=this.$refs.modelZoo.findIndex(r=>r.model.name==t.model_name&&this.configFile.binding_name==t.binding_folder),n=this.models_zoo[e];n&&(console.log("model entry",n),n.installing=!0,n.progress=t.progress,console.log(`Progress = ${t.progress}`),t.progress>=100?(n.installing=!1,n.isInstalled=!0):(n.installing=!0,n.isInstalled=!0))}}else if(t.status==="succeeded"){if(console.log("Received succeeded"),this.$refs.modelZoo){const e=this.$refs.modelZoo.findIndex(r=>r.model.name==t.model_name&&this.configFile.binding_name==t.binding_folder),n=this.models_zoo[e];t.progress>=100&&(n.installing=!1,n.isInstalled=!0)}if(console.log("Installed successfully"),this.$refs.modelZoo){const e=this.$refs.modelZoo.findIndex(r=>r.model.name==t.model_name&&this.configFile.binding_name==t.binding_folder),n=this.models_zoo[e];n&&(n.installing=!1,n.isInstalled=!0)}this.$store.state.toast.showToast(`Model: +failed to install!`,4,!1),this.$store.dispatch("refreshDiskUsage");console.log("Here")};Je.on("install_progress",r),Je.emit("install_model",{path:n,name:e.model.name,variant_name:this.selected_variant.name,type:e.model.type}),console.log("Started installation, please wait")},resetLogo(){this.configFile.app_custom_logo="",this.settingsChanged=!0},resetAvatar(){this.configFile.user_avatar="",this.settingsChanged=!0},uploadLogo(t){const e=t.target.files[0],n=new FormData;n.append("logo",e),console.log("Uploading logo"),Qe.post("/upload_logo",n).then(r=>{console.log("Logo uploaded successfully"),this.$store.state.toast.showToast("Avatar uploaded successfully!",4,!0);const i=r.data.fileName;console.log("response",r),this.app_custom_logo=i,this.$store.state.config.app_custom_logo=i,this.settingsChanged=!0}).catch(r=>{console.error("Error uploading avatar:",r)})},uploadAvatar(t){const e=t.target.files[0],n=new FormData;n.append("avatar",e),console.log("Uploading avatar"),Qe.post("/upload_avatar",n).then(r=>{console.log("Avatar uploaded successfully"),this.$store.state.toast.showToast("Avatar uploaded successfully!",4,!0);const i=r.data.fileName;console.log("response",r),this.user_avatar=i,this.$store.state.config.user_avatar=i,this.settingsChanged=!0}).catch(r=>{console.error("Error uploading avatar:",r)})},async update_software(){console.log("Posting");const t=await this.api_post_req("update_software");console.log("Posting done"),t.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Failure!",4,!1)},async restart_software(){console.log("Posting");const t=await this.api_post_req("restart_program");console.log("Posting done"),t.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Failure!",4,!1)},on_loading_text(t){console.log("Loading text",t),this.loading_text=t},async load_everything(){for(this.isLoading=!0,ze(()=>{Ze.replace()});this.isReady===!1;)await new Promise(t=>setTimeout(t,100));this.refresh(),console.log("Ready"),this.configFile.model_name&&(this.isModelSelected=!0),this.persCatgArr=await this.api_get_req("list_personalities_categories"),this.persArr=await this.api_get_req("list_personalities?category="+this.configFile.personality_category),console.log("category"),this.personality_category=this.configFile.personality_category,this.personalitiesFiltered=this.$store.state.personalities.filter(t=>t.category===this.configFile.personality_category),this.modelsFiltered=[],this.updateModelsZoo(),this.isLoading=!1,this.isMounted=!0,console.log("READY Stuff")},async open_mzl(){this.mzl_collapsed=!this.mzl_collapsed,console.log("Fetching models")},async getVramUsage(){await this.api_get_req("vram_usage")},async progressListener(t){if(console.log("received something"),t.status==="progress"){if(this.$refs.modelZoo){const e=this.$refs.modelZoo.findIndex(r=>r.model.name==t.model_name&&this.configFile.binding_name==t.binding_folder),n=this.models_zoo[e];n&&(console.log("model entry",n),n.installing=!0,n.progress=t.progress,console.log(`Progress = ${t.progress}`),t.progress>=100?(n.installing=!1,n.isInstalled=!0):(n.installing=!0,n.isInstalled=!0))}}else if(t.status==="succeeded"){if(console.log("Received succeeded"),this.$refs.modelZoo){const e=this.$refs.modelZoo.findIndex(r=>r.model.name==t.model_name&&this.configFile.binding_name==t.binding_folder),n=this.models_zoo[e];t.progress>=100&&(n.installing=!1,n.isInstalled=!0)}if(console.log("Installed successfully"),this.$refs.modelZoo){const e=this.$refs.modelZoo.findIndex(r=>r.model.name==t.model_name&&this.configFile.binding_name==t.binding_folder),n=this.models_zoo[e];n&&(n.installing=!1,n.isInstalled=!0)}this.$store.state.toast.showToast(`Model: `+model_object.name+` installed!`,4,!0),this.$store.dispatch("refreshDiskUsage")}else if(t.status==="failed"&&(console.log("Install failed"),this.$refs.modelZoo)){const e=this.$refs.modelZoo.findIndex(r=>r.model.name==t.model_name&&this.configFile.binding_name==t.binding_folder),n=this.models_zoo[e];n&&(n.installing=!1,n.isInstalled=!1),console.error("Installation failed:",t.error),this.$store.state.toast.showToast(`Model: `+model_object.name+` -failed to install!`,4,!1),this.$store.dispatch("refreshDiskUsage")}},showAddModelDialog(){this.$refs.addmodeldialog.showDialog("").then(()=>{console.log(this.$refs.addmodeldialog.model_path);const t=this.$refs.addmodeldialog.model_path;tt.emit("install_model",{path:t,type:this.models_zoo[0].type},e=>{console.log("Model installation successful:",e)}),console.log(this.$refs.addmodeldialog.model_path)})},closeAddModelDialog(){this.addModelDialogVisibility=!1},collapseAll(t){this.servers_conf_collapsed=t,this.mainconf_collapsed=t,this.bec_collapsed=t,this.mzc_collapsed=t,this.pzc_collapsed=t,this.bzc_collapsed=t,this.pc_collapsed=t,this.mc_collapsed=t,this.sc_collapsed=t,this.mzdc_collapsed=t},fetchPersonalities(){this.api_get_req("list_personalities_categories").then(t=>{this.persCatgArr=t,this.persCatgArr.sort()}),this.api_get_req("list_personalities").then(t=>{this.persArr=t,this.persArr.sort(),console.log(`Listed personalities: +failed to install!`,4,!1),this.$store.dispatch("refreshDiskUsage")}},showAddModelDialog(){this.$refs.addmodeldialog.showDialog("").then(()=>{console.log(this.$refs.addmodeldialog.model_path);const t=this.$refs.addmodeldialog.model_path;Je.emit("install_model",{path:t,type:this.models_zoo[0].type},e=>{console.log("Model installation successful:",e)}),console.log(this.$refs.addmodeldialog.model_path)})},closeAddModelDialog(){this.addModelDialogVisibility=!1},collapseAll(t){this.servers_conf_collapsed=t,this.mainconf_collapsed=t,this.bec_collapsed=t,this.mzc_collapsed=t,this.pzc_collapsed=t,this.bzc_collapsed=t,this.pc_collapsed=t,this.mc_collapsed=t,this.sc_collapsed=t,this.mzdc_collapsed=t},fetchPersonalities(){this.api_get_req("list_personalities_categories").then(t=>{this.persCatgArr=t,this.persCatgArr.sort()}),this.api_get_req("list_personalities").then(t=>{this.persArr=t,this.persArr.sort(),console.log(`Listed personalities: ${t}`)})},fetchHardwareInfos(){this.$store.dispatch("refreshDiskUsage"),this.$store.dispatch("refreshRamUsage")},async onPersonalitySelected(t){if(console.log("on pers",t),this.isLoading&&this.$store.state.toast.showToast("Loading... please wait",4,!1),this.isLoading=!0,console.log("selecting ",t),t){if(t.selected){this.$store.state.toast.showToast("Personality already selected",4,!0),this.isLoading=!1;return}let e=t.language==null?t.full_path:t.full_path+":"+t.language;if(console.log("pth",e),t.isMounted&&this.configFile.personalities.includes(e)){const n=await this.select_personality(t);console.log("pers is mounted",n),n&&n.status&&n.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: `+t.name,4,!0):this.$store.state.toast.showToast(`Error on select personality: `+t.name,4,!1),this.isLoading=!1}else console.log("mounting pers"),this.mountPersonality(t);ze(()=>{Ze.replace()})}},onModelSelected(t){if(this.isLoading){this.$store.state.toast.showToast("Loading... please wait",4,!1);return}t&&(t.isInstalled?this.update_model(t.model.name).then(e=>{console.log("update_model",e),this.configFile.model_name=t.model.name,e.status?(this.$store.state.toast.showToast(`Selected model: @@ -272,20 +272,20 @@ Download: ${"https://huggingface.co/"+t.quantizer+"/"+t.name} License: ${t.license} Owner: ${t.quantizer} Website: ${"https://huggingface.co/"+t.quantizer} -Description: ${t.description}`,this.$store.state.toast.showToast("Copied model info to clipboard!",4,!0),navigator.clipboard.writeText(e.trim())},onCopyLink(t){this.$store.state.toast.showToast("Copied link to clipboard!",4,!0),navigator.clipboard.writeText(t.model.name)},onCopyPersonalityName(t){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(t.name)},async onCopyToCustom(t){await Qe.post("/copy_to_custom_personas",{client_id:this.$store.state.client_id,category:t.personality.category,name:t.personality.name})},async handleOpenFolder(t){await Qe.post("/open_personality_folder",{client_id:this.$store.state.client_id,personality_folder:t.personality.category/t.personality.folder})},onCancelInstall(){const t=this.addModel;console.log("cancel install",t),this.modelDownlaodInProgress=!1,this.addModel={},tt.emit("cancel_install",{model_name:t.model_name,binding_folder:t.binding_folder,model_url:t.model_url,patreon:t.patreon?t.patreon:"None"}),this.$store.state.toast.showToast("Model installation aborted",4,!1)},onInstall(t){this.variant_choices=t.model.variants,this.currenModelToInstall=t,console.log("variant_choices"),console.log(this.variant_choices),console.log(t),this.variantSelectionDialogVisible=!0},onCreateReference(){Qe.post("/add_reference_to_local_model",{path:this.reference_path}).then(t=>{t.status?(this.$store.state.toast.showToast("Reference created",4,!0),this.is_loading_zoo=!0,this.refreshModelsZoo().then(()=>{this.updateModelsZoo(),this.is_loading_zoofalse})):this.$store.state.toast.showToast("Couldn't create reference",4,!1)})},onInstallAddModel(){if(!this.addModel.url){this.$store.state.toast.showToast("Link is empty",4,!1);return}let t=this.addModel.url;this.addModel.progress=0,console.log("installing..."),console.log("value ",this.addModel.url),this.modelDownlaodInProgress=!0;const e=n=>{console.log("received something"),n.status&&n.progress<=100?(console.log("Progress",n),this.addModel=n,this.addModel.url=t,this.addModel.progress==100&&(this.modelDownlaodInProgress=!1,console.log("Received succeeded"),tt.off("install_progress",e),console.log("Installed successfully"),this.addModel={},this.$store.state.toast.showToast(`Model: +Description: ${t.description}`,this.$store.state.toast.showToast("Copied model info to clipboard!",4,!0),navigator.clipboard.writeText(e.trim())},onCopyLink(t){this.$store.state.toast.showToast("Copied link to clipboard!",4,!0),navigator.clipboard.writeText(t.model.name)},onCopyPersonalityName(t){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(t.name)},async onCopyToCustom(t){await Qe.post("/copy_to_custom_personas",{client_id:this.$store.state.client_id,category:t.personality.category,name:t.personality.name})},async handleOpenFolder(t){await Qe.post("/open_personality_folder",{client_id:this.$store.state.client_id,personality_folder:t.personality.category/t.personality.folder})},onCancelInstall(){const t=this.addModel;console.log("cancel install",t),this.modelDownlaodInProgress=!1,this.addModel={},Je.emit("cancel_install",{model_name:t.model_name,binding_folder:t.binding_folder,model_url:t.model_url,patreon:t.patreon?t.patreon:"None"}),this.$store.state.toast.showToast("Model installation aborted",4,!1)},onInstall(t){this.variant_choices=t.model.variants,this.currenModelToInstall=t,console.log("variant_choices"),console.log(this.variant_choices),console.log(t),this.variantSelectionDialogVisible=!0},onCreateReference(){Qe.post("/add_reference_to_local_model",{path:this.reference_path}).then(t=>{t.status?(this.$store.state.toast.showToast("Reference created",4,!0),this.is_loading_zoo=!0,this.refreshModelsZoo().then(()=>{this.updateModelsZoo(),this.is_loading_zoofalse})):this.$store.state.toast.showToast("Couldn't create reference",4,!1)})},onInstallAddModel(){if(!this.addModel.url){this.$store.state.toast.showToast("Link is empty",4,!1);return}let t=this.addModel.url;this.addModel.progress=0,console.log("installing..."),console.log("value ",this.addModel.url),this.modelDownlaodInProgress=!0;const e=n=>{console.log("received something"),n.status&&n.progress<=100?(console.log("Progress",n),this.addModel=n,this.addModel.url=t,this.addModel.progress==100&&(this.modelDownlaodInProgress=!1,console.log("Received succeeded"),Je.off("install_progress",e),console.log("Installed successfully"),this.addModel={},this.$store.state.toast.showToast(`Model: `+this.addModel.model_name+` -installed!`,4,!0),this.$store.dispatch("refreshDiskUsage"))):(tt.off("install_progress",e),console.log("Install failed"),this.modelDownlaodInProgress=!1,console.error("Installation failed:",n.error),this.$store.state.toast.showToast(`Model: +installed!`,4,!0),this.$store.dispatch("refreshDiskUsage"))):(Je.off("install_progress",e),console.log("Install failed"),this.modelDownlaodInProgress=!1,console.error("Installation failed:",n.error),this.$store.state.toast.showToast(`Model: `+this.addModel.model_name+` -failed to install!`,4,!1),this.$store.dispatch("refreshDiskUsage"))};tt.on("install_progress",e),tt.emit("install_model",{path:t,type:this.models_zoo[0].type}),console.log("Started installation, please wait")},uploadLocalModel(){if(this.uploadData.length==0){this.$store.state.toast.showToast("No files to upload",4,!1);return}let t=this.addModel.url;this.addModel.progress=0,console.log("installing..."),console.log("value ",this.addModel.url),this.modelDownlaodInProgress=!0;const e=n=>{console.log("received something"),n.status&&n.progress<=100?(console.log("Progress",n),this.addModel=n,this.addModel.url=t,this.addModel.progress==100&&(this.modelDownlaodInProgress=!1,console.log("Received succeeded"),tt.off("progress",e),console.log("Installed successfully"),this.addModel={},this.$store.state.toast.showToast(`Model: +failed to install!`,4,!1),this.$store.dispatch("refreshDiskUsage"))};Je.on("install_progress",e),Je.emit("install_model",{path:t,type:this.models_zoo[0].type}),console.log("Started installation, please wait")},uploadLocalModel(){if(this.uploadData.length==0){this.$store.state.toast.showToast("No files to upload",4,!1);return}let t=this.addModel.url;this.addModel.progress=0,console.log("installing..."),console.log("value ",this.addModel.url),this.modelDownlaodInProgress=!0;const e=n=>{console.log("received something"),n.status&&n.progress<=100?(console.log("Progress",n),this.addModel=n,this.addModel.url=t,this.addModel.progress==100&&(this.modelDownlaodInProgress=!1,console.log("Received succeeded"),Je.off("progress",e),console.log("Installed successfully"),this.addModel={},this.$store.state.toast.showToast(`Model: `+this.addModel.model_name+` -installed!`,4,!0),this.$store.dispatch("refreshDiskUsage"))):(tt.off("progress",e),console.log("Install failed"),this.modelDownlaodInProgress=!1,console.error("Installation failed:",n.error),this.$store.state.toast.showToast(`Model: +installed!`,4,!0),this.$store.dispatch("refreshDiskUsage"))):(Je.off("progress",e),console.log("Install failed"),this.modelDownlaodInProgress=!1,console.error("Installation failed:",n.error),this.$store.state.toast.showToast(`Model: `+this.addModel.model_name+` -failed to install!`,4,!1),this.$store.dispatch("refreshDiskUsage"))};tt.on("progress",e),console.log("Started installation, please wait")},setFileList(t){this.uploadData=t.target.files,console.log("set file list",this.uploadData)},onUninstall(t){this.$store.state.yesNoDialog.askQuestion(`Are you sure you want to delete this model? - [`+t.name+"]","Yes","Cancel").then(e=>{if(e){console.log("uninstalling model...");const n=r=>{console.log("uninstalling res",r),r.status?(console.log("uninstalling success",r),t.uninstalling=!1,tt.off("install_progress",n),this.showProgress=!1,this.is_loading_zoo=!0,this.refreshModelsZoo().then(()=>{this.updateModelsZoo(),this.is_loading_zoo=!1}),this.modelsFiltered=this.models_zoo,this.$store.state.toast.showToast(`Model: +failed to install!`,4,!1),this.$store.dispatch("refreshDiskUsage"))};Je.on("progress",e),console.log("Started installation, please wait")},setFileList(t){this.uploadData=t.target.files,console.log("set file list",this.uploadData)},onUninstall(t){this.$store.state.yesNoDialog.askQuestion(`Are you sure you want to delete this model? + [`+t.name+"]","Yes","Cancel").then(e=>{if(e){console.log("uninstalling model...");const n=r=>{console.log("uninstalling res",r),r.status?(console.log("uninstalling success",r),t.uninstalling=!1,Je.off("install_progress",n),this.showProgress=!1,this.is_loading_zoo=!0,this.refreshModelsZoo().then(()=>{this.updateModelsZoo(),this.is_loading_zoo=!1}),this.modelsFiltered=this.models_zoo,this.$store.state.toast.showToast(`Model: `+t.model.name+` -was uninstalled!`,4,!0),this.$store.dispatch("refreshDiskUsage")):(console.log("uninstalling failed",r),t.uninstalling=!1,this.showProgress=!1,tt.off("uninstall_progress",n),console.error("Uninstallation failed:",r.error),this.$store.state.toast.showToast(`Model: +was uninstalled!`,4,!0),this.$store.dispatch("refreshDiskUsage")):(console.log("uninstalling failed",r),t.uninstalling=!1,this.showProgress=!1,Je.off("uninstall_progress",n),console.error("Uninstallation failed:",r.error),this.$store.state.toast.showToast(`Model: `+t.model.name+` -failed to uninstall!`,4,!1),this.$store.dispatch("refreshDiskUsage"))};tt.on("uninstall_progress",n),this.selected_variant!=null?tt.emit("uninstall_model",{path:"https://huggingface.co/"+t.model.quantizer+"/"+t.model.name+"/resolve/main/"+this.selected_variant.name,type:t.model.type}):tt.emit("uninstall_model",{path:"https://huggingface.co/"+t.model.quantizer+"/"+t.model.name,type:t.model.type})}})},onBindingSelected(t){if(console.log("Binding selected"),!t.binding.installed){this.$store.state.toast.showToast(`Binding is not installed: +failed to uninstall!`,4,!1),this.$store.dispatch("refreshDiskUsage"))};Je.on("uninstall_progress",n),this.selected_variant!=null?Je.emit("uninstall_model",{path:"https://huggingface.co/"+t.model.quantizer+"/"+t.model.name+"/resolve/main/"+this.selected_variant.name,type:t.model.type}):Je.emit("uninstall_model",{path:"https://huggingface.co/"+t.model.quantizer+"/"+t.model.name,type:t.model.type})}})},onBindingSelected(t){if(console.log("Binding selected"),!t.binding.installed){this.$store.state.toast.showToast(`Binding is not installed: `+t.binding.name,4,!1);return}this.mzc_collapsed=!0,this.configFile.binding_name!=t.binding.folder&&(this.update_binding(t.binding.folder),this.binding_changed=!0),this.api_get_req("get_model_status").then(e=>{this.$store.commit("setIsModelOk",e)})},onInstallBinding(t){this.configFile.binding_name!=t.binding.folder?(this.isLoading=!0,t.disclaimer&&this.$store.state.yesNoDialog.askQuestion(t.disclaimer,"Proceed","Cancel"),Qe.post("/install_binding",{client_id:this.$store.state.client_id,name:t.binding.folder}).then(e=>{if(e)return this.isLoading=!1,console.log("install_binding",e),e.data.status?(this.$store.state.toast.showToast("Binding installed successfully!",4,!0),this.$store.state.messageBox.showMessage(`It is advised to reboot the application after installing a binding. Page will refresh in 5s.`),setTimeout(()=>{window.location.href="/"},5e3)):this.$store.state.toast.showToast("Could not reinstall binding",4,!1),this.isLoading=!1,e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not reinstall binding `+e.message,4,!1),{status:!1}))):this.update_binding(t.binding.folder)},onUnInstallBinding(t){this.isLoading=!0,Qe.post("/unInstall_binding",{client_id:this.$store.state.client_id,name:t.binding.folder}).then(e=>{if(e){if(this.isLoading=!1,console.log("unInstall_binding",e),e.data.status){const n=this.bindingsZoo.findIndex(i=>i.folder==t.binding.folder),r=this.bindingsZoo[n];r?r.installed=!0:r.installed=!1,this.settingsChanged=!0,this.binding_changed=!0,this.$store.state.toast.showToast("Binding uninstalled successfully!",4,!0)}else this.$store.state.toast.showToast("Could not uninstall binding",4,!1);return e.data}this.isLoading=!1,t.isInstalled=False}).catch(e=>(this.isLoading=!1,this.$store.state.toast.showToast(`Could not uninstall binding @@ -312,25 +312,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(t){await this.unmountPersonality(t),await this.mountPersonality(t)},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,console.log("Personality path:",t.personality.path),Qe.post("/reinstall_personality",{client_id:this.$store.state.client_id,name:t.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(t){t.target.src=co},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 t=await Qe.get("/get_snd_input_devices");this.snd_input_devices=t.data.device_names,this.snd_input_devices_indexes=t.data.device_indexes}catch{console.log("Couldin't list input devices")}try{console.log("Loading output devices list");const t=await Qe.get("/get_snd_output_devices");this.snd_output_devices=t.data.device_names,this.snd_output_devices_indexes=t.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 t=await Qe.get("/list_comfyui_models");t.data.status&&(this.comfyui_models=t.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(t=>t.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(t=>t.isInstalled===!0):this.models_zoo.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)))}},imgBinding:{get(){if(!this.isMounted)return ri;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return ri}}},imgModel:{get(){try{let t=this.$store.state.modelsZoo.findIndex(e=>e.name==this.$store.state.selectedModel);return t>=0?(console.log(`model avatar : ${this.$store.state.modelsZoo[t].icon}`),this.$store.state.modelsZoo[t].icon):ri}catch{console.log("error")}if(!this.isMounted)return ri;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return ri}}},isReady:{get(){return this.$store.state.ready}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(t){this.$store.state.config.audio_out_voice=t}},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(t){this.$store.commit("setConfig",t)}},userName:{get(){return this.$store.state.config.user_name},set(t){this.$store.state.config.user_name=t}},user_avatar:{get(){return this.$store.state.config.user_avatar!=""?"/user_infos/"+this.$store.state.config.user_avatar:co},set(t){this.$store.state.config.user_avatar=t}},hardware_mode:{get(){return this.$store.state.config.hardware_mode},set(t){this.$store.state.config.hardware_mode=t}},auto_update:{get(){return this.$store.state.config.auto_update},set(t){this.$store.state.config.auto_update=t}},auto_speak:{get(){return this.$store.state.config.auto_speak},set(t){this.$store.state.config.auto_speak=t}},auto_read:{get(){return this.$store.state.config.auto_read},set(t){this.$store.state.config.auto_read=t}},xtts_current_language:{get(){return this.$store.state.config.xtts_current_language},set(t){console.log("Current xtts voice set to ",t),this.$store.state.config.xtts_current_language=t}},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(t){t=="main_voice"||t===void 0?(console.log("Current voice set to None"),this.$store.state.config.xtts_current_voice=null):(console.log("Current voice set to ",t),this.$store.state.config.xtts_current_voice=t)}},audio_pitch:{get(){return this.$store.state.config.audio_pitch},set(t){this.$store.state.config.audio_pitch=t}},audio_in_language:{get(){return this.$store.state.config.audio_in_language},set(t){this.$store.state.config.audio_in_language=t}},use_user_name_in_discussions:{get(){return this.$store.state.config.use_user_name_in_discussions},set(t){this.$store.state.config.use_user_name_in_discussions=t}},discussion_db_name:{get(){return this.$store.state.config.discussion_db_name},set(t){this.$store.state.config.discussion_db_name=t}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}},bindingsZoo:{get(){return this.$store.state.bindingsZoo},set(t){this.$store.commit("setbindingsZoo",t)}},modelsArr:{get(){return this.$store.state.modelsArr},set(t){this.$store.commit("setModelsArr",t)}},models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},installed_models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},diskUsage:{get(){return this.$store.state.diskUsage},set(t){this.$store.commit("setDiskUsage",t)}},ramUsage:{get(){return this.$store.state.ramUsage},set(t){this.$store.commit("setRamUsage",t)}},vramUsage:{get(){return this.$store.state.vramUsage},set(t){this.$store.commit("setVramUsage",t)}},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 t=this.bindingsZoo.findIndex(e=>e.folder===this.configFile.binding_name);return t>-1?this.bindingsZoo[t].name:null},active_pesonality(){if(!this.isMounted)return null;const t=this.$store.state.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);return t>-1?this.$store.state.personalities[t].name:null},speed_computed(){return $o(this.addModel.speed)},total_size_computed(){return $o(this.addModel.total_size)},downloaded_size_computed(){return $o(this.addModel.downloaded_size)}},watch:{bec_collapsed(){ze(()=>{Ze.replace()})},pc_collapsed(){ze(()=>{Ze.replace()})},mc_collapsed(){ze(()=>{Ze.replace()})},sc_collapsed(){ze(()=>{Ze.replace()})},showConfirmation(){ze(()=>{Ze.replace()})},mzl_collapsed(){ze(()=>{Ze.replace()})},pzl_collapsed(){ze(()=>{Ze.replace()})},ezl_collapsed(){ze(()=>{Ze.replace()})},bzl_collapsed(){ze(()=>{Ze.replace()})},all_collapsed(t){this.collapseAll(t),ze(()=>{Ze.replace()})},settingsChanged(t){this.$store.state.settingsChanged=t,ze(()=>{Ze.replace()})},isLoading(){ze(()=>{Ze.replace()})},searchPersonality(t){t==""&&this.filterPersonalities()},mzdc_collapsed(){ze(()=>{Ze.replace()})}},async beforeRouteLeave(t){await this.$router.isReady()}},xjn={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"},Sjn={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg panels-color shadow-lg"},Ljn={key:0,class:"flex gap-3 flex-1 items-center duration-75"},Cjn={key:1,class:"flex gap-3 flex-1 items-center"},Ajn={class:"flex gap-3 flex-1 items-center justify-end"},wjn={class:"flex gap-3 items-center"},Mjn={key:0,class:"flex gap-3 items-center"},Ojn={key:1,role:"status"},Rjn={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"},Njn={class:"flex flex-row p-3"},Djn={class:"text-base font-semibold cursor-pointer select-none items-center"},Ijn={class:"flex gap-2 items-center"},kjn={key:0},Pjn=["src"],Hjn={class:"font-bold font-large text-lg"},Vjn={key:1},Bjn={class:"flex gap-2 items-center"},Fjn=["src"],$jn={class:"font-bold font-large text-lg"},Ujn={class:"font-bold font-large text-lg"},Gjn={class:"font-bold font-large text-lg"},qjn={class:"mb-2"},zjn={class:"flex flex-col mx-2"},jjn={class:"p-2"},Wjn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Yjn={class:"mb-2"},Kjn={class:"flex flex-col mx-2"},Zjn={class:"p-2"},Xjn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Jjn={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},eWn=["src"],tWn={class:"flex flex-col mx-2"},nWn={class:"p-2"},rWn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},iWn={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"},oWn={class:"flex flex-row p-3"},sWn={class:"flex flex-col mb-2 px-3 pb-2"},aWn={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"},lWn={class:"flex flex-col space-y-4"},cWn={class:"flex items-center"},uWn={class:"flex items-center"},dWn={class:"flex items-center"},fWn={class:"flex items-start"},pWn={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"},hWn={class:"flex flex-row p-3"},TWn={class:"flex flex-col mb-2 px-3 pb-2"},mWn={class:"settings-container grid gap-6 p-6 bg-gray-50 dark:bg-gray-700 rounded-lg border border-gray-300 dark:border-gray-600"},gWn={class:"setting-section"},_Wn={class:"settings-grid grid gap-4"},QWn={class:"setting-row flex items-center gap-4"},vWn={class:"setting-row flex items-center gap-4"},yWn={class:"setting-row flex items-center gap-4"},bWn={class:"setting-content flex items-center gap-4"},EWn={for:"avatar-upload",class:"cursor-pointer"},xWn=["src"],SWn={class:"setting-section"},LWn={class:"settings-grid grid gap-4"},CWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},AWn={class:"relative inline-block w-12 h-6"},wWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},MWn={class:"relative inline-block w-12 h-6"},OWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},RWn={class:"relative inline-block w-12 h-6"},NWn={class:"setting-section"},DWn={class:"settings-grid grid gap-4"},IWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},kWn={class:"relative inline-block w-12 h-6"},PWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},HWn={class:"relative inline-block w-12 h-6"},VWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},BWn={class:"relative inline-block w-12 h-6"},FWn={class:"setting-section"},$Wn={class:"settings-grid grid gap-4"},UWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},GWn={class:"relative inline-block w-12 h-6"},qWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},zWn={class:"relative inline-block w-12 h-6"},jWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},WWn={class:"relative inline-block w-12 h-6"},YWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},KWn={class:"relative inline-block w-12 h-6"},ZWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},XWn={class:"relative inline-block w-12 h-6"},JWn={class:"grid gap-6 bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md"},eYn={class:"flex flex-col space-y-2"},tYn={class:"grid md:grid-cols-2 gap-4"},nYn={class:"space-y-2"},rYn={class:"space-y-2"},iYn={class:"grid md:grid-cols-2 gap-4"},oYn={class:"space-y-2"},sYn={class:"space-y-2"},aYn={class:"grid md:grid-cols-2 gap-4"},lYn={class:"space-y-2"},cYn={class:"space-y-2"},uYn={class:"grid md:grid-cols-2 gap-4"},dYn={class:"space-y-2"},fYn={class:"space-y-2"},pYn={class:"space-y-2"},hYn={class:"space-y-2"},TYn={class:"space-y-2"},mYn={class:"p-4 bg-gray-100 dark:bg-gray-900 rounded-md"},gYn=["innerHTML"],_Yn={class:"flex items-center space-x-4"},QYn={class:"relative inline-block w-10 mr-2 align-middle select-none transition duration-200 ease-in"},vYn={class:"grid gap-6 bg-gray-50 dark:bg-gray-700 p-6 rounded-lg shadow-md"},yYn={class:"flex flex-col md:flex-row md:items-center gap-4"},bYn={class:"flex flex-col md:flex-row md:items-start gap-4"},EYn={class:"space-y-4"},xYn={class:"flex flex-col md:flex-row md:items-center gap-4"},SYn={class:"flex-1 space-y-3"},LYn={class:"flex items-center space-x-3 cursor-pointer"},CYn={class:"flex items-center space-x-3 cursor-pointer"},AYn={class:"flex items-center space-x-3 cursor-pointer"},wYn={class:"flex flex-col md:flex-row md:items-center gap-4"},MYn={class:"flex items-center gap-4"},OYn={for:"avatar-upload",class:"cursor-pointer"},RYn=["src"],NYn={class:"space-y-4"},DYn={class:"flex flex-col md:flex-row md:items-center gap-4"},IYn={class:"flex flex-col md:flex-row md:items-center gap-4"},kYn={class:"settings-container p-6 space-y-4 bg-gray-50 dark:bg-gray-800 rounded-xl shadow-md"},PYn={class:"setting-row flex items-center justify-between p-3 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"},HYn={class:"relative"},VYn={class:"setting-row flex items-center justify-between p-3 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"},BYn={class:"relative"},FYn={class:"setting-row flex items-center justify-between p-3 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"},$Yn={class:"relative"},UYn={class:"setting-row flex items-center justify-between p-3 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"},GYn={class:"relative"},qYn={class:"setting-row flex items-center justify-between p-3 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"},zYn={class:"relative"},jYn={class:"bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg p-4 space-y-4"},WYn={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},YYn={class:"flex items-center"},KYn={class:"relative inline-flex items-center cursor-pointer"},ZYn={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},XYn={class:"flex-1"},JYn={class:"p-4 bg-gray-50 dark:bg-gray-700 rounded-lg shadow-sm border border-gray-200 dark:border-gray-600"},eKn={class:"flex flex-col sm:flex-row items-start sm:items-center gap-2"},tKn={class:"flex-1 w-full"},nKn={class:"settings-container bg-gray-50 dark:bg-gray-700 p-6 rounded-lg shadow-md"},rKn={class:"setting-row mb-4"},iKn={class:"flex items-center justify-between"},oKn={class:"w-64"},sKn={class:"setting-row mb-4"},aKn={class:"flex items-center justify-between"},lKn={class:"w-64"},cKn={class:"setting-row"},uKn={class:"flex items-center justify-between"},dKn={class:"w-64"},fKn={class:"inline-flex items-center cursor-pointer"},pKn={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"},hKn={class:"flex flex-row p-3"},TKn={class:"space-y-6"},mKn={class:"space-y-4"},gKn={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-4"},_Kn={class:"flex flex-col"},QKn=["value","onInput"],vKn={class:"flex flex-col"},yKn=["value","onInput"],bKn={class:"flex flex-col lg:col-span-2"},EKn={class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},xKn=["value","onInput"],SKn=["value","onInput"],LKn={key:0,class:"flex flex-col lg:col-span-2"},CKn=["value","onInput"],AKn={class:"flex flex-wrap items-center justify-between mt-4 pt-3 border-t border-gray-200 dark:border-gray-700 gap-2"},wKn={class:"flex flex-wrap items-center gap-3"},MKn={class:"flex items-center space-x-2 cursor-pointer"},OKn=["checked","onChange"],RKn={key:0,class:"flex gap-2"},NKn=["onClick"],DKn=["onClick"],IKn={class:"inline-flex"},kKn=["onClick"],PKn={class:"space-y-6"},HKn={class:"space-y-4"},VKn={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4"},BKn={class:"flex flex-col"},FKn=["value","onInput"],$Kn={class:"flex flex-col"},UKn=["value","onInput"],GKn={class:"flex flex-col lg:col-span-2"},qKn=["value","onInput"],zKn={class:"flex flex-col lg:col-span-2"},jKn=["value","onInput"],WKn={class:"flex items-center justify-between mt-4 pt-3 border-t border-gray-200 dark:border-gray-700"},YKn={class:"flex items-center space-x-4"},KKn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},ZKn={class:"relative inline-block w-12 h-6"},XKn=["onUpdate:modelValue"],JKn=["onClick"],eZn={class:"bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg p-6 space-y-6"},tZn={class:"flex flex-col md:flex-row md:items-center gap-4"},nZn={class:"flex flex-col md:flex-row md:items-center gap-4"},rZn={class:"flex-1"},iZn={class:"inline-flex items-center"},oZn={class:"flex flex-col md:flex-row md:items-start gap-4"},sZn={class:"flex-1 space-y-2"},aZn=["disabled"],lZn={key:0,label:"Semantic Models"},cZn={key:1,label:"OpenAI Models"},uZn={key:2,label:"Ollama Models"},dZn={key:3,disabled:""},fZn={class:"flex flex-col md:flex-row md:items-start gap-4"},pZn={class:"space-y-6"},hZn={class:"flex flex-col md:flex-row md:items-start gap-4"},TZn={class:"flex-1 space-y-2"},mZn={class:"space-y-4"},gZn={class:"flex items-center gap-4"},_Zn={class:"flex-1"},QZn={class:"inline-flex items-center"},vZn={class:"space-y-4 bg-gray-50 dark:bg-gray-800 rounded-lg p-6 shadow-sm border border-gray-200 dark:border-gray-700"},yZn={class:"flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-700 p-3 rounded-lg transition-colors"},bZn={class:"flex items-center"},EZn={class:"relative inline-flex items-center cursor-pointer"},xZn={class:"flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-700 p-3 rounded-lg transition-colors"},SZn={class:"flex items-center"},LZn={class:"relative inline-flex items-center cursor-pointer"},CZn={class:"flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-700 p-3 rounded-lg transition-colors"},AZn={class:"flex items-center"},wZn={class:"relative inline-flex items-center cursor-pointer"},MZn={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"},OZn={class:"flex flex-row p-3"},RZn={class:"grid gap-6 bg-gray-50 dark:bg-gray-700 rounded-lg p-6 border border-gray-300 dark:border-gray-600"},NZn={class:"flex items-center justify-between"},DZn={class:"relative inline-flex items-center cursor-pointer"},IZn={class:"flex items-center justify-between"},kZn={class:"relative inline-flex items-center cursor-pointer"},PZn={class:"flex items-center justify-between"},HZn={class:"relative inline-flex items-center cursor-pointer"},VZn={class:"flex items-center justify-between"},BZn={class:"relative inline-flex items-center cursor-pointer"},FZn={class:"space-y-6"},$Zn={class:"flex flex-col gap-2"},UZn={class:"flex flex-col gap-4"},GZn={class:"flex flex-col gap-2"},qZn={class:"flex flex-col gap-4"},zZn={class:"flex flex-col gap-2"},jZn={class:"flex flex-col gap-4"},WZn={class:"flex flex-col gap-2"},YZn={class:"flex flex-col gap-4"},KZn={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"},ZZn={class:"flex flex-row p-3"},XZn={class:"grid gap-6 p-6 bg-white dark:bg-gray-800 rounded-xl shadow-lg"},JZn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-6"},eXn={class:"w-full md:w-2/3"},tXn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-6"},nXn={class:"w-full md:w-2/3"},rXn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-6"},iXn={class:"w-full md:w-2/3"},oXn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-6"},sXn={class:"w-full md:w-2/3"},aXn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-6"},lXn={class:"w-full md:w-2/3"},cXn={class:"space-y-6 bg-gray-50 dark:bg-gray-800 p-6 rounded-lg shadow-md"},uXn={class:"flex items-center space-x-4"},dXn={class:"w-2/3"},fXn={class:"inline-flex items-center cursor-pointer"},pXn={class:"flex items-center space-x-4"},hXn={class:"w-2/3"},TXn={class:"inline-flex items-center cursor-pointer"},mXn={class:"flex items-center space-x-4"},gXn={class:"w-2/3"},_Xn={class:"flex items-center space-x-4"},QXn={class:"w-2/3"},vXn={class:"grid gap-6 p-6 bg-white dark:bg-gray-800 rounded-lg shadow-md"},yXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},bXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},EXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},xXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},SXn={class:"space-y-4 p-4 bg-gray-50 dark:bg-gray-700 rounded-lg"},LXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},CXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},AXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},wXn={class:"space-y-4 p-4 bg-gray-50 dark:bg-gray-700 rounded-lg"},MXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},OXn={class:"flex items-center"},RXn={class:"relative inline-flex items-center cursor-pointer"},NXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},DXn={class:"space-y-4 p-4 bg-white dark:bg-gray-800 rounded-lg shadow-md"},IXn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-4"},kXn={class:"md:w-2/3"},PXn=["value"],HXn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-4 pt-4 border-t dark:border-gray-700"},VXn={class:"md:w-2/3"},BXn=["value"],FXn={class:"grid gap-4 p-4 bg-gray-50 dark:bg-gray-800 rounded-lg shadow-md"},$Xn={class:"grid grid-cols-[200px,1fr] items-center gap-4"},UXn={class:"grid grid-cols-[200px,1fr] items-center gap-4"},GXn={class:"grid grid-cols-[200px,1fr] items-center gap-4"},qXn={class:"grid grid-cols-[200px,1fr] items-center gap-4"},zXn={class:"space-y-3"},jXn={class:"flex items-center space-x-2 cursor-pointer"},WXn={class:"flex items-center space-x-2 cursor-pointer"},YXn={class:"pl-6 space-y-2 border-l-2 border-gray-200 dark:border-gray-600"},KXn=["id","onUpdate:modelValue"],ZXn={class:"text-sm text-gray-600 dark:text-gray-300"},XXn={class:"grid grid-cols-[200px,1fr] items-center gap-4"},JXn={class:"space-y-3"},eJn=["id","onUpdate:modelValue"],tJn={class:"text-sm text-gray-600 dark:text-gray-300"},nJn={class:"space-y-6 p-6 bg-white dark:bg-gray-800 rounded-lg shadow-md"},rJn={class:"flex items-center justify-between"},iJn={class:"relative inline-flex items-center cursor-pointer"},oJn={class:"flex items-center justify-between"},sJn={class:"relative inline-flex items-center cursor-pointer"},aJn={class:"space-y-2"},lJn={for:"audio_silenceTimer",class:"text-sm font-medium text-gray-700 dark:text-gray-200"},cJn={class:"flex flex-col gap-4"},uJn={class:"space-y-2"},dJn=["value"],fJn={class:"bg-white dark:bg-gray-800 rounded-xl shadow-lg p-6 space-y-6"},pJn={class:"flex items-center justify-between p-4 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-lg transition-all"},hJn={class:"relative inline-flex items-center cursor-pointer"},TJn={class:"p-4"},mJn={class:"p-4"},gJn={class:"relative"},_Jn=["value"],QJn={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"},vJn={class:"flex flex-row"},yJn={class:"flex flex-row"},bJn=["value"],EJn={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"},xJn={class:"flex flex-row"},SJn=["value"],LJn={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"},CJn={class:"flex flex-row"},AJn=["value"],wJn={class:"flex flex-row"},MJn=["value"],OJn={class:"flex flex-row"},RJn={class:"flex flex-row"},NJn={class:"flex flex-row"},DJn={class:"flex flex-row"},IJn={class:"flex flex-row"},kJn={class:"flex flex-row"},PJn={class:"flex flex-row"},HJn={class:"flex flex-row"},VJn={class:"flex flex-row"},BJn={class:"flex flex-row"},FJn={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"},$Jn={class:"flex flex-row"},UJn={class:"flex flex-row"},GJn={class:"flex flex-row"},qJn={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"},zJn={class:"flex flex-row"},jJn={class:"flex flex-row"},WJn={class:"flex flex-row"},YJn={class:"flex flex-row"},KJn={class:"flex flex-row"},ZJn=["value"],XJn={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"},JJn={class:"flex flex-row"},eer={class:"flex flex-row"},ter={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"},ner={class:"flex flex-row"},rer={class:"flex flex-row"},ier={class:"flex flex-row"},oer={class:"flex flex-row"},ser={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"},aer={class:"flex flex-row"},ler={class:"flex flex-row"},cer={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"},uer={class:"flex flex-row"},der={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"},fer={class:"flex flex-row"},per={class:"flex flex-row"},her={class:"flex flex-row"},Ter={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"},mer={class:"flex flex-row"},ger={class:"flex flex-row"},_er={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"},Qer={class:"flex flex-row"},ver={class:"flex flex-row"},yer=["value"],ber={class:"flex flex-row"},Eer={class:"flex flex-row"},xer={class:"flex flex-row"},Ser={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"},Ler={class:"flex flex-row"},Cer={class:"flex flex-row"},Aer={class:"flex flex-row"},wer={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"},Mer={class:"flex flex-row"},Oer={class:"flex flex-row"},Rer={class:"flex flex-row"},Ner={class:"flex flex-col align-bottom"},Der={class:"relative"},Ier={class:"absolute right-0"},ker={class:"flex flex-row"},Per={class:"flex flex-row"},Her={class:"flex flex-row"},Ver={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"},Ber={class:"flex flex-row"},Fer={class:"flex flex-row"},$er={class:"flex flex-row"},Uer={class:"bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 max-w-2xl mx-auto"},Ger={class:"flex flex-col md:flex-row items-start md:items-center space-y-4 md:space-y-0 md:space-x-6"},qer={class:"w-full md:w-2/3"},zer={class:"relative"},jer={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"},Wer={class:"flex flex-row"},Yer={class:"flex flex-row"},Ker={class:"flex flex-row"},Zer={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"},Xer={class:"flex flex-row p-3"},Jer={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},etr={key:1,class:"mr-2"},ttr={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},ntr={class:"flex gap-1 items-center"},rtr=["src"],itr={class:"font-bold font-large text-lg line-clamp-1"},otr={key:0,class:"mb-2"},str={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},atr={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"},ltr={class:"flex flex-row p-3"},ctr={class:"flex flex-row items-center"},utr={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},dtr={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},ftr={key:2,class:"mr-2"},ptr={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},htr={class:"flex gap-1 items-center"},Ttr=["src"],mtr={class:"font-bold font-large text-lg line-clamp-1"},gtr={class:"mx-2 mb-4"},_tr={class:"relative"},Qtr={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},vtr={key:0},ytr={key:1},btr={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},Etr={key:1,class:"mb-2"},xtr={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Str={class:"mb-2"},Ltr={class:"p-2"},Ctr={class:"mb-3"},Atr={key:0},wtr={class:"mb-3"},Mtr={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},Otr={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},Rtr={class:"w-full p-2"},Ntr={class:"flex justify-between mb-1"},Dtr={class:"text-sm font-medium text-blue-700 dark:text-white"},Itr=["title"],ktr={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Ptr={class:"flex justify-between mb-1"},Htr={class:"text-base font-medium text-blue-700 dark:text-white"},Vtr={class:"text-sm font-medium text-blue-700 dark:text-white"},Btr={class:"flex flex-grow"},Ftr={class:"flex flex-row flex-grow gap-3"},$tr={class:"p-2 text-center grow"},Utr={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"},Gtr={class:"flex flex-row p-3 items-center"},qtr={key:0,class:"mr-2"},ztr={class:"mr-2 font-bold font-large text-lg line-clamp-1"},jtr={key:1,class:"mr-2"},Wtr={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},Ytr={key:0,class:"flex -space-x-4 items-center"},Ktr={class:"group items-center flex flex-row"},Ztr=["onClick"],Xtr=["src","title"],Jtr=["onClick"],enr={class:"mx-2 mb-4"},tnr={class:"relative"},nnr={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},rnr={key:0},inr={key:1},onr={key:0,class:"mx-2 mb-4"},snr={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},anr=["selected"],lnr={key:0,class:"mb-2"},cnr={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},unr={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"},dnr={class:"flex flex-row"},fnr={class:"m-2"},pnr={class:"flex flex-row gap-2 items-center"},hnr={class:"m-2"},Tnr={class:"m-2"},mnr={class:"flex flex-col align-bottom"},gnr={class:"relative"},_nr={class:"absolute right-0"},Qnr={class:"m-2"},vnr={class:"flex flex-col align-bottom"},ynr={class:"relative"},bnr={class:"absolute right-0"},Enr={class:"m-2"},xnr={class:"flex flex-col align-bottom"},Snr={class:"relative"},Lnr={class:"absolute right-0"},Cnr={class:"m-2"},Anr={class:"flex flex-col align-bottom"},wnr={class:"relative"},Mnr={class:"absolute right-0"},Onr={class:"m-2"},Rnr={class:"flex flex-col align-bottom"},Nnr={class:"relative"},Dnr={class:"absolute right-0"},Inr={class:"m-2"},knr={class:"flex flex-col align-bottom"},Pnr={class:"relative"},Hnr={class:"absolute right-0"};function Vnr(t,e,n,r,i,o){const s=pt("DictManager"),a=pt("Card"),l=pt("StringListManager"),c=pt("BindingEntry"),u=pt("RadioOptions"),d=pt("model-entry"),h=pt("personality-entry"),f=pt("AddModelDialog"),m=pt("ChoiceDialog");return k(),H(Ue,null,[g("div",xjn,[g("div",Sjn,[i.showConfirmation?(k(),H("div",Ljn,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=he(T=>i.showConfirmation=!1,["stop"]))},e[418]||(e[418]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=he(T=>o.save_configuration(),["stop"]))},e[419]||(e[419]=[g("i",{"data-feather":"check"},null,-1)]))])):re("",!0),i.showConfirmation?re("",!0):(k(),H("div",Cjn,[g("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=T=>o.reset_configuration())},e[420]||(e[420]=[g("i",{"data-feather":"refresh-ccw"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[3]||(e[3]=he(T=>i.all_collapsed=!i.all_collapsed,["stop"]))},e[421]||(e[421]=[g("i",{"data-feather":"list"},null,-1)]))])),g("div",Ajn,[g("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[4]||(e[4]=T=>o.api_get_req("clear_uploads").then(Q=>{Q.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},e[422]||(e[422]=[g("i",{"data-feather":"trash-2"},null,-1)])),g("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=T=>o.api_post_req("restart_program").then(Q=>{Q.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},e[423]||(e[423]=[g("i",{"data-feather":"refresh-ccw"},null,-1)])),i.has_updates?(k(),H("button",{key:0,title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=T=>o.api_post_req("update_software").then(Q=>{Q.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},e[424]||(e[424]=[g("i",{"data-feather":"arrow-up-circle"},null,-1),g("i",{"data-feather":"alert-circle"},null,-1)]))):re("",!0),g("div",wjn,[i.settingsChanged?(k(),H("div",Mjn,[i.isLoading?re("",!0):(k(),H("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[7]||(e[7]=he(T=>o.applyConfiguration(),["stop"]))},e[425]||(e[425]=[g("div",{class:"flex flex-row"},[g("p",{class:"text-green-600 font-bold hover:text-green-300 ml-4 pl-4 mr-4 pr-4"},"Apply changes:"),g("i",{"data-feather":"check"})],-1)]))),i.isLoading?re("",!0):(k(),H("button",{key:1,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Cancel changes",type:"button",onClick:e[8]||(e[8]=he(T=>o.cancelConfiguration(),["stop"]))},e[426]||(e[426]=[g("div",{class:"flex flex-row"},[g("p",{class:"text-red-600 font-bold hover:text-red-300 ml-4 pl-4 mr-4 pr-4"},"Cancel changes:"),g("i",{"data-feather":"x"})],-1)])))])):re("",!0),i.isLoading?(k(),H("div",Ojn,[g("p",null,le(i.loading_text),1),e[427]||(e[427]=g("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"},[g("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"}),g("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[428]||(e[428]=g("span",{class:"sr-only"},"Loading...",-1))])):re("",!0)])])]),g("div",{class:je(i.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[g("div",Rjn,[g("div",Njn,[g("button",{onClick:e[9]||(e[9]=he(T=>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"},[J(g("div",null,e[429]||(e[429]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.sc_collapsed]]),J(g("div",null,e[430]||(e[430]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.sc_collapsed]]),e[433]||(e[433]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),e[434]||(e[434]=g("div",{class:"mr-2"},"|",-1)),g("div",Djn,[g("div",Ijn,[g("div",null,[o.vramUsage&&o.vramUsage.gpus&&o.vramUsage.gpus.length==1?(k(),H("div",kjn,[(k(!0),H(Ue,null,ot(o.vramUsage.gpus,T=>(k(),H("div",{class:"flex gap-2 items-center",key:T},[g("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Pjn),g("p",Hjn,[g("div",null,le(o.computedFileSize(T.used_vram))+" / "+le(o.computedFileSize(T.total_vram))+" ("+le(T.percentage)+"%) ",1)])]))),128))])):re("",!0),o.vramUsage&&o.vramUsage.gpus&&o.vramUsage.gpus.length>1?(k(),H("div",Vjn,[g("div",Bjn,[g("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Fjn),g("p",$jn,[g("div",null,le(o.vramUsage.gpus.length)+"x ",1)])])])):re("",!0)]),e[431]||(e[431]=g("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),g("p",Ujn,[g("div",null,le(o.ram_usage)+" / "+le(o.ram_total_space)+" ("+le(o.ram_percent_usage)+"%)",1)]),e[432]||(e[432]=g("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),g("p",Gjn,[g("div",null,le(o.disk_binding_models_usage)+" / "+le(o.disk_total_space)+" ("+le(o.disk_percent_usage)+"%)",1)])])])])]),g("div",{class:je([{hidden:i.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",qjn,[e[437]||(e[437]=g("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[g("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"})]),nt(" CPU Ram usage: ")],-1)),g("div",zjn,[g("div",null,[e[435]||(e[435]=g("b",null,"Avaliable ram: ",-1)),nt(le(o.ram_available_space),1)]),g("div",null,[e[436]||(e[436]=g("b",null,"Ram usage: ",-1)),nt(" "+le(o.ram_usage)+" / "+le(o.ram_total_space)+" ("+le(o.ram_percent_usage)+")% ",1)])]),g("div",jjn,[g("div",Wjn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn("width: "+o.ram_percent_usage+"%;")},null,4)])])]),g("div",Yjn,[e[440]||(e[440]=g("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[g("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),nt(" Disk usage: ")],-1)),g("div",Kjn,[g("div",null,[e[438]||(e[438]=g("b",null,"Avaliable disk space: ",-1)),nt(le(o.disk_available_space),1)]),g("div",null,[e[439]||(e[439]=g("b",null,"Disk usage: ",-1)),nt(" "+le(o.disk_binding_models_usage)+" / "+le(o.disk_total_space)+" ("+le(o.disk_percent_usage)+"%)",1)])]),g("div",Zjn,[g("div",Xjn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn("width: "+o.disk_percent_usage+"%;")},null,4)])])]),(k(!0),H(Ue,null,ot(o.vramUsage.gpus,T=>(k(),H("div",{class:"mb-2",key:T},[g("label",Jjn,[g("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,eWn),e[441]||(e[441]=nt(" GPU usage: "))]),g("div",tWn,[g("div",null,[e[442]||(e[442]=g("b",null,"Model: ",-1)),nt(le(T.gpu_model),1)]),g("div",null,[e[443]||(e[443]=g("b",null,"Avaliable vram: ",-1)),nt(le(this.computedFileSize(T.available_space)),1)]),g("div",null,[e[444]||(e[444]=g("b",null,"GPU usage: ",-1)),nt(" "+le(this.computedFileSize(T.used_vram))+" / "+le(this.computedFileSize(T.total_vram))+" ("+le(T.percentage)+"%)",1)])]),g("div",nWn,[g("div",rWn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn("width: "+T.percentage+"%;")},null,4)])])]))),128))],2)]),g("div",iWn,[g("div",oWn,[g("button",{onClick:e[10]||(e[10]=he(T=>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"},[J(g("div",null,e[445]||(e[445]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.smartrouterconf_collapsed]]),J(g("div",null,e[446]||(e[446]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.smartrouterconf_collapsed]]),e[447]||(e[447]=g("div",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Smart routing configurations",-1))])]),g("div",{class:je([{hidden:i.smartrouterconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",sWn,[oe(a,{title:"Smart Routing Settings",is_shrunk:!1,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",aWn,[g("div",lWn,[g("div",cWn,[e[448]||(e[448]=g("label",{for:"use_smart_routing",class:"text-sm font-bold w-64"},"Use Smart Routing:",-1)),J(g("input",{type:"checkbox",id:"use_smart_routing","onUpdate:modelValue":e[11]||(e[11]=T=>o.configFile.use_smart_routing=T),onChange:e[12]||(e[12]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.use_smart_routing]])]),g("div",uWn,[e[449]||(e[449]=g("label",{for:"restore_model_after_smart_routing",class:"text-sm font-bold w-64"},"Restore model after smart routing:",-1)),J(g("input",{type:"checkbox",id:"restore_model_after_smart_routing","onUpdate:modelValue":e[13]||(e[13]=T=>o.configFile.restore_model_after_smart_routing=T),onChange:e[14]||(e[14]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.restore_model_after_smart_routing]])]),g("div",dWn,[e[450]||(e[450]=g("label",{for:"smart_routing_router_model",class:"text-sm font-bold w-64"},"Router Model:",-1)),J(g("input",{type:"text",id:"smart_routing_router_model","onUpdate:modelValue":e[15]||(e[15]=T=>o.configFile.smart_routing_router_model=T),onChange:e[16]||(e[16]=T=>i.settingsChanged=!0),class:"flex-grow mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.smart_routing_router_model]])]),g("div",fWn,[e[451]||(e[451]=g("label",{for:"smart_routing_models_description",class:"text-sm font-bold w-64 mt-1"},"Models with description:",-1)),oe(s,{modelValue:o.configFile.smart_routing_models_description,"onUpdate:modelValue":e[17]||(e[17]=T=>o.configFile.smart_routing_models_description=T),onChange:e[18]||(e[18]=T=>i.settingsChanged=!0),"key-name":"Model Path","value-name":"Model description",placeholder:"Enter model name",class:"flex-grow"},null,8,["modelValue"])])])])]),_:1})])],2)]),g("div",pWn,[g("div",hWn,[g("button",{onClick:e[19]||(e[19]=he(T=>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"},[J(g("div",null,e[452]||(e[452]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.mainconf_collapsed]]),J(g("div",null,e[453]||(e[453]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.mainconf_collapsed]]),e[454]||(e[454]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1))])]),g("div",{class:je([{hidden:i.mainconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",TWn,[oe(a,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",mWn,[g("div",gWn,[e[459]||(e[459]=g("h3",{class:"font-bold text-lg text-gray-800 dark:text-gray-200 mb-4"},"User Information",-1)),g("div",_Wn,[g("div",QWn,[e[455]||(e[455]=g("div",{class:"setting-label w-64"},[g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Username:")],-1)),J(g("input",{type:"text","onUpdate:modelValue":e[20]||(e[20]=T=>o.configFile.user_name=T),onChange:e[21]||(e[21]=T=>i.settingsChanged=!0),class:"flex-1 px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-blue-500"},null,544),[[we,o.configFile.user_name]])]),g("div",vWn,[e[456]||(e[456]=g("div",{class:"setting-label w-64"},[g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"User Description:")],-1)),J(g("textarea",{"onUpdate:modelValue":e[22]||(e[22]=T=>o.configFile.user_description=T),onChange:e[23]||(e[23]=T=>i.settingsChanged=!0),class:"flex-1 px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-blue-500",rows:"3"}," ",544),[[we,o.configFile.user_description]])]),g("div",yWn,[e[458]||(e[458]=g("div",{class:"setting-label w-64"},[g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"User Avatar:")],-1)),g("div",bWn,[g("label",EWn,[g("img",{src:o.configFile.user_avatar?`/user_infos/${o.configFile.user_avatar}`:t.defaultAvatar,class:"w-12 h-12 rounded-full object-cover border-2 border-gray-300 hover:border-blue-500 transition-all"},null,8,xWn)]),g("input",{type:"file",id:"avatar-upload",class:"hidden",onChange:e[24]||(e[24]=(...T)=>o.uploadAvatar&&o.uploadAvatar(...T))},null,32),g("button",{onClick:e[25]||(e[25]=he(T=>o.resetAvatar(),["stop"])),class:"text-gray-500 hover:text-red-600 p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-all",title:"Remove avatar"},e[457]||(e[457]=[g("i",{"data-feather":"x"},null,-1)]))])])])]),g("div",SWn,[e[466]||(e[466]=g("h3",{class:"font-bold text-lg text-gray-800 dark:text-gray-200 mb-4"},"Discussion Settings",-1)),g("div",LWn,[g("div",CWn,[e[461]||(e[461]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Use username in discussions",-1)),g("div",AWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[26]||(e[26]=T=>o.configFile.use_user_name_in_discussions=T),onChange:e[27]||(e[27]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.use_user_name_in_discussions]]),e[460]||(e[460]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",wWn,[e[463]||(e[463]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Use model name in discussions",-1)),g("div",MWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[28]||(e[28]=T=>o.configFile.use_model_name_in_discussions=T),onChange:e[29]||(e[29]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.use_model_name_in_discussions]]),e[462]||(e[462]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",OWn,[e[465]||(e[465]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Use user information in discussions",-1)),g("div",RWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[30]||(e[30]=T=>o.configFile.use_user_informations_in_discussion=T),onChange:e[31]||(e[31]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.use_user_informations_in_discussion]]),e[464]||(e[464]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])])])]),g("div",NWn,[e[473]||(e[473]=g("h3",{class:"font-bold text-lg text-gray-800 dark:text-gray-200 mb-4"},"Debug Settings",-1)),g("div",DWn,[g("div",IWn,[e[468]||(e[468]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Enable Debug Mode",-1)),g("div",kWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[32]||(e[32]=T=>o.configFile.debug=T),onChange:e[33]||(e[33]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.debug]]),e[467]||(e[467]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",PWn,[e[470]||(e[470]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Show Final Full Prompt",-1)),g("div",HWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[34]||(e[34]=T=>o.configFile.debug_show_final_full_prompt=T),onChange:e[35]||(e[35]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.debug_show_final_full_prompt]]),e[469]||(e[469]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",VWn,[e[472]||(e[472]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Show Chunks",-1)),g("div",BWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[36]||(e[36]=T=>o.configFile.debug_show_chunks=T),onChange:e[37]||(e[37]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.debug_show_chunks]]),e[471]||(e[471]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])])])]),g("div",FWn,[e[484]||(e[484]=g("h3",{class:"font-bold text-lg text-gray-800 dark:text-gray-200 mb-4"},"Auto-sync Settings",-1)),g("div",$Wn,[g("div",UWn,[e[475]||(e[475]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Auto Update",-1)),g("div",GWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[38]||(e[38]=T=>o.configFile.auto_update=T),onChange:e[39]||(e[39]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.auto_update]]),e[474]||(e[474]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",qWn,[e[477]||(e[477]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Auto Sync Personalities",-1)),g("div",zWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[40]||(e[40]=T=>o.configFile.auto_sync_personalities=T),onChange:e[41]||(e[41]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.auto_sync_personalities]]),e[476]||(e[476]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",jWn,[e[479]||(e[479]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Auto Sync Extensions",-1)),g("div",WWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[42]||(e[42]=T=>o.configFile.auto_sync_extensions=T),onChange:e[43]||(e[43]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.auto_sync_extensions]]),e[478]||(e[478]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",YWn,[e[481]||(e[481]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Auto Sync Bindings",-1)),g("div",KWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[44]||(e[44]=T=>o.configFile.auto_sync_bindings=T),onChange:e[45]||(e[45]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.auto_sync_bindings]]),e[480]||(e[480]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",ZWn,[e[483]||(e[483]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Auto Sync Models",-1)),g("div",XWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[46]||(e[46]=T=>o.configFile.auto_sync_models=T),onChange:e[47]||(e[47]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.auto_sync_models]]),e[482]||(e[482]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])])])])])]),_:1}),oe(a,{title:"Model template",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",JWn,[g("div",eYn,[e[486]||(e[486]=g("label",{class:"text-sm font-semibold text-gray-700 dark:text-gray-300"},"Template Type",-1)),g("select",{onChange:e[48]||(e[48]=(...T)=>o.handleTemplateSelection&&o.handleTemplateSelection(...T)),class:"form-select w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},e[485]||(e[485]=[g("option",{value:"lollms"},"Lollms communication template",-1),g("option",{value:"lollms_simplified"},"Lollms simplified communication template",-1),g("option",{value:"bare"},"Bare, useful when in chat mode",-1),g("option",{value:"llama3"},"LLama3 communication template",-1),g("option",{value:"mistral"},"Mistral communication template",-1),g("option",{value:"deepseek"},"DeepSeek communication template",-1)]),32)]),g("div",tYn,[g("div",nYn,[e[487]||(e[487]=g("label",{for:"start_header_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," Start Header Template ",-1)),J(g("input",{type:"text",id:"start_header_id_template","onUpdate:modelValue":e[49]||(e[49]=T=>o.configFile.start_header_id_template=T),onChange:e[50]||(e[50]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.start_header_id_template]])]),g("div",rYn,[e[488]||(e[488]=g("label",{for:"end_header_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," End Header Template ",-1)),J(g("input",{type:"text",id:"end_header_id_template","onUpdate:modelValue":e[51]||(e[51]=T=>o.configFile.end_header_id_template=T),onChange:e[52]||(e[52]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.end_header_id_template]])])]),g("div",iYn,[g("div",oYn,[e[489]||(e[489]=g("label",{for:"start_user_header_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," Start User Header Template ",-1)),J(g("input",{type:"text",id:"start_user_header_id_template","onUpdate:modelValue":e[53]||(e[53]=T=>o.configFile.start_user_header_id_template=T),onChange:e[54]||(e[54]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.start_user_header_id_template]])]),g("div",sYn,[e[490]||(e[490]=g("label",{for:"end_user_header_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," End User Header Template ",-1)),J(g("input",{type:"text",id:"end_user_header_id_template","onUpdate:modelValue":e[55]||(e[55]=T=>o.configFile.end_user_header_id_template=T),onChange:e[56]||(e[56]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.end_user_header_id_template]])])]),g("div",aYn,[g("div",lYn,[e[491]||(e[491]=g("label",{for:"start_ai_header_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," Start AI Header Template ",-1)),J(g("input",{type:"text",id:"start_ai_header_id_template","onUpdate:modelValue":e[57]||(e[57]=T=>o.configFile.start_ai_header_id_template=T),onChange:e[58]||(e[58]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.start_ai_header_id_template]])]),g("div",cYn,[e[492]||(e[492]=g("label",{for:"end_ai_header_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," End AI Header Template ",-1)),J(g("input",{type:"text",id:"end_ai_header_id_template","onUpdate:modelValue":e[59]||(e[59]=T=>o.configFile.end_ai_header_id_template=T),onChange:e[60]||(e[60]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.end_ai_header_id_template]])])]),g("div",uYn,[g("div",dYn,[e[493]||(e[493]=g("label",{for:"end_user_message_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," End User Message Template ",-1)),J(g("input",{type:"text",id:"end_user_message_id_template","onUpdate:modelValue":e[61]||(e[61]=T=>o.configFile.end_user_message_id_template=T),onChange:e[62]||(e[62]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.end_user_message_id_template]])]),g("div",fYn,[e[494]||(e[494]=g("label",{for:"end_ai_message_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," End AI Message Template ",-1)),J(g("input",{type:"text",id:"end_ai_message_id_template","onUpdate:modelValue":e[63]||(e[63]=T=>o.configFile.end_ai_message_id_template=T),onChange:e[64]||(e[64]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.end_ai_message_id_template]])])]),g("div",pYn,[e[495]||(e[495]=g("label",{for:"separator_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," Separator Template ",-1)),J(g("textarea",{id:"separator_template","onUpdate:modelValue":e[65]||(e[65]=T=>o.configFile.separator_template=T),onChange:e[66]||(e[66]=T=>i.settingsChanged=!0),class:"w-full h-24 rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"}," ",544),[[we,o.configFile.separator_template]])]),g("div",hYn,[e[496]||(e[496]=g("label",{for:"system_message_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," System Template ",-1)),J(g("input",{type:"text",id:"system_message_template","onUpdate:modelValue":e[67]||(e[67]=T=>o.configFile.system_message_template=T),onChange:e[68]||(e[68]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.system_message_template]])]),g("div",TYn,[e[497]||(e[497]=g("label",{class:"text-sm font-semibold text-gray-700 dark:text-gray-300"},"Full Template Preview",-1)),g("div",mYn,[g("div",{innerHTML:o.full_template},null,8,gYn)])]),g("div",_Yn,[e[499]||(e[499]=g("label",{for:"use_continue_message",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," Use Continue Message ",-1)),g("div",QYn,[J(g("input",{type:"checkbox",id:"use_continue_message","onUpdate:modelValue":e[69]||(e[69]=T=>o.configFile.use_continue_message=T),onChange:e[70]||(e[70]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"},null,544),[[ut,o.configFile.use_continue_message]]),e[498]||(e[498]=g("label",{for:"use_continue_message",class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])])])]),_:1}),oe(a,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",vYn,[g("div",yYn,[e[500]||(e[500]=g("label",{for:"user_name",class:"text-sm font-bold text-gray-700 dark:text-gray-200 min-w-[200px]"}," User Name ",-1)),J(g("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[71]||(e[71]=T=>o.configFile.user_name=T),onChange:e[72]||(e[72]=T=>i.settingsChanged=!0),class:"flex-1 px-4 py-2 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.user_name]])]),g("div",bYn,[e[501]||(e[501]=g("label",{for:"user_description",class:"text-sm font-bold text-gray-700 dark:text-gray-200 min-w-[200px]"}," User Description ",-1)),J(g("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[73]||(e[73]=T=>o.configFile.user_description=T),onChange:e[74]||(e[74]=T=>i.settingsChanged=!0),class:"flex-1 h-[300px] px-4 py-2 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500 dark:text-white resize-none"},null,544),[[we,o.configFile.user_description]])]),g("div",EYn,[g("div",xYn,[e[505]||(e[505]=g("label",{class:"text-sm font-bold text-gray-700 dark:text-gray-200 min-w-[200px]"}," Discussion Settings ",-1)),g("div",SYn,[g("label",LYn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[75]||(e[75]=T=>o.configFile.use_user_informations_in_discussion=T),onChange:e[76]||(e[76]=T=>i.settingsChanged=!0),class:"w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:bg-gray-600"},null,544),[[ut,o.configFile.use_user_informations_in_discussion]]),e[502]||(e[502]=g("span",{class:"text-sm text-gray-700 dark:text-gray-200"},"Use user description in discussion",-1))]),g("label",CYn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[77]||(e[77]=T=>o.configFile.use_model_name_in_discussions=T),onChange:e[78]||(e[78]=T=>i.settingsChanged=!0),class:"w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:bg-gray-600"},null,544),[[ut,o.configFile.use_model_name_in_discussions]]),e[503]||(e[503]=g("span",{class:"text-sm text-gray-700 dark:text-gray-200"},"Use model name in discussion",-1))]),g("label",AYn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[79]||(e[79]=T=>o.configFile.use_user_name_in_discussions=T),onChange:e[80]||(e[80]=T=>i.settingsChanged=!0),class:"w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:bg-gray-600"},null,544),[[ut,o.configFile.use_user_name_in_discussions]]),e[504]||(e[504]=g("span",{class:"text-sm text-gray-700 dark:text-gray-200"},"Use User Name in discussions",-1))])])])]),g("div",wYn,[e[507]||(e[507]=g("label",{class:"text-sm font-bold text-gray-700 dark:text-gray-200 min-w-[200px]"}," User Avatar ",-1)),g("div",MYn,[g("label",OYn,[g("img",{src:o.configFile.user_avatar!=null&&o.configFile.user_avatar!=""?"/user_infos/"+o.configFile.user_avatar:i.storeLogo,class:"w-16 h-16 rounded-full object-cover border-2 border-gray-300 hover:border-blue-500"},null,8,RYn)]),g("input",{type:"file",id:"avatar-upload",class:"hidden",onChange:e[81]||(e[81]=(...T)=>o.uploadAvatar&&o.uploadAvatar(...T))},null,32),g("button",{onClick:e[82]||(e[82]=he(T=>o.resetAvatar(),["stop"])),class:"p-2 text-gray-500 hover:text-red-500 transition-colors duration-200",title:"Remove avatar"},e[506]||(e[506]=[g("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)]))])]),g("div",NYn,[g("div",DYn,[e[508]||(e[508]=g("label",{for:"max_n_predict",class:"text-sm font-bold text-gray-700 dark:text-gray-200 min-w-[200px]"}," Maximum Token Space ",-1)),J(g("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[83]||(e[83]=T=>o.configFile.max_n_predict=T),onChange:e[84]||(e[84]=T=>i.settingsChanged=!0),class:"flex-1 px-4 py-2 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.max_n_predict]])]),g("div",IYn,[e[509]||(e[509]=g("label",{for:"min_n_predict",class:"text-sm font-bold text-gray-700 dark:text-gray-200 min-w-[200px]"}," Minimum Token Space ",-1)),J(g("input",{type:"number",id:"min_n_predict",required:"","onUpdate:modelValue":e[85]||(e[85]=T=>o.configFile.min_n_predict=T),onChange:e[86]||(e[86]=T=>i.settingsChanged=!0),class:"flex-1 px-4 py-2 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.min_n_predict]])])])])]),_:1}),oe(a,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",kYn,[g("div",PYn,[e[510]||(e[510]=g("label",{for:"turn_on_code_execution",class:"text-sm font-medium text-gray-700 dark:text-gray-200"}," Turn on code execution ",-1)),g("div",HYn,[J(g("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[87]||(e[87]=T=>o.configFile.turn_on_code_execution=T),onChange:e[88]||(e[88]=T=>i.settingsChanged=!0),class:"toggle-checkbox"},null,544),[[ut,o.configFile.turn_on_code_execution]])])]),g("div",VYn,[e[511]||(e[511]=g("label",{for:"turn_on_code_validation",class:"text-sm font-medium text-gray-700 dark:text-gray-200"},[nt(" Turn on code validation "),g("span",{class:"block text-xs text-gray-500 dark:text-gray-400"},"Very recommended for security reasons")],-1)),g("div",BYn,[J(g("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[89]||(e[89]=T=>o.configFile.turn_on_code_validation=T),onChange:e[90]||(e[90]=T=>i.settingsChanged=!0),class:"toggle-checkbox"},null,544),[[ut,o.configFile.turn_on_code_validation]])])]),g("div",FYn,[e[512]||(e[512]=g("label",{for:"turn_on_setting_update_validation",class:"text-sm font-medium text-gray-700 dark:text-gray-200"},[nt(" Turn on apply settings validation "),g("span",{class:"block text-xs text-gray-500 dark:text-gray-400"},"Very recommended for security reasons")],-1)),g("div",$Yn,[J(g("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[91]||(e[91]=T=>o.configFile.turn_on_setting_update_validation=T),onChange:e[92]||(e[92]=T=>i.settingsChanged=!0),class:"toggle-checkbox"},null,544),[[ut,o.configFile.turn_on_setting_update_validation]])])]),g("div",UYn,[e[513]||(e[513]=g("label",{for:"turn_on_open_file_validation",class:"text-sm font-medium text-gray-700 dark:text-gray-200"}," Turn on open file/folder validation ",-1)),g("div",GYn,[J(g("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[93]||(e[93]=T=>o.configFile.turn_on_open_file_validation=T),onChange:e[94]||(e[94]=T=>i.settingsChanged=!0),class:"toggle-checkbox"},null,544),[[ut,o.configFile.turn_on_open_file_validation]])])]),g("div",qYn,[e[514]||(e[514]=g("label",{for:"turn_on_send_file_validation",class:"text-sm font-medium text-gray-700 dark:text-gray-200"}," Turn on send file validation ",-1)),g("div",zYn,[J(g("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[95]||(e[95]=T=>o.configFile.turn_on_send_file_validation=T),onChange:e[96]||(e[96]=T=>i.settingsChanged=!0),class:"toggle-checkbox"},null,544),[[ut,o.configFile.turn_on_send_file_validation]])])])])]),_:1}),oe(a,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",jYn,[g("div",WYn,[e[516]||(e[516]=g("label",{for:"activate_skills_lib",class:"text-sm font-bold text-gray-900 dark:text-white min-w-[200px]"}," Activate Skills library: ",-1)),g("div",YYn,[g("label",KYn,[J(g("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[97]||(e[97]=T=>o.configFile.activate_skills_lib=T),onChange:e[98]||(e[98]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.activate_skills_lib]]),e[515]||(e[515]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-600 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),g("div",ZYn,[e[517]||(e[517]=g("label",{for:"skills_lib_database_name",class:"text-sm font-bold text-gray-900 dark:text-white min-w-[200px]"}," Skills library database name: ",-1)),g("div",XYn,[J(g("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[99]||(e[99]=T=>o.configFile.skills_lib_database_name=T),onChange:e[100]||(e[100]=T=>i.settingsChanged=!0),class:"w-full px-3 py-2 bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-blue-500 dark:focus:border-blue-500 text-gray-900 dark:text-white transition-colors duration-200",placeholder:"Enter database name"},null,544),[[we,o.configFile.skills_lib_database_name]])])])])]),_:1}),oe(a,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",JYn,[g("div",eKn,[e[518]||(e[518]=g("div",{class:"min-w-[200px]"},[g("label",{for:"pdf_latex_path",class:"block text-sm font-semibold text-gray-700 dark:text-gray-200"}," PDF LaTeX Path: ")],-1)),g("div",tKn,[J(g("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[101]||(e[101]=T=>o.configFile.pdf_latex_path=T),onChange:e[102]||(e[102]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 text-sm bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:text-white dark:placeholder-gray-400 transition-colors duration-200",placeholder:"Enter PDF LaTeX path..."},null,544),[[we,o.configFile.pdf_latex_path]])])])])]),_:1}),oe(a,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",nKn,[g("div",rKn,[g("div",iKn,[e[519]||(e[519]=g("label",{for:"positive_boost",class:"text-sm font-bold text-gray-700 dark:text-gray-200"}," Positive Boost ",-1)),g("div",oKn,[J(g("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[103]||(e[103]=T=>o.configFile.positive_boost=T),onChange:e[104]||(e[104]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-600 dark:border-gray-500 dark:text-white transition-all duration-200"},null,544),[[we,o.configFile.positive_boost]])])])]),g("div",sKn,[g("div",aKn,[e[520]||(e[520]=g("label",{for:"negative_boost",class:"text-sm font-bold text-gray-700 dark:text-gray-200"}," Negative Boost ",-1)),g("div",lKn,[J(g("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[105]||(e[105]=T=>o.configFile.negative_boost=T),onChange:e[106]||(e[106]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-600 dark:border-gray-500 dark:text-white transition-all duration-200"},null,544),[[we,o.configFile.negative_boost]])])])]),g("div",cKn,[g("div",uKn,[e[522]||(e[522]=g("label",{for:"fun_mode",class:"text-sm font-bold text-gray-700 dark:text-gray-200"}," Fun Mode ",-1)),g("div",dKn,[g("label",fKn,[J(g("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[107]||(e[107]=T=>o.configFile.fun_mode=T),onChange:e[108]||(e[108]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.fun_mode]]),e[521]||(e[521]=g("div",{class:"relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])])])])]),_:1})])],2)]),g("div",pKn,[g("div",hKn,[g("button",{onClick:e[109]||(e[109]=he(T=>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"},[J(g("div",null,e[523]||(e[523]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.data_conf_collapsed]]),J(g("div",null,e[524]||(e[524]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.data_conf_collapsed]]),e[525]||(e[525]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1))])]),g("div",{class:je([{hidden:i.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[oe(a,{title:"Data Lakes",is_subcard:!0,class:"p-4 m-2"},{default:He(()=>[g("div",TKn,[e[536]||(e[536]=g("div",{class:"flex items-center mb-4"},[g("h3",{class:"text-lg font-semibold dark:text-white"},"Data Lakes Configuration")],-1)),g("div",mKn,[(k(!0),H(Ue,null,ot(o.configFile.datalakes,(T,Q)=>(k(),H("div",{key:Q,class:"p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"},[g("div",gKn,[g("div",_Kn,[e[526]||(e[526]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Data Lake Alias",-1)),g("input",{type:"text",value:o.getDataLakeAlias(Q),onInput:_=>o.updateAlias(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter alias"},null,40,QKn)]),g("div",vKn,[e[528]||(e[528]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Type",-1)),g("select",{required:"",value:o.getDataLakeType(Q),onInput:_=>o.updateDatabaseType(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"},e[527]||(e[527]=[g("option",{value:"lollmsvectordb"},"Lollms VectorDB Folder",-1),g("option",{value:"lightrag"},"Light Rag",-1),g("option",{value:"elasticdsearch"},"Elastic Search",-1)]),40,yKn)]),g("div",bKn,[g("label",EKn,le(T.type==="lightrag"?"DataLake URL":"DataLake Path"),1),T.type==="lightrag"?(k(),H("input",{key:0,type:"text",value:o.getDataLakeUrl(Q),onInput:_=>o.updateDataLakeUrl(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter DataLake URL"},null,40,xKn)):re("",!0),T.type==="lollmsvectordb"?(k(),H("input",{key:1,type:"text",value:o.getDataLakePath(Q),onInput:_=>o.updateDataLakePath(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter DataLake Path"},null,40,SKn)):re("",!0)]),T.type==="lightrag"?(k(),H("div",LKn,[e[529]||(e[529]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"API Key",-1)),g("input",{type:"text",value:o.getDataLakeKey(Q),onInput:_=>o.updateDatabaseKey(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter API key"},null,40,CKn)])):re("",!0)]),g("div",AKn,[g("div",wKn,[g("label",MKn,[g("input",{type:"checkbox",checked:o.getDataLakeStatus(Q),onChange:_=>o.updateMounted(Q,_.target.checked),class:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500"},null,40,OKn),e[530]||(e[530]=g("span",{class:"text-sm font-medium text-gray-700 dark:text-gray-300"},"Mounted",-1))]),T.type==="lollmsvectordb"?(k(),H("div",RKn,[g("button",{onClick:_=>o.vectorize_folder(Q),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-green-600 rounded-md hover:bg-green-700 focus:ring-2 focus:ring-offset-2 focus:ring-green-500",title:"Vectorize or re-vectorize the selected folder"},e[531]||(e[531]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("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),nt(" Vectorize ")]),8,NKn),g("button",{onClick:_=>o.select_folder(Q),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",title:"Select a folder as data source"},e[532]||(e[532]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1),nt(" Select Folder ")]),8,DKn)])):re("",!0),g("div",IKn,[g("input",{type:"file",ref_for:!0,ref:"fileInput",onChange:e[110]||(e[110]=(..._)=>o.handleFileUpload&&o.handleFileUpload(..._)),accept:".pdf,.txt,.doc,.docx,.csv,.md",class:"hidden",multiple:""},null,544),g("button",{onClick:e[111]||(e[111]=(..._)=>o.triggerFileInput&&o.triggerFileInput(..._)),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-green-600 rounded-md hover:bg-green-700 focus:ring-2 focus:ring-offset-2 focus:ring-green-500"},e[533]||(e[533]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1),nt(" Upload Files ")]))])]),g("button",{onClick:_=>o.removeDataLake(Q),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-red-600 rounded-md hover:bg-red-700 focus:ring-2 focus:ring-offset-2 focus:ring-red-500"},e[534]||(e[534]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("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),nt(" Remove Data Lake ")]),8,kKn)])]))),128))]),g("button",{onClick:e[112]||(e[112]=(...T)=>o.addDataLake&&o.addDataLake(...T)),class:"inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},e[535]||(e[535]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),nt(" Add New Data Lake ")]))])]),_:1}),oe(a,{title:"Data Servers",is_subcard:!0,class:"p-4 m-2"},{default:He(()=>[g("div",PKn,[e[547]||(e[547]=g("div",{class:"flex items-center mb-4"},[g("h3",{class:"text-lg font-semibold dark:text-white"},"Database Servers")],-1)),g("div",HKn,[(k(!0),H(Ue,null,ot(o.configFile.rag_local_services,(T,Q)=>(k(),H("div",{key:Q,class:"p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"},[g("div",VKn,[g("div",BKn,[e[537]||(e[537]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Database Alias",-1)),g("input",{type:"text",value:o.getServedDatabaseAlias(Q),onInput:_=>o.updateAlias(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter alias"},null,40,FKn)]),g("div",$Kn,[e[539]||(e[539]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Type",-1)),g("select",{required:"",value:o.getServedDatabaseType(Q),onInput:_=>o.updateDatabaseType(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"},e[538]||(e[538]=[g("option",{value:"lightrag"},"Light Rag",-1),g("option",{value:"elasticdsearch"},"Elastic Search",-1)]),40,UKn)]),g("div",GKn,[e[540]||(e[540]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Database URL",-1)),g("input",{type:"text",value:o.getServedDatabaseUrl(Q),onInput:_=>o.updateDataLakeUrl(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter database URL"},null,40,qKn)]),g("div",zKn,[e[541]||(e[541]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"API Key",-1)),g("input",{type:"text",value:o.getServedDatabaseKey(Q),onInput:_=>o.updateDatabaseKey(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter API key"},null,40,jKn)])]),g("div",WKn,[g("div",YKn,[g("div",KKn,[e[543]||(e[543]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Start at Startup",-1)),g("div",ZKn,[J(g("input",{type:"checkbox","onUpdate:modelValue":_=>o.configFile.rag_local_services[Q].start_at_startup=_,onChange:e[113]||(e[113]=_=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,40,XKn),[[ut,o.configFile.rag_local_services[Q].start_at_startup]]),e[542]||(e[542]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("input",{type:"file",ref_for:!0,ref:"fileInput",onChange:e[114]||(e[114]=(..._)=>o.handleFileUpload&&o.handleFileUpload(..._)),accept:".pdf,.txt,.doc,.docx,.csv,.md",class:"hidden",multiple:""},null,544),g("button",{onClick:e[115]||(e[115]=(..._)=>o.triggerFileInput&&o.triggerFileInput(..._)),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-green-600 rounded-md hover:bg-green-700 focus:ring-2 focus:ring-offset-2 focus:ring-green-500"},e[544]||(e[544]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1),nt(" Upload Files ")]))]),g("button",{onClick:_=>o.removeServedDataBase(Q),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-red-600 rounded-md hover:bg-red-700 focus:ring-2 focus:ring-offset-2 focus:ring-red-500"},e[545]||(e[545]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("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),nt(" Remove Database ")]),8,JKn)])]))),128))]),g("button",{onClick:e[116]||(e[116]=(...T)=>o.addDatabaseService&&o.addDatabaseService(...T)),class:"inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},e[546]||(e[546]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),nt(" Add New Database Server ")]))])]),_:1}),oe(a,{title:"LollmsVectordb Configuration",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",eZn,[g("div",tZn,[e[549]||(e[549]=g("label",{for:"rag_vectorizer",class:"text-sm font-bold w-64"},"RAG Vectorizer:",-1)),J(g("select",{id:"rag_vectorizer",required:"","onUpdate:modelValue":e[117]||(e[117]=T=>o.configFile.rag_vectorizer=T),onChange:e[118]||(e[118]=T=>i.settingsChanged=!0),class:"flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500"},e[548]||(e[548]=[g("option",{value:"semantic"},"Semantic Vectorizer",-1),g("option",{value:"tfidf"},"TFIDF Vectorizer",-1),g("option",{value:"openai"},"OpenAI Vectorizer",-1),g("option",{value:"ollama"},"Ollama Vectorizer",-1)]),544),[[pn,o.configFile.rag_vectorizer]])]),g("div",nZn,[e[550]||(e[550]=g("label",{class:"text-sm font-bold w-64"},"Allow executing remote code:",-1)),g("div",rZn,[g("label",iZn,[J(g("input",{"onUpdate:modelValue":e[119]||(e[119]=T=>o.configFile.rag_vectorizer_execute_remote_code=T),type:"checkbox",onChange:e[120]||(e[120]=T=>i.settingsChanged=!0),class:"w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:bg-gray-600"},null,544),[[ut,o.configFile.rag_vectorizer_execute_remote_code]])])])]),g("div",oZn,[e[554]||(e[554]=g("label",{class:"text-sm font-bold w-64 pt-2"},"RAG Vectorizer model:",-1)),g("div",sZn,[J(g("select",{id:"rag_vectorizer_model",required:"","onUpdate:modelValue":e[121]||(e[121]=T=>o.configFile.rag_vectorizer_model=T),onChange:e[122]||(e[122]=T=>i.settingsChanged=!0),class:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500",disabled:o.configFile.rag_vectorizer==="tfidf"},[o.configFile.rag_vectorizer==="semantic"?(k(),H("optgroup",lZn,e[551]||(e[551]=[g("option",{value:"BAAI/bge-m3"},"BAAI/bge-m3",-1),g("option",{value:"nvidia/NV-Embed-v2"},"nvidia/NV-Embed-v2",-1),g("option",{value:"sentence-transformers/all-MiniLM-L6-v2"},"sentence-transformers/all-MiniLM-L6-v2",-1),g("option",{value:"sentence-transformers/all-MiniLM-L12-v2"},"sentence-transformers/all-MiniLM-L12-v2",-1),g("option",{value:"sentence-transformers/all-distilroberta-v1"},"sentence-transformers/all-distilroberta-v1",-1),g("option",{value:"sentence-transformers/all-mpnet-base-v2"},"sentence-transformers/all-mpnet-base-v2",-1)]))):re("",!0),o.configFile.rag_vectorizer==="openai"?(k(),H("optgroup",cZn,e[552]||(e[552]=[g("option",{value:"text-embedding-ada-002"},"text-embedding-ada-002",-1),g("option",{value:"text-embedding-babbage-001"},"text-embedding-babbage-001",-1),g("option",{value:"text-embedding-curie-001"},"text-embedding-curie-001",-1),g("option",{value:"text-embedding-davinci-001"},"text-embedding-davinci-001",-1)]))):re("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),H("optgroup",uZn,e[553]||(e[553]=[g("option",{value:"bge-m3"},"bge-m3",-1),g("option",{value:"NV-Embed-v2"},"nvidia/NV-Embed-v2",-1),g("option",{value:"nomic-embed-text"},"nomic-embed-text",-1),g("option",{value:"mxbai-embed-large"},"mxbai-embed-large",-1),g("option",{value:"snowflake-arctic-embed"},"snowflake-arctic-embed",-1),g("option",{value:"all-minilm"},"all-minilm",-1),g("option",{value:"bge-large"},"bge-large",-1)]))):re("",!0),o.configFile.rag_vectorizer==="tfidf"?(k(),H("option",dZn,"No models available for TFIDF")):re("",!0)],40,aZn),[[pn,o.configFile.rag_vectorizer_model]]),J(g("input",{"onUpdate:modelValue":e[123]||(e[123]=T=>o.configFile.rag_vectorizer_model=T),class:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500"},null,512),[[we,o.configFile.rag_vectorizer_model]])])]),g("div",fZn,[e[555]||(e[555]=g("label",{class:"text-sm font-bold w-64 pt-2"},"RAG server address:",-1)),o.configFile.rag_vectorizer==="ollama"?J((k(),H("input",{key:0,"onUpdate:modelValue":e[124]||(e[124]=T=>o.configFile.rag_service_url=T),class:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500"},null,512)),[[we,o.configFile.rag_service_url]]):re("",!0)]),g("div",pZn,[g("div",hZn,[e[556]||(e[556]=g("label",{class:"text-sm font-bold w-64"},"RAG chunk size:",-1)),g("div",TZn,[J(g("input",{id:"rag_chunk_size","onUpdate:modelValue":e[125]||(e[125]=T=>o.configFile.rag_chunk_size=T),onChange:e[126]||(e[126]=T=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-600"},null,544),[[we,o.configFile.rag_chunk_size]]),J(g("input",{"onUpdate:modelValue":e[127]||(e[127]=T=>o.configFile.rag_chunk_size=T),type:"number",onChange:e[128]||(e[128]=T=>i.settingsChanged=!0),class:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500"},null,544),[[we,o.configFile.rag_chunk_size]])])])]),g("div",mZn,[g("div",gZn,[e[557]||(e[557]=g("label",{class:"text-sm font-bold w-64"},"Clean chunks:",-1)),g("div",_Zn,[g("label",QZn,[J(g("input",{"onUpdate:modelValue":e[129]||(e[129]=T=>o.configFile.rag_clean_chunks=T),type:"checkbox",onChange:e[130]||(e[130]=T=>i.settingsChanged=!0),class:"w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:bg-gray-600"},null,544),[[ut,o.configFile.rag_clean_chunks]])])])])])])]),_:1}),oe(a,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",vZn,[g("div",yZn,[e[559]||(e[559]=g("div",{class:"flex-grow"},[g("label",{for:"rag_build_keys_words",class:"font-medium text-gray-700 dark:text-gray-200"},[nt(" Reformulate prompt before querying database "),g("span",{class:"text-sm text-gray-500 dark:text-gray-400 block mt-1"}," (Recommended for better search results) ")])],-1)),g("div",bZn,[g("label",EZn,[J(g("input",{type:"checkbox",id:"rag_build_keys_words","onUpdate:modelValue":e[131]||(e[131]=T=>o.configFile.rag_build_keys_words=T),onChange:e[132]||(e[132]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.rag_build_keys_words]]),e[558]||(e[558]=g("div",{class:"w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),g("div",xZn,[e[561]||(e[561]=g("div",{class:"flex-grow"},[g("label",{for:"rag_put_chunk_informations_into_context",class:"font-medium text-gray-700 dark:text-gray-200"}," Put Chunk Information Into Context ")],-1)),g("div",SZn,[g("label",LZn,[J(g("input",{type:"checkbox",id:"rag_put_chunk_informations_into_context","onUpdate:modelValue":e[133]||(e[133]=T=>o.configFile.rag_put_chunk_informations_into_context=T),onChange:e[134]||(e[134]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.rag_put_chunk_informations_into_context]]),e[560]||(e[560]=g("div",{class:"w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),g("div",CZn,[e[563]||(e[563]=g("div",{class:"flex-grow"},[g("label",{for:"data_vectorization_save_db",class:"font-medium text-gray-700 dark:text-gray-200"},[nt(" Save new files to database "),g("span",{class:"text-sm text-gray-500 dark:text-gray-400 block mt-1"}," Database will persist and grow across sessions ")])],-1)),g("div",AZn,[g("label",wZn,[J(g("input",{type:"checkbox",id:"data_vectorization_save_db","onUpdate:modelValue":e[135]||(e[135]=T=>o.configFile.data_vectorization_save_db=T),onChange:e[136]||(e[136]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.data_vectorization_save_db]]),e[562]||(e[562]=g("div",{class:"w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])])])]),_:1})],2)]),g("div",MZn,[g("div",OZn,[g("button",{onClick:e[137]||(e[137]=he(T=>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"},[J(g("div",null,e[564]||(e[564]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.internet_conf_collapsed]]),J(g("div",null,e[565]||(e[565]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.internet_conf_collapsed]]),e[566]||(e[566]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Internet",-1))])]),g("div",{class:je([{hidden:i.internet_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[oe(a,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",RZn,[g("div",NZn,[e[568]||(e[568]=g("label",{for:"activate_internet_search",class:"text-sm font-bold text-gray-900 dark:text-white"}," Activate automatic internet search ",-1)),g("label",DZn,[J(g("input",{type:"checkbox",id:"fun_mode","onUpdate:modelValue":e[138]||(e[138]=T=>o.configFile.activate_internet_search=T),onChange:e[139]||(e[139]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.activate_internet_search]]),e[567]||(e[567]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-600 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",IZn,[e[570]||(e[570]=g("label",{for:"activate_internet_pages_judgement",class:"text-sm font-bold text-gray-900 dark:text-white"}," Activate internet pages judgement ",-1)),g("label",kZn,[J(g("input",{type:"checkbox",id:"activate_internet_pages_judgement","onUpdate:modelValue":e[140]||(e[140]=T=>o.configFile.activate_internet_pages_judgement=T),onChange:e[141]||(e[141]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.activate_internet_pages_judgement]]),e[569]||(e[569]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-600 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",PZn,[e[572]||(e[572]=g("label",{for:"internet_quick_search",class:"text-sm font-bold text-gray-900 dark:text-white"}," Activate quick search ",-1)),g("label",HZn,[J(g("input",{type:"checkbox",id:"internet_quick_search","onUpdate:modelValue":e[142]||(e[142]=T=>o.configFile.internet_quick_search=T),onChange:e[143]||(e[143]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.internet_quick_search]]),e[571]||(e[571]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-600 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",VZn,[e[574]||(e[574]=g("label",{for:"internet_activate_search_decision",class:"text-sm font-bold text-gray-900 dark:text-white"}," Activate search decision ",-1)),g("label",BZn,[J(g("input",{type:"checkbox",id:"internet_activate_search_decision","onUpdate:modelValue":e[144]||(e[144]=T=>o.configFile.internet_activate_search_decision=T),onChange:e[145]||(e[145]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.internet_activate_search_decision]]),e[573]||(e[573]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-600 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",FZn,[g("div",$Zn,[e[575]||(e[575]=g("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold text-gray-900 dark:text-white"}," Internet vectorization chunk size ",-1)),g("div",UZn,[J(g("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[146]||(e[146]=T=>o.configFile.internet_vectorization_chunk_size=T),onChange:e[147]||(e[147]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-600"},null,544),[[we,o.configFile.internet_vectorization_chunk_size]]),J(g("input",{"onUpdate:modelValue":e[148]||(e[148]=T=>o.configFile.internet_vectorization_chunk_size=T),type:"number",onChange:e[149]||(e[149]=T=>i.settingsChanged=!0),class:"w-24 px-3 py-2 bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded-md text-sm"},null,544),[[we,o.configFile.internet_vectorization_chunk_size]])])]),g("div",GZn,[e[576]||(e[576]=g("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold text-gray-900 dark:text-white"}," Internet vectorization overlap size ",-1)),g("div",qZn,[J(g("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[150]||(e[150]=T=>o.configFile.internet_vectorization_overlap_size=T),onChange:e[151]||(e[151]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-600"},null,544),[[we,o.configFile.internet_vectorization_overlap_size]]),J(g("input",{"onUpdate:modelValue":e[152]||(e[152]=T=>o.configFile.internet_vectorization_overlap_size=T),type:"number",onChange:e[153]||(e[153]=T=>i.settingsChanged=!0),class:"w-24 px-3 py-2 bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded-md text-sm"},null,544),[[we,o.configFile.internet_vectorization_overlap_size]])])]),g("div",zZn,[e[577]||(e[577]=g("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold text-gray-900 dark:text-white"}," Internet vectorization number of chunks ",-1)),g("div",jZn,[J(g("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[154]||(e[154]=T=>o.configFile.internet_vectorization_nb_chunks=T),onChange:e[155]||(e[155]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-600"},null,544),[[we,o.configFile.internet_vectorization_nb_chunks]]),J(g("input",{"onUpdate:modelValue":e[156]||(e[156]=T=>o.configFile.internet_vectorization_nb_chunks=T),type:"number",onChange:e[157]||(e[157]=T=>i.settingsChanged=!0),class:"w-24 px-3 py-2 bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded-md text-sm"},null,544),[[we,o.configFile.internet_vectorization_nb_chunks]])])]),g("div",WZn,[e[578]||(e[578]=g("label",{for:"internet_nb_search_pages",class:"text-sm font-bold text-gray-900 dark:text-white"}," Internet number of search pages ",-1)),g("div",YZn,[J(g("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[158]||(e[158]=T=>o.configFile.internet_nb_search_pages=T),onChange:e[159]||(e[159]=T=>i.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-600"},null,544),[[we,o.configFile.internet_nb_search_pages]]),J(g("input",{"onUpdate:modelValue":e[160]||(e[160]=T=>o.configFile.internet_nb_search_pages=T),type:"number",onChange:e[161]||(e[161]=T=>i.settingsChanged=!0),class:"w-24 px-3 py-2 bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded-md text-sm"},null,544),[[we,o.configFile.internet_nb_search_pages]])])])])])]),_:1})],2)]),g("div",KZn,[g("div",ZZn,[g("button",{onClick:e[162]||(e[162]=he(T=>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"},[J(g("div",null,e[579]||(e[579]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.servers_conf_collapsed]]),J(g("div",null,e[580]||(e[580]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.servers_conf_collapsed]]),e[581]||(e[581]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Services Zoo",-1))])]),g("div",{class:je([{hidden:i.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[oe(a,{title:"Default services selection",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",XZn,[g("div",JZn,[e[583]||(e[583]=g("div",{class:"w-full md:w-1/3"},[g("label",{for:"active_tts_service",class:"block text-sm font-semibold text-gray-700 dark:text-gray-300",title:"Default Text to speech engine"}," Active TTS Service ")],-1)),g("div",eXn,[J(g("select",{id:"active_tts_service",required:"","onUpdate:modelValue":e[163]||(e[163]=T=>o.configFile.active_tts_service=T),onChange:e[164]||(e[164]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 rounded-lg border border-gray-300 bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-all duration-200"},e[582]||(e[582]=[g("option",{value:"None"},"None",-1),g("option",{value:"browser"},"Use Browser TTS (doesn't work in realtime mode)",-1),g("option",{value:"xtts"},"XTTS",-1),g("option",{value:"parler-tts"},"Parler-TTS",-1),g("option",{value:"openai_tts"},"Open AI TTS",-1),g("option",{value:"eleven_labs_tts"},"ElevenLabs TTS",-1),g("option",{value:"fish_tts"},"Fish TTS",-1)]),544),[[pn,o.configFile.active_tts_service]])])]),g("div",tXn,[e[585]||(e[585]=g("div",{class:"w-full md:w-1/3"},[g("label",{for:"active_stt_service",class:"block text-sm font-semibold text-gray-700 dark:text-gray-300",title:"Default Speech to Text engine"}," Active STT Service ")],-1)),g("div",nXn,[J(g("select",{id:"active_stt_service",required:"","onUpdate:modelValue":e[165]||(e[165]=T=>o.configFile.active_stt_service=T),onChange:e[166]||(e[166]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 rounded-lg border border-gray-300 bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-all duration-200"},e[584]||(e[584]=[g("option",{value:"None"},"None",-1),g("option",{value:"whisper"},"Whisper",-1),g("option",{value:"openai_whisper"},"Open AI Whisper",-1)]),544),[[pn,o.configFile.active_stt_service]])])]),g("div",rXn,[e[587]||(e[587]=g("div",{class:"w-full md:w-1/3"},[g("label",{for:"active_tti_service",class:"block text-sm font-semibold text-gray-700 dark:text-gray-300",title:"Default Text to image engine"}," Active TTI Service ")],-1)),g("div",iXn,[J(g("select",{id:"active_tti_service",required:"","onUpdate:modelValue":e[167]||(e[167]=T=>o.configFile.active_tti_service=T),onChange:e[168]||(e[168]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 rounded-lg border border-gray-300 bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-all duration-200"},e[586]||(e[586]=[g("option",{value:"None"},"None",-1),g("option",{value:"diffusers"},"Diffusers",-1),g("option",{value:"diffusers_client"},"Diffusers Client",-1),g("option",{value:"autosd"},"AUTO1111's SD",-1),g("option",{value:"dall-e"},"Open AI DALL-E",-1),g("option",{value:"midjourney"},"Midjourney",-1),g("option",{value:"comfyui"},"Comfyui",-1),g("option",{value:"fooocus"},"Fooocus",-1)]),544),[[pn,o.configFile.active_tti_service]])])]),g("div",oXn,[e[589]||(e[589]=g("div",{class:"w-full md:w-1/3"},[g("label",{for:"active_ttm_service",class:"block text-sm font-semibold text-gray-700 dark:text-gray-300",title:"Default Text to Music engine"}," Active TTM Service ")],-1)),g("div",sXn,[J(g("select",{id:"active_ttm_service",required:"","onUpdate:modelValue":e[169]||(e[169]=T=>o.configFile.active_ttm_service=T),onChange:e[170]||(e[170]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 rounded-lg border border-gray-300 bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-all duration-200"},e[588]||(e[588]=[g("option",{value:"None"},"None",-1),g("option",{value:"musicgen"},"Music Gen",-1)]),544),[[pn,o.configFile.active_ttm_service]])])]),g("div",aXn,[e[591]||(e[591]=g("div",{class:"w-full md:w-1/3"},[g("label",{for:"active_ttv_service",class:"block text-sm font-semibold text-gray-700 dark:text-gray-300",title:"Default Text to Video engine"}," Active TTV Service ")],-1)),g("div",lXn,[J(g("select",{id:"active_ttv_service",required:"","onUpdate:modelValue":e[171]||(e[171]=T=>o.configFile.active_ttv_service=T),onChange:e[172]||(e[172]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 rounded-lg border border-gray-300 bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-all duration-200"},e[590]||(e[590]=[g("option",{value:"None"},"None",-1),g("option",{value:"cog_video_x"},"Cog Video X",-1),g("option",{value:"diffusers"},"Diffusers",-1),g("option",{value:"lumalab"},"Lumalab",-1)]),544),[[pn,o.configFile.active_ttv_service]])])])])]),_:1}),oe(a,{title:"TTI settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",cXn,[g("div",uXn,[e[593]||(e[593]=g("div",{class:"w-1/3"},[g("label",{for:"use_negative_prompt",class:"text-sm font-semibold text-gray-700 dark:text-gray-200"}," Use negative prompt ")],-1)),g("div",dXn,[g("label",fXn,[J(g("input",{type:"checkbox",id:"use_negative_prompt","onUpdate:modelValue":e[173]||(e[173]=T=>o.configFile.use_negative_prompt=T),onChange:e[174]||(e[174]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.use_negative_prompt]]),e[592]||(e[592]=g("div",{class:"relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),g("div",pXn,[e[595]||(e[595]=g("div",{class:"w-1/3"},[g("label",{for:"use_ai_generated_negative_prompt",class:"text-sm font-semibold text-gray-700 dark:text-gray-200"}," Use AI generated negative prompt ")],-1)),g("div",hXn,[g("label",TXn,[J(g("input",{type:"checkbox",id:"use_ai_generated_negative_prompt","onUpdate:modelValue":e[175]||(e[175]=T=>o.configFile.use_ai_generated_negative_prompt=T),onChange:e[176]||(e[176]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.use_ai_generated_negative_prompt]]),e[594]||(e[594]=g("div",{class:"relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),g("div",mXn,[e[596]||(e[596]=g("div",{class:"w-1/3"},[g("label",{for:"negative_prompt_generation_prompt",class:"text-sm font-semibold text-gray-700 dark:text-gray-200"}," Negative prompt generation prompt ")],-1)),g("div",gXn,[J(g("input",{type:"text",id:"negative_prompt_generation_prompt","onUpdate:modelValue":e[177]||(e[177]=T=>o.configFile.negative_prompt_generation_prompt=T),onChange:e[178]||(e[178]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors duration-200 text-sm text-gray-900 dark:text-white placeholder-gray-400",required:""},null,544),[[we,o.configFile.negative_prompt_generation_prompt]])])]),g("div",_Xn,[e[597]||(e[597]=g("div",{class:"w-1/3"},[g("label",{for:"default_negative_prompt",class:"text-sm font-semibold text-gray-700 dark:text-gray-200"}," Default negative prompt ")],-1)),g("div",QXn,[J(g("input",{type:"text",id:"default_negative_prompt","onUpdate:modelValue":e[179]||(e[179]=T=>o.configFile.default_negative_prompt=T),onChange:e[180]||(e[180]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors duration-200 text-sm text-gray-900 dark:text-white placeholder-gray-400",required:""},null,544),[[we,o.configFile.default_negative_prompt]])])])])]),_:1}),oe(a,{title:"Full Audio settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",vXn,[g("div",yXn,[e[598]||(e[598]=g("div",{class:"flex items-center"},[g("label",{for:"stt_listening_threshold",class:"font-medium text-gray-700 dark:text-gray-200",title:"Listening threshold"}," Listening threshold "),g("span",{class:"ml-1 text-gray-400 hover:text-gray-600 cursor-help",title:"Controls the sensitivity of voice detection"},[g("i",{class:"fas fa-info-circle"})])],-1)),J(g("input",{type:"number",step:"1",id:"stt_listening_threshold",required:"","onUpdate:modelValue":e[181]||(e[181]=T=>o.configFile.stt_listening_threshold=T),onChange:e[182]||(e[182]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white"},null,544),[[we,o.configFile.stt_listening_threshold]])]),g("div",bXn,[e[599]||(e[599]=g("div",{class:"flex items-center"},[g("label",{for:"stt_silence_duration",class:"font-medium text-gray-700 dark:text-gray-200"}," Silence duration (s) "),g("span",{class:"ml-1 text-gray-400 hover:text-gray-600 cursor-help",title:"Duration of silence before stopping recording"},[g("i",{class:"fas fa-info-circle"})])],-1)),J(g("input",{type:"number",step:"1",id:"stt_silence_duration",required:"","onUpdate:modelValue":e[183]||(e[183]=T=>o.configFile.stt_silence_duration=T),onChange:e[184]||(e[184]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white"},null,544),[[we,o.configFile.stt_silence_duration]])]),g("div",EXn,[e[600]||(e[600]=g("div",{class:"flex items-center"},[g("label",{for:"stt_sound_threshold_percentage",class:"font-medium text-gray-700 dark:text-gray-200"}," Minimum sound percentage "),g("span",{class:"ml-1 text-gray-400 hover:text-gray-600 cursor-help",title:"Minimum required sound percentage in recorded segment"},[g("i",{class:"fas fa-info-circle"})])],-1)),J(g("input",{type:"number",step:"1",id:"stt_sound_threshold_percentage",required:"","onUpdate:modelValue":e[185]||(e[185]=T=>o.configFile.stt_sound_threshold_percentage=T),onChange:e[186]||(e[186]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white"},null,544),[[we,o.configFile.stt_sound_threshold_percentage]])]),g("div",xXn,[e[601]||(e[601]=g("div",{class:"flex items-center"},[g("label",{for:"stt_gain",class:"font-medium text-gray-700 dark:text-gray-200"}," Volume amplification "),g("span",{class:"ml-1 text-gray-400 hover:text-gray-600 cursor-help",title:"Audio input gain adjustment"},[g("i",{class:"fas fa-info-circle"})])],-1)),J(g("input",{type:"number",step:"1",id:"stt_gain",required:"","onUpdate:modelValue":e[187]||(e[187]=T=>o.configFile.stt_gain=T),onChange:e[188]||(e[188]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white"},null,544),[[we,o.configFile.stt_gain]])]),g("div",SXn,[e[605]||(e[605]=g("h3",{class:"font-semibold text-gray-900 dark:text-white mb-4"},"Audio Settings",-1)),g("div",LXn,[e[602]||(e[602]=g("label",{for:"stt_rate",class:"font-medium text-gray-700 dark:text-gray-200"},"Audio rate",-1)),J(g("input",{type:"number",step:"1",id:"stt_rate",required:"","onUpdate:modelValue":e[189]||(e[189]=T=>o.configFile.stt_rate=T),onChange:e[190]||(e[190]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-white border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.stt_rate]])]),g("div",CXn,[e[603]||(e[603]=g("label",{for:"stt_channels",class:"font-medium text-gray-700 dark:text-gray-200"},"Number of channels",-1)),J(g("input",{type:"number",step:"1",id:"stt_channels",required:"","onUpdate:modelValue":e[191]||(e[191]=T=>o.configFile.stt_channels=T),onChange:e[192]||(e[192]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-white border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.stt_channels]])]),g("div",AXn,[e[604]||(e[604]=g("label",{for:"stt_buffer_size",class:"font-medium text-gray-700 dark:text-gray-200"},"Buffer size",-1)),J(g("input",{type:"number",step:"1",id:"stt_buffer_size",required:"","onUpdate:modelValue":e[193]||(e[193]=T=>o.configFile.stt_buffer_size=T),onChange:e[194]||(e[194]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-white border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.stt_buffer_size]])])]),g("div",wXn,[e[609]||(e[609]=g("h3",{class:"font-semibold text-gray-900 dark:text-white mb-4"},"Word Detection",-1)),g("div",MXn,[e[607]||(e[607]=g("label",{for:"stt_activate_word_detection",class:"font-medium text-gray-700 dark:text-gray-200"}," Activate word detection ",-1)),g("div",OXn,[g("label",RXn,[J(g("input",{type:"checkbox",id:"stt_activate_word_detection","onUpdate:modelValue":e[195]||(e[195]=T=>o.configFile.stt_activate_word_detection=T),onChange:e[196]||(e[196]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.stt_activate_word_detection]]),e[606]||(e[606]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),g("div",NXn,[e[608]||(e[608]=g("label",{for:"stt_word_detection_file",class:"font-medium text-gray-700 dark:text-gray-200"}," Word detection wav file ",-1)),J(g("input",{type:"text",id:"stt_word_detection_file",required:"","onUpdate:modelValue":e[197]||(e[197]=T=>o.configFile.stt_word_detection_file=T),onChange:e[198]||(e[198]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-white border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.stt_word_detection_file]])])])])]),_:1}),oe(a,{title:"Audio devices settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",DXn,[g("div",IXn,[e[610]||(e[610]=g("div",{class:"md:w-1/3"},[g("label",{for:"stt_input_device",class:"block text-sm font-semibold text-gray-700 dark:text-gray-200",title:"Input device"}," Audio Input Device "),g("p",{class:"text-xs text-gray-500 dark:text-gray-400 mt-1"}," Select your microphone or audio input source ")],-1)),g("div",kXn,[J(g("select",{id:"stt_input_device",required:"","onUpdate:modelValue":e[199]||(e[199]=T=>o.configFile.stt_input_device=T),onChange:e[200]||(e[200]=T=>i.settingsChanged=!0),class:"w-full px-3 py-2 bg-gray-50 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-1 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-colors duration-200"},[(k(!0),H(Ue,null,ot(i.snd_input_devices,(T,Q)=>(k(),H("option",{key:T,value:i.snd_input_devices_indexes[Q]},le(T),9,PXn))),128))],544),[[pn,o.configFile.stt_input_device]])])]),g("div",HXn,[e[611]||(e[611]=g("div",{class:"md:w-1/3"},[g("label",{for:"tts_output_device",class:"block text-sm font-semibold text-gray-700 dark:text-gray-200",title:"Output device"}," Audio Output Device "),g("p",{class:"text-xs text-gray-500 dark:text-gray-400 mt-1"}," Select your speakers or audio output device ")],-1)),g("div",VXn,[J(g("select",{id:"tts_output_device",required:"","onUpdate:modelValue":e[201]||(e[201]=T=>o.configFile.tts_output_device=T),onChange:e[202]||(e[202]=T=>i.settingsChanged=!0),class:"w-full px-3 py-2 bg-gray-50 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-1 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-colors duration-200"},[(k(!0),H(Ue,null,ot(i.snd_output_devices,(T,Q)=>(k(),H("option",{key:T,value:i.snd_output_devices_indexes[Q]},le(T),9,BXn))),128))],544),[[pn,o.configFile.tts_output_device]])])])])]),_:1}),oe(a,{title:"Lollms service",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",FXn,[g("div",$Xn,[e[612]||(e[612]=g("label",{for:"host",class:"font-semibold text-gray-700 dark:text-gray-200"},"Host:",-1)),J(g("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[203]||(e[203]=T=>o.configFile.host=T),onChange:e[204]||(e[204]=T=>i.settingsChanged=!0),class:"input-field"},null,544),[[we,o.configFile.host]])]),g("div",UXn,[e[613]||(e[613]=g("label",{for:"lollms_access_keys",class:"font-semibold text-gray-700 dark:text-gray-200"},"Access keys:",-1)),oe(l,{modelValue:o.configFile.lollms_access_keys,"onUpdate:modelValue":e[205]||(e[205]=T=>o.configFile.lollms_access_keys=T),onChange:e[206]||(e[206]=T=>i.settingsChanged=!0),placeholder:"Enter access key"},null,8,["modelValue"])]),g("div",GXn,[e[614]||(e[614]=g("label",{for:"port",class:"font-semibold text-gray-700 dark:text-gray-200"},"Port:",-1)),J(g("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[207]||(e[207]=T=>o.configFile.port=T),onChange:e[208]||(e[208]=T=>i.settingsChanged=!0),class:"input-field"},null,544),[[we,o.configFile.port]])]),g("div",qXn,[e[617]||(e[617]=g("span",{class:"font-semibold text-gray-700 dark:text-gray-200"},"Server Configuration:",-1)),g("div",zXn,[g("label",jXn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[209]||(e[209]=T=>o.configFile.headless_server_mode=T),onChange:e[210]||(e[210]=T=>i.settingsChanged=!0),class:"w-4 h-4 rounded accent-blue-500"},null,544),[[ut,o.configFile.headless_server_mode]]),e[615]||(e[615]=g("span",{class:"text-sm text-gray-600 dark:text-gray-300"},"Headless Server Mode",-1))]),g("label",WXn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[211]||(e[211]=T=>o.configFile.activate_lollms_server=T),onChange:e[212]||(e[212]=T=>i.settingsChanged=!0),class:"w-4 h-4 rounded accent-blue-500"},null,544),[[ut,o.configFile.activate_lollms_server]]),e[616]||(e[616]=g("span",{class:"text-sm text-gray-600 dark:text-gray-300"},"LoLLMS Server",-1))]),g("div",YXn,[(k(),H(Ue,null,ot(["rag","tts","stt","tti","itt","ttm"],T=>g("label",{key:T,class:"flex items-center space-x-2 cursor-pointer"},[J(g("input",{type:"checkbox",id:`activate_lollms_${T}_server`,"onUpdate:modelValue":Q=>o.configFile[`activate_lollms_${T}_server`]=Q,onChange:e[213]||(e[213]=Q=>i.settingsChanged=!0),class:"w-4 h-4 rounded accent-blue-500"},null,40,KXn),[[ut,o.configFile[`activate_lollms_${T}_server`]]]),g("span",ZXn,le(T.toUpperCase())+" Server",1)])),64))])])]),g("div",XXn,[e[618]||(e[618]=g("span",{class:"font-semibold text-gray-700 dark:text-gray-200"},"Emulators:",-1)),g("div",JXn,[(k(),H(Ue,null,ot(["ollama","openai","mistralai"],T=>g("label",{key:T,class:"flex items-center space-x-2 cursor-pointer"},[J(g("input",{type:"checkbox",id:`activate_${T}_emulator`,"onUpdate:modelValue":Q=>o.configFile[`activate_${T}_emulator`]=Q,onChange:e[214]||(e[214]=Q=>i.settingsChanged=!0),class:"w-4 h-4 rounded accent-blue-500"},null,40,eJn),[[ut,o.configFile[`activate_${T}_emulator`]]]),g("span",tJn,le(T.charAt(0).toUpperCase()+T.slice(1))+" Emulator",1)])),64))])])])]),_:1}),oe(a,{title:"STT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[oe(a,{title:"Browser Audio STT",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",nJn,[g("div",rJn,[e[620]||(e[620]=g("label",{for:"activate_audio_infos",class:"text-sm font-medium text-gray-700 dark:text-gray-200"}," Activate audio infos ",-1)),g("label",iJn,[J(g("input",{type:"checkbox",id:"activate_audio_infos","onUpdate:modelValue":e[215]||(e[215]=T=>o.configFile.activate_audio_infos=T),onChange:e[216]||(e[216]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.activate_audio_infos]]),e[619]||(e[619]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",oJn,[e[622]||(e[622]=g("label",{for:"audio_auto_send_input",class:"text-sm font-medium text-gray-700 dark:text-gray-200"}," Send audio input automatically ",-1)),g("label",sJn,[J(g("input",{type:"checkbox",id:"audio_auto_send_input","onUpdate:modelValue":e[217]||(e[217]=T=>o.configFile.audio_auto_send_input=T),onChange:e[218]||(e[218]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.audio_auto_send_input]]),e[621]||(e[621]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",aJn,[g("label",lJn," Audio silence timer (ms): "+le(o.configFile.audio_silenceTimer)+"ms ",1),g("div",cJn,[J(g("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[219]||(e[219]=T=>o.configFile.audio_silenceTimer=T),onChange:e[220]||(e[220]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 accent-blue-600"},null,544),[[we,o.configFile.audio_silenceTimer]]),J(g("input",{"onUpdate:modelValue":e[221]||(e[221]=T=>o.configFile.audio_silenceTimer=T),onChange:e[222]||(e[222]=T=>i.settingsChanged=!0),type:"number",class:"w-full px-3 py-2 bg-gray-50 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"},null,544),[[we,o.configFile.audio_silenceTimer]])])]),g("div",uJn,[e[623]||(e[623]=g("label",{for:"audio_in_language",class:"text-sm font-medium text-gray-700 dark:text-gray-200"}," Input Audio Language ",-1)),J(g("select",{id:"audio_in_language","onUpdate:modelValue":e[223]||(e[223]=T=>o.configFile.audio_in_language=T),onChange:e[224]||(e[224]=T=>i.settingsChanged=!0),class:"w-full px-3 py-2 bg-gray-50 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"},[(k(!0),H(Ue,null,ot(o.audioLanguages,T=>(k(),H("option",{key:T.code,value:T.code},le(T.name),9,dJn))),128))],544),[[pn,o.configFile.audio_in_language]])])])]),_:1}),oe(a,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",fJn,[g("div",pJn,[e[625]||(e[625]=g("label",{for:"whisper_activate",class:"text-gray-700 dark:text-gray-200 font-medium"}," Activate Whisper at startup ",-1)),g("label",hJn,[J(g("input",{type:"checkbox",id:"whisper_activate","onUpdate:modelValue":e[225]||(e[225]=T=>o.configFile.whisper_activate=T),onChange:e[226]||(e[226]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.whisper_activate]]),e[624]||(e[624]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",TJn,[g("button",{onClick:e[227]||(e[227]=(...T)=>o.reinstallWhisperService&&o.reinstallWhisperService(...T)),class:"w-full py-3 px-4 bg-gradient-to-r from-green-400 to-green-500 hover:from-green-500 hover:to-green-600 text-white font-medium rounded-lg shadow-md hover:shadow-lg transition-all duration-300 flex items-center justify-center space-x-2"},e[626]||(e[626]=[g("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("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),g("span",null,"Install Whisper",-1)]))]),g("div",mJn,[e[628]||(e[628]=g("label",{for:"whisper_model",class:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2"}," Whisper Model ",-1)),g("div",gJn,[J(g("select",{id:"whisper_model","onUpdate:modelValue":e[228]||(e[228]=T=>o.configFile.whisper_model=T),onChange:e[229]||(e[229]=T=>i.settingsChanged=!0),class:"block w-full px-4 py-3 text-base border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white appearance-none"},[(k(!0),H(Ue,null,ot(o.whisperModels,T=>(k(),H("option",{key:T,value:T},le(T),9,_Jn))),128))],544),[[pn,o.configFile.whisper_model]]),e[627]||(e[627]=g("div",{class:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700 dark:text-gray-300"},[g("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})])],-1))])])])]),_:1}),oe(a,{title:"Open AI Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",QJn,[g("tr",null,[e[629]||(e[629]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_whisper_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai whisper key:")],-1)),g("td",null,[g("div",vJn,[J(g("input",{type:"text",id:"openai_whisper_key",required:"","onUpdate:modelValue":e[230]||(e[230]=T=>o.configFile.openai_whisper_key=T),onChange:e[231]||(e[231]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.openai_whisper_key]])])])]),g("tr",null,[e[630]||(e[630]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open Ai Whisper model:")],-1)),g("td",null,[g("div",yJn,[J(g("select",{id:"openai_whisper_model","onUpdate:modelValue":e[232]||(e[232]=T=>o.configFile.openai_whisper_model=T),onChange:e[233]||(e[233]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),H(Ue,null,ot(o.openaiWhisperModels,T=>(k(),H("option",{key:T,value:T},le(T),9,bJn))),128))],544),[[pn,o.configFile.openai_whisper_model]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTS services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[oe(a,{title:"Browser Audio TTS",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",EJn,[g("tr",null,[e[631]||(e[631]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),g("td",null,[g("div",xJn,[J(g("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[234]||(e[234]=T=>o.configFile.auto_speak=T),onChange:e[235]||(e[235]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.auto_speak]])])])]),g("tr",null,[e[632]||(e[632]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),g("td",null,[J(g("input",{id:"audio_pitch","onUpdate:modelValue":e[236]||(e[236]=T=>o.configFile.audio_pitch=T),onChange:e[237]||(e[237]=T=>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),[[we,o.configFile.audio_pitch]]),J(g("input",{"onUpdate:modelValue":e[238]||(e[238]=T=>o.configFile.audio_pitch=T),onChange:e[239]||(e[239]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.audio_pitch]])])]),g("tr",null,[e[633]||(e[633]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),g("td",null,[J(g("select",{id:"audio_out_voice","onUpdate:modelValue":e[240]||(e[240]=T=>o.configFile.audio_out_voice=T),onChange:e[241]||(e[241]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),H(Ue,null,ot(i.audioVoices,T=>(k(),H("option",{key:T.name,value:T.name},le(T.name),9,SJn))),128))],544),[[pn,o.configFile.audio_out_voice]])])])])]),_:1}),oe(a,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",LJn,[g("tr",null,[e[634]||(e[634]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),g("td",null,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[242]||(e[242]=(...T)=>o.reinstallXTTSService&&o.reinstallXTTSService(...T))},"install xtts service")])]),g("tr",null,[e[635]||(e[635]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),g("td",null,[g("div",CJn,[J(g("select",{"onUpdate:modelValue":e[243]||(e[243]=T=>o.xtts_current_language=T),onChange:e[244]||(e[244]=T=>i.settingsChanged=!0)},[(k(!0),H(Ue,null,ot(i.voice_languages,(T,Q)=>(k(),H("option",{key:Q,value:T},le(Q),9,AJn))),128))],544),[[pn,o.xtts_current_language]])])])]),g("tr",null,[e[636]||(e[636]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),g("td",null,[g("div",wJn,[J(g("select",{"onUpdate:modelValue":e[245]||(e[245]=T=>o.xtts_current_voice=T),onChange:e[246]||(e[246]=T=>i.settingsChanged=!0)},[(k(!0),H(Ue,null,ot(i.voices,T=>(k(),H("option",{key:T,value:T},le(T),9,MJn))),128))],544),[[pn,o.xtts_current_voice]])])])]),g("tr",null,[e[637]||(e[637]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_freq",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Frequency (controls the tone):")],-1)),g("td",null,[g("div",OJn,[J(g("input",{type:"number",id:"xtts_freq",required:"","onUpdate:modelValue":e[247]||(e[247]=T=>o.configFile.xtts_freq=T),onChange:e[248]||(e[248]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[we,o.configFile.xtts_freq,void 0,{number:!0}]])])])]),g("tr",null,[e[638]||(e[638]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),g("td",null,[g("div",RJn,[J(g("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[249]||(e[249]=T=>o.configFile.auto_read=T),onChange:e[250]||(e[250]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.auto_read]])])])]),g("tr",null,[e[639]||(e[639]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_stream_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts stream chunk size:")],-1)),g("td",null,[g("div",NJn,[J(g("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[251]||(e[251]=T=>o.configFile.xtts_stream_chunk_size=T),onChange:e[252]||(e[252]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.xtts_stream_chunk_size]])])])]),g("tr",null,[e[640]||(e[640]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_temperature",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Temperature:")],-1)),g("td",null,[g("div",DJn,[J(g("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[253]||(e[253]=T=>o.configFile.xtts_temperature=T),onChange:e[254]||(e[254]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[we,o.configFile.xtts_temperature,void 0,{number:!0}]])])])]),g("tr",null,[e[641]||(e[641]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_length_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Length Penalty:")],-1)),g("td",null,[g("div",IJn,[J(g("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[255]||(e[255]=T=>o.configFile.xtts_length_penalty=T),onChange:e[256]||(e[256]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[we,o.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),g("tr",null,[e[642]||(e[642]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_repetition_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Repetition Penalty:")],-1)),g("td",null,[g("div",kJn,[J(g("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[257]||(e[257]=T=>o.configFile.xtts_repetition_penalty=T),onChange:e[258]||(e[258]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[we,o.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),g("tr",null,[e[643]||(e[643]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_top_k",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top K:")],-1)),g("td",null,[g("div",PJn,[J(g("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[259]||(e[259]=T=>o.configFile.xtts_top_k=T),onChange:e[260]||(e[260]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.xtts_top_k,void 0,{number:!0}]])])])]),g("tr",null,[e[644]||(e[644]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_top_p",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top P:")],-1)),g("td",null,[g("div",HJn,[J(g("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[261]||(e[261]=T=>o.configFile.xtts_top_p=T),onChange:e[262]||(e[262]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.xtts_top_p,void 0,{number:!0}]])])])]),g("tr",null,[e[645]||(e[645]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_speed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Speed:")],-1)),g("td",null,[g("div",VJn,[J(g("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[263]||(e[263]=T=>o.configFile.xtts_speed=T),onChange:e[264]||(e[264]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[we,o.configFile.xtts_speed,void 0,{number:!0}]])])])]),g("tr",null,[e[646]||(e[646]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_text_splitting",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Text Splitting:")],-1)),g("td",null,[g("div",BJn,[J(g("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[265]||(e[265]=T=>o.configFile.enable_text_splitting=T),onChange:e[266]||(e[266]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.enable_text_splitting]])])])])])]),_:1}),oe(a,{title:"Open AI TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",FJn,[g("tr",null,[e[647]||(e[647]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key:")],-1)),g("td",null,[g("div",$Jn,[J(g("input",{type:"text",id:"openai_tts_key",required:"","onUpdate:modelValue":e[267]||(e[267]=T=>o.configFile.openai_tts_key=T),onChange:e[268]||(e[268]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.openai_tts_key]])])])]),g("tr",null,[e[649]||(e[649]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_tts_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts model:")],-1)),g("td",null,[g("div",UJn,[J(g("select",{"onUpdate:modelValue":e[269]||(e[269]=T=>o.configFile.openai_tts_model=T),onChange:e[270]||(e[270]=T=>i.settingsChanged=!0)},e[648]||(e[648]=[g("option",null," tts-1 ",-1),g("option",null," tts-2 ",-1)]),544),[[pn,o.configFile.openai_tts_model]])])])]),g("tr",null,[e[651]||(e[651]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts voice:")],-1)),g("td",null,[g("div",GJn,[J(g("select",{"onUpdate:modelValue":e[271]||(e[271]=T=>o.configFile.openai_tts_voice=T),onChange:e[272]||(e[272]=T=>i.settingsChanged=!0)},e[650]||(e[650]=[g("option",null," alloy ",-1),g("option",null," echo ",-1),g("option",null," fable ",-1),g("option",null," nova ",-1),g("option",null," shimmer ",-1)]),544),[[pn,o.configFile.openai_tts_voice]])])])])])]),_:1}),oe(a,{title:"Eleven Labs TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",qJn,[g("tr",null,[e[652]||(e[652]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs key:")],-1)),g("td",null,[g("div",zJn,[J(g("input",{type:"text",id:"elevenlabs_tts_key",required:"","onUpdate:modelValue":e[273]||(e[273]=T=>o.configFile.elevenlabs_tts_key=T),onChange:e[274]||(e[274]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.elevenlabs_tts_key]])])])]),g("tr",null,[e[653]||(e[653]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_model_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs TTS model ID:")],-1)),g("td",null,[g("div",jJn,[J(g("input",{type:"text",id:"elevenlabs_tts_model_id",required:"","onUpdate:modelValue":e[275]||(e[275]=T=>o.configFile.elevenlabs_tts_model_id=T),onChange:e[276]||(e[276]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.elevenlabs_tts_model_id]])])])]),g("tr",null,[e[654]||(e[654]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_voice_stability",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Stability:")],-1)),g("td",null,[g("div",WJn,[J(g("input",{type:"number",id:"elevenlabs_tts_voice_stability",required:"","onUpdate:modelValue":e[277]||(e[277]=T=>o.configFile.elevenlabs_tts_voice_stability=T),onChange:e[278]||(e[278]=T=>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),[[we,o.configFile.elevenlabs_tts_voice_stability]])])])]),g("tr",null,[e[655]||(e[655]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_voice_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Boost:")],-1)),g("td",null,[g("div",YJn,[J(g("input",{type:"number",id:"elevenlabs_tts_voice_boost",required:"","onUpdate:modelValue":e[279]||(e[279]=T=>o.configFile.elevenlabs_tts_voice_boost=T),onChange:e[280]||(e[280]=T=>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),[[we,o.configFile.elevenlabs_tts_voice_boost]])])])]),g("tr",null,[e[656]||(e[656]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_voice_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice ID:")],-1)),g("td",null,[g("div",KJn,[J(g("select",{"onUpdate:modelValue":e[281]||(e[281]=T=>o.configFile.elevenlabs_tts_voice_id=T),onChange:e[282]||(e[282]=T=>i.settingsChanged=!0)},[(k(!0),H(Ue,null,ot(i.voices,T=>(k(),H("option",{key:T.voice_id,value:T.voice_id},le(T.name),9,ZJn))),128))],544),[[pn,o.configFile.elevenlabs_tts_voice_id]])])])])])]),_:1}),oe(a,{title:"Fish TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",XJn,[g("tr",null,[e[657]||(e[657]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"fish_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fish TTS key:")],-1)),g("td",null,[g("div",JJn,[J(g("input",{type:"text",id:"fish_tts_key",required:"","onUpdate:modelValue":e[283]||(e[283]=T=>o.configFile.fish_tts_key=T),onChange:e[284]||(e[284]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.fish_tts_key]])])])]),g("tr",null,[e[658]||(e[658]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"fish_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fish TTS voice:")],-1)),g("td",null,[g("div",eer,[J(g("input",{type:"text",id:"fish_tts_voice",required:"","onUpdate:modelValue":e[285]||(e[285]=T=>o.configFile.fish_tts_voice=T),onChange:e[286]||(e[286]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.fish_tts_voice]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTI services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[oe(a,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",ter,[g("tr",null,[e[660]||(e[660]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),g("td",null,[g("div",ner,[J(g("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[287]||(e[287]=T=>o.configFile.enable_sd_service=T),onChange:e[288]||(e[288]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.enable_sd_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[289]||(e[289]=T=>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[659]||(e[659]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[662]||(e[662]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),g("td",null,[g("div",rer,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[290]||(e[290]=(...T)=>o.reinstallSDService&&o.reinstallSDService(...T))},"install sd service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[291]||(e[291]=(...T)=>o.upgradeSDService&&o.upgradeSDService(...T))},"upgrade sd service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[292]||(e[292]=(...T)=>o.startSDService&&o.startSDService(...T))},"start sd service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[293]||(e[293]=(...T)=>o.showSD&&o.showSD(...T))},"show sd ui"),e[661]||(e[661]=g("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))])]),g("td",null,[g("div",ier,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[294]||(e[294]=(...T)=>o.reinstallSDService&&o.reinstallSDService(...T))},"install sd service")])])]),g("tr",null,[e[663]||(e[663]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),g("td",null,[g("div",oer,[J(g("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[295]||(e[295]=T=>o.configFile.sd_base_url=T),onChange:e[296]||(e[296]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.sd_base_url]])])])])])]),_:1}),oe(a,{title:"Diffusers service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",ser,[g("tr",null,[e[665]||(e[665]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"install_diffusers_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Diffusers service:")],-1)),g("td",null,[g("div",aer,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[297]||(e[297]=(...T)=>o.reinstallDiffusersService&&o.reinstallDiffusersService(...T))},"install diffusers service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[298]||(e[298]=(...T)=>o.upgradeDiffusersService&&o.upgradeDiffusersService(...T))},"upgrade diffusers service"),e[664]||(e[664]=g("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))])])]),g("tr",null,[e[666]||(e[666]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"diffusers_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers model:")],-1)),g("td",null,[g("div",ler,[J(g("input",{type:"text",id:"diffusers_model",required:"","onUpdate:modelValue":e[299]||(e[299]=T=>o.configFile.diffusers_model=T),onChange:e[300]||(e[300]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.diffusers_model]])])]),e[667]||(e[667]=g("td",null,null,-1))])])]),_:1}),oe(a,{title:"Diffusers client service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",cer,[g("tr",null,[e[668]||(e[668]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"diffusers_client_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers client base url:")],-1)),g("td",null,[g("div",uer,[J(g("input",{type:"text",id:"diffusers_client_base_url",required:"","onUpdate:modelValue":e[301]||(e[301]=T=>o.configFile.diffusers_client_base_url=T),onChange:e[302]||(e[302]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.diffusers_client_base_url]])])]),e[669]||(e[669]=g("td",null,null,-1))])])]),_:1}),oe(a,{title:"Midjourney",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",der,[g("tr",null,[e[670]||(e[670]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"midjourney_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"midjourney key:")],-1)),g("td",null,[g("div",fer,[J(g("input",{type:"text",id:"midjourney_key",required:"","onUpdate:modelValue":e[303]||(e[303]=T=>o.configFile.midjourney_key=T),onChange:e[304]||(e[304]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.midjourney_key]])])])]),g("tr",null,[e[671]||(e[671]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"midjourney_timeout",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"request timeout(s):")],-1)),g("td",null,[g("div",per,[J(g("input",{type:"number",min:"10",max:"2048",id:"midjourney_timeout",required:"","onUpdate:modelValue":e[305]||(e[305]=T=>o.configFile.midjourney_timeout=T),onChange:e[306]||(e[306]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.midjourney_timeout]])])])]),g("tr",null,[e[672]||(e[672]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"midjourney_retries",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"number of retries:")],-1)),g("td",null,[g("div",her,[J(g("input",{type:"number",min:"0",max:"2048",id:"midjourney_retries",required:"","onUpdate:modelValue":e[307]||(e[307]=T=>o.configFile.midjourney_retries=T),onChange:e[308]||(e[308]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.midjourney_retries]])])])])])]),_:1}),oe(a,{title:"Dall-E",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",Ter,[g("tr",null,[e[673]||(e[673]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"dall_e_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e key:")],-1)),g("td",null,[g("div",mer,[J(g("input",{type:"text",id:"dall_e_key",required:"","onUpdate:modelValue":e[309]||(e[309]=T=>o.configFile.dall_e_key=T),onChange:e[310]||(e[310]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.dall_e_key]])])])]),g("tr",null,[e[675]||(e[675]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"dall_e_generation_engine",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e generation engine:")],-1)),g("td",null,[g("div",ger,[J(g("select",{"onUpdate:modelValue":e[311]||(e[311]=T=>o.configFile.dall_e_generation_engine=T),onChange:e[312]||(e[312]=T=>i.settingsChanged=!0)},e[674]||(e[674]=[g("option",null," dall-e-2 ",-1),g("option",null," dall-e-3 ",-1)]),544),[[pn,o.configFile.dall_e_generation_engine]])])])])])]),_:1}),oe(a,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",_er,[g("tr",null,[e[677]||(e[677]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),g("td",null,[g("div",Qer,[J(g("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[313]||(e[313]=T=>o.configFile.enable_comfyui_service=T),onChange:e[314]||(e[314]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.enable_comfyui_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[315]||(e[315]=T=>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[676]||(e[676]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[678]||(e[678]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Available models (only if local):")],-1)),g("td",null,[g("div",ver,[J(g("select",{id:"comfyui_model",required:"","onUpdate:modelValue":e[316]||(e[316]=T=>o.configFile.comfyui_model=T),onChange:e[317]||(e[317]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),H(Ue,null,ot(i.comfyui_models,(T,Q)=>(k(),H("option",{key:T,value:T},le(T),9,yer))),128))],544),[[pn,o.configFile.comfyui_model]])])])]),g("tr",null,[e[680]||(e[680]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui model:")],-1)),g("td",null,[g("div",ber,[J(g("input",{type:"text",id:"comfyui_model",required:"","onUpdate:modelValue":e[318]||(e[318]=T=>o.configFile.comfyui_model=T),onChange:e[319]||(e[319]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.comfyui_model]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[320]||(e[320]=T=>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[679]||(e[679]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[682]||(e[682]=g("td",{style:{"min-width":"200px"}},null,-1)),g("td",null,[g("div",Eer,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[321]||(e[321]=(...T)=>o.reinstallComfyUIService&&o.reinstallComfyUIService(...T))},"install comfyui service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[322]||(e[322]=(...T)=>o.upgradeComfyUIService&&o.upgradeComfyUIService(...T))},"upgrade comfyui service"),g("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]=(...T)=>o.startComfyUIService&&o.startComfyUIService(...T))},"start comfyui service"),g("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]=(...T)=>o.showComfyui&&o.showComfyui(...T))},"show comfyui"),e[681]||(e[681]=g("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))])])]),g("tr",null,[e[683]||(e[683]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),g("td",null,[g("div",xer,[J(g("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[325]||(e[325]=T=>o.configFile.comfyui_base_url=T),onChange:e[326]||(e[326]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.comfyui_base_url]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[oe(a,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",Ser,[g("tr",null,[e[685]||(e[685]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),g("td",null,[g("div",Ler,[J(g("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[327]||(e[327]=T=>o.configFile.enable_ollama_service=T),onChange:e[328]||(e[328]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.enable_ollama_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[329]||(e[329]=T=>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(t=>t.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(t=>t.isInstalled===!0):this.models_zoo.slice(0,Math.min(this.models_zoo.length,this.models_zoo_initialLoadCount)))}},imgBinding:{get(){if(!this.isMounted)return ri;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return ri}}},imgModel:{get(){try{let t=this.$store.state.modelsZoo.findIndex(e=>e.name==this.$store.state.selectedModel);return t>=0?(console.log(`model avatar : ${this.$store.state.modelsZoo[t].icon}`),this.$store.state.modelsZoo[t].icon):ri}catch{console.log("error")}if(!this.isMounted)return ri;try{return this.$refs.bindingZoo[this.$refs.bindingZoo.findIndex(t=>t.binding.folder==this.configFile.binding_name)].$refs.imgElement.src}catch{return ri}}},isReady:{get(){return this.$store.state.ready}},audio_out_voice:{get(){return this.$store.state.config.audio_out_voice},set(t){this.$store.state.config.audio_out_voice=t}},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(t){this.$store.commit("setConfig",t)}},userName:{get(){return this.$store.state.config.user_name},set(t){this.$store.state.config.user_name=t}},user_avatar:{get(){return this.$store.state.config.user_avatar!=""?"/user_infos/"+this.$store.state.config.user_avatar:co},set(t){this.$store.state.config.user_avatar=t}},hardware_mode:{get(){return this.$store.state.config.hardware_mode},set(t){this.$store.state.config.hardware_mode=t}},auto_update:{get(){return this.$store.state.config.auto_update},set(t){this.$store.state.config.auto_update=t}},auto_speak:{get(){return this.$store.state.config.auto_speak},set(t){this.$store.state.config.auto_speak=t}},auto_read:{get(){return this.$store.state.config.auto_read},set(t){this.$store.state.config.auto_read=t}},xtts_current_language:{get(){return this.$store.state.config.xtts_current_language},set(t){console.log("Current xtts voice set to ",t),this.$store.state.config.xtts_current_language=t}},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(t){t=="main_voice"||t===void 0?(console.log("Current voice set to None"),this.$store.state.config.xtts_current_voice=null):(console.log("Current voice set to ",t),this.$store.state.config.xtts_current_voice=t)}},audio_pitch:{get(){return this.$store.state.config.audio_pitch},set(t){this.$store.state.config.audio_pitch=t}},audio_in_language:{get(){return this.$store.state.config.audio_in_language},set(t){this.$store.state.config.audio_in_language=t}},use_user_name_in_discussions:{get(){return this.$store.state.config.use_user_name_in_discussions},set(t){this.$store.state.config.use_user_name_in_discussions=t}},discussion_db_name:{get(){return this.$store.state.config.discussion_db_name},set(t){this.$store.state.config.discussion_db_name=t}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}},bindingsZoo:{get(){return this.$store.state.bindingsZoo},set(t){this.$store.commit("setbindingsZoo",t)}},modelsArr:{get(){return this.$store.state.modelsArr},set(t){this.$store.commit("setModelsArr",t)}},models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},installed_models:{get(){return this.models_zoo},set(t){this.$store.commit("setModelsZoo",t)}},diskUsage:{get(){return this.$store.state.diskUsage},set(t){this.$store.commit("setDiskUsage",t)}},ramUsage:{get(){return this.$store.state.ramUsage},set(t){this.$store.commit("setRamUsage",t)}},vramUsage:{get(){return this.$store.state.vramUsage},set(t){this.$store.commit("setVramUsage",t)}},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 t=this.bindingsZoo.findIndex(e=>e.folder===this.configFile.binding_name);return t>-1?this.bindingsZoo[t].name:null},active_pesonality(){if(!this.isMounted)return null;const t=this.$store.state.personalities.findIndex(e=>e.full_path===this.configFile.personalities[this.configFile.active_personality_id]);return t>-1?this.$store.state.personalities[t].name:null},speed_computed(){return $o(this.addModel.speed)},total_size_computed(){return $o(this.addModel.total_size)},downloaded_size_computed(){return $o(this.addModel.downloaded_size)}},watch:{bec_collapsed(){ze(()=>{Ze.replace()})},pc_collapsed(){ze(()=>{Ze.replace()})},mc_collapsed(){ze(()=>{Ze.replace()})},sc_collapsed(){ze(()=>{Ze.replace()})},showConfirmation(){ze(()=>{Ze.replace()})},mzl_collapsed(){ze(()=>{Ze.replace()})},pzl_collapsed(){ze(()=>{Ze.replace()})},ezl_collapsed(){ze(()=>{Ze.replace()})},bzl_collapsed(){ze(()=>{Ze.replace()})},all_collapsed(t){this.collapseAll(t),ze(()=>{Ze.replace()})},settingsChanged(t){this.$store.state.settingsChanged=t,ze(()=>{Ze.replace()})},isLoading(){ze(()=>{Ze.replace()})},searchPersonality(t){t==""&&this.filterPersonalities()},mzdc_collapsed(){ze(()=>{Ze.replace()})}},async beforeRouteLeave(t){await this.$router.isReady()}},xjn={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"},Sjn={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg panels-color shadow-lg"},Ljn={key:0,class:"flex gap-3 flex-1 items-center duration-75"},Cjn={key:1,class:"flex gap-3 flex-1 items-center"},Ajn={class:"flex gap-3 flex-1 items-center justify-end"},wjn={class:"flex gap-3 items-center"},Mjn={key:0,class:"flex gap-3 items-center"},Ojn={key:1,role:"status"},Rjn={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"},Njn={class:"flex flex-row p-3"},Djn={class:"text-base font-semibold cursor-pointer select-none items-center"},Ijn={class:"flex gap-2 items-center"},kjn={key:0},Pjn=["src"],Hjn={class:"font-bold font-large text-lg"},Vjn={key:1},Bjn={class:"flex gap-2 items-center"},Fjn=["src"],$jn={class:"font-bold font-large text-lg"},Ujn={class:"font-bold font-large text-lg"},Gjn={class:"font-bold font-large text-lg"},qjn={class:"mb-2"},zjn={class:"flex flex-col mx-2"},jjn={class:"p-2"},Wjn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Yjn={class:"mb-2"},Kjn={class:"flex flex-col mx-2"},Zjn={class:"p-2"},Xjn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Jjn={class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},eWn=["src"],tWn={class:"flex flex-col mx-2"},nWn={class:"p-2"},rWn={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},iWn={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"},oWn={class:"flex flex-row p-3"},sWn={class:"flex flex-col mb-2 px-3 pb-2"},aWn={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"},lWn={class:"flex flex-col space-y-4"},cWn={class:"flex items-center"},uWn={class:"flex items-center"},dWn={class:"flex items-center"},fWn={class:"flex items-start"},pWn={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"},hWn={class:"flex flex-row p-3"},TWn={class:"flex flex-col mb-2 px-3 pb-2"},mWn={class:"settings-container grid gap-6 p-6 bg-gray-50 dark:bg-gray-700 rounded-lg border border-gray-300 dark:border-gray-600"},gWn={class:"setting-section"},_Wn={class:"settings-grid grid gap-4"},QWn={class:"setting-row flex items-center gap-4"},vWn={class:"setting-row flex items-center gap-4"},yWn={class:"setting-row flex items-center gap-4"},bWn={class:"setting-content flex items-center gap-4"},EWn={for:"avatar-upload",class:"cursor-pointer"},xWn=["src"],SWn={class:"setting-section"},LWn={class:"settings-grid grid gap-4"},CWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},AWn={class:"relative inline-block w-12 h-6"},wWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},MWn={class:"relative inline-block w-12 h-6"},OWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},RWn={class:"relative inline-block w-12 h-6"},NWn={class:"setting-section"},DWn={class:"settings-grid grid gap-4"},IWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},kWn={class:"relative inline-block w-12 h-6"},PWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},HWn={class:"relative inline-block w-12 h-6"},VWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},BWn={class:"relative inline-block w-12 h-6"},FWn={class:"setting-section"},$Wn={class:"settings-grid grid gap-4"},UWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},GWn={class:"relative inline-block w-12 h-6"},qWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},zWn={class:"relative inline-block w-12 h-6"},jWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},WWn={class:"relative inline-block w-12 h-6"},YWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},KWn={class:"relative inline-block w-12 h-6"},ZWn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},XWn={class:"relative inline-block w-12 h-6"},JWn={class:"grid gap-6 bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md"},eYn={class:"flex flex-col space-y-2"},tYn={class:"grid md:grid-cols-2 gap-4"},nYn={class:"space-y-2"},rYn={class:"space-y-2"},iYn={class:"grid md:grid-cols-2 gap-4"},oYn={class:"space-y-2"},sYn={class:"space-y-2"},aYn={class:"grid md:grid-cols-2 gap-4"},lYn={class:"space-y-2"},cYn={class:"space-y-2"},uYn={class:"grid md:grid-cols-2 gap-4"},dYn={class:"space-y-2"},fYn={class:"space-y-2"},pYn={class:"space-y-2"},hYn={class:"space-y-2"},TYn={class:"space-y-2"},mYn={class:"p-4 bg-gray-100 dark:bg-gray-900 rounded-md"},gYn=["innerHTML"],_Yn={class:"flex items-center space-x-4"},QYn={class:"relative inline-block w-10 mr-2 align-middle select-none transition duration-200 ease-in"},vYn={class:"grid gap-6 bg-gray-50 dark:bg-gray-700 p-6 rounded-lg shadow-md"},yYn={class:"flex flex-col md:flex-row md:items-center gap-4"},bYn={class:"flex flex-col md:flex-row md:items-start gap-4"},EYn={class:"space-y-4"},xYn={class:"flex flex-col md:flex-row md:items-center gap-4"},SYn={class:"flex-1 space-y-3"},LYn={class:"flex items-center space-x-3 cursor-pointer"},CYn={class:"flex items-center space-x-3 cursor-pointer"},AYn={class:"flex items-center space-x-3 cursor-pointer"},wYn={class:"flex flex-col md:flex-row md:items-center gap-4"},MYn={class:"flex items-center gap-4"},OYn={for:"avatar-upload",class:"cursor-pointer"},RYn=["src"],NYn={class:"space-y-4"},DYn={class:"flex flex-col md:flex-row md:items-center gap-4"},IYn={class:"flex flex-col md:flex-row md:items-center gap-4"},kYn={class:"settings-container p-6 space-y-4 bg-gray-50 dark:bg-gray-800 rounded-xl shadow-md"},PYn={class:"setting-row flex items-center justify-between p-3 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"},HYn={class:"relative"},VYn={class:"setting-row flex items-center justify-between p-3 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"},BYn={class:"relative"},FYn={class:"setting-row flex items-center justify-between p-3 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"},$Yn={class:"relative"},UYn={class:"setting-row flex items-center justify-between p-3 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"},GYn={class:"relative"},qYn={class:"setting-row flex items-center justify-between p-3 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"},zYn={class:"relative"},jYn={class:"bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg p-4 space-y-4"},WYn={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},YYn={class:"flex items-center"},KYn={class:"relative inline-flex items-center cursor-pointer"},ZYn={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},XYn={class:"flex-1"},JYn={class:"p-4 bg-gray-50 dark:bg-gray-700 rounded-lg shadow-sm border border-gray-200 dark:border-gray-600"},eKn={class:"flex flex-col sm:flex-row items-start sm:items-center gap-2"},tKn={class:"flex-1 w-full"},nKn={class:"settings-container bg-gray-50 dark:bg-gray-700 p-6 rounded-lg shadow-md"},rKn={class:"setting-row mb-4"},iKn={class:"flex items-center justify-between"},oKn={class:"w-64"},sKn={class:"setting-row mb-4"},aKn={class:"flex items-center justify-between"},lKn={class:"w-64"},cKn={class:"setting-row"},uKn={class:"flex items-center justify-between"},dKn={class:"w-64"},fKn={class:"inline-flex items-center cursor-pointer"},pKn={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"},hKn={class:"flex flex-row p-3"},TKn={class:"space-y-6"},mKn={class:"space-y-4"},gKn={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-4"},_Kn={class:"flex flex-col"},QKn=["value","onInput"],vKn={class:"flex flex-col"},yKn=["value","onInput"],bKn={class:"flex flex-col lg:col-span-2"},EKn={class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},xKn=["value","onInput"],SKn=["value","onInput"],LKn={key:0,class:"flex flex-col lg:col-span-2"},CKn=["value","onInput"],AKn={class:"flex flex-wrap items-center justify-between mt-4 pt-3 border-t border-gray-200 dark:border-gray-700 gap-2"},wKn={class:"flex flex-wrap items-center gap-3"},MKn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},OKn={class:"relative inline-block w-12 h-6"},RKn=["onUpdate:modelValue"],NKn={key:0,class:"flex gap-2"},DKn=["onClick"],IKn=["onClick"],kKn={class:"inline-flex"},PKn=["onClick"],HKn={class:"space-y-6"},VKn={class:"space-y-4"},BKn={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4"},FKn={class:"flex flex-col"},$Kn=["value","onInput"],UKn={class:"flex flex-col"},GKn=["value","onInput"],qKn={class:"flex flex-col lg:col-span-2"},zKn=["value","onInput"],jKn={class:"flex flex-col lg:col-span-2"},WKn=["value","onInput"],YKn={class:"flex flex-col lg:col-span-2"},KKn=["onUpdate:modelValue"],ZKn={class:"flex flex-col lg:col-span-2"},XKn=["onUpdate:modelValue"],JKn={class:"flex items-center justify-between mt-4 pt-3 border-t border-gray-200 dark:border-gray-700"},eZn={class:"flex items-center space-x-4"},tZn={class:"setting-row flex items-center justify-between p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm"},nZn={class:"relative inline-block w-12 h-6"},rZn=["onUpdate:modelValue"],iZn=["onClick"],oZn=["onClick"],sZn=["onClick"],aZn={class:"bg-gray-50 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg p-6 space-y-6"},lZn={class:"flex flex-col md:flex-row md:items-center gap-4"},cZn={class:"flex flex-col md:flex-row md:items-center gap-4"},uZn={class:"flex-1"},dZn={class:"inline-flex items-center"},fZn={class:"flex flex-col md:flex-row md:items-start gap-4"},pZn={class:"flex-1 space-y-2"},hZn=["disabled"],TZn={key:0,label:"Semantic Models"},mZn={key:1,label:"OpenAI Models"},gZn={key:2,label:"Ollama Models"},_Zn={key:3,disabled:""},QZn={class:"flex flex-col md:flex-row md:items-start gap-4"},vZn={class:"space-y-6"},yZn={class:"flex flex-col md:flex-row md:items-start gap-4"},bZn={class:"flex-1 space-y-2"},EZn={class:"space-y-4"},xZn={class:"flex items-center gap-4"},SZn={class:"flex-1"},LZn={class:"inline-flex items-center"},CZn={class:"space-y-4 bg-gray-50 dark:bg-gray-800 rounded-lg p-6 shadow-sm border border-gray-200 dark:border-gray-700"},AZn={class:"flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-700 p-3 rounded-lg transition-colors"},wZn={class:"flex items-center"},MZn={class:"relative inline-flex items-center cursor-pointer"},OZn={class:"flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-700 p-3 rounded-lg transition-colors"},RZn={class:"flex items-center"},NZn={class:"relative inline-flex items-center cursor-pointer"},DZn={class:"flex items-center justify-between hover:bg-gray-100 dark:hover:bg-gray-700 p-3 rounded-lg transition-colors"},IZn={class:"flex items-center"},kZn={class:"relative inline-flex items-center cursor-pointer"},PZn={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"},HZn={class:"flex flex-row p-3"},VZn={class:"grid gap-6 bg-gray-50 dark:bg-gray-700 rounded-lg p-6 border border-gray-300 dark:border-gray-600"},BZn={class:"flex items-center justify-between"},FZn={class:"relative inline-flex items-center cursor-pointer"},$Zn={class:"flex items-center justify-between"},UZn={class:"relative inline-flex items-center cursor-pointer"},GZn={class:"flex items-center justify-between"},qZn={class:"relative inline-flex items-center cursor-pointer"},zZn={class:"flex items-center justify-between"},jZn={class:"relative inline-flex items-center cursor-pointer"},WZn={class:"space-y-6"},YZn={class:"flex flex-col gap-2"},KZn={class:"flex flex-col gap-4"},ZZn={class:"flex flex-col gap-2"},XZn={class:"flex flex-col gap-4"},JZn={class:"flex flex-col gap-2"},eXn={class:"flex flex-col gap-4"},tXn={class:"flex flex-col gap-2"},nXn={class:"flex flex-col gap-4"},rXn={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"},iXn={class:"flex flex-row p-3"},oXn={class:"grid gap-6 p-6 bg-white dark:bg-gray-800 rounded-xl shadow-lg"},sXn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-6"},aXn={class:"w-full md:w-2/3"},lXn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-6"},cXn={class:"w-full md:w-2/3"},uXn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-6"},dXn={class:"w-full md:w-2/3"},fXn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-6"},pXn={class:"w-full md:w-2/3"},hXn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-6"},TXn={class:"w-full md:w-2/3"},mXn={class:"space-y-6 bg-gray-50 dark:bg-gray-800 p-6 rounded-lg shadow-md"},gXn={class:"flex items-center space-x-4"},_Xn={class:"w-2/3"},QXn={class:"inline-flex items-center cursor-pointer"},vXn={class:"flex items-center space-x-4"},yXn={class:"w-2/3"},bXn={class:"inline-flex items-center cursor-pointer"},EXn={class:"flex items-center space-x-4"},xXn={class:"w-2/3"},SXn={class:"flex items-center space-x-4"},LXn={class:"w-2/3"},CXn={class:"grid gap-6 p-6 bg-white dark:bg-gray-800 rounded-lg shadow-md"},AXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},wXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},MXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},OXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},RXn={class:"space-y-4 p-4 bg-gray-50 dark:bg-gray-700 rounded-lg"},NXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},DXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},IXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},kXn={class:"space-y-4 p-4 bg-gray-50 dark:bg-gray-700 rounded-lg"},PXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},HXn={class:"flex items-center"},VXn={class:"relative inline-flex items-center cursor-pointer"},BXn={class:"grid grid-cols-1 md:grid-cols-[300px,1fr] gap-4 items-center"},FXn={class:"space-y-4 p-4 bg-white dark:bg-gray-800 rounded-lg shadow-md"},$Xn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-4"},UXn={class:"md:w-2/3"},GXn=["value"],qXn={class:"flex flex-col md:flex-row md:items-center space-y-2 md:space-y-0 md:space-x-4 pt-4 border-t dark:border-gray-700"},zXn={class:"md:w-2/3"},jXn=["value"],WXn={class:"grid gap-4 p-4 bg-gray-50 dark:bg-gray-800 rounded-lg shadow-md"},YXn={class:"grid grid-cols-[200px,1fr] items-center gap-4"},KXn={class:"grid grid-cols-[200px,1fr] items-center gap-4"},ZXn={class:"grid grid-cols-[200px,1fr] items-center gap-4"},XXn={class:"grid grid-cols-[200px,1fr] items-center gap-4"},JXn={class:"space-y-3"},eJn={class:"flex items-center space-x-2 cursor-pointer"},tJn={class:"flex items-center space-x-2 cursor-pointer"},nJn={class:"pl-6 space-y-2 border-l-2 border-gray-200 dark:border-gray-600"},rJn=["id","onUpdate:modelValue"],iJn={class:"text-sm text-gray-600 dark:text-gray-300"},oJn={class:"grid grid-cols-[200px,1fr] items-center gap-4"},sJn={class:"space-y-3"},aJn=["id","onUpdate:modelValue"],lJn={class:"text-sm text-gray-600 dark:text-gray-300"},cJn={class:"space-y-6 p-6 bg-white dark:bg-gray-800 rounded-lg shadow-md"},uJn={class:"flex items-center justify-between"},dJn={class:"relative inline-flex items-center cursor-pointer"},fJn={class:"flex items-center justify-between"},pJn={class:"relative inline-flex items-center cursor-pointer"},hJn={class:"space-y-2"},TJn={for:"audio_silenceTimer",class:"text-sm font-medium text-gray-700 dark:text-gray-200"},mJn={class:"flex flex-col gap-4"},gJn={class:"space-y-2"},_Jn=["value"],QJn={class:"bg-white dark:bg-gray-800 rounded-xl shadow-lg p-6 space-y-6"},vJn={class:"flex items-center justify-between p-4 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-lg transition-all"},yJn={class:"relative inline-flex items-center cursor-pointer"},bJn={class:"p-4"},EJn={class:"p-4"},xJn={class:"relative"},SJn=["value"],LJn={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"},CJn={class:"flex flex-row"},AJn={class:"flex flex-row"},wJn=["value"],MJn={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"},OJn={class:"flex flex-row"},RJn=["value"],NJn={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"},DJn={class:"flex flex-row"},IJn=["value"],kJn={class:"flex flex-row"},PJn=["value"],HJn={class:"flex flex-row"},VJn={class:"flex flex-row"},BJn={class:"flex flex-row"},FJn={class:"flex flex-row"},$Jn={class:"flex flex-row"},UJn={class:"flex flex-row"},GJn={class:"flex flex-row"},qJn={class:"flex flex-row"},zJn={class:"flex flex-row"},jJn={class:"flex flex-row"},WJn={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"},YJn={class:"flex flex-row"},KJn={class:"flex flex-row"},ZJn={class:"flex flex-row"},XJn={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"},JJn={class:"flex flex-row"},eer={class:"flex flex-row"},ter={class:"flex flex-row"},ner={class:"flex flex-row"},rer={class:"flex flex-row"},ier=["value"],oer={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"},ser={class:"flex flex-row"},aer={class:"flex flex-row"},ler={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"},cer={class:"flex flex-row"},uer={class:"flex flex-row"},der={class:"flex flex-row"},fer={class:"flex flex-row"},per={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"},her={class:"flex flex-row"},Ter={class:"flex flex-row"},mer={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"},ger={class:"flex flex-row"},_er={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"},Qer={class:"flex flex-row"},ver={class:"flex flex-row"},yer={class:"flex flex-row"},ber={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"},Eer={class:"flex flex-row"},xer={class:"flex flex-row"},Ser={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"},Ler={class:"flex flex-row"},Cer={class:"flex flex-row"},Aer=["value"],wer={class:"flex flex-row"},Mer={class:"flex flex-row"},Oer={class:"flex flex-row"},Rer={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"},Ner={class:"flex flex-row"},Der={class:"flex flex-row"},Ier={class:"flex flex-row"},ker={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"},Per={class:"flex flex-row"},Her={class:"flex flex-row"},Ver={class:"flex flex-row"},Ber={class:"flex flex-col align-bottom"},Fer={class:"relative"},$er={class:"absolute right-0"},Uer={class:"flex flex-row"},Ger={class:"flex flex-row"},qer={class:"flex flex-row"},zer={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"},jer={class:"flex flex-row"},Wer={class:"flex flex-row"},Yer={class:"flex flex-row"},Ker={class:"bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 max-w-2xl mx-auto"},Zer={class:"flex flex-col md:flex-row items-start md:items-center space-y-4 md:space-y-0 md:space-x-6"},Xer={class:"w-full md:w-2/3"},Jer={class:"relative"},etr={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"},ttr={class:"flex flex-row"},ntr={class:"flex flex-row"},rtr={class:"flex flex-row"},itr={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"},otr={class:"flex flex-row p-3"},str={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},atr={key:1,class:"mr-2"},ltr={key:2,class:"text-base font-semibold cursor-pointer select-none items-center"},ctr={class:"flex gap-1 items-center"},utr=["src"],dtr={class:"font-bold font-large text-lg line-clamp-1"},ftr={key:0,class:"mb-2"},ptr={for:"binding",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},htr={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"},Ttr={class:"flex flex-row p-3"},mtr={class:"flex flex-row items-center"},gtr={key:0,class:"text-base text-red-600 flex gap-3 items-center mr-2"},_tr={key:1,class:"text-base text-red-600 flex gap-3 items-center mr-2"},Qtr={key:2,class:"mr-2"},vtr={key:3,class:"text-base font-semibold cursor-pointer select-none items-center"},ytr={class:"flex gap-1 items-center"},btr=["src"],Etr={class:"font-bold font-large text-lg line-clamp-1"},xtr={class:"mx-2 mb-4"},Str={class:"relative"},Ltr={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},Ctr={key:0},Atr={key:1},wtr={key:0,role:"status",class:"text-center w-full display: flex;align-items: center;"},Mtr={key:1,class:"mb-2"},Otr={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},Rtr={class:"mb-2"},Ntr={class:"p-2"},Dtr={class:"mb-3"},Itr={key:0},ktr={class:"mb-3"},Ptr={key:1,class:"relative flex flex-col items-center justify-center flex-grow h-full"},Htr={class:"relative flex flex-row flex-grow items-center w-full h-full bottom-0"},Vtr={class:"w-full p-2"},Btr={class:"flex justify-between mb-1"},Ftr={class:"text-sm font-medium text-blue-700 dark:text-white"},$tr=["title"],Utr={class:"w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700"},Gtr={class:"flex justify-between mb-1"},qtr={class:"text-base font-medium text-blue-700 dark:text-white"},ztr={class:"text-sm font-medium text-blue-700 dark:text-white"},jtr={class:"flex flex-grow"},Wtr={class:"flex flex-row flex-grow gap-3"},Ytr={class:"p-2 text-center grow"},Ktr={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"},Ztr={class:"flex flex-row p-3 items-center"},Xtr={key:0,class:"mr-2"},Jtr={class:"mr-2 font-bold font-large text-lg line-clamp-1"},enr={key:1,class:"mr-2"},tnr={key:2,class:"text-base font-semibold cursor-pointer select-none items-center flex flex-row"},nnr={key:0,class:"flex -space-x-4 items-center"},rnr={class:"group items-center flex flex-row"},inr=["onClick"],onr=["src","title"],snr=["onClick"],anr={class:"mx-2 mb-4"},lnr={class:"relative"},cnr={class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},unr={key:0},dnr={key:1},fnr={key:0,class:"mx-2 mb-4"},pnr={for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},hnr=["selected"],Tnr={key:0,class:"mb-2"},mnr={for:"model",class:"block ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},gnr={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"},_nr={class:"flex flex-row"},Qnr={class:"m-2"},vnr={class:"flex flex-row gap-2 items-center"},ynr={class:"m-2"},bnr={class:"m-2"},Enr={class:"flex flex-col align-bottom"},xnr={class:"relative"},Snr={class:"absolute right-0"},Lnr={class:"m-2"},Cnr={class:"flex flex-col align-bottom"},Anr={class:"relative"},wnr={class:"absolute right-0"},Mnr={class:"m-2"},Onr={class:"flex flex-col align-bottom"},Rnr={class:"relative"},Nnr={class:"absolute right-0"},Dnr={class:"m-2"},Inr={class:"flex flex-col align-bottom"},knr={class:"relative"},Pnr={class:"absolute right-0"},Hnr={class:"m-2"},Vnr={class:"flex flex-col align-bottom"},Bnr={class:"relative"},Fnr={class:"absolute right-0"},$nr={class:"m-2"},Unr={class:"flex flex-col align-bottom"},Gnr={class:"relative"},qnr={class:"absolute right-0"};function znr(t,e,n,r,i,o){const s=pt("DictManager"),a=pt("Card"),l=pt("StringListManager"),c=pt("BindingEntry"),u=pt("RadioOptions"),d=pt("model-entry"),h=pt("personality-entry"),f=pt("AddModelDialog"),m=pt("ChoiceDialog");return k(),H(Ue,null,[g("div",xjn,[g("div",Sjn,[i.showConfirmation?(k(),H("div",Ljn,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel",type:"button",onClick:e[0]||(e[0]=he(T=>i.showConfirmation=!1,["stop"]))},e[421]||(e[421]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm save changes",type:"button",onClick:e[1]||(e[1]=he(T=>o.save_configuration(),["stop"]))},e[422]||(e[422]=[g("i",{"data-feather":"check"},null,-1)]))])):re("",!0),i.showConfirmation?re("",!0):(k(),H("div",Cjn,[g("button",{title:"Reset configuration",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[2]||(e[2]=T=>o.reset_configuration())},e[423]||(e[423]=[g("i",{"data-feather":"refresh-ccw"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Collapse / Expand all panels",type:"button",onClick:e[3]||(e[3]=he(T=>i.all_collapsed=!i.all_collapsed,["stop"]))},e[424]||(e[424]=[g("i",{"data-feather":"list"},null,-1)]))])),g("div",Ajn,[g("button",{title:"Clear uploads",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[4]||(e[4]=T=>o.api_get_req("clear_uploads").then(Q=>{Q.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},e[425]||(e[425]=[g("i",{"data-feather":"trash-2"},null,-1)])),g("button",{title:"Restart program",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[5]||(e[5]=T=>o.api_post_req("restart_program").then(Q=>{Q.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast(["failed!"],4,!1)}))},e[426]||(e[426]=[g("i",{"data-feather":"refresh-ccw"},null,-1)])),i.has_updates?(k(),H("button",{key:0,title:"Upgrade program ",class:"text-2xl hover:text-secondary duration-75 active:scale-90",onClick:e[6]||(e[6]=T=>o.api_post_req("update_software").then(Q=>{Q.status?this.$store.state.toast.showToast("Success!",4,!0):this.$store.state.toast.showToast("Success!",4,!0)}))},e[427]||(e[427]=[g("i",{"data-feather":"arrow-up-circle"},null,-1),g("i",{"data-feather":"alert-circle"},null,-1)]))):re("",!0),g("div",wjn,[i.settingsChanged?(k(),H("div",Mjn,[i.isLoading?re("",!0):(k(),H("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Apply changes",type:"button",onClick:e[7]||(e[7]=he(T=>o.applyConfiguration(),["stop"]))},e[428]||(e[428]=[g("div",{class:"flex flex-row"},[g("p",{class:"text-green-600 font-bold hover:text-green-300 ml-4 pl-4 mr-4 pr-4"},"Apply changes:"),g("i",{"data-feather":"check"})],-1)]))),i.isLoading?re("",!0):(k(),H("button",{key:1,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Cancel changes",type:"button",onClick:e[8]||(e[8]=he(T=>o.cancelConfiguration(),["stop"]))},e[429]||(e[429]=[g("div",{class:"flex flex-row"},[g("p",{class:"text-red-600 font-bold hover:text-red-300 ml-4 pl-4 mr-4 pr-4"},"Cancel changes:"),g("i",{"data-feather":"x"})],-1)])))])):re("",!0),i.isLoading?(k(),H("div",Ojn,[g("p",null,le(i.loading_text),1),e[430]||(e[430]=g("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"},[g("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"}),g("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[431]||(e[431]=g("span",{class:"sr-only"},"Loading...",-1))])):re("",!0)])])]),g("div",{class:je(i.isLoading?"pointer-events-none opacity-30 w-full":"w-full")},[g("div",Rjn,[g("div",Njn,[g("button",{onClick:e[9]||(e[9]=he(T=>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"},[J(g("div",null,e[432]||(e[432]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.sc_collapsed]]),J(g("div",null,e[433]||(e[433]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.sc_collapsed]]),e[436]||(e[436]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),e[437]||(e[437]=g("div",{class:"mr-2"},"|",-1)),g("div",Djn,[g("div",Ijn,[g("div",null,[o.vramUsage&&o.vramUsage.gpus&&o.vramUsage.gpus.length==1?(k(),H("div",kjn,[(k(!0),H(Ue,null,ot(o.vramUsage.gpus,T=>(k(),H("div",{class:"flex gap-2 items-center",key:T},[g("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Pjn),g("p",Hjn,[g("div",null,le(o.computedFileSize(T.used_vram))+" / "+le(o.computedFileSize(T.total_vram))+" ("+le(T.percentage)+"%) ",1)])]))),128))])):re("",!0),o.vramUsage&&o.vramUsage.gpus&&o.vramUsage.gpus.length>1?(k(),H("div",Vjn,[g("div",Bjn,[g("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,Fjn),g("p",$jn,[g("div",null,le(o.vramUsage.gpus.length)+"x ",1)])])])):re("",!0)]),e[434]||(e[434]=g("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),g("p",Ujn,[g("div",null,le(o.ram_usage)+" / "+le(o.ram_total_space)+" ("+le(o.ram_percent_usage)+"%)",1)]),e[435]||(e[435]=g("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),g("p",Gjn,[g("div",null,le(o.disk_binding_models_usage)+" / "+le(o.disk_total_space)+" ("+le(o.disk_percent_usage)+"%)",1)])])])])]),g("div",{class:je([{hidden:i.sc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",qjn,[e[440]||(e[440]=g("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[g("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"})]),nt(" CPU Ram usage: ")],-1)),g("div",zjn,[g("div",null,[e[438]||(e[438]=g("b",null,"Avaliable ram: ",-1)),nt(le(o.ram_available_space),1)]),g("div",null,[e[439]||(e[439]=g("b",null,"Ram usage: ",-1)),nt(" "+le(o.ram_usage)+" / "+le(o.ram_total_space)+" ("+le(o.ram_percent_usage)+")% ",1)])]),g("div",jjn,[g("div",Wjn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn("width: "+o.ram_percent_usage+"%;")},null,4)])])]),g("div",Yjn,[e[443]||(e[443]=g("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-white"},[g("i",{"data-feather":"hard-drive",class:"w-5 h-5"}),nt(" Disk usage: ")],-1)),g("div",Kjn,[g("div",null,[e[441]||(e[441]=g("b",null,"Avaliable disk space: ",-1)),nt(le(o.disk_available_space),1)]),g("div",null,[e[442]||(e[442]=g("b",null,"Disk usage: ",-1)),nt(" "+le(o.disk_binding_models_usage)+" / "+le(o.disk_total_space)+" ("+le(o.disk_percent_usage)+"%)",1)])]),g("div",Zjn,[g("div",Xjn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn("width: "+o.disk_percent_usage+"%;")},null,4)])])]),(k(!0),H(Ue,null,ot(o.vramUsage.gpus,T=>(k(),H("div",{class:"mb-2",key:T},[g("label",Jjn,[g("img",{src:i.SVGGPU,width:"25",height:"25"},null,8,eWn),e[444]||(e[444]=nt(" GPU usage: "))]),g("div",tWn,[g("div",null,[e[445]||(e[445]=g("b",null,"Model: ",-1)),nt(le(T.gpu_model),1)]),g("div",null,[e[446]||(e[446]=g("b",null,"Avaliable vram: ",-1)),nt(le(this.computedFileSize(T.available_space)),1)]),g("div",null,[e[447]||(e[447]=g("b",null,"GPU usage: ",-1)),nt(" "+le(this.computedFileSize(T.used_vram))+" / "+le(this.computedFileSize(T.total_vram))+" ("+le(T.percentage)+"%)",1)])]),g("div",nWn,[g("div",rWn,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn("width: "+T.percentage+"%;")},null,4)])])]))),128))],2)]),g("div",iWn,[g("div",oWn,[g("button",{onClick:e[10]||(e[10]=he(T=>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"},[J(g("div",null,e[448]||(e[448]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.smartrouterconf_collapsed]]),J(g("div",null,e[449]||(e[449]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.smartrouterconf_collapsed]]),e[450]||(e[450]=g("div",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Smart routing configurations",-1))])]),g("div",{class:je([{hidden:i.smartrouterconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",sWn,[oe(a,{title:"Smart Routing Settings",is_shrunk:!1,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",aWn,[g("div",lWn,[g("div",cWn,[e[451]||(e[451]=g("label",{for:"use_smart_routing",class:"text-sm font-bold w-64"},"Use Smart Routing:",-1)),J(g("input",{type:"checkbox",id:"use_smart_routing","onUpdate:modelValue":e[11]||(e[11]=T=>o.configFile.use_smart_routing=T),onChange:e[12]||(e[12]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.use_smart_routing]])]),g("div",uWn,[e[452]||(e[452]=g("label",{for:"restore_model_after_smart_routing",class:"text-sm font-bold w-64"},"Restore model after smart routing:",-1)),J(g("input",{type:"checkbox",id:"restore_model_after_smart_routing","onUpdate:modelValue":e[13]||(e[13]=T=>o.configFile.restore_model_after_smart_routing=T),onChange:e[14]||(e[14]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.restore_model_after_smart_routing]])]),g("div",dWn,[e[453]||(e[453]=g("label",{for:"smart_routing_router_model",class:"text-sm font-bold w-64"},"Router Model:",-1)),J(g("input",{type:"text",id:"smart_routing_router_model","onUpdate:modelValue":e[15]||(e[15]=T=>o.configFile.smart_routing_router_model=T),onChange:e[16]||(e[16]=T=>i.settingsChanged=!0),class:"flex-grow mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.smart_routing_router_model]])]),g("div",fWn,[e[454]||(e[454]=g("label",{for:"smart_routing_models_description",class:"text-sm font-bold w-64 mt-1"},"Models with description:",-1)),oe(s,{modelValue:o.configFile.smart_routing_models_description,"onUpdate:modelValue":e[17]||(e[17]=T=>o.configFile.smart_routing_models_description=T),onChange:e[18]||(e[18]=T=>i.settingsChanged=!0),"key-name":"Model Path","value-name":"Model description",placeholder:"Enter model name",class:"flex-grow"},null,8,["modelValue"])])])])]),_:1})])],2)]),g("div",pWn,[g("div",hWn,[g("button",{onClick:e[19]||(e[19]=he(T=>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"},[J(g("div",null,e[455]||(e[455]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.mainconf_collapsed]]),J(g("div",null,e[456]||(e[456]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.mainconf_collapsed]]),e[457]||(e[457]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Main configurations",-1))])]),g("div",{class:je([{hidden:i.mainconf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",TWn,[oe(a,{title:"General",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",mWn,[g("div",gWn,[e[462]||(e[462]=g("h3",{class:"font-bold text-lg text-gray-800 dark:text-gray-200 mb-4"},"User Information",-1)),g("div",_Wn,[g("div",QWn,[e[458]||(e[458]=g("div",{class:"setting-label w-64"},[g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Username:")],-1)),J(g("input",{type:"text","onUpdate:modelValue":e[20]||(e[20]=T=>o.configFile.user_name=T),onChange:e[21]||(e[21]=T=>i.settingsChanged=!0),class:"flex-1 px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-blue-500"},null,544),[[we,o.configFile.user_name]])]),g("div",vWn,[e[459]||(e[459]=g("div",{class:"setting-label w-64"},[g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"User Description:")],-1)),J(g("textarea",{"onUpdate:modelValue":e[22]||(e[22]=T=>o.configFile.user_description=T),onChange:e[23]||(e[23]=T=>i.settingsChanged=!0),class:"flex-1 px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:ring-2 focus:ring-blue-500",rows:"3"}," ",544),[[we,o.configFile.user_description]])]),g("div",yWn,[e[461]||(e[461]=g("div",{class:"setting-label w-64"},[g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"User Avatar:")],-1)),g("div",bWn,[g("label",EWn,[g("img",{src:o.configFile.user_avatar?`/user_infos/${o.configFile.user_avatar}`:t.defaultAvatar,class:"w-12 h-12 rounded-full object-cover border-2 border-gray-300 hover:border-blue-500 transition-all"},null,8,xWn)]),g("input",{type:"file",id:"avatar-upload",class:"hidden",onChange:e[24]||(e[24]=(...T)=>o.uploadAvatar&&o.uploadAvatar(...T))},null,32),g("button",{onClick:e[25]||(e[25]=he(T=>o.resetAvatar(),["stop"])),class:"text-gray-500 hover:text-red-600 p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-all",title:"Remove avatar"},e[460]||(e[460]=[g("i",{"data-feather":"x"},null,-1)]))])])])]),g("div",SWn,[e[469]||(e[469]=g("h3",{class:"font-bold text-lg text-gray-800 dark:text-gray-200 mb-4"},"Discussion Settings",-1)),g("div",LWn,[g("div",CWn,[e[464]||(e[464]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Use username in discussions",-1)),g("div",AWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[26]||(e[26]=T=>o.configFile.use_user_name_in_discussions=T),onChange:e[27]||(e[27]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.use_user_name_in_discussions]]),e[463]||(e[463]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",wWn,[e[466]||(e[466]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Use model name in discussions",-1)),g("div",MWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[28]||(e[28]=T=>o.configFile.use_model_name_in_discussions=T),onChange:e[29]||(e[29]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.use_model_name_in_discussions]]),e[465]||(e[465]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",OWn,[e[468]||(e[468]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Use user information in discussions",-1)),g("div",RWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[30]||(e[30]=T=>o.configFile.use_user_informations_in_discussion=T),onChange:e[31]||(e[31]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.use_user_informations_in_discussion]]),e[467]||(e[467]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])])])]),g("div",NWn,[e[476]||(e[476]=g("h3",{class:"font-bold text-lg text-gray-800 dark:text-gray-200 mb-4"},"Debug Settings",-1)),g("div",DWn,[g("div",IWn,[e[471]||(e[471]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Enable Debug Mode",-1)),g("div",kWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[32]||(e[32]=T=>o.configFile.debug=T),onChange:e[33]||(e[33]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.debug]]),e[470]||(e[470]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",PWn,[e[473]||(e[473]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Show Final Full Prompt",-1)),g("div",HWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[34]||(e[34]=T=>o.configFile.debug_show_final_full_prompt=T),onChange:e[35]||(e[35]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.debug_show_final_full_prompt]]),e[472]||(e[472]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",VWn,[e[475]||(e[475]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Show Chunks",-1)),g("div",BWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[36]||(e[36]=T=>o.configFile.debug_show_chunks=T),onChange:e[37]||(e[37]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.debug_show_chunks]]),e[474]||(e[474]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])])])]),g("div",FWn,[e[487]||(e[487]=g("h3",{class:"font-bold text-lg text-gray-800 dark:text-gray-200 mb-4"},"Auto-sync Settings",-1)),g("div",$Wn,[g("div",UWn,[e[478]||(e[478]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Auto Update",-1)),g("div",GWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[38]||(e[38]=T=>o.configFile.auto_update=T),onChange:e[39]||(e[39]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.auto_update]]),e[477]||(e[477]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",qWn,[e[480]||(e[480]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Auto Sync Personalities",-1)),g("div",zWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[40]||(e[40]=T=>o.configFile.auto_sync_personalities=T),onChange:e[41]||(e[41]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.auto_sync_personalities]]),e[479]||(e[479]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",jWn,[e[482]||(e[482]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Auto Sync Extensions",-1)),g("div",WWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[42]||(e[42]=T=>o.configFile.auto_sync_extensions=T),onChange:e[43]||(e[43]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.auto_sync_extensions]]),e[481]||(e[481]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",YWn,[e[484]||(e[484]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Auto Sync Bindings",-1)),g("div",KWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[44]||(e[44]=T=>o.configFile.auto_sync_bindings=T),onChange:e[45]||(e[45]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.auto_sync_bindings]]),e[483]||(e[483]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("div",ZWn,[e[486]||(e[486]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200"},"Auto Sync Models",-1)),g("div",XWn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[46]||(e[46]=T=>o.configFile.auto_sync_models=T),onChange:e[47]||(e[47]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,544),[[ut,o.configFile.auto_sync_models]]),e[485]||(e[485]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])])])])])]),_:1}),oe(a,{title:"Model template",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",JWn,[g("div",eYn,[e[489]||(e[489]=g("label",{class:"text-sm font-semibold text-gray-700 dark:text-gray-300"},"Template Type",-1)),g("select",{onChange:e[48]||(e[48]=(...T)=>o.handleTemplateSelection&&o.handleTemplateSelection(...T)),class:"form-select w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},e[488]||(e[488]=[g("option",{value:"lollms"},"Lollms communication template",-1),g("option",{value:"lollms_simplified"},"Lollms simplified communication template",-1),g("option",{value:"bare"},"Bare, useful when in chat mode",-1),g("option",{value:"llama3"},"LLama3 communication template",-1),g("option",{value:"mistral"},"Mistral communication template",-1),g("option",{value:"deepseek"},"DeepSeek communication template",-1)]),32)]),g("div",tYn,[g("div",nYn,[e[490]||(e[490]=g("label",{for:"start_header_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," Start Header Template ",-1)),J(g("input",{type:"text",id:"start_header_id_template","onUpdate:modelValue":e[49]||(e[49]=T=>o.configFile.start_header_id_template=T),onChange:e[50]||(e[50]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.start_header_id_template]])]),g("div",rYn,[e[491]||(e[491]=g("label",{for:"end_header_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," End Header Template ",-1)),J(g("input",{type:"text",id:"end_header_id_template","onUpdate:modelValue":e[51]||(e[51]=T=>o.configFile.end_header_id_template=T),onChange:e[52]||(e[52]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.end_header_id_template]])])]),g("div",iYn,[g("div",oYn,[e[492]||(e[492]=g("label",{for:"start_user_header_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," Start User Header Template ",-1)),J(g("input",{type:"text",id:"start_user_header_id_template","onUpdate:modelValue":e[53]||(e[53]=T=>o.configFile.start_user_header_id_template=T),onChange:e[54]||(e[54]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.start_user_header_id_template]])]),g("div",sYn,[e[493]||(e[493]=g("label",{for:"end_user_header_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," End User Header Template ",-1)),J(g("input",{type:"text",id:"end_user_header_id_template","onUpdate:modelValue":e[55]||(e[55]=T=>o.configFile.end_user_header_id_template=T),onChange:e[56]||(e[56]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.end_user_header_id_template]])])]),g("div",aYn,[g("div",lYn,[e[494]||(e[494]=g("label",{for:"start_ai_header_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," Start AI Header Template ",-1)),J(g("input",{type:"text",id:"start_ai_header_id_template","onUpdate:modelValue":e[57]||(e[57]=T=>o.configFile.start_ai_header_id_template=T),onChange:e[58]||(e[58]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.start_ai_header_id_template]])]),g("div",cYn,[e[495]||(e[495]=g("label",{for:"end_ai_header_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," End AI Header Template ",-1)),J(g("input",{type:"text",id:"end_ai_header_id_template","onUpdate:modelValue":e[59]||(e[59]=T=>o.configFile.end_ai_header_id_template=T),onChange:e[60]||(e[60]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.end_ai_header_id_template]])])]),g("div",uYn,[g("div",dYn,[e[496]||(e[496]=g("label",{for:"end_user_message_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," End User Message Template ",-1)),J(g("input",{type:"text",id:"end_user_message_id_template","onUpdate:modelValue":e[61]||(e[61]=T=>o.configFile.end_user_message_id_template=T),onChange:e[62]||(e[62]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.end_user_message_id_template]])]),g("div",fYn,[e[497]||(e[497]=g("label",{for:"end_ai_message_id_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," End AI Message Template ",-1)),J(g("input",{type:"text",id:"end_ai_message_id_template","onUpdate:modelValue":e[63]||(e[63]=T=>o.configFile.end_ai_message_id_template=T),onChange:e[64]||(e[64]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.end_ai_message_id_template]])])]),g("div",pYn,[e[498]||(e[498]=g("label",{for:"separator_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," Separator Template ",-1)),J(g("textarea",{id:"separator_template","onUpdate:modelValue":e[65]||(e[65]=T=>o.configFile.separator_template=T),onChange:e[66]||(e[66]=T=>i.settingsChanged=!0),class:"w-full h-24 rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"}," ",544),[[we,o.configFile.separator_template]])]),g("div",hYn,[e[499]||(e[499]=g("label",{for:"system_message_template",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," System Template ",-1)),J(g("input",{type:"text",id:"system_message_template","onUpdate:modelValue":e[67]||(e[67]=T=>o.configFile.system_message_template=T),onChange:e[68]||(e[68]=T=>i.settingsChanged=!0),class:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:border-blue-500 focus:ring-blue-500"},null,544),[[we,o.configFile.system_message_template]])]),g("div",TYn,[e[500]||(e[500]=g("label",{class:"text-sm font-semibold text-gray-700 dark:text-gray-300"},"Full Template Preview",-1)),g("div",mYn,[g("div",{innerHTML:o.full_template},null,8,gYn)])]),g("div",_Yn,[e[502]||(e[502]=g("label",{for:"use_continue_message",class:"text-sm font-semibold text-gray-700 dark:text-gray-300"}," Use Continue Message ",-1)),g("div",QYn,[J(g("input",{type:"checkbox",id:"use_continue_message","onUpdate:modelValue":e[69]||(e[69]=T=>o.configFile.use_continue_message=T),onChange:e[70]||(e[70]=T=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer"},null,544),[[ut,o.configFile.use_continue_message]]),e[501]||(e[501]=g("label",{for:"use_continue_message",class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])])])]),_:1}),oe(a,{title:"User",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",vYn,[g("div",yYn,[e[503]||(e[503]=g("label",{for:"user_name",class:"text-sm font-bold text-gray-700 dark:text-gray-200 min-w-[200px]"}," User Name ",-1)),J(g("input",{type:"text",id:"user_name",required:"","onUpdate:modelValue":e[71]||(e[71]=T=>o.configFile.user_name=T),onChange:e[72]||(e[72]=T=>i.settingsChanged=!0),class:"flex-1 px-4 py-2 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.user_name]])]),g("div",bYn,[e[504]||(e[504]=g("label",{for:"user_description",class:"text-sm font-bold text-gray-700 dark:text-gray-200 min-w-[200px]"}," User Description ",-1)),J(g("textarea",{id:"user_description",required:"","onUpdate:modelValue":e[73]||(e[73]=T=>o.configFile.user_description=T),onChange:e[74]||(e[74]=T=>i.settingsChanged=!0),class:"flex-1 h-[300px] px-4 py-2 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500 dark:text-white resize-none"},null,544),[[we,o.configFile.user_description]])]),g("div",EYn,[g("div",xYn,[e[508]||(e[508]=g("label",{class:"text-sm font-bold text-gray-700 dark:text-gray-200 min-w-[200px]"}," Discussion Settings ",-1)),g("div",SYn,[g("label",LYn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[75]||(e[75]=T=>o.configFile.use_user_informations_in_discussion=T),onChange:e[76]||(e[76]=T=>i.settingsChanged=!0),class:"w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:bg-gray-600"},null,544),[[ut,o.configFile.use_user_informations_in_discussion]]),e[505]||(e[505]=g("span",{class:"text-sm text-gray-700 dark:text-gray-200"},"Use user description in discussion",-1))]),g("label",CYn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[77]||(e[77]=T=>o.configFile.use_model_name_in_discussions=T),onChange:e[78]||(e[78]=T=>i.settingsChanged=!0),class:"w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:bg-gray-600"},null,544),[[ut,o.configFile.use_model_name_in_discussions]]),e[506]||(e[506]=g("span",{class:"text-sm text-gray-700 dark:text-gray-200"},"Use model name in discussion",-1))]),g("label",AYn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[79]||(e[79]=T=>o.configFile.use_user_name_in_discussions=T),onChange:e[80]||(e[80]=T=>i.settingsChanged=!0),class:"w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:bg-gray-600"},null,544),[[ut,o.configFile.use_user_name_in_discussions]]),e[507]||(e[507]=g("span",{class:"text-sm text-gray-700 dark:text-gray-200"},"Use User Name in discussions",-1))])])])]),g("div",wYn,[e[510]||(e[510]=g("label",{class:"text-sm font-bold text-gray-700 dark:text-gray-200 min-w-[200px]"}," User Avatar ",-1)),g("div",MYn,[g("label",OYn,[g("img",{src:o.configFile.user_avatar!=null&&o.configFile.user_avatar!=""?"/user_infos/"+o.configFile.user_avatar:i.storeLogo,class:"w-16 h-16 rounded-full object-cover border-2 border-gray-300 hover:border-blue-500"},null,8,RYn)]),g("input",{type:"file",id:"avatar-upload",class:"hidden",onChange:e[81]||(e[81]=(...T)=>o.uploadAvatar&&o.uploadAvatar(...T))},null,32),g("button",{onClick:e[82]||(e[82]=he(T=>o.resetAvatar(),["stop"])),class:"p-2 text-gray-500 hover:text-red-500 transition-colors duration-200",title:"Remove avatar"},e[509]||(e[509]=[g("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)]))])]),g("div",NYn,[g("div",DYn,[e[511]||(e[511]=g("label",{for:"max_n_predict",class:"text-sm font-bold text-gray-700 dark:text-gray-200 min-w-[200px]"}," Maximum Token Space ",-1)),J(g("input",{type:"number",id:"max_n_predict",required:"","onUpdate:modelValue":e[83]||(e[83]=T=>o.configFile.max_n_predict=T),onChange:e[84]||(e[84]=T=>i.settingsChanged=!0),class:"flex-1 px-4 py-2 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.max_n_predict]])]),g("div",IYn,[e[512]||(e[512]=g("label",{for:"min_n_predict",class:"text-sm font-bold text-gray-700 dark:text-gray-200 min-w-[200px]"}," Minimum Token Space ",-1)),J(g("input",{type:"number",id:"min_n_predict",required:"","onUpdate:modelValue":e[85]||(e[85]=T=>o.configFile.min_n_predict=T),onChange:e[86]||(e[86]=T=>i.settingsChanged=!0),class:"flex-1 px-4 py-2 rounded-lg border border-gray-300 focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.min_n_predict]])])])])]),_:1}),oe(a,{title:"Security settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",kYn,[g("div",PYn,[e[513]||(e[513]=g("label",{for:"turn_on_code_execution",class:"text-sm font-medium text-gray-700 dark:text-gray-200"}," Turn on code execution ",-1)),g("div",HYn,[J(g("input",{type:"checkbox",id:"turn_on_code_execution",required:"","onUpdate:modelValue":e[87]||(e[87]=T=>o.configFile.turn_on_code_execution=T),onChange:e[88]||(e[88]=T=>i.settingsChanged=!0),class:"toggle-checkbox"},null,544),[[ut,o.configFile.turn_on_code_execution]])])]),g("div",VYn,[e[514]||(e[514]=g("label",{for:"turn_on_code_validation",class:"text-sm font-medium text-gray-700 dark:text-gray-200"},[nt(" Turn on code validation "),g("span",{class:"block text-xs text-gray-500 dark:text-gray-400"},"Very recommended for security reasons")],-1)),g("div",BYn,[J(g("input",{type:"checkbox",id:"turn_on_code_validation",required:"","onUpdate:modelValue":e[89]||(e[89]=T=>o.configFile.turn_on_code_validation=T),onChange:e[90]||(e[90]=T=>i.settingsChanged=!0),class:"toggle-checkbox"},null,544),[[ut,o.configFile.turn_on_code_validation]])])]),g("div",FYn,[e[515]||(e[515]=g("label",{for:"turn_on_setting_update_validation",class:"text-sm font-medium text-gray-700 dark:text-gray-200"},[nt(" Turn on apply settings validation "),g("span",{class:"block text-xs text-gray-500 dark:text-gray-400"},"Very recommended for security reasons")],-1)),g("div",$Yn,[J(g("input",{type:"checkbox",id:"turn_on_setting_update_validation",required:"","onUpdate:modelValue":e[91]||(e[91]=T=>o.configFile.turn_on_setting_update_validation=T),onChange:e[92]||(e[92]=T=>i.settingsChanged=!0),class:"toggle-checkbox"},null,544),[[ut,o.configFile.turn_on_setting_update_validation]])])]),g("div",UYn,[e[516]||(e[516]=g("label",{for:"turn_on_open_file_validation",class:"text-sm font-medium text-gray-700 dark:text-gray-200"}," Turn on open file/folder validation ",-1)),g("div",GYn,[J(g("input",{type:"checkbox",id:"turn_on_open_file_validation",required:"","onUpdate:modelValue":e[93]||(e[93]=T=>o.configFile.turn_on_open_file_validation=T),onChange:e[94]||(e[94]=T=>i.settingsChanged=!0),class:"toggle-checkbox"},null,544),[[ut,o.configFile.turn_on_open_file_validation]])])]),g("div",qYn,[e[517]||(e[517]=g("label",{for:"turn_on_send_file_validation",class:"text-sm font-medium text-gray-700 dark:text-gray-200"}," Turn on send file validation ",-1)),g("div",zYn,[J(g("input",{type:"checkbox",id:"turn_on_send_file_validation",required:"","onUpdate:modelValue":e[95]||(e[95]=T=>o.configFile.turn_on_send_file_validation=T),onChange:e[96]||(e[96]=T=>i.settingsChanged=!0),class:"toggle-checkbox"},null,544),[[ut,o.configFile.turn_on_send_file_validation]])])])])]),_:1}),oe(a,{title:"Knowledge database",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",jYn,[g("div",WYn,[e[519]||(e[519]=g("label",{for:"activate_skills_lib",class:"text-sm font-bold text-gray-900 dark:text-white min-w-[200px]"}," Activate Skills library: ",-1)),g("div",YYn,[g("label",KYn,[J(g("input",{type:"checkbox",id:"activate_skills_lib",required:"","onUpdate:modelValue":e[97]||(e[97]=T=>o.configFile.activate_skills_lib=T),onChange:e[98]||(e[98]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.activate_skills_lib]]),e[518]||(e[518]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-600 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),g("div",ZYn,[e[520]||(e[520]=g("label",{for:"skills_lib_database_name",class:"text-sm font-bold text-gray-900 dark:text-white min-w-[200px]"}," Skills library database name: ",-1)),g("div",XYn,[J(g("input",{type:"text",id:"skills_lib_database_name",required:"","onUpdate:modelValue":e[99]||(e[99]=T=>o.configFile.skills_lib_database_name=T),onChange:e[100]||(e[100]=T=>i.settingsChanged=!0),class:"w-full px-3 py-2 bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-blue-500 dark:focus:border-blue-500 text-gray-900 dark:text-white transition-colors duration-200",placeholder:"Enter database name"},null,544),[[we,o.configFile.skills_lib_database_name]])])])])]),_:1}),oe(a,{title:"Latex",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",JYn,[g("div",eKn,[e[521]||(e[521]=g("div",{class:"min-w-[200px]"},[g("label",{for:"pdf_latex_path",class:"block text-sm font-semibold text-gray-700 dark:text-gray-200"}," PDF LaTeX Path: ")],-1)),g("div",tKn,[J(g("input",{type:"text",id:"pdf_latex_path",required:"","onUpdate:modelValue":e[101]||(e[101]=T=>o.configFile.pdf_latex_path=T),onChange:e[102]||(e[102]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 text-sm bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:text-white dark:placeholder-gray-400 transition-colors duration-200",placeholder:"Enter PDF LaTeX path..."},null,544),[[we,o.configFile.pdf_latex_path]])])])])]),_:1}),oe(a,{title:"Boost",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",nKn,[g("div",rKn,[g("div",iKn,[e[522]||(e[522]=g("label",{for:"positive_boost",class:"text-sm font-bold text-gray-700 dark:text-gray-200"}," Positive Boost ",-1)),g("div",oKn,[J(g("input",{type:"text",id:"positive_boost",required:"","onUpdate:modelValue":e[103]||(e[103]=T=>o.configFile.positive_boost=T),onChange:e[104]||(e[104]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-600 dark:border-gray-500 dark:text-white transition-all duration-200"},null,544),[[we,o.configFile.positive_boost]])])])]),g("div",sKn,[g("div",aKn,[e[523]||(e[523]=g("label",{for:"negative_boost",class:"text-sm font-bold text-gray-700 dark:text-gray-200"}," Negative Boost ",-1)),g("div",lKn,[J(g("input",{type:"text",id:"negative_boost",required:"","onUpdate:modelValue":e[105]||(e[105]=T=>o.configFile.negative_boost=T),onChange:e[106]||(e[106]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-600 dark:border-gray-500 dark:text-white transition-all duration-200"},null,544),[[we,o.configFile.negative_boost]])])])]),g("div",cKn,[g("div",uKn,[e[525]||(e[525]=g("label",{for:"fun_mode",class:"text-sm font-bold text-gray-700 dark:text-gray-200"}," Fun Mode ",-1)),g("div",dKn,[g("label",fKn,[J(g("input",{type:"checkbox",id:"fun_mode",required:"","onUpdate:modelValue":e[107]||(e[107]=T=>o.configFile.fun_mode=T),onChange:e[108]||(e[108]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.fun_mode]]),e[524]||(e[524]=g("div",{class:"relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])])])])]),_:1})])],2)]),g("div",pKn,[g("div",hKn,[g("button",{onClick:e[109]||(e[109]=he(T=>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"},[J(g("div",null,e[526]||(e[526]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.data_conf_collapsed]]),J(g("div",null,e[527]||(e[527]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.data_conf_collapsed]]),e[528]||(e[528]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Data management settings",-1))])]),g("div",{class:je([{hidden:i.data_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[oe(a,{title:"Data Lakes",is_subcard:!0,class:"p-4 m-2"},{default:He(()=>[g("div",TKn,[e[540]||(e[540]=g("div",{class:"flex items-center mb-4"},[g("h3",{class:"text-lg font-semibold dark:text-white"},"Data Lakes Configuration")],-1)),g("div",mKn,[(k(!0),H(Ue,null,ot(o.configFile.datalakes,(T,Q)=>(k(),H("div",{key:Q,class:"p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"},[g("div",gKn,[g("div",_Kn,[e[529]||(e[529]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Data Lake Alias",-1)),g("input",{type:"text",value:o.getDataLakeAlias(Q),onInput:_=>o.updateAlias(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter alias"},null,40,QKn)]),g("div",vKn,[e[531]||(e[531]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Type",-1)),g("select",{required:"",value:o.getDataLakeType(Q),onInput:_=>o.updateDatabaseType(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"},e[530]||(e[530]=[g("option",{value:"lollmsvectordb"},"Lollms VectorDB Folder",-1),g("option",{value:"lightrag"},"Light Rag",-1),g("option",{value:"elasticdsearch"},"Elastic Search",-1)]),40,yKn)]),g("div",bKn,[g("label",EKn,le(T.type==="lightrag"?"DataLake URL":"DataLake Path"),1),T.type==="lightrag"?(k(),H("input",{key:0,type:"text",value:o.getDataLakeUrl(Q),onInput:_=>o.updateDataLakeUrl(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter DataLake URL"},null,40,xKn)):re("",!0),T.type==="lollmsvectordb"?(k(),H("input",{key:1,type:"text",value:o.getDataLakePath(Q),onInput:_=>o.updateDataLakePath(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter DataLake Path"},null,40,SKn)):re("",!0)]),T.type==="lightrag"?(k(),H("div",LKn,[e[532]||(e[532]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"API Key",-1)),g("input",{type:"text",value:o.getDataLakeKey(Q),onInput:_=>o.updateDatabaseKey(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter API key"},null,40,CKn)])):re("",!0)]),g("div",AKn,[g("div",wKn,[g("div",MKn,[e[534]||(e[534]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200 mr-4"},"Mounted",-1)),g("div",OKn,[J(g("input",{type:"checkbox","onUpdate:modelValue":_=>o.configFile.datalakes[Q].mounted=_,onChange:e[110]||(e[110]=_=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,40,RKn),[[ut,o.configFile.datalakes[Q].mounted]]),e[533]||(e[533]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),T.type==="lollmsvectordb"?(k(),H("div",NKn,[g("button",{onClick:_=>o.vectorize_folder(Q),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-green-600 rounded-md hover:bg-green-700 focus:ring-2 focus:ring-offset-2 focus:ring-green-500",title:"Vectorize or re-vectorize the selected folder"},e[535]||(e[535]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("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),nt(" Vectorize ")]),8,DKn),g("button",{onClick:_=>o.lollms_vectordb_select_folder(Q),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",title:"Select a folder as data source"},e[536]||(e[536]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1),nt(" Select Folder ")]),8,IKn)])):re("",!0),g("div",kKn,[g("input",{type:"file",ref_for:!0,ref:"fileInput",onChange:e[111]||(e[111]=(..._)=>o.handleFileUpload&&o.handleFileUpload(..._)),accept:".pdf,.txt,.doc,.docx,.csv,.md",class:"hidden",multiple:""},null,544),g("button",{onClick:e[112]||(e[112]=(..._)=>o.triggerFileInput&&o.triggerFileInput(..._)),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-green-600 rounded-md hover:bg-green-700 focus:ring-2 focus:ring-offset-2 focus:ring-green-500"},e[537]||(e[537]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1),nt(" Upload Files ")]))])]),g("button",{onClick:_=>o.removeDataLake(Q),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-red-600 rounded-md hover:bg-red-700 focus:ring-2 focus:ring-offset-2 focus:ring-red-500"},e[538]||(e[538]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("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),nt(" Remove Data Lake ")]),8,PKn)])]))),128))]),g("button",{onClick:e[113]||(e[113]=(...T)=>o.addDataLake&&o.addDataLake(...T)),class:"inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},e[539]||(e[539]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),nt(" Add New Data Lake ")]))])]),_:1}),oe(a,{title:"Data Servers",is_subcard:!0,class:"p-4 m-2"},{default:He(()=>[g("div",HKn,[e[555]||(e[555]=g("div",{class:"flex items-center mb-4"},[g("h3",{class:"text-lg font-semibold dark:text-white"},"Database Servers")],-1)),g("div",VKn,[(k(!0),H(Ue,null,ot(o.configFile.rag_local_services,(T,Q)=>(k(),H("div",{key:Q,class:"p-4 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"},[g("div",BKn,[g("div",FKn,[e[541]||(e[541]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Database Alias",-1)),g("input",{type:"text",value:o.getServedDatabaseAlias(Q),onInput:_=>o.updateAlias(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter alias"},null,40,$Kn)]),g("div",UKn,[e[543]||(e[543]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Type",-1)),g("select",{required:"",value:o.getServedDatabaseType(Q),onInput:_=>o.updateDatabaseType(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"},e[542]||(e[542]=[g("option",{value:"lightrag"},"Light Rag",-1),g("option",{value:"elasticdsearch"},"Elastic Search",-1)]),40,GKn)]),g("div",qKn,[e[544]||(e[544]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Database URL",-1)),g("input",{type:"text",value:o.getServedDatabaseUrl(Q),onInput:_=>o.updateDataLakeUrl(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter database URL"},null,40,zKn)]),g("div",jKn,[e[545]||(e[545]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"API Key",-1)),g("input",{type:"text",value:o.getServedDatabaseKey(Q),onInput:_=>o.updateDatabaseKey(Q,_.target.value),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Enter API key"},null,40,WKn)]),g("div",YKn,[e[546]||(e[546]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Input folder",-1)),J(g("input",{type:"text","onUpdate:modelValue":_=>o.configFile.rag_local_services[Q].input_path=_,onChange:e[114]||(e[114]=_=>i.settingsChanged=!0),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Input folder"},null,40,KKn),[[we,o.configFile.rag_local_services[Q].input_path]])]),g("div",ZKn,[e[547]||(e[547]=g("label",{class:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Input folder",-1)),J(g("input",{type:"text","onUpdate:modelValue":_=>o.configFile.rag_local_services[Q].working_path=_,onChange:e[115]||(e[115]=_=>i.settingsChanged=!0),class:"px-3 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white",placeholder:"Output folder"},null,40,XKn),[[we,o.configFile.rag_local_services[Q].working_path]])])]),g("div",JKn,[g("div",eZn,[g("div",tZn,[e[549]||(e[549]=g("label",{class:"font-bold text-sm text-gray-700 dark:text-gray-200 mr-4"},"Start at Startup",-1)),g("div",nZn,[J(g("input",{type:"checkbox","onUpdate:modelValue":_=>o.configFile.rag_local_services[Q].start_at_startup=_,onChange:e[116]||(e[116]=_=>i.settingsChanged=!0),class:"toggle-checkbox absolute block w-6 h-6 rounded-full bg-white border-4 appearance-none cursor-pointer transition-transform duration-200 ease-in-out checked:translate-x-6 checked:bg-blue-500"},null,40,rZn),[[ut,o.configFile.rag_local_services[Q].start_at_startup]]),e[548]||(e[548]=g("label",{class:"toggle-label block overflow-hidden h-6 rounded-full bg-gray-300 dark:bg-gray-600 cursor-pointer"},null,-1))])]),g("input",{type:"file",ref_for:!0,ref:"fileInput",onChange:e[117]||(e[117]=(..._)=>o.handleFileUpload&&o.handleFileUpload(..._)),accept:".pdf,.txt,.doc,.docx,.csv,.md",class:"hidden",multiple:""},null,544),g("button",{onClick:e[118]||(e[118]=(..._)=>o.triggerFileInput&&o.triggerFileInput(..._)),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-green-600 rounded-md hover:bg-green-700 focus:ring-2 focus:ring-offset-2 focus:ring-green-500"},e[550]||(e[550]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})],-1),nt(" Upload Files ")]))]),g("button",{onClick:_=>o.lightrag_select_input_folder(Q),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",title:"Select a folder as data source"},e[551]||(e[551]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1),nt(" Select input Folder ")]),8,iZn),g("button",{onClick:_=>o.lightrag_select_output_folder(Q),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",title:"Select a folder as data source"},e[552]||(e[552]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})],-1),nt(" Select work Folder ")]),8,oZn),g("button",{onClick:_=>o.removeServedDataBase(Q),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white bg-red-600 rounded-md hover:bg-red-700 focus:ring-2 focus:ring-offset-2 focus:ring-red-500"},e[553]||(e[553]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("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),nt(" Remove Database ")]),8,sZn)])]))),128))]),g("button",{onClick:e[119]||(e[119]=(...T)=>o.addDatabaseService&&o.addDatabaseService(...T)),class:"inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-md hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},e[554]||(e[554]=[g("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),nt(" Add New Database Server ")]))])]),_:1}),oe(a,{title:"LollmsVectordb Configuration",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",aZn,[g("div",lZn,[e[557]||(e[557]=g("label",{for:"rag_vectorizer",class:"text-sm font-bold w-64"},"RAG Vectorizer:",-1)),J(g("select",{id:"rag_vectorizer",required:"","onUpdate:modelValue":e[120]||(e[120]=T=>o.configFile.rag_vectorizer=T),onChange:e[121]||(e[121]=T=>i.settingsChanged=!0),class:"flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500"},e[556]||(e[556]=[g("option",{value:"semantic"},"Semantic Vectorizer",-1),g("option",{value:"tfidf"},"TFIDF Vectorizer",-1),g("option",{value:"openai"},"OpenAI Vectorizer",-1),g("option",{value:"ollama"},"Ollama Vectorizer",-1)]),544),[[pn,o.configFile.rag_vectorizer]])]),g("div",cZn,[e[558]||(e[558]=g("label",{class:"text-sm font-bold w-64"},"Allow executing remote code:",-1)),g("div",uZn,[g("label",dZn,[J(g("input",{"onUpdate:modelValue":e[122]||(e[122]=T=>o.configFile.rag_vectorizer_execute_remote_code=T),type:"checkbox",onChange:e[123]||(e[123]=T=>i.settingsChanged=!0),class:"w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:bg-gray-600"},null,544),[[ut,o.configFile.rag_vectorizer_execute_remote_code]])])])]),g("div",fZn,[e[562]||(e[562]=g("label",{class:"text-sm font-bold w-64 pt-2"},"RAG Vectorizer model:",-1)),g("div",pZn,[J(g("select",{id:"rag_vectorizer_model",required:"","onUpdate:modelValue":e[124]||(e[124]=T=>o.configFile.rag_vectorizer_model=T),onChange:e[125]||(e[125]=T=>i.settingsChanged=!0),class:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500",disabled:o.configFile.rag_vectorizer==="tfidf"},[o.configFile.rag_vectorizer==="semantic"?(k(),H("optgroup",TZn,e[559]||(e[559]=[g("option",{value:"BAAI/bge-m3"},"BAAI/bge-m3",-1),g("option",{value:"nvidia/NV-Embed-v2"},"nvidia/NV-Embed-v2",-1),g("option",{value:"sentence-transformers/all-MiniLM-L6-v2"},"sentence-transformers/all-MiniLM-L6-v2",-1),g("option",{value:"sentence-transformers/all-MiniLM-L12-v2"},"sentence-transformers/all-MiniLM-L12-v2",-1),g("option",{value:"sentence-transformers/all-distilroberta-v1"},"sentence-transformers/all-distilroberta-v1",-1),g("option",{value:"sentence-transformers/all-mpnet-base-v2"},"sentence-transformers/all-mpnet-base-v2",-1)]))):re("",!0),o.configFile.rag_vectorizer==="openai"?(k(),H("optgroup",mZn,e[560]||(e[560]=[g("option",{value:"text-embedding-ada-002"},"text-embedding-ada-002",-1),g("option",{value:"text-embedding-babbage-001"},"text-embedding-babbage-001",-1),g("option",{value:"text-embedding-curie-001"},"text-embedding-curie-001",-1),g("option",{value:"text-embedding-davinci-001"},"text-embedding-davinci-001",-1)]))):re("",!0),o.configFile.rag_vectorizer==="ollama"?(k(),H("optgroup",gZn,e[561]||(e[561]=[g("option",{value:"bge-m3"},"bge-m3",-1),g("option",{value:"NV-Embed-v2"},"nvidia/NV-Embed-v2",-1),g("option",{value:"nomic-embed-text"},"nomic-embed-text",-1),g("option",{value:"mxbai-embed-large"},"mxbai-embed-large",-1),g("option",{value:"snowflake-arctic-embed"},"snowflake-arctic-embed",-1),g("option",{value:"all-minilm"},"all-minilm",-1),g("option",{value:"bge-large"},"bge-large",-1)]))):re("",!0),o.configFile.rag_vectorizer==="tfidf"?(k(),H("option",_Zn,"No models available for TFIDF")):re("",!0)],40,hZn),[[pn,o.configFile.rag_vectorizer_model]]),J(g("input",{"onUpdate:modelValue":e[126]||(e[126]=T=>o.configFile.rag_vectorizer_model=T),class:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500"},null,512),[[we,o.configFile.rag_vectorizer_model]])])]),g("div",QZn,[e[563]||(e[563]=g("label",{class:"text-sm font-bold w-64 pt-2"},"RAG server address:",-1)),o.configFile.rag_vectorizer==="ollama"?J((k(),H("input",{key:0,"onUpdate:modelValue":e[127]||(e[127]=T=>o.configFile.rag_service_url=T),class:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500"},null,512)),[[we,o.configFile.rag_service_url]]):re("",!0)]),g("div",vZn,[g("div",yZn,[e[564]||(e[564]=g("label",{class:"text-sm font-bold w-64"},"RAG chunk size:",-1)),g("div",bZn,[J(g("input",{id:"rag_chunk_size","onUpdate:modelValue":e[128]||(e[128]=T=>o.configFile.rag_chunk_size=T),onChange:e[129]||(e[129]=T=>i.settingsChanged=!0),type:"range",min:"2",max:"64000",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-600"},null,544),[[we,o.configFile.rag_chunk_size]]),J(g("input",{"onUpdate:modelValue":e[130]||(e[130]=T=>o.configFile.rag_chunk_size=T),type:"number",onChange:e[131]||(e[131]=T=>i.settingsChanged=!0),class:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 dark:bg-gray-600 dark:border-gray-500"},null,544),[[we,o.configFile.rag_chunk_size]])])])]),g("div",EZn,[g("div",xZn,[e[565]||(e[565]=g("label",{class:"text-sm font-bold w-64"},"Clean chunks:",-1)),g("div",SZn,[g("label",LZn,[J(g("input",{"onUpdate:modelValue":e[132]||(e[132]=T=>o.configFile.rag_clean_chunks=T),type:"checkbox",onChange:e[133]||(e[133]=T=>i.settingsChanged=!0),class:"w-5 h-5 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:bg-gray-600"},null,544),[[ut,o.configFile.rag_clean_chunks]])])])])])])]),_:1}),oe(a,{title:"Data Vectorization",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",CZn,[g("div",AZn,[e[567]||(e[567]=g("div",{class:"flex-grow"},[g("label",{for:"rag_build_keys_words",class:"font-medium text-gray-700 dark:text-gray-200"},[nt(" Reformulate prompt before querying database "),g("span",{class:"text-sm text-gray-500 dark:text-gray-400 block mt-1"}," (Recommended for better search results) ")])],-1)),g("div",wZn,[g("label",MZn,[J(g("input",{type:"checkbox",id:"rag_build_keys_words","onUpdate:modelValue":e[134]||(e[134]=T=>o.configFile.rag_build_keys_words=T),onChange:e[135]||(e[135]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.rag_build_keys_words]]),e[566]||(e[566]=g("div",{class:"w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),g("div",OZn,[e[569]||(e[569]=g("div",{class:"flex-grow"},[g("label",{for:"rag_put_chunk_informations_into_context",class:"font-medium text-gray-700 dark:text-gray-200"}," Put Chunk Information Into Context ")],-1)),g("div",RZn,[g("label",NZn,[J(g("input",{type:"checkbox",id:"rag_put_chunk_informations_into_context","onUpdate:modelValue":e[136]||(e[136]=T=>o.configFile.rag_put_chunk_informations_into_context=T),onChange:e[137]||(e[137]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.rag_put_chunk_informations_into_context]]),e[568]||(e[568]=g("div",{class:"w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),g("div",DZn,[e[571]||(e[571]=g("div",{class:"flex-grow"},[g("label",{for:"data_vectorization_save_db",class:"font-medium text-gray-700 dark:text-gray-200"},[nt(" Save new files to database "),g("span",{class:"text-sm text-gray-500 dark:text-gray-400 block mt-1"}," Database will persist and grow across sessions ")])],-1)),g("div",IZn,[g("label",kZn,[J(g("input",{type:"checkbox",id:"data_vectorization_save_db","onUpdate:modelValue":e[138]||(e[138]=T=>o.configFile.data_vectorization_save_db=T),onChange:e[139]||(e[139]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.data_vectorization_save_db]]),e[570]||(e[570]=g("div",{class:"w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])])])]),_:1})],2)]),g("div",PZn,[g("div",HZn,[g("button",{onClick:e[140]||(e[140]=he(T=>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"},[J(g("div",null,e[572]||(e[572]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.internet_conf_collapsed]]),J(g("div",null,e[573]||(e[573]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.internet_conf_collapsed]]),e[574]||(e[574]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Internet",-1))])]),g("div",{class:je([{hidden:i.internet_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[oe(a,{title:"Internet search",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",VZn,[g("div",BZn,[e[576]||(e[576]=g("label",{for:"activate_internet_search",class:"text-sm font-bold text-gray-900 dark:text-white"}," Activate automatic internet search ",-1)),g("label",FZn,[J(g("input",{type:"checkbox",id:"fun_mode","onUpdate:modelValue":e[141]||(e[141]=T=>o.configFile.activate_internet_search=T),onChange:e[142]||(e[142]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.activate_internet_search]]),e[575]||(e[575]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-600 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",$Zn,[e[578]||(e[578]=g("label",{for:"activate_internet_pages_judgement",class:"text-sm font-bold text-gray-900 dark:text-white"}," Activate internet pages judgement ",-1)),g("label",UZn,[J(g("input",{type:"checkbox",id:"activate_internet_pages_judgement","onUpdate:modelValue":e[143]||(e[143]=T=>o.configFile.activate_internet_pages_judgement=T),onChange:e[144]||(e[144]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.activate_internet_pages_judgement]]),e[577]||(e[577]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-600 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",GZn,[e[580]||(e[580]=g("label",{for:"internet_quick_search",class:"text-sm font-bold text-gray-900 dark:text-white"}," Activate quick search ",-1)),g("label",qZn,[J(g("input",{type:"checkbox",id:"internet_quick_search","onUpdate:modelValue":e[145]||(e[145]=T=>o.configFile.internet_quick_search=T),onChange:e[146]||(e[146]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.internet_quick_search]]),e[579]||(e[579]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-600 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",zZn,[e[582]||(e[582]=g("label",{for:"internet_activate_search_decision",class:"text-sm font-bold text-gray-900 dark:text-white"}," Activate search decision ",-1)),g("label",jZn,[J(g("input",{type:"checkbox",id:"internet_activate_search_decision","onUpdate:modelValue":e[147]||(e[147]=T=>o.configFile.internet_activate_search_decision=T),onChange:e[148]||(e[148]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.internet_activate_search_decision]]),e[581]||(e[581]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-600 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",WZn,[g("div",YZn,[e[583]||(e[583]=g("label",{for:"internet_vectorization_chunk_size",class:"text-sm font-bold text-gray-900 dark:text-white"}," Internet vectorization chunk size ",-1)),g("div",KZn,[J(g("input",{id:"internet_vectorization_chunk_size","onUpdate:modelValue":e[149]||(e[149]=T=>o.configFile.internet_vectorization_chunk_size=T),onChange:e[150]||(e[150]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"64000",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-600"},null,544),[[we,o.configFile.internet_vectorization_chunk_size]]),J(g("input",{"onUpdate:modelValue":e[151]||(e[151]=T=>o.configFile.internet_vectorization_chunk_size=T),type:"number",onChange:e[152]||(e[152]=T=>i.settingsChanged=!0),class:"w-24 px-3 py-2 bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded-md text-sm"},null,544),[[we,o.configFile.internet_vectorization_chunk_size]])])]),g("div",ZZn,[e[584]||(e[584]=g("label",{for:"internet_vectorization_overlap_size",class:"text-sm font-bold text-gray-900 dark:text-white"}," Internet vectorization overlap size ",-1)),g("div",XZn,[J(g("input",{id:"internet_vectorization_overlap_size","onUpdate:modelValue":e[153]||(e[153]=T=>o.configFile.internet_vectorization_overlap_size=T),onChange:e[154]||(e[154]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"1000",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-600"},null,544),[[we,o.configFile.internet_vectorization_overlap_size]]),J(g("input",{"onUpdate:modelValue":e[155]||(e[155]=T=>o.configFile.internet_vectorization_overlap_size=T),type:"number",onChange:e[156]||(e[156]=T=>i.settingsChanged=!0),class:"w-24 px-3 py-2 bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded-md text-sm"},null,544),[[we,o.configFile.internet_vectorization_overlap_size]])])]),g("div",JZn,[e[585]||(e[585]=g("label",{for:"internet_vectorization_nb_chunks",class:"text-sm font-bold text-gray-900 dark:text-white"}," Internet vectorization number of chunks ",-1)),g("div",eXn,[J(g("input",{id:"internet_vectorization_nb_chunks","onUpdate:modelValue":e[157]||(e[157]=T=>o.configFile.internet_vectorization_nb_chunks=T),onChange:e[158]||(e[158]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"100",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-600"},null,544),[[we,o.configFile.internet_vectorization_nb_chunks]]),J(g("input",{"onUpdate:modelValue":e[159]||(e[159]=T=>o.configFile.internet_vectorization_nb_chunks=T),type:"number",onChange:e[160]||(e[160]=T=>i.settingsChanged=!0),class:"w-24 px-3 py-2 bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded-md text-sm"},null,544),[[we,o.configFile.internet_vectorization_nb_chunks]])])]),g("div",tXn,[e[586]||(e[586]=g("label",{for:"internet_nb_search_pages",class:"text-sm font-bold text-gray-900 dark:text-white"}," Internet number of search pages ",-1)),g("div",nXn,[J(g("input",{id:"internet_nb_search_pages","onUpdate:modelValue":e[161]||(e[161]=T=>o.configFile.internet_nb_search_pages=T),onChange:e[162]||(e[162]=T=>i.settingsChanged=!0),type:"range",min:"1",max:"100",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-600"},null,544),[[we,o.configFile.internet_nb_search_pages]]),J(g("input",{"onUpdate:modelValue":e[163]||(e[163]=T=>o.configFile.internet_nb_search_pages=T),type:"number",onChange:e[164]||(e[164]=T=>i.settingsChanged=!0),class:"w-24 px-3 py-2 bg-white dark:bg-gray-600 border border-gray-300 dark:border-gray-500 rounded-md text-sm"},null,544),[[we,o.configFile.internet_nb_search_pages]])])])])])]),_:1})],2)]),g("div",rXn,[g("div",iXn,[g("button",{onClick:e[165]||(e[165]=he(T=>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"},[J(g("div",null,e[587]||(e[587]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.servers_conf_collapsed]]),J(g("div",null,e[588]||(e[588]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.servers_conf_collapsed]]),e[589]||(e[589]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Services Zoo",-1))])]),g("div",{class:je([{hidden:i.servers_conf_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[oe(a,{title:"Default services selection",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",oXn,[g("div",sXn,[e[591]||(e[591]=g("div",{class:"w-full md:w-1/3"},[g("label",{for:"active_tts_service",class:"block text-sm font-semibold text-gray-700 dark:text-gray-300",title:"Default Text to speech engine"}," Active TTS Service ")],-1)),g("div",aXn,[J(g("select",{id:"active_tts_service",required:"","onUpdate:modelValue":e[166]||(e[166]=T=>o.configFile.active_tts_service=T),onChange:e[167]||(e[167]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 rounded-lg border border-gray-300 bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-all duration-200"},e[590]||(e[590]=[g("option",{value:"None"},"None",-1),g("option",{value:"browser"},"Use Browser TTS (doesn't work in realtime mode)",-1),g("option",{value:"xtts"},"XTTS",-1),g("option",{value:"parler-tts"},"Parler-TTS",-1),g("option",{value:"openai_tts"},"Open AI TTS",-1),g("option",{value:"eleven_labs_tts"},"ElevenLabs TTS",-1),g("option",{value:"fish_tts"},"Fish TTS",-1)]),544),[[pn,o.configFile.active_tts_service]])])]),g("div",lXn,[e[593]||(e[593]=g("div",{class:"w-full md:w-1/3"},[g("label",{for:"active_stt_service",class:"block text-sm font-semibold text-gray-700 dark:text-gray-300",title:"Default Speech to Text engine"}," Active STT Service ")],-1)),g("div",cXn,[J(g("select",{id:"active_stt_service",required:"","onUpdate:modelValue":e[168]||(e[168]=T=>o.configFile.active_stt_service=T),onChange:e[169]||(e[169]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 rounded-lg border border-gray-300 bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-all duration-200"},e[592]||(e[592]=[g("option",{value:"None"},"None",-1),g("option",{value:"whisper"},"Whisper",-1),g("option",{value:"openai_whisper"},"Open AI Whisper",-1)]),544),[[pn,o.configFile.active_stt_service]])])]),g("div",uXn,[e[595]||(e[595]=g("div",{class:"w-full md:w-1/3"},[g("label",{for:"active_tti_service",class:"block text-sm font-semibold text-gray-700 dark:text-gray-300",title:"Default Text to image engine"}," Active TTI Service ")],-1)),g("div",dXn,[J(g("select",{id:"active_tti_service",required:"","onUpdate:modelValue":e[170]||(e[170]=T=>o.configFile.active_tti_service=T),onChange:e[171]||(e[171]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 rounded-lg border border-gray-300 bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-all duration-200"},e[594]||(e[594]=[g("option",{value:"None"},"None",-1),g("option",{value:"diffusers"},"Diffusers",-1),g("option",{value:"diffusers_client"},"Diffusers Client",-1),g("option",{value:"autosd"},"AUTO1111's SD",-1),g("option",{value:"dall-e"},"Open AI DALL-E",-1),g("option",{value:"midjourney"},"Midjourney",-1),g("option",{value:"comfyui"},"Comfyui",-1),g("option",{value:"fooocus"},"Fooocus",-1)]),544),[[pn,o.configFile.active_tti_service]])])]),g("div",fXn,[e[597]||(e[597]=g("div",{class:"w-full md:w-1/3"},[g("label",{for:"active_ttm_service",class:"block text-sm font-semibold text-gray-700 dark:text-gray-300",title:"Default Text to Music engine"}," Active TTM Service ")],-1)),g("div",pXn,[J(g("select",{id:"active_ttm_service",required:"","onUpdate:modelValue":e[172]||(e[172]=T=>o.configFile.active_ttm_service=T),onChange:e[173]||(e[173]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 rounded-lg border border-gray-300 bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-all duration-200"},e[596]||(e[596]=[g("option",{value:"None"},"None",-1),g("option",{value:"musicgen"},"Music Gen",-1)]),544),[[pn,o.configFile.active_ttm_service]])])]),g("div",hXn,[e[599]||(e[599]=g("div",{class:"w-full md:w-1/3"},[g("label",{for:"active_ttv_service",class:"block text-sm font-semibold text-gray-700 dark:text-gray-300",title:"Default Text to Video engine"}," Active TTV Service ")],-1)),g("div",TXn,[J(g("select",{id:"active_ttv_service",required:"","onUpdate:modelValue":e[174]||(e[174]=T=>o.configFile.active_ttv_service=T),onChange:e[175]||(e[175]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 rounded-lg border border-gray-300 bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-all duration-200"},e[598]||(e[598]=[g("option",{value:"None"},"None",-1),g("option",{value:"cog_video_x"},"Cog Video X",-1),g("option",{value:"diffusers"},"Diffusers",-1),g("option",{value:"lumalab"},"Lumalab",-1)]),544),[[pn,o.configFile.active_ttv_service]])])])])]),_:1}),oe(a,{title:"TTI settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",mXn,[g("div",gXn,[e[601]||(e[601]=g("div",{class:"w-1/3"},[g("label",{for:"use_negative_prompt",class:"text-sm font-semibold text-gray-700 dark:text-gray-200"}," Use negative prompt ")],-1)),g("div",_Xn,[g("label",QXn,[J(g("input",{type:"checkbox",id:"use_negative_prompt","onUpdate:modelValue":e[176]||(e[176]=T=>o.configFile.use_negative_prompt=T),onChange:e[177]||(e[177]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.use_negative_prompt]]),e[600]||(e[600]=g("div",{class:"relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),g("div",vXn,[e[603]||(e[603]=g("div",{class:"w-1/3"},[g("label",{for:"use_ai_generated_negative_prompt",class:"text-sm font-semibold text-gray-700 dark:text-gray-200"}," Use AI generated negative prompt ")],-1)),g("div",yXn,[g("label",bXn,[J(g("input",{type:"checkbox",id:"use_ai_generated_negative_prompt","onUpdate:modelValue":e[178]||(e[178]=T=>o.configFile.use_ai_generated_negative_prompt=T),onChange:e[179]||(e[179]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.use_ai_generated_negative_prompt]]),e[602]||(e[602]=g("div",{class:"relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),g("div",EXn,[e[604]||(e[604]=g("div",{class:"w-1/3"},[g("label",{for:"negative_prompt_generation_prompt",class:"text-sm font-semibold text-gray-700 dark:text-gray-200"}," Negative prompt generation prompt ")],-1)),g("div",xXn,[J(g("input",{type:"text",id:"negative_prompt_generation_prompt","onUpdate:modelValue":e[180]||(e[180]=T=>o.configFile.negative_prompt_generation_prompt=T),onChange:e[181]||(e[181]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors duration-200 text-sm text-gray-900 dark:text-white placeholder-gray-400",required:""},null,544),[[we,o.configFile.negative_prompt_generation_prompt]])])]),g("div",SXn,[e[605]||(e[605]=g("div",{class:"w-1/3"},[g("label",{for:"default_negative_prompt",class:"text-sm font-semibold text-gray-700 dark:text-gray-200"}," Default negative prompt ")],-1)),g("div",LXn,[J(g("input",{type:"text",id:"default_negative_prompt","onUpdate:modelValue":e[182]||(e[182]=T=>o.configFile.default_negative_prompt=T),onChange:e[183]||(e[183]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors duration-200 text-sm text-gray-900 dark:text-white placeholder-gray-400",required:""},null,544),[[we,o.configFile.default_negative_prompt]])])])])]),_:1}),oe(a,{title:"Full Audio settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",CXn,[g("div",AXn,[e[606]||(e[606]=g("div",{class:"flex items-center"},[g("label",{for:"stt_listening_threshold",class:"font-medium text-gray-700 dark:text-gray-200",title:"Listening threshold"}," Listening threshold "),g("span",{class:"ml-1 text-gray-400 hover:text-gray-600 cursor-help",title:"Controls the sensitivity of voice detection"},[g("i",{class:"fas fa-info-circle"})])],-1)),J(g("input",{type:"number",step:"1",id:"stt_listening_threshold",required:"","onUpdate:modelValue":e[184]||(e[184]=T=>o.configFile.stt_listening_threshold=T),onChange:e[185]||(e[185]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white"},null,544),[[we,o.configFile.stt_listening_threshold]])]),g("div",wXn,[e[607]||(e[607]=g("div",{class:"flex items-center"},[g("label",{for:"stt_silence_duration",class:"font-medium text-gray-700 dark:text-gray-200"}," Silence duration (s) "),g("span",{class:"ml-1 text-gray-400 hover:text-gray-600 cursor-help",title:"Duration of silence before stopping recording"},[g("i",{class:"fas fa-info-circle"})])],-1)),J(g("input",{type:"number",step:"1",id:"stt_silence_duration",required:"","onUpdate:modelValue":e[186]||(e[186]=T=>o.configFile.stt_silence_duration=T),onChange:e[187]||(e[187]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white"},null,544),[[we,o.configFile.stt_silence_duration]])]),g("div",MXn,[e[608]||(e[608]=g("div",{class:"flex items-center"},[g("label",{for:"stt_sound_threshold_percentage",class:"font-medium text-gray-700 dark:text-gray-200"}," Minimum sound percentage "),g("span",{class:"ml-1 text-gray-400 hover:text-gray-600 cursor-help",title:"Minimum required sound percentage in recorded segment"},[g("i",{class:"fas fa-info-circle"})])],-1)),J(g("input",{type:"number",step:"1",id:"stt_sound_threshold_percentage",required:"","onUpdate:modelValue":e[188]||(e[188]=T=>o.configFile.stt_sound_threshold_percentage=T),onChange:e[189]||(e[189]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white"},null,544),[[we,o.configFile.stt_sound_threshold_percentage]])]),g("div",OXn,[e[609]||(e[609]=g("div",{class:"flex items-center"},[g("label",{for:"stt_gain",class:"font-medium text-gray-700 dark:text-gray-200"}," Volume amplification "),g("span",{class:"ml-1 text-gray-400 hover:text-gray-600 cursor-help",title:"Audio input gain adjustment"},[g("i",{class:"fas fa-info-circle"})])],-1)),J(g("input",{type:"number",step:"1",id:"stt_gain",required:"","onUpdate:modelValue":e[190]||(e[190]=T=>o.configFile.stt_gain=T),onChange:e[191]||(e[191]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-gray-50 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:text-white"},null,544),[[we,o.configFile.stt_gain]])]),g("div",RXn,[e[613]||(e[613]=g("h3",{class:"font-semibold text-gray-900 dark:text-white mb-4"},"Audio Settings",-1)),g("div",NXn,[e[610]||(e[610]=g("label",{for:"stt_rate",class:"font-medium text-gray-700 dark:text-gray-200"},"Audio rate",-1)),J(g("input",{type:"number",step:"1",id:"stt_rate",required:"","onUpdate:modelValue":e[192]||(e[192]=T=>o.configFile.stt_rate=T),onChange:e[193]||(e[193]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-white border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.stt_rate]])]),g("div",DXn,[e[611]||(e[611]=g("label",{for:"stt_channels",class:"font-medium text-gray-700 dark:text-gray-200"},"Number of channels",-1)),J(g("input",{type:"number",step:"1",id:"stt_channels",required:"","onUpdate:modelValue":e[194]||(e[194]=T=>o.configFile.stt_channels=T),onChange:e[195]||(e[195]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-white border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.stt_channels]])]),g("div",IXn,[e[612]||(e[612]=g("label",{for:"stt_buffer_size",class:"font-medium text-gray-700 dark:text-gray-200"},"Buffer size",-1)),J(g("input",{type:"number",step:"1",id:"stt_buffer_size",required:"","onUpdate:modelValue":e[196]||(e[196]=T=>o.configFile.stt_buffer_size=T),onChange:e[197]||(e[197]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-white border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.stt_buffer_size]])])]),g("div",kXn,[e[617]||(e[617]=g("h3",{class:"font-semibold text-gray-900 dark:text-white mb-4"},"Word Detection",-1)),g("div",PXn,[e[615]||(e[615]=g("label",{for:"stt_activate_word_detection",class:"font-medium text-gray-700 dark:text-gray-200"}," Activate word detection ",-1)),g("div",HXn,[g("label",VXn,[J(g("input",{type:"checkbox",id:"stt_activate_word_detection","onUpdate:modelValue":e[198]||(e[198]=T=>o.configFile.stt_activate_word_detection=T),onChange:e[199]||(e[199]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.stt_activate_word_detection]]),e[614]||(e[614]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])])]),g("div",BXn,[e[616]||(e[616]=g("label",{for:"stt_word_detection_file",class:"font-medium text-gray-700 dark:text-gray-200"}," Word detection wav file ",-1)),J(g("input",{type:"text",id:"stt_word_detection_file",required:"","onUpdate:modelValue":e[200]||(e[200]=T=>o.configFile.stt_word_detection_file=T),onChange:e[201]||(e[201]=T=>i.settingsChanged=!0),class:"px-4 py-2 bg-white border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent dark:bg-gray-600 dark:border-gray-500 dark:text-white"},null,544),[[we,o.configFile.stt_word_detection_file]])])])])]),_:1}),oe(a,{title:"Audio devices settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",FXn,[g("div",$Xn,[e[618]||(e[618]=g("div",{class:"md:w-1/3"},[g("label",{for:"stt_input_device",class:"block text-sm font-semibold text-gray-700 dark:text-gray-200",title:"Input device"}," Audio Input Device "),g("p",{class:"text-xs text-gray-500 dark:text-gray-400 mt-1"}," Select your microphone or audio input source ")],-1)),g("div",UXn,[J(g("select",{id:"stt_input_device",required:"","onUpdate:modelValue":e[202]||(e[202]=T=>o.configFile.stt_input_device=T),onChange:e[203]||(e[203]=T=>i.settingsChanged=!0),class:"w-full px-3 py-2 bg-gray-50 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-1 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-colors duration-200"},[(k(!0),H(Ue,null,ot(i.snd_input_devices,(T,Q)=>(k(),H("option",{key:T,value:i.snd_input_devices_indexes[Q]},le(T),9,GXn))),128))],544),[[pn,o.configFile.stt_input_device]])])]),g("div",qXn,[e[619]||(e[619]=g("div",{class:"md:w-1/3"},[g("label",{for:"tts_output_device",class:"block text-sm font-semibold text-gray-700 dark:text-gray-200",title:"Output device"}," Audio Output Device "),g("p",{class:"text-xs text-gray-500 dark:text-gray-400 mt-1"}," Select your speakers or audio output device ")],-1)),g("div",zXn,[J(g("select",{id:"tts_output_device",required:"","onUpdate:modelValue":e[204]||(e[204]=T=>o.configFile.tts_output_device=T),onChange:e[205]||(e[205]=T=>i.settingsChanged=!0),class:"w-full px-3 py-2 bg-gray-50 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-1 focus:ring-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white transition-colors duration-200"},[(k(!0),H(Ue,null,ot(i.snd_output_devices,(T,Q)=>(k(),H("option",{key:T,value:i.snd_output_devices_indexes[Q]},le(T),9,jXn))),128))],544),[[pn,o.configFile.tts_output_device]])])])])]),_:1}),oe(a,{title:"Lollms service",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",WXn,[g("div",YXn,[e[620]||(e[620]=g("label",{for:"host",class:"font-semibold text-gray-700 dark:text-gray-200"},"Host:",-1)),J(g("input",{type:"text",id:"host",required:"","onUpdate:modelValue":e[206]||(e[206]=T=>o.configFile.host=T),onChange:e[207]||(e[207]=T=>i.settingsChanged=!0),class:"input-field"},null,544),[[we,o.configFile.host]])]),g("div",KXn,[e[621]||(e[621]=g("label",{for:"lollms_access_keys",class:"font-semibold text-gray-700 dark:text-gray-200"},"Access keys:",-1)),oe(l,{modelValue:o.configFile.lollms_access_keys,"onUpdate:modelValue":e[208]||(e[208]=T=>o.configFile.lollms_access_keys=T),onChange:e[209]||(e[209]=T=>i.settingsChanged=!0),placeholder:"Enter access key"},null,8,["modelValue"])]),g("div",ZXn,[e[622]||(e[622]=g("label",{for:"port",class:"font-semibold text-gray-700 dark:text-gray-200"},"Port:",-1)),J(g("input",{type:"number",step:"1",id:"port",required:"","onUpdate:modelValue":e[210]||(e[210]=T=>o.configFile.port=T),onChange:e[211]||(e[211]=T=>i.settingsChanged=!0),class:"input-field"},null,544),[[we,o.configFile.port]])]),g("div",XXn,[e[625]||(e[625]=g("span",{class:"font-semibold text-gray-700 dark:text-gray-200"},"Server Configuration:",-1)),g("div",JXn,[g("label",eJn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[212]||(e[212]=T=>o.configFile.headless_server_mode=T),onChange:e[213]||(e[213]=T=>i.settingsChanged=!0),class:"w-4 h-4 rounded accent-blue-500"},null,544),[[ut,o.configFile.headless_server_mode]]),e[623]||(e[623]=g("span",{class:"text-sm text-gray-600 dark:text-gray-300"},"Headless Server Mode",-1))]),g("label",tJn,[J(g("input",{type:"checkbox","onUpdate:modelValue":e[214]||(e[214]=T=>o.configFile.activate_lollms_server=T),onChange:e[215]||(e[215]=T=>i.settingsChanged=!0),class:"w-4 h-4 rounded accent-blue-500"},null,544),[[ut,o.configFile.activate_lollms_server]]),e[624]||(e[624]=g("span",{class:"text-sm text-gray-600 dark:text-gray-300"},"LoLLMS Server",-1))]),g("div",nJn,[(k(),H(Ue,null,ot(["rag","tts","stt","tti","itt","ttm"],T=>g("label",{key:T,class:"flex items-center space-x-2 cursor-pointer"},[J(g("input",{type:"checkbox",id:`activate_lollms_${T}_server`,"onUpdate:modelValue":Q=>o.configFile[`activate_lollms_${T}_server`]=Q,onChange:e[216]||(e[216]=Q=>i.settingsChanged=!0),class:"w-4 h-4 rounded accent-blue-500"},null,40,rJn),[[ut,o.configFile[`activate_lollms_${T}_server`]]]),g("span",iJn,le(T.toUpperCase())+" Server",1)])),64))])])]),g("div",oJn,[e[626]||(e[626]=g("span",{class:"font-semibold text-gray-700 dark:text-gray-200"},"Emulators:",-1)),g("div",sJn,[(k(),H(Ue,null,ot(["ollama","openai","mistralai"],T=>g("label",{key:T,class:"flex items-center space-x-2 cursor-pointer"},[J(g("input",{type:"checkbox",id:`activate_${T}_emulator`,"onUpdate:modelValue":Q=>o.configFile[`activate_${T}_emulator`]=Q,onChange:e[217]||(e[217]=Q=>i.settingsChanged=!0),class:"w-4 h-4 rounded accent-blue-500"},null,40,aJn),[[ut,o.configFile[`activate_${T}_emulator`]]]),g("span",lJn,le(T.charAt(0).toUpperCase()+T.slice(1))+" Emulator",1)])),64))])])])]),_:1}),oe(a,{title:"STT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[oe(a,{title:"Browser Audio STT",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",cJn,[g("div",uJn,[e[628]||(e[628]=g("label",{for:"activate_audio_infos",class:"text-sm font-medium text-gray-700 dark:text-gray-200"}," Activate audio infos ",-1)),g("label",dJn,[J(g("input",{type:"checkbox",id:"activate_audio_infos","onUpdate:modelValue":e[218]||(e[218]=T=>o.configFile.activate_audio_infos=T),onChange:e[219]||(e[219]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.activate_audio_infos]]),e[627]||(e[627]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",fJn,[e[630]||(e[630]=g("label",{for:"audio_auto_send_input",class:"text-sm font-medium text-gray-700 dark:text-gray-200"}," Send audio input automatically ",-1)),g("label",pJn,[J(g("input",{type:"checkbox",id:"audio_auto_send_input","onUpdate:modelValue":e[220]||(e[220]=T=>o.configFile.audio_auto_send_input=T),onChange:e[221]||(e[221]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.audio_auto_send_input]]),e[629]||(e[629]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",hJn,[g("label",TJn," Audio silence timer (ms): "+le(o.configFile.audio_silenceTimer)+"ms ",1),g("div",mJn,[J(g("input",{id:"audio_silenceTimer","onUpdate:modelValue":e[222]||(e[222]=T=>o.configFile.audio_silenceTimer=T),onChange:e[223]||(e[223]=T=>i.settingsChanged=!0),type:"range",min:"0",max:"10000",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 accent-blue-600"},null,544),[[we,o.configFile.audio_silenceTimer]]),J(g("input",{"onUpdate:modelValue":e[224]||(e[224]=T=>o.configFile.audio_silenceTimer=T),onChange:e[225]||(e[225]=T=>i.settingsChanged=!0),type:"number",class:"w-full px-3 py-2 bg-gray-50 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"},null,544),[[we,o.configFile.audio_silenceTimer]])])]),g("div",gJn,[e[631]||(e[631]=g("label",{for:"audio_in_language",class:"text-sm font-medium text-gray-700 dark:text-gray-200"}," Input Audio Language ",-1)),J(g("select",{id:"audio_in_language","onUpdate:modelValue":e[226]||(e[226]=T=>o.configFile.audio_in_language=T),onChange:e[227]||(e[227]=T=>i.settingsChanged=!0),class:"w-full px-3 py-2 bg-gray-50 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white"},[(k(!0),H(Ue,null,ot(o.audioLanguages,T=>(k(),H("option",{key:T.code,value:T.code},le(T.name),9,_Jn))),128))],544),[[pn,o.configFile.audio_in_language]])])])]),_:1}),oe(a,{title:"Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",QJn,[g("div",vJn,[e[633]||(e[633]=g("label",{for:"whisper_activate",class:"text-gray-700 dark:text-gray-200 font-medium"}," Activate Whisper at startup ",-1)),g("label",yJn,[J(g("input",{type:"checkbox",id:"whisper_activate","onUpdate:modelValue":e[228]||(e[228]=T=>o.configFile.whisper_activate=T),onChange:e[229]||(e[229]=T=>i.settingsChanged=!0),class:"sr-only peer"},null,544),[[ut,o.configFile.whisper_activate]]),e[632]||(e[632]=g("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1))])]),g("div",bJn,[g("button",{onClick:e[230]||(e[230]=(...T)=>o.reinstallWhisperService&&o.reinstallWhisperService(...T)),class:"w-full py-3 px-4 bg-gradient-to-r from-green-400 to-green-500 hover:from-green-500 hover:to-green-600 text-white font-medium rounded-lg shadow-md hover:shadow-lg transition-all duration-300 flex items-center justify-center space-x-2"},e[634]||(e[634]=[g("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("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),g("span",null,"Install Whisper",-1)]))]),g("div",EJn,[e[636]||(e[636]=g("label",{for:"whisper_model",class:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2"}," Whisper Model ",-1)),g("div",xJn,[J(g("select",{id:"whisper_model","onUpdate:modelValue":e[231]||(e[231]=T=>o.configFile.whisper_model=T),onChange:e[232]||(e[232]=T=>i.settingsChanged=!0),class:"block w-full px-4 py-3 text-base border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white appearance-none"},[(k(!0),H(Ue,null,ot(o.whisperModels,T=>(k(),H("option",{key:T,value:T},le(T),9,SJn))),128))],544),[[pn,o.configFile.whisper_model]]),e[635]||(e[635]=g("div",{class:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700 dark:text-gray-300"},[g("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})])],-1))])])])]),_:1}),oe(a,{title:"Open AI Whisper audio transcription",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",LJn,[g("tr",null,[e[637]||(e[637]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_whisper_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai whisper key:")],-1)),g("td",null,[g("div",CJn,[J(g("input",{type:"text",id:"openai_whisper_key",required:"","onUpdate:modelValue":e[233]||(e[233]=T=>o.configFile.openai_whisper_key=T),onChange:e[234]||(e[234]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.openai_whisper_key]])])])]),g("tr",null,[e[638]||(e[638]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_whisper_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open Ai Whisper model:")],-1)),g("td",null,[g("div",AJn,[J(g("select",{id:"openai_whisper_model","onUpdate:modelValue":e[235]||(e[235]=T=>o.configFile.openai_whisper_model=T),onChange:e[236]||(e[236]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),H(Ue,null,ot(o.openaiWhisperModels,T=>(k(),H("option",{key:T,value:T},le(T),9,wJn))),128))],544),[[pn,o.configFile.openai_whisper_model]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTS services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[oe(a,{title:"Browser Audio TTS",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",MJn,[g("tr",null,[e[639]||(e[639]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_speak",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto speak:")],-1)),g("td",null,[g("div",OJn,[J(g("input",{type:"checkbox",id:"auto_speak",required:"","onUpdate:modelValue":e[237]||(e[237]=T=>o.configFile.auto_speak=T),onChange:e[238]||(e[238]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.auto_speak]])])])]),g("tr",null,[e[640]||(e[640]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_pitch",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"audio pitch:")],-1)),g("td",null,[J(g("input",{id:"audio_pitch","onUpdate:modelValue":e[239]||(e[239]=T=>o.configFile.audio_pitch=T),onChange:e[240]||(e[240]=T=>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),[[we,o.configFile.audio_pitch]]),J(g("input",{"onUpdate:modelValue":e[241]||(e[241]=T=>o.configFile.audio_pitch=T),onChange:e[242]||(e[242]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.audio_pitch]])])]),g("tr",null,[e[641]||(e[641]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"audio_out_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Output Audio Voice:")],-1)),g("td",null,[J(g("select",{id:"audio_out_voice","onUpdate:modelValue":e[243]||(e[243]=T=>o.configFile.audio_out_voice=T),onChange:e[244]||(e[244]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),H(Ue,null,ot(i.audioVoices,T=>(k(),H("option",{key:T.name,value:T.name},le(T.name),9,RJn))),128))],544),[[pn,o.configFile.audio_out_voice]])])])])]),_:1}),oe(a,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",NJn,[g("tr",null,[e[642]||(e[642]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),g("td",null,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[245]||(e[245]=(...T)=>o.reinstallXTTSService&&o.reinstallXTTSService(...T))},"install xtts service")])]),g("tr",null,[e[643]||(e[643]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_language",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current language:")],-1)),g("td",null,[g("div",DJn,[J(g("select",{"onUpdate:modelValue":e[246]||(e[246]=T=>o.xtts_current_language=T),onChange:e[247]||(e[247]=T=>i.settingsChanged=!0)},[(k(!0),H(Ue,null,ot(i.voice_languages,(T,Q)=>(k(),H("option",{key:Q,value:T},le(Q),9,IJn))),128))],544),[[pn,o.xtts_current_language]])])])]),g("tr",null,[e[644]||(e[644]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_current_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Current voice:")],-1)),g("td",null,[g("div",kJn,[J(g("select",{"onUpdate:modelValue":e[248]||(e[248]=T=>o.xtts_current_voice=T),onChange:e[249]||(e[249]=T=>i.settingsChanged=!0)},[(k(!0),H(Ue,null,ot(i.voices,T=>(k(),H("option",{key:T,value:T},le(T),9,PJn))),128))],544),[[pn,o.xtts_current_voice]])])])]),g("tr",null,[e[645]||(e[645]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_freq",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Frequency (controls the tone):")],-1)),g("td",null,[g("div",HJn,[J(g("input",{type:"number",id:"xtts_freq",required:"","onUpdate:modelValue":e[250]||(e[250]=T=>o.configFile.xtts_freq=T),onChange:e[251]||(e[251]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[we,o.configFile.xtts_freq,void 0,{number:!0}]])])])]),g("tr",null,[e[646]||(e[646]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"auto_read",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable auto read:")],-1)),g("td",null,[g("div",VJn,[J(g("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[252]||(e[252]=T=>o.configFile.auto_read=T),onChange:e[253]||(e[253]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.auto_read]])])])]),g("tr",null,[e[647]||(e[647]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_stream_chunk_size",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"xtts stream chunk size:")],-1)),g("td",null,[g("div",BJn,[J(g("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[254]||(e[254]=T=>o.configFile.xtts_stream_chunk_size=T),onChange:e[255]||(e[255]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.xtts_stream_chunk_size]])])])]),g("tr",null,[e[648]||(e[648]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_temperature",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Temperature:")],-1)),g("td",null,[g("div",FJn,[J(g("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[256]||(e[256]=T=>o.configFile.xtts_temperature=T),onChange:e[257]||(e[257]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[we,o.configFile.xtts_temperature,void 0,{number:!0}]])])])]),g("tr",null,[e[649]||(e[649]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_length_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Length Penalty:")],-1)),g("td",null,[g("div",$Jn,[J(g("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[258]||(e[258]=T=>o.configFile.xtts_length_penalty=T),onChange:e[259]||(e[259]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[we,o.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),g("tr",null,[e[650]||(e[650]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_repetition_penalty",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Repetition Penalty:")],-1)),g("td",null,[g("div",UJn,[J(g("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[260]||(e[260]=T=>o.configFile.xtts_repetition_penalty=T),onChange:e[261]||(e[261]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[we,o.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),g("tr",null,[e[651]||(e[651]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_top_k",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top K:")],-1)),g("td",null,[g("div",GJn,[J(g("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[262]||(e[262]=T=>o.configFile.xtts_top_k=T),onChange:e[263]||(e[263]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.xtts_top_k,void 0,{number:!0}]])])])]),g("tr",null,[e[652]||(e[652]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_top_p",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Top P:")],-1)),g("td",null,[g("div",qJn,[J(g("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[264]||(e[264]=T=>o.configFile.xtts_top_p=T),onChange:e[265]||(e[265]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.xtts_top_p,void 0,{number:!0}]])])])]),g("tr",null,[e[653]||(e[653]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"xtts_speed",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Speed:")],-1)),g("td",null,[g("div",zJn,[J(g("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[266]||(e[266]=T=>o.configFile.xtts_speed=T),onChange:e[267]||(e[267]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[we,o.configFile.xtts_speed,void 0,{number:!0}]])])])]),g("tr",null,[e[654]||(e[654]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_text_splitting",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable Text Splitting:")],-1)),g("td",null,[g("div",jJn,[J(g("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[268]||(e[268]=T=>o.configFile.enable_text_splitting=T),onChange:e[269]||(e[269]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.enable_text_splitting]])])])])])]),_:1}),oe(a,{title:"Open AI TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",WJn,[g("tr",null,[e[655]||(e[655]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Open AI key:")],-1)),g("td",null,[g("div",YJn,[J(g("input",{type:"text",id:"openai_tts_key",required:"","onUpdate:modelValue":e[270]||(e[270]=T=>o.configFile.openai_tts_key=T),onChange:e[271]||(e[271]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.openai_tts_key]])])])]),g("tr",null,[e[657]||(e[657]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_tts_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts model:")],-1)),g("td",null,[g("div",KJn,[J(g("select",{"onUpdate:modelValue":e[272]||(e[272]=T=>o.configFile.openai_tts_model=T),onChange:e[273]||(e[273]=T=>i.settingsChanged=!0)},e[656]||(e[656]=[g("option",null," tts-1 ",-1),g("option",null," tts-2 ",-1)]),544),[[pn,o.configFile.openai_tts_model]])])])]),g("tr",null,[e[659]||(e[659]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"openai_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"openai tts voice:")],-1)),g("td",null,[g("div",ZJn,[J(g("select",{"onUpdate:modelValue":e[274]||(e[274]=T=>o.configFile.openai_tts_voice=T),onChange:e[275]||(e[275]=T=>i.settingsChanged=!0)},e[658]||(e[658]=[g("option",null," alloy ",-1),g("option",null," echo ",-1),g("option",null," fable ",-1),g("option",null," nova ",-1),g("option",null," shimmer ",-1)]),544),[[pn,o.configFile.openai_tts_voice]])])])])])]),_:1}),oe(a,{title:"Eleven Labs TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",XJn,[g("tr",null,[e[660]||(e[660]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs key:")],-1)),g("td",null,[g("div",JJn,[J(g("input",{type:"text",id:"elevenlabs_tts_key",required:"","onUpdate:modelValue":e[276]||(e[276]=T=>o.configFile.elevenlabs_tts_key=T),onChange:e[277]||(e[277]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.elevenlabs_tts_key]])])])]),g("tr",null,[e[661]||(e[661]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_model_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Eleven Labs TTS model ID:")],-1)),g("td",null,[g("div",eer,[J(g("input",{type:"text",id:"elevenlabs_tts_model_id",required:"","onUpdate:modelValue":e[278]||(e[278]=T=>o.configFile.elevenlabs_tts_model_id=T),onChange:e[279]||(e[279]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.elevenlabs_tts_model_id]])])])]),g("tr",null,[e[662]||(e[662]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_voice_stability",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Stability:")],-1)),g("td",null,[g("div",ter,[J(g("input",{type:"number",id:"elevenlabs_tts_voice_stability",required:"","onUpdate:modelValue":e[280]||(e[280]=T=>o.configFile.elevenlabs_tts_voice_stability=T),onChange:e[281]||(e[281]=T=>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),[[we,o.configFile.elevenlabs_tts_voice_stability]])])])]),g("tr",null,[e[663]||(e[663]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_voice_boost",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice Boost:")],-1)),g("td",null,[g("div",ner,[J(g("input",{type:"number",id:"elevenlabs_tts_voice_boost",required:"","onUpdate:modelValue":e[282]||(e[282]=T=>o.configFile.elevenlabs_tts_voice_boost=T),onChange:e[283]||(e[283]=T=>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),[[we,o.configFile.elevenlabs_tts_voice_boost]])])])]),g("tr",null,[e[664]||(e[664]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elevenlabs_tts_voice_id",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Voice ID:")],-1)),g("td",null,[g("div",rer,[J(g("select",{"onUpdate:modelValue":e[284]||(e[284]=T=>o.configFile.elevenlabs_tts_voice_id=T),onChange:e[285]||(e[285]=T=>i.settingsChanged=!0)},[(k(!0),H(Ue,null,ot(i.voices,T=>(k(),H("option",{key:T.voice_id,value:T.voice_id},le(T.name),9,ier))),128))],544),[[pn,o.configFile.elevenlabs_tts_voice_id]])])])])])]),_:1}),oe(a,{title:"Fish TTS service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",oer,[g("tr",null,[e[665]||(e[665]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"fish_tts_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fish TTS key:")],-1)),g("td",null,[g("div",ser,[J(g("input",{type:"text",id:"fish_tts_key",required:"","onUpdate:modelValue":e[286]||(e[286]=T=>o.configFile.fish_tts_key=T),onChange:e[287]||(e[287]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.fish_tts_key]])])])]),g("tr",null,[e[666]||(e[666]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"fish_tts_voice",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Fish TTS voice:")],-1)),g("td",null,[g("div",aer,[J(g("input",{type:"text",id:"fish_tts_voice",required:"","onUpdate:modelValue":e[288]||(e[288]=T=>o.configFile.fish_tts_voice=T),onChange:e[289]||(e[289]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.fish_tts_voice]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTI services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[oe(a,{title:"Stable diffusion service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",ler,[g("tr",null,[e[668]||(e[668]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable sd service:")],-1)),g("td",null,[g("div",cer,[J(g("input",{type:"checkbox",id:"enable_sd_service",required:"","onUpdate:modelValue":e[290]||(e[290]=T=>o.configFile.enable_sd_service=T),onChange:e[291]||(e[291]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.enable_sd_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[292]||(e[292]=T=>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[667]||(e[667]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[670]||(e[670]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"install_sd_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install SD service:")],-1)),g("td",null,[g("div",uer,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[293]||(e[293]=(...T)=>o.reinstallSDService&&o.reinstallSDService(...T))},"install sd service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[294]||(e[294]=(...T)=>o.upgradeSDService&&o.upgradeSDService(...T))},"upgrade sd service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[295]||(e[295]=(...T)=>o.startSDService&&o.startSDService(...T))},"start sd service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[296]||(e[296]=(...T)=>o.showSD&&o.showSD(...T))},"show sd ui"),e[669]||(e[669]=g("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))])]),g("td",null,[g("div",der,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[297]||(e[297]=(...T)=>o.reinstallSDService&&o.reinstallSDService(...T))},"install sd service")])])]),g("tr",null,[e[671]||(e[671]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"sd_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"sd base url:")],-1)),g("td",null,[g("div",fer,[J(g("input",{type:"text",id:"sd_base_url",required:"","onUpdate:modelValue":e[298]||(e[298]=T=>o.configFile.sd_base_url=T),onChange:e[299]||(e[299]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.sd_base_url]])])])])])]),_:1}),oe(a,{title:"Diffusers service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",per,[g("tr",null,[e[673]||(e[673]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"install_diffusers_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Diffusers service:")],-1)),g("td",null,[g("div",her,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[300]||(e[300]=(...T)=>o.reinstallDiffusersService&&o.reinstallDiffusersService(...T))},"install diffusers service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[301]||(e[301]=(...T)=>o.upgradeDiffusersService&&o.upgradeDiffusersService(...T))},"upgrade diffusers service"),e[672]||(e[672]=g("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))])])]),g("tr",null,[e[674]||(e[674]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"diffusers_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers model:")],-1)),g("td",null,[g("div",Ter,[J(g("input",{type:"text",id:"diffusers_model",required:"","onUpdate:modelValue":e[302]||(e[302]=T=>o.configFile.diffusers_model=T),onChange:e[303]||(e[303]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.diffusers_model]])])]),e[675]||(e[675]=g("td",null,null,-1))])])]),_:1}),oe(a,{title:"Diffusers client service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",mer,[g("tr",null,[e[676]||(e[676]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"diffusers_client_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Diffusers client base url:")],-1)),g("td",null,[g("div",ger,[J(g("input",{type:"text",id:"diffusers_client_base_url",required:"","onUpdate:modelValue":e[304]||(e[304]=T=>o.configFile.diffusers_client_base_url=T),onChange:e[305]||(e[305]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.diffusers_client_base_url]])])]),e[677]||(e[677]=g("td",null,null,-1))])])]),_:1}),oe(a,{title:"Midjourney",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",_er,[g("tr",null,[e[678]||(e[678]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"midjourney_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"midjourney key:")],-1)),g("td",null,[g("div",Qer,[J(g("input",{type:"text",id:"midjourney_key",required:"","onUpdate:modelValue":e[306]||(e[306]=T=>o.configFile.midjourney_key=T),onChange:e[307]||(e[307]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.midjourney_key]])])])]),g("tr",null,[e[679]||(e[679]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"midjourney_timeout",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"request timeout(s):")],-1)),g("td",null,[g("div",ver,[J(g("input",{type:"number",min:"10",max:"2048",id:"midjourney_timeout",required:"","onUpdate:modelValue":e[308]||(e[308]=T=>o.configFile.midjourney_timeout=T),onChange:e[309]||(e[309]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.midjourney_timeout]])])])]),g("tr",null,[e[680]||(e[680]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"midjourney_retries",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"number of retries:")],-1)),g("td",null,[g("div",yer,[J(g("input",{type:"number",min:"0",max:"2048",id:"midjourney_retries",required:"","onUpdate:modelValue":e[310]||(e[310]=T=>o.configFile.midjourney_retries=T),onChange:e[311]||(e[311]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.midjourney_retries]])])])])])]),_:1}),oe(a,{title:"Dall-E",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",ber,[g("tr",null,[e[681]||(e[681]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"dall_e_key",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e key:")],-1)),g("td",null,[g("div",Eer,[J(g("input",{type:"text",id:"dall_e_key",required:"","onUpdate:modelValue":e[312]||(e[312]=T=>o.configFile.dall_e_key=T),onChange:e[313]||(e[313]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.dall_e_key]])])])]),g("tr",null,[e[683]||(e[683]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"dall_e_generation_engine",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"dall e generation engine:")],-1)),g("td",null,[g("div",xer,[J(g("select",{"onUpdate:modelValue":e[314]||(e[314]=T=>o.configFile.dall_e_generation_engine=T),onChange:e[315]||(e[315]=T=>i.settingsChanged=!0)},e[682]||(e[682]=[g("option",null," dall-e-2 ",-1),g("option",null," dall-e-3 ",-1)]),544),[[pn,o.configFile.dall_e_generation_engine]])])])])])]),_:1}),oe(a,{title:"ComfyUI service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",Ser,[g("tr",null,[e[685]||(e[685]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_comfyui_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui service:")],-1)),g("td",null,[g("div",Ler,[J(g("input",{type:"checkbox",id:"enable_comfyui_service",required:"","onUpdate:modelValue":e[316]||(e[316]=T=>o.configFile.enable_comfyui_service=T),onChange:e[317]||(e[317]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.enable_comfyui_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[318]||(e[318]=T=>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[684]||(e[684]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[686]||(e[686]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Available models (only if local):")],-1)),g("td",null,[g("div",Cer,[J(g("select",{id:"comfyui_model",required:"","onUpdate:modelValue":e[319]||(e[319]=T=>o.configFile.comfyui_model=T),onChange:e[320]||(e[320]=T=>i.settingsChanged=!0),class:"w-full mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},[(k(!0),H(Ue,null,ot(i.comfyui_models,(T,Q)=>(k(),H("option",{key:T,value:T},le(T),9,Aer))),128))],544),[[pn,o.configFile.comfyui_model]])])])]),g("tr",null,[e[688]||(e[688]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"comfyui_model",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable comfyui model:")],-1)),g("td",null,[g("div",wer,[J(g("input",{type:"text",id:"comfyui_model",required:"","onUpdate:modelValue":e[321]||(e[321]=T=>o.configFile.comfyui_model=T),onChange:e[322]||(e[322]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.comfyui_model]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[323]||(e[323]=T=>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[687]||(e[687]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[690]||(e[690]=g("td",{style:{"min-width":"200px"}},null,-1)),g("td",null,[g("div",Mer,[g("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]=(...T)=>o.reinstallComfyUIService&&o.reinstallComfyUIService(...T))},"install comfyui service"),g("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]=(...T)=>o.upgradeComfyUIService&&o.upgradeComfyUIService(...T))},"upgrade comfyui service"),g("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]=(...T)=>o.startComfyUIService&&o.startComfyUIService(...T))},"start comfyui service"),g("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]=(...T)=>o.showComfyui&&o.showComfyui(...T))},"show comfyui"),e[689]||(e[689]=g("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))])])]),g("tr",null,[e[691]||(e[691]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"comfyui_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"comfyui base url:")],-1)),g("td",null,[g("div",Oer,[J(g("input",{type:"text",id:"comfyui_base_url",required:"","onUpdate:modelValue":e[328]||(e[328]=T=>o.configFile.comfyui_base_url=T),onChange:e[329]||(e[329]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.comfyui_base_url]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTT services",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[oe(a,{title:"Ollama service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",Rer,[g("tr",null,[e[693]||(e[693]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_ollama_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable ollama service:")],-1)),g("td",null,[g("div",Ner,[J(g("input",{type:"checkbox",id:"enable_ollama_service",required:"","onUpdate:modelValue":e[330]||(e[330]=T=>o.configFile.enable_ollama_service=T),onChange:e[331]||(e[331]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.enable_ollama_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[332]||(e[332]=T=>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[684]||(e[684]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[686]||(e[686]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),g("td",null,[g("div",Cer,[g("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]=(...T)=>o.reinstallOLLAMAService&&o.reinstallOLLAMAService(...T))},"install ollama service"),g("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]=(...T)=>o.startollamaService&&o.startollamaService(...T))},"start ollama service")])])]),g("tr",null,[e[687]||(e[687]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),g("td",null,[g("div",Aer,[J(g("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[332]||(e[332]=T=>o.configFile.ollama_base_url=T),onChange:e[333]||(e[333]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.ollama_base_url]])])])])])]),_:1}),oe(a,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",wer,[g("tr",null,[e[689]||(e[689]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),g("td",null,[g("div",Mer,[J(g("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[334]||(e[334]=T=>o.configFile.enable_vllm_service=T),onChange:e[335]||(e[335]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.enable_vllm_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[336]||(e[336]=T=>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[692]||(e[692]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[694]||(e[694]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Ollama service:")],-1)),g("td",null,[g("div",Der,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[333]||(e[333]=(...T)=>o.reinstallOLLAMAService&&o.reinstallOLLAMAService(...T))},"install ollama service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[334]||(e[334]=(...T)=>o.startollamaService&&o.startollamaService(...T))},"start ollama service")])])]),g("tr",null,[e[695]||(e[695]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"ollama_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"ollama base url:")],-1)),g("td",null,[g("div",Ier,[J(g("input",{type:"text",id:"ollama_base_url",required:"","onUpdate:modelValue":e[335]||(e[335]=T=>o.configFile.ollama_base_url=T),onChange:e[336]||(e[336]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.ollama_base_url]])])])])])]),_:1}),oe(a,{title:"vLLM service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",ker,[g("tr",null,[e[697]||(e[697]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_vllm_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable vLLM service:")],-1)),g("td",null,[g("div",Per,[J(g("input",{type:"checkbox",id:"enable_vllm_service",required:"","onUpdate:modelValue":e[337]||(e[337]=T=>o.configFile.enable_vllm_service=T),onChange:e[338]||(e[338]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.enable_vllm_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[339]||(e[339]=T=>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[688]||(e[688]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[690]||(e[690]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),g("td",null,[g("div",Oer,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[337]||(e[337]=(...T)=>o.reinstallvLLMService&&o.reinstallvLLMService(...T))},"install vLLM service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[338]||(e[338]=(...T)=>o.startvLLMService&&o.startvLLMService(...T))},"start vllm service")])])]),g("tr",null,[e[691]||(e[691]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),g("td",null,[g("div",Rer,[J(g("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[339]||(e[339]=T=>o.configFile.vllm_url=T),onChange:e[340]||(e[340]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_url]])])])]),g("tr",null,[e[693]||(e[693]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),g("td",null,[g("div",Ner,[g("div",Der,[e[692]||(e[692]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),g("p",Ier,[J(g("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[341]||(e[341]=T=>o.configFile.vllm_gpu_memory_utilization=T),onChange:e[342]||(e[342]=T=>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),[[we,o.configFile.vllm_gpu_memory_utilization]])])]),J(g("input",{id:"vllm_gpu_memory_utilization",onChange:e[343]||(e[343]=T=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[344]||(e[344]=T=>o.configFile.vllm_gpu_memory_utilization=T),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),[[we,o.configFile.vllm_gpu_memory_utilization]])])])]),g("tr",null,[e[694]||(e[694]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),g("td",null,[g("div",ker,[J(g("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[345]||(e[345]=T=>o.configFile.vllm_max_num_seqs=T),onChange:e[346]||(e[346]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_max_num_seqs]])])])]),g("tr",null,[e[695]||(e[695]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),g("td",null,[g("div",Per,[J(g("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[347]||(e[347]=T=>o.configFile.vllm_max_model_len=T),onChange:e[348]||(e[348]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_max_model_len]])])])]),g("tr",null,[e[696]||(e[696]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),g("td",null,[g("div",Her,[J(g("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[349]||(e[349]=T=>o.configFile.vllm_model_path=T),onChange:e[350]||(e[350]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_model_path]])])])])])]),_:1}),oe(a,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",Ver,[g("tr",null,[e[698]||(e[698]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),g("td",null,[g("div",Ber,[J(g("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[351]||(e[351]=T=>o.configFile.enable_petals_service=T),onChange:e[352]||(e[352]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.enable_petals_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[353]||(e[353]=T=>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[696]||(e[696]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[698]||(e[698]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install vLLM service:")],-1)),g("td",null,[g("div",Her,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[340]||(e[340]=(...T)=>o.reinstallvLLMService&&o.reinstallvLLMService(...T))},"install vLLM service"),g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[341]||(e[341]=(...T)=>o.startvLLMService&&o.startvLLMService(...T))},"start vllm service")])])]),g("tr",null,[e[699]||(e[699]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm base url:")],-1)),g("td",null,[g("div",Ver,[J(g("input",{type:"text",id:"vllm_url",required:"","onUpdate:modelValue":e[342]||(e[342]=T=>o.configFile.vllm_url=T),onChange:e[343]||(e[343]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_url]])])])]),g("tr",null,[e[701]||(e[701]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"gpu memory utilization:")],-1)),g("td",null,[g("div",Ber,[g("div",Fer,[e[700]||(e[700]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"vllm_gpu_memory_utilization",class:"text-sm font-medium"}," vllm gpu memory utilization: ")],-1)),g("p",$er,[J(g("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[344]||(e[344]=T=>o.configFile.vllm_gpu_memory_utilization=T),onChange:e[345]||(e[345]=T=>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),[[we,o.configFile.vllm_gpu_memory_utilization]])])]),J(g("input",{id:"vllm_gpu_memory_utilization",onChange:e[346]||(e[346]=T=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[347]||(e[347]=T=>o.configFile.vllm_gpu_memory_utilization=T),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),[[we,o.configFile.vllm_gpu_memory_utilization]])])])]),g("tr",null,[e[702]||(e[702]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_max_num_seqs",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm max num seqs:")],-1)),g("td",null,[g("div",Uer,[J(g("input",{type:"number",id:"vllm_max_num_seqs",min:"64",max:"2048",required:"","onUpdate:modelValue":e[348]||(e[348]=T=>o.configFile.vllm_max_num_seqs=T),onChange:e[349]||(e[349]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_max_num_seqs]])])])]),g("tr",null,[e[703]||(e[703]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_max_model_len",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"max model len:")],-1)),g("td",null,[g("div",Ger,[J(g("input",{type:"number",id:"vllm_max_model_len",min:"2048",max:"1000000",required:"","onUpdate:modelValue":e[350]||(e[350]=T=>o.configFile.vllm_max_model_len=T),onChange:e[351]||(e[351]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_max_model_len]])])])]),g("tr",null,[e[704]||(e[704]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"vllm_model_path",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"vllm model path:")],-1)),g("td",null,[g("div",qer,[J(g("input",{type:"text",id:"vllm_model_path",required:"","onUpdate:modelValue":e[352]||(e[352]=T=>o.configFile.vllm_model_path=T),onChange:e[353]||(e[353]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.vllm_model_path]])])])])])]),_:1}),oe(a,{title:"Petals service",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",zer,[g("tr",null,[e[706]||(e[706]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"enable_petals_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable petals service:")],-1)),g("td",null,[g("div",jer,[J(g("input",{type:"checkbox",id:"enable_petals_service",required:"","onUpdate:modelValue":e[354]||(e[354]=T=>o.configFile.enable_petals_service=T),onChange:e[355]||(e[355]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.enable_petals_service]])])]),g("td",null,[g("div",{class:"hover:text-secondary duration-75 active:scale-90 peer-checked:text-primary",onClick:e[356]||(e[356]=T=>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[697]||(e[697]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[699]||(e[699]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),g("td",null,[g("div",Fer,[g("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]=(...T)=>o.reinstallPetalsService&&o.reinstallPetalsService(...T))},"install petals service")])])]),g("tr",null,[e[700]||(e[700]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),g("td",null,[g("div",$er,[J(g("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[355]||(e[355]=T=>o.configFile.petals_base_url=T),onChange:e[356]||(e[356]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.petals_base_url]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTV settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",Uer,[g("div",Ger,[e[703]||(e[703]=g("div",{class:"w-full md:w-1/3"},[g("label",{for:"lumalabs_key",class:"block text-sm font-semibold text-gray-700 dark:text-gray-200"}," Lumalabs Key ")],-1)),g("div",qer,[g("div",zer,[J(g("input",{type:"text",id:"lumalabs_key",required:"","onUpdate:modelValue":e[357]||(e[357]=T=>o.configFile.lumalabs_key=T),onChange:e[358]||(e[358]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2.5 rounded-lg border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent transition duration-150 ease-in-out",placeholder:"Enter your Lumalabs API key"},null,544),[[we,o.configFile.lumalabs_key]]),e[701]||(e[701]=g("div",{class:"absolute inset-y-0 right-0 flex items-center pr-3"},[g("svg",{class:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"})])],-1))]),e[702]||(e[702]=g("p",{class:"mt-1 text-xs text-gray-500 dark:text-gray-400"}," Your API key will be securely stored ",-1))])])])]),_:1}),oe(a,{title:"Misc",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[oe(a,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",jer,[g("tr",null,[e[704]||(e[704]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),g("td",null,[g("div",Wer,[J(g("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[359]||(e[359]=T=>o.configFile.elastic_search_service=T),onChange:e[360]||(e[360]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.elastic_search_service]])])])]),g("tr",null,[e[705]||(e[705]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),g("td",null,[g("div",Yer,[g("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[361]||(e[361]=(...T)=>o.reinstallElasticSearchService&&o.reinstallElasticSearchService(...T))},"install ElasticSearch service")])])]),g("tr",null,[e[706]||(e[706]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),g("td",null,[g("div",Ker,[J(g("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[362]||(e[362]=T=>o.configFile.elastic_search_url=T),onChange:e[363]||(e[363]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.elastic_search_url]])])])])])]),_:1})]),_:1})],2)]),g("div",Zer,[g("div",Xer,[g("button",{onClick:e[364]||(e[364]=he(T=>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"},[J(g("div",null,e[707]||(e[707]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.bzc_collapsed]]),J(g("div",null,e[708]||(e[708]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.bzc_collapsed]]),e[710]||(e[710]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),o.configFile.binding_name?re("",!0):(k(),H("div",Jer,e[709]||(e[709]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),nt(" No binding selected! ")]))),o.configFile.binding_name?(k(),H("div",etr,"|")):re("",!0),o.configFile.binding_name?(k(),H("div",ttr,[g("div",ntr,[g("img",{src:o.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,rtr),g("p",itr,le(o.binding_name),1)])])):re("",!0)])]),g("div",{class:je([{hidden:i.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[o.bindingsZoo&&o.bindingsZoo.length>0?(k(),H("div",otr,[g("label",str," Bindings: ("+le(o.bindingsZoo.length)+") ",1),g("div",{class:je(["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"])},[oe(Ns,{name:"list"},{default:He(()=>[(k(!0),H(Ue,null,ot(o.bindingsZoo,(T,Q)=>(k(),wt(c,{ref_for:!0,ref:"bindingZoo",key:"index-"+Q+"-"+T.folder,binding:T,"on-selected":o.onBindingSelected,"on-reinstall":o.onReinstallBinding,"on-unInstall":o.onUnInstallBinding,"on-install":o.onInstallBinding,"on-settings":o.onSettingsBinding,"on-reload-binding":o.onReloadBinding,selected:T.folder===o.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):re("",!0),i.bzl_collapsed?(k(),H("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[365]||(e[365]=T=>i.bzl_collapsed=!i.bzl_collapsed)},e[711]||(e[711]=[g("i",{"data-feather":"chevron-up"},null,-1)]))):(k(),H("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[366]||(e[366]=T=>i.bzl_collapsed=!i.bzl_collapsed)},e[712]||(e[712]=[g("i",{"data-feather":"chevron-down"},null,-1)])))],2)]),g("div",atr,[g("div",ltr,[g("button",{onClick:e[367]||(e[367]=he(T=>o.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[J(g("div",null,e[713]||(e[713]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.mzc_collapsed]]),J(g("div",null,e[714]||(e[714]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.mzc_collapsed]]),e[717]||(e[717]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),g("div",ctr,[o.configFile.binding_name?re("",!0):(k(),H("div",utr,e[715]||(e[715]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),nt(" Select binding first! ")]))),!o.configFile.model_name&&o.configFile.binding_name?(k(),H("div",dtr,e[716]||(e[716]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),nt(" No model selected! ")]))):re("",!0),o.configFile.model_name?(k(),H("div",ftr,"|")):re("",!0),o.configFile.model_name?(k(),H("div",ptr,[g("div",htr,[g("img",{src:o.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,Ttr),g("p",mtr,le(o.configFile.model_name),1)])])):re("",!0)])])]),g("div",{class:je([{hidden:i.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",gtr,[g("div",_tr,[g("div",Qtr,[i.searchModelInProgress?(k(),H("div",vtr,e[718]||(e[718]=[g("div",{role:"status"},[g("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"},[g("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"}),g("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"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):re("",!0),i.searchModelInProgress?re("",!0):(k(),H("div",ytr,e[719]||(e[719]=[g("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"},[g("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)])))]),J(g("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[368]||(e[368]=T=>i.searchModel=T),onKeyup:e[369]||(e[369]=Xr((...T)=>o.searchModel_func&&o.searchModel_func(...T),["enter"]))},null,544),[[we,i.searchModel]]),i.searchModel?(k(),H("button",{key:0,onClick:e[370]||(e[370]=he(T=>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")):re("",!0)])]),g("div",null,[J(g("input",{"onUpdate:modelValue":e[371]||(e[371]=T=>i.show_only_installed_models=T),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[ut,i.show_only_installed_models]]),e[720]||(e[720]=g("label",{for:"only_installed"},"Show only installed models",-1))]),g("div",null,[oe(u,{radioOptions:i.sortOptions,onRadioSelected:o.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),e[728]||(e[728]=g("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?(k(),H("div",btr,e[721]||(e[721]=[g("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"},[g("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"}),g("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),g("p",{class:"heartbeat-text"},"Loading models Zoo",-1)]))):re("",!0),i.models_zoo&&i.models_zoo.length>0?(k(),H("div",Etr,[g("label",xtr," Models: ("+le(i.models_zoo.length)+") ",1),g("div",{class:je(["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"])},[oe(Ns,{name:"list"},{default:He(()=>[(k(!0),H(Ue,null,ot(o.rendered_models_zoo,(T,Q)=>(k(),wt(d,{ref_for:!0,ref:"modelZoo",key:"index-"+Q+"-"+T.name,model:T,"is-installed":T.isInstalled,"on-install":o.onInstall,"on-uninstall":o.onUninstall,"on-selected":o.onModelSelected,selected:T.name===o.configFile.model_name,model_type:T.model_type,"on-copy":o.onCopy,"on-copy-link":o.onCopyLink,"on-cancel-install":o.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),g("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[372]||(e[372]=(...T)=>o.load_more_models&&o.load_more_models(...T))},"Load more models",512)]),_:1})],2)])):re("",!0),i.mzl_collapsed?(k(),H("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[373]||(e[373]=(...T)=>o.open_mzl&&o.open_mzl(...T))},e[722]||(e[722]=[g("i",{"data-feather":"chevron-up"},null,-1)]))):(k(),H("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[374]||(e[374]=(...T)=>o.open_mzl&&o.open_mzl(...T))},e[723]||(e[723]=[g("i",{"data-feather":"chevron-down"},null,-1)]))),g("div",Str,[g("div",Ltr,[g("div",null,[g("div",Ctr,[e[724]||(e[724]=g("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),J(g("input",{type:"text","onUpdate:modelValue":e[375]||(e[375]=T=>i.reference_path=T),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),[[we,i.reference_path]])]),g("button",{type:"button",onClick:e[376]||(e[376]=he(T=>o.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?re("",!0):(k(),H("div",Atr,[g("div",wtr,[e[725]||(e[725]=g("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),J(g("input",{type:"text","onUpdate:modelValue":e[377]||(e[377]=T=>i.addModel.url=T),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),[[we,i.addModel.url]])]),g("button",{type:"button",onClick:e[378]||(e[378]=he(T=>o.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?(k(),H("div",Mtr,[e[727]||(e[727]=g("div",{role:"status",class:"justify-center"},null,-1)),g("div",Otr,[g("div",Rtr,[g("div",Ntr,[e[726]||(e[726]=Fl(' Downloading Loading...',1)),g("span",Dtr,le(Math.floor(i.addModel.progress))+"%",1)]),g("div",{class:"mx-1 opacity-80 line-clamp-1",title:i.addModel.url},le(i.addModel.url),9,Itr),g("div",ktr,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn({width:i.addModel.progress+"%"})},null,4)]),g("div",Ptr,[g("span",Htr,"Download speed: "+le(o.speed_computed)+"/s",1),g("span",Vtr,le(o.downloaded_size_computed)+"/"+le(o.total_size_computed),1)])])]),g("div",Btr,[g("div",Ftr,[g("div",$tr,[g("button",{onClick:e[379]||(e[379]=he((...T)=>o.onCancelInstall&&o.onCancelInstall(...T),["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 ")])])])])):re("",!0)])])],2)]),g("div",Utr,[g("div",Gtr,[g("button",{onClick:e[382]||(e[382]=he(T=>i.pzc_collapsed=!i.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[J(g("div",null,e[729]||(e[729]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.pzc_collapsed]]),J(g("div",null,e[730]||(e[730]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.pzc_collapsed]]),e[733]||(e[733]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),o.configFile.personalities?(k(),H("div",qtr,"|")):re("",!0),g("div",ztr,le(o.active_pesonality),1),o.configFile.personalities?(k(),H("div",jtr,"|")):re("",!0),o.configFile.personalities?(k(),H("div",Wtr,[o.mountedPersArr.length>0?(k(),H("div",Ytr,[(k(!0),H(Ue,null,ot(o.mountedPersArr,(T,Q)=>(k(),H("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:Q+"-"+T.name,ref_for:!0,ref:"mountedPersonalities"},[g("div",Ktr,[g("button",{onClick:he(_=>o.onPersonalitySelected(T),["stop"])},[g("img",{src:i.bUrl+T.avatar,onError:e[380]||(e[380]=(..._)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(..._)),class:je(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",o.configFile.active_personality_id==o.configFile.personalities.indexOf(T.full_path)?"border-secondary":"border-transparent z-0"]),title:T.name},null,42,Xtr)],8,Ztr),g("button",{onClick:he(_=>o.unmountPersonality(T),["stop"])},e[731]||(e[731]=[g("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"},[g("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"},[g("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,Jtr)])]))),128))])):re("",!0)])):re("",!0),g("button",{onClick:e[381]||(e[381]=he(T=>o.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[732]||(e[732]=[g("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"},[g("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)]))])]),g("div",{class:je([{hidden:i.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",enr,[e[736]||(e[736]=g("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),g("div",tnr,[g("div",nnr,[i.searchPersonalityInProgress?(k(),H("div",rnr,e[734]||(e[734]=[g("div",{role:"status"},[g("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"},[g("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"}),g("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"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):re("",!0),i.searchPersonalityInProgress?re("",!0):(k(),H("div",inr,e[735]||(e[735]=[g("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"},[g("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)])))]),J(g("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[383]||(e[383]=T=>i.searchPersonality=T),onKeyup:e[384]||(e[384]=he((...T)=>o.searchPersonality_func&&o.searchPersonality_func(...T),["stop"]))},null,544),[[we,i.searchPersonality]]),i.searchPersonality?(k(),H("button",{key:0,onClick:e[385]||(e[385]=he(T=>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")):re("",!0)])]),i.searchPersonality?re("",!0):(k(),H("div",onr,[g("label",snr," Personalities Category: ("+le(i.persCatgArr.length)+") ",1),g("select",{id:"persCat",onChange:e[386]||(e[386]=T=>o.update_personality_category(T.target.value,o.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"},[(k(!0),H(Ue,null,ot(i.persCatgArr,(T,Q)=>(k(),H("option",{key:Q,selected:T==this.configFile.personality_category},le(T),9,anr))),128))],32)])),g("div",null,[i.personalitiesFiltered.length>0?(k(),H("div",lnr,[g("label",cnr,le(i.searchPersonality?"Search results":"Personalities")+": ("+le(i.personalitiesFiltered.length)+") ",1),g("div",{class:je(["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"])},[oe(Ns,{name:"bounce"},{default:He(()=>[(k(!0),H(Ue,null,ot(i.personalitiesFiltered,(T,Q)=>(k(),wt(h,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+Q+"-"+T.name,personality:T,select_language:!0,full_path:T.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(_=>_===T.full_path||_===T.full_path+":"+T.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-edit":o.editPersonality,"on-copy-to-custom":o.copyToCustom,"on-reinstall":o.onPersonalityReinstall,"on-settings":o.onSettingsPersonality,"on-copy-personality-name":o.onCopyPersonalityName,"on-copy-to_custom":o.onCopyToCustom,"on-open-folder":o.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)])):re("",!0)]),i.pzl_collapsed?(k(),H("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[387]||(e[387]=T=>i.pzl_collapsed=!i.pzl_collapsed)},e[737]||(e[737]=[g("i",{"data-feather":"chevron-up"},null,-1)]))):(k(),H("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[388]||(e[388]=T=>i.pzl_collapsed=!i.pzl_collapsed)},e[738]||(e[738]=[g("i",{"data-feather":"chevron-down"},null,-1)])))],2)]),g("div",unr,[g("div",dnr,[g("button",{onClick:e[389]||(e[389]=he(T=>i.mc_collapsed=!i.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[J(g("div",null,e[739]||(e[739]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.mc_collapsed]]),J(g("div",null,e[740]||(e[740]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.mc_collapsed]]),e[741]||(e[741]=g("p",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1))])]),g("div",{class:je([{hidden:i.mc_collapsed},"flex flex-col mb-2 p-2"])},[g("div",fnr,[g("div",pnr,[J(g("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[390]||(e[390]=he(()=>{},["stop"])),"onUpdate:modelValue":e[391]||(e[391]=T=>o.configFile.override_personality_model_parameters=T),onChange:e[392]||(e[392]=T=>o.update_setting("override_personality_model_parameters",o.configFile.override_personality_model_parameters))},null,544),[[ut,o.configFile.override_personality_model_parameters]]),e[742]||(e[742]=g("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1))])]),g("div",{class:je(o.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[g("div",hnr,[e[743]||(e[743]=g("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),J(g("input",{type:"text",id:"seed","onUpdate:modelValue":e[393]||(e[393]=T=>o.configFile.seed=T),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),[[we,o.configFile.seed]])]),g("div",Tnr,[g("div",mnr,[g("div",gnr,[e[744]||(e[744]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),g("p",_nr,[J(g("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[394]||(e[394]=T=>o.configFile.temperature=T),onChange:e[395]||(e[395]=T=>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),[[we,o.configFile.temperature]])])]),J(g("input",{id:"temperature",onChange:e[396]||(e[396]=T=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[397]||(e[397]=T=>o.configFile.temperature=T),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),[[we,o.configFile.temperature]])])]),g("div",Qnr,[g("div",vnr,[g("div",ynr,[e[745]||(e[745]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),g("p",bnr,[J(g("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[398]||(e[398]=T=>o.configFile.n_predict=T),onChange:e[399]||(e[399]=T=>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),[[we,o.configFile.n_predict]])])]),J(g("input",{id:"predict",type:"range",onChange:e[400]||(e[400]=T=>i.settingsChanged=!0),"onUpdate:modelValue":e[401]||(e[401]=T=>o.configFile.n_predict=T),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),[[we,o.configFile.n_predict]])])]),g("div",Enr,[g("div",xnr,[g("div",Snr,[e[746]||(e[746]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),g("p",Lnr,[J(g("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[402]||(e[402]=T=>o.configFile.top_k=T),onChange:e[403]||(e[403]=T=>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),[[we,o.configFile.top_k]])])]),J(g("input",{id:"top_k",type:"range",onChange:e[404]||(e[404]=T=>i.settingsChanged=!0),"onUpdate:modelValue":e[405]||(e[405]=T=>o.configFile.top_k=T),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),[[we,o.configFile.top_k]])])]),g("div",Cnr,[g("div",Anr,[g("div",wnr,[e[747]||(e[747]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),g("p",Mnr,[J(g("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[406]||(e[406]=T=>o.configFile.top_p=T),onChange:e[407]||(e[407]=T=>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),[[we,o.configFile.top_p]])])]),J(g("input",{id:"top_p",type:"range","onUpdate:modelValue":e[408]||(e[408]=T=>o.configFile.top_p=T),min:"0",max:"1",step:"0.01",onChange:e[409]||(e[409]=T=>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),[[we,o.configFile.top_p]])])]),g("div",Onr,[g("div",Rnr,[g("div",Nnr,[e[748]||(e[748]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),g("p",Dnr,[J(g("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[410]||(e[410]=T=>o.configFile.repeat_penalty=T),onChange:e[411]||(e[411]=T=>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),[[we,o.configFile.repeat_penalty]])])]),J(g("input",{id:"repeat_penalty",onChange:e[412]||(e[412]=T=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[413]||(e[413]=T=>o.configFile.repeat_penalty=T),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),[[we,o.configFile.repeat_penalty]])])]),g("div",Inr,[g("div",knr,[g("div",Pnr,[e[749]||(e[749]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),g("p",Hnr,[J(g("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[414]||(e[414]=T=>o.configFile.repeat_last_n=T),onChange:e[415]||(e[415]=T=>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),[[we,o.configFile.repeat_last_n]])])]),J(g("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[416]||(e[416]=T=>o.configFile.repeat_last_n=T),min:"0",max:"100",step:"1",onChange:e[417]||(e[417]=T=>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),[[we,o.configFile.repeat_last_n]])])])],2)],2)])],2)]),oe(f,{ref:"addmodeldialog"},null,512),oe(m,{class:"z-20",show:i.variantSelectionDialogVisible,choices:i.variant_choices,onChoiceSelected:o.onVariantChoiceSelected,onCloseDialog:o.oncloseVariantChoiceDialog,onChoiceValidated:o.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const Bnr=yt(Ejn,[["render",Vnr],["__scopeId","data-v-d37ef18c"]]),Fnr={components:{ClipBoardTextInput:gb,Card:Q9},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const t={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};Qe.post("/start_training",t).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(t){const e=t.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(t){console.log("watching model_name",t),this.$refs.clipboardInput.inputValue=t}}},$nr={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"},Unr={class:"mb-4"},Gnr=["value"],qnr={class:"mb-4"},znr={class:"mb-4"},jnr={class:"mb-4"},Wnr={class:"mb-4"},Ynr={class:"mb-4"},Knr={class:"mb-4"},Znr={key:1};function Xnr(t,e,n,r,i,o){const s=pt("Card"),a=pt("ClipBoardTextInput");return o.selectedModel!==null&&o.selectedModel.toLowerCase().includes("gptq")?(k(),H("div",$nr,[g("form",{onSubmit:e[2]||(e[2]=he((...l)=>o.submitForm&&o.submitForm(...l),["prevent"])),class:""},[oe(s,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[oe(s,{title:"Model",class:"",isHorizontal:!1},{default:He(()=>[g("div",Unr,[e[3]||(e[3]=g("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),J(g("select",{"onUpdate:modelValue":e[0]||(e[0]=l=>o.selectedModel=l),onChange:e[1]||(e[1]=(...l)=>t.setModel&&t.setModel(...l)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(k(!0),H(Ue,null,ot(o.models,l=>(k(),H("option",{key:l,value:l},le(l),9,Gnr))),128))],544),[[pn,o.selectedModel]])])]),_:1}),oe(s,{title:"Data",isHorizontal:!1},{default:He(()=>[g("div",qnr,[e[4]||(e[4]=g("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1)),oe(a,{id:"model_path",inputType:"file",value:i.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),oe(s,{title:"Training",isHorizontal:!1},{default:He(()=>[g("div",znr,[e[5]||(e[5]=g("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.lr},null,8,["value"])]),g("div",jnr,[e[6]||(e[6]=g("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.num_epochs},null,8,["value"])]),g("div",Wnr,[e[7]||(e[7]=g("label",{for:"max_length",class:"text-sm"},"Max Length:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.max_length},null,8,["value"])]),g("div",Ynr,[e[8]||(e[8]=g("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.batch_size},null,8,["value"])])]),_:1}),oe(s,{title:"Output",isHorizontal:!1},{default:He(()=>[g("div",Knr,[e[9]||(e[9]=g("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1)),oe(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),oe(s,{disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>e[10]||(e[10]=[g("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1)])),_:1})],32)])):(k(),H("div",Znr,[oe(s,{title:"Info",class:"",isHorizontal:!1},{default:He(()=>e[11]||(e[11]=[nt(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")])),_:1})]))}const Jnr=yt(Fnr,[["render",Xnr]]),err={components:{ClipBoardTextInput:gb,Card:Q9},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(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(t){const e=t.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},trr={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"},nrr={class:"mb-4"},rrr={class:"mb-4"};function irr(t,e,n,r,i,o){const s=pt("ClipBoardTextInput"),a=pt("Card");return k(),H("div",trr,[g("form",{onSubmit:e[0]||(e[0]=he((...l)=>o.submitForm&&o.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[oe(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[oe(a,{title:"Model",class:"",isHorizontal:!1},{default:He(()=>[g("div",nrr,[e[1]||(e[1]=g("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),oe(s,{id:"model_path",inputType:"text",value:i.model_name},null,8,["value"])]),g("div",rrr,[e[2]||(e[2]=g("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1)),oe(s,{id:"model_path",inputType:"text",value:i.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),oe(a,{disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>e[3]||(e[3]=[g("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1)])),_:1})],32)])}const orr=yt(err,[["render",irr]]),srr={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(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",t,e)}},mounted(){this.newTitle=this.title,ze(()=>{Ze.replace()})},watch:{showConfirmation(){ze(()=>{Ze.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&ze(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(t){this.showConfirmation=t,t&&ze(()=>{this.$refs.titleBox.focus()})},makeTitleMode(t){this.showConfirmation=t},checkBoxValue(t,e){this.checkBoxValue_local=t}}},arr=["id"],lrr={class:"flex flex-row items-center gap-2"},crr={key:0},urr={class:"flex flex-row items-center w-full"},drr=["title"],frr=["value"],prr={class:"absolute top-0 right-0 h-full flex items-center group"},hrr={class:"discussion-toolbox"},Trr={key:0,class:"flex gap-2 items-center"},mrr={key:1,class:"flex gap-2 items-center"};function grr(t,e,n,r,i,o){return k(),H("div",{class:je([n.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-"+n.id,onClick:e[13]||(e[13]=he(s=>o.selectEvent(),["stop"]))},[g("div",lrr,[n.isCheckbox?(k(),H("div",crr,[J(g("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]=he(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=s=>i.checkBoxValue_local=s),onInput:e[2]||(e[2]=s=>o.checkedChangeEvent(s,n.id))},null,544),[[ut,i.checkBoxValue_local]])])):re("",!0),n.selected?(k(),H("div",{key:1,class:je(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent":"bg-secondary"])},null,2)):re("",!0),n.selected?re("",!0):(k(),H("div",{key:2,class:je(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent":""])},null,2))]),g("div",urr,[i.editTitle?re("",!0):(k(),H("p",{key:0,title:n.title,class:"line-clamp-1 w-full ml-1 -mx-5 text-xs"},le(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,drr)),i.editTitle?(k(),H("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:n.title,required:"",onKeydown:[e[3]||(e[3]=Xr(he(s=>o.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=Xr(he(s=>i.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=s=>o.chnageTitle(s.target.value)),onClick:e[6]||(e[6]=he(()=>{},["stop"]))},null,40,frr)):re("",!0)]),g("div",prr,[g("div",hrr,[i.showConfirmation?(k(),H("div",Trr,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=he(s=>o.cancel(),["stop"]))},e[14]||(e[14]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=he(s=>i.editTitleMode?o.editTitleEvent():i.deleteMode?o.deleteEvent():o.makeTitleEvent(),["stop"]))},e[15]||(e[15]=[g("i",{"data-feather":"check"},null,-1)]))])):re("",!0),i.showConfirmation?re("",!0):(k(),H("div",mrr,[n.openfolder_enabled?(k(),H("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=he(s=>o.openFolderEvent(),["stop"]))},e[16]||(e[16]=[g("i",{"data-feather":"folder"},null,-1)]))):re("",!0),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=he(s=>i.makeTitleMode=!0,["stop"]))},e[17]||(e[17]=[g("i",{"data-feather":"type"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=he(s=>i.editTitleMode=!0,["stop"]))},e[18]||(e[18]=[g("i",{"data-feather":"edit-2"},null,-1)])),g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=he(s=>i.deleteMode=!0,["stop"]))},e[19]||(e[19]=[g("i",{"data-feather":"trash"},null,-1)]))]))])])],10,arr)}const kb=yt(srr,[["render",grr],["__scopeId","data-v-2b3580ce"]]),_rr={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(t){this.prompt=t}}},Qrr={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},vrr={class:"bg-white p-8 rounded"},yrr={class:"text-xl font-bold mb-4"};function brr(t,e,n,r,i,o){return k(),H("div",null,[i.show?(k(),H("div",Qrr,[g("div",vrr,[g("h2",yrr,le(n.promptText),1),J(g("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=s=>i.inputText=s),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[we,i.inputText]]),g("button",{onClick:e[1]||(e[1]=(...s)=>o.ok&&o.ok(...s)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),g("button",{onClick:e[2]||(e[2]=(...s)=>o.cancel&&o.cancel(...s)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):re("",!0)])}const Err=yt(_rr,[["render",brr]]),xrr={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:kb,MarkdownRenderer:T9},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){Qe.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(t=>{this.categories=t.data.categories}).catch(t=>{console.error("Error fetching categories:",t)})},fetchTitles(){console.log("Fetching categories"),Qe.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(t=>{this.titles=t.data.titles,console.log("titles recovered")}).catch(t=>{console.error("Error fetching titles:",t)})},fetchContent(t){console.log("loading skill",t),Qe.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:t}).then(e=>{const n=e.data.contents[0];this.id=n.id,this.content=n.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(t){console.log("Delete category")},editCategory(t){console.log("Edit category")},checkUncheckCategory(t){console.log("Unchecked category")},deleteSkill(t){console.log("Delete skill ",t),Qe.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:t}).then(()=>{this.fetchTitles()})},editTitle(t){Qe.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:t,title:t}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(t){console.log("Make title")},checkUncheckTitle(t){},searchSkills(){}}},Srr={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},Lrr={class:"w-[15rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},Crr={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"},Arr={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 wrr(t,e,n,r,i,o){const s=pt("Discussion"),a=pt("MarkdownRenderer");return k(),H("div",{class:je([{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"])},[g("div",Srr,[g("div",Lrr,[J(g("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]=l=>i.searchQuery=l),onKeyup:e[1]||(e[1]=Xr((...l)=>o.searchSkills&&o.searchSkills(...l),["enter"]))},null,544),[[we,i.searchQuery]]),g("div",Crr,[e[3]||(e[3]=g("h2",{class:"text-xl font-bold m-4"},"Titles",-1)),i.titles.length>0?(k(),wt(Ns,{key:0,name:"list"},{default:He(()=>[(k(!0),H(Ue,null,ot(i.titles,l=>(k(),wt(s,{key:l.id,id:l.id,title:l.title,selected:o.fetchContent(l.id),loading:i.loading,isCheckbox:i.isCheckbox,checkBoxValue:!1,openfolder_enabled:!1,onSelect:c=>o.fetchContent(l.id),onDelete:c=>o.deleteSkill(l.id),onEditTitle:o.editTitle,onMakeTitle:o.makeTitle,onChecked:o.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):re("",!0)])]),g("div",Arr,[e[4]||(e[4]=g("h2",{class:"text-xl font-bold m-4"},"Content",-1)),oe(a,{host:n.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"])])]),g("button",{onClick:e[2]||(e[2]=(...l)=>o.closeComponent&&o.closeComponent(...l)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const rU=yt(xrr,[["render",wrr]]),Mrr={props:{htmlContent:{type:String,required:!0}}},Orr=["innerHTML"];function Rrr(t,e,n,r,i,o){return k(),H("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:n.htmlContent},null,8,Orr)}const Nrr=yt(Mrr,[["render",Rrr]]),Drr={name:"JsonTreeView",props:{data:{type:[Object,Array],required:!0},depth:{type:Number,default:0}},data(){return{collapsedKeys:new Set}},methods:{isObject(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},isArray(t){return Array.isArray(t)},toggleCollapse(t){this.collapsedKeys.has(t)?this.collapsedKeys.delete(t):this.collapsedKeys.add(t)},isCollapsed(t){return this.collapsedKeys.has(t)},getValueType(t){return typeof t=="string"?"string":typeof t=="number"?"number":typeof t=="boolean"?"boolean":t===null?"null":""},formatValue(t){return typeof t=="string"?`"${t}"`:String(t)}}},Irr={class:"json-tree-view"},krr=["onClick"],Prr={key:0,class:"toggle-icon"},Hrr={class:"key"},Vrr={key:0,class:"json-nested"};function Brr(t,e,n,r,i,o){const s=pt("json-tree-view",!0);return k(),H("div",Irr,[(k(!0),H(Ue,null,ot(n.data,(a,l)=>(k(),H("div",{key:l,class:"json-item"},[g("div",{class:"json-key",onClick:c=>o.toggleCollapse(l)},[o.isObject(a)||o.isArray(a)?(k(),H("span",Prr,[g("i",{class:je(o.isCollapsed(l)?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)])):re("",!0),g("span",Hrr,le(l)+":",1),!o.isObject(a)&&!o.isArray(a)?(k(),H("span",{key:1,class:je(["value",o.getValueType(a)])},le(o.formatValue(a)),3)):re("",!0)],8,krr),(o.isObject(a)||o.isArray(a))&&!o.isCollapsed(l)?(k(),H("div",Vrr,[oe(s,{data:a,depth:n.depth+1},null,8,["data","depth"])])):re("",!0)]))),128))])}const Frr=yt(Drr,[["render",Brr],["__scopeId","data-v-40406ec6"]]),$rr={components:{JsonTreeView:Frr},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(t){return console.error("Error parsing JSON string:",t),{error:"Invalid JSON string"}}return this.jsonData}},methods:{toggleCollapsible(){this.collapsed=!this.collapsed}}},Urr={key:0,class:"json-viewer"},Grr={class:"toggle-icon"},qrr={class:"json-content panels-color"};function zrr(t,e,n,r,i,o){const s=pt("json-tree-view");return o.isContentPresent?(k(),H("div",Urr,[g("div",{class:"collapsible-section",onClick:e[0]||(e[0]=(...a)=>o.toggleCollapsible&&o.toggleCollapsible(...a))},[g("span",Grr,[g("i",{class:je(i.collapsed?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)]),nt(" "+le(n.jsonFormText),1)]),J(g("div",qrr,[oe(s,{data:o.parsedJsonData,depth:0},null,8,["data"])],512),[[Pt,!i.collapsed]])])):re("",!0)}const jrr=yt($rr,[["render",zrr],["__scopeId","data-v-83fc9727"]]),Wrr={props:{done:Boolean,text:String,status:Boolean,description:String}},Yrr={class:"step-wrapper"},Krr={class:"step-icon"},Zrr={key:0,class:"icon-success",viewBox:"0 0 24 24"},Xrr={key:1,class:"icon-fail",viewBox:"0 0 24 24"},Jrr={key:1,class:"icon-spinner"},eir={class:"step-content"},tir={class:"step-text"},nir={key:0,class:"step-description"};function rir(t,e,n,r,i,o){return k(),H("div",{class:je(["step-container",{"step-done":n.done}])},[g("div",Yrr,[g("div",Krr,[n.done?(k(),H(Ue,{key:0},[n.status?(k(),H("svg",Zrr,e[0]||(e[0]=[g("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},null,-1)]))):(k(),H("svg",Xrr,e[1]||(e[1]=[g("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)):(k(),H("div",Jrr))]),g("div",eir,[g("h3",tir,le(n.text||"No text provided"),1),n.description?(k(),H("p",nir,le(n.description),1)):re("",!0)])])],2)}const iir=yt(Wrr,[["render",rir]]),oir="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",sir="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",air="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",iU="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",lir="/",cir={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:T9,Step:iir,RenderHTMLJS:Nrr,JsonViewer:jrr,DynamicUIRenderer:nU,ToolbarButton:_b,DropdownMenu:G$},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{ui_componentKey:0,isSynthesizingVoice:!1,cpp_block:M$,html5_block:O$,LaTeX_block:R$,json_block:w$,javascript_block:A$,process_svg:oir,ok_svg:sir,failed_svg:air,loading_svg:D$,sendGlobe:iU,code_block:L$,python_block:C$,bash_block:N$,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."),ze(()=>{Ze.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 t of this.message.metadata)Object.prototype.hasOwnProperty.call(t,"audio_url")&&t.audio_url!=null&&(this.audio_url=t.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{toggleExpanded(){this.expanded=!this.expanded},computeTimeDiff(t,e){let n=e.getTime()-t.getTime();const r=Math.floor(n/(1e3*60*60));n-=r*(1e3*60*60);const i=Math.floor(n/(1e3*60));n-=i*(1e3*60);const o=Math.floor(n/1e3);return n-=o*1e3,[r,i,o]},insertTab(t){const e=t.target,n=e.selectionStart,r=e.selectionEnd,i=t.shiftKey;if(n===r)if(i){if(e.value.substring(n-4,n)==" "){const o=e.value.substring(0,n-4),s=e.value.substring(r),a=o+s;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n-4})}}else{const o=e.value.substring(0,n),s=e.value.substring(r),a=o+" "+s;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4})}else{const s=e.value.substring(n,r).split(` +Here is how you can do that`))},e[705]||(e[705]=[g("i",{"data-feather":"help-circle",class:"w-5 h-5"},null,-1)]))])]),g("tr",null,[e[707]||(e[707]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Install Petals service:")],-1)),g("td",null,[g("div",Wer,[g("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]=(...T)=>o.reinstallPetalsService&&o.reinstallPetalsService(...T))},"install petals service")])])]),g("tr",null,[e[708]||(e[708]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"petals_base_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"petals base url:")],-1)),g("td",null,[g("div",Yer,[J(g("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[358]||(e[358]=T=>o.configFile.petals_base_url=T),onChange:e[359]||(e[359]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.petals_base_url]])])])])])]),_:1})]),_:1}),oe(a,{title:"TTV settings",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("div",Ker,[g("div",Zer,[e[711]||(e[711]=g("div",{class:"w-full md:w-1/3"},[g("label",{for:"lumalabs_key",class:"block text-sm font-semibold text-gray-700 dark:text-gray-200"}," Lumalabs Key ")],-1)),g("div",Xer,[g("div",Jer,[J(g("input",{type:"text",id:"lumalabs_key",required:"","onUpdate:modelValue":e[360]||(e[360]=T=>o.configFile.lumalabs_key=T),onChange:e[361]||(e[361]=T=>i.settingsChanged=!0),class:"w-full px-4 py-2.5 rounded-lg border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent transition duration-150 ease-in-out",placeholder:"Enter your Lumalabs API key"},null,544),[[we,o.configFile.lumalabs_key]]),e[709]||(e[709]=g("div",{class:"absolute inset-y-0 right-0 flex items-center pr-3"},[g("svg",{class:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor"},[g("path",{d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"})])],-1))]),e[710]||(e[710]=g("p",{class:"mt-1 text-xs text-gray-500 dark:text-gray-400"}," Your API key will be securely stored ",-1))])])])]),_:1}),oe(a,{title:"Misc",is_shrunk:!0,is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[oe(a,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:He(()=>[g("table",etr,[g("tr",null,[e[712]||(e[712]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Enable elastic search service:")],-1)),g("td",null,[g("div",ttr,[J(g("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[362]||(e[362]=T=>o.configFile.elastic_search_service=T),onChange:e[363]||(e[363]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[ut,o.configFile.elastic_search_service]])])])]),g("tr",null,[e[713]||(e[713]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"install_elastic_search_service",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"Reinstall Elastic Search service:")],-1)),g("td",null,[g("div",ntr,[g("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]=(...T)=>o.reinstallElasticSearchService&&o.reinstallElasticSearchService(...T))},"install ElasticSearch service")])])]),g("tr",null,[e[714]||(e[714]=g("td",{style:{"min-width":"200px"}},[g("label",{for:"elastic_search_url",class:"text-sm font-bold",style:{"margin-right":"1rem"}},"elastic search base url:")],-1)),g("td",null,[g("div",rtr,[J(g("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[365]||(e[365]=T=>o.configFile.elastic_search_url=T),onChange:e[366]||(e[366]=T=>i.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[we,o.configFile.elastic_search_url]])])])])])]),_:1})]),_:1})],2)]),g("div",itr,[g("div",otr,[g("button",{onClick:e[367]||(e[367]=he(T=>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"},[J(g("div",null,e[715]||(e[715]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.bzc_collapsed]]),J(g("div",null,e[716]||(e[716]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.bzc_collapsed]]),e[718]||(e[718]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Binding zoo",-1)),o.configFile.binding_name?re("",!0):(k(),H("div",str,e[717]||(e[717]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),nt(" No binding selected! ")]))),o.configFile.binding_name?(k(),H("div",atr,"|")):re("",!0),o.configFile.binding_name?(k(),H("div",ltr,[g("div",ctr,[g("img",{src:o.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,utr),g("p",dtr,le(o.binding_name),1)])])):re("",!0)])]),g("div",{class:je([{hidden:i.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[o.bindingsZoo&&o.bindingsZoo.length>0?(k(),H("div",ftr,[g("label",ptr," Bindings: ("+le(o.bindingsZoo.length)+") ",1),g("div",{class:je(["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"])},[oe(Ns,{name:"list"},{default:He(()=>[(k(!0),H(Ue,null,ot(o.bindingsZoo,(T,Q)=>(k(),wt(c,{ref_for:!0,ref:"bindingZoo",key:"index-"+Q+"-"+T.folder,binding:T,"on-selected":o.onBindingSelected,"on-reinstall":o.onReinstallBinding,"on-unInstall":o.onUnInstallBinding,"on-install":o.onInstallBinding,"on-settings":o.onSettingsBinding,"on-reload-binding":o.onReloadBinding,selected:T.folder===o.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):re("",!0),i.bzl_collapsed?(k(),H("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[368]||(e[368]=T=>i.bzl_collapsed=!i.bzl_collapsed)},e[719]||(e[719]=[g("i",{"data-feather":"chevron-up"},null,-1)]))):(k(),H("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[369]||(e[369]=T=>i.bzl_collapsed=!i.bzl_collapsed)},e[720]||(e[720]=[g("i",{"data-feather":"chevron-down"},null,-1)])))],2)]),g("div",htr,[g("div",Ttr,[g("button",{onClick:e[370]||(e[370]=he(T=>o.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[J(g("div",null,e[721]||(e[721]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.mzc_collapsed]]),J(g("div",null,e[722]||(e[722]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.mzc_collapsed]]),e[725]||(e[725]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Models zoo",-1)),g("div",mtr,[o.configFile.binding_name?re("",!0):(k(),H("div",gtr,e[723]||(e[723]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),nt(" Select binding first! ")]))),!o.configFile.model_name&&o.configFile.binding_name?(k(),H("div",_tr,e[724]||(e[724]=[g("i",{"data-feather":"alert-triangle",class:"flex-shrink-0"},null,-1),nt(" No model selected! ")]))):re("",!0),o.configFile.model_name?(k(),H("div",Qtr,"|")):re("",!0),o.configFile.model_name?(k(),H("div",vtr,[g("div",ytr,[g("img",{src:o.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,btr),g("p",Etr,le(o.configFile.model_name),1)])])):re("",!0)])])]),g("div",{class:je([{hidden:i.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",xtr,[g("div",Str,[g("div",Ltr,[i.searchModelInProgress?(k(),H("div",Ctr,e[726]||(e[726]=[g("div",{role:"status"},[g("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"},[g("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"}),g("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"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):re("",!0),i.searchModelInProgress?re("",!0):(k(),H("div",Atr,e[727]||(e[727]=[g("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"},[g("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)])))]),J(g("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[371]||(e[371]=T=>i.searchModel=T),onKeyup:e[372]||(e[372]=Xr((...T)=>o.searchModel_func&&o.searchModel_func(...T),["enter"]))},null,544),[[we,i.searchModel]]),i.searchModel?(k(),H("button",{key:0,onClick:e[373]||(e[373]=he(T=>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")):re("",!0)])]),g("div",null,[J(g("input",{"onUpdate:modelValue":e[374]||(e[374]=T=>i.show_only_installed_models=T),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[ut,i.show_only_installed_models]]),e[728]||(e[728]=g("label",{for:"only_installed"},"Show only installed models",-1))]),g("div",null,[oe(u,{radioOptions:i.sortOptions,onRadioSelected:o.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),e[736]||(e[736]=g("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?(k(),H("div",wtr,e[729]||(e[729]=[g("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"},[g("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"}),g("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),g("p",{class:"heartbeat-text"},"Loading models Zoo",-1)]))):re("",!0),i.models_zoo&&i.models_zoo.length>0?(k(),H("div",Mtr,[g("label",Otr," Models: ("+le(i.models_zoo.length)+") ",1),g("div",{class:je(["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"])},[oe(Ns,{name:"list"},{default:He(()=>[(k(!0),H(Ue,null,ot(o.rendered_models_zoo,(T,Q)=>(k(),wt(d,{ref_for:!0,ref:"modelZoo",key:"index-"+Q+"-"+T.name,model:T,"is-installed":T.isInstalled,"on-install":o.onInstall,"on-uninstall":o.onUninstall,"on-selected":o.onModelSelected,selected:T.name===o.configFile.model_name,model_type:T.model_type,"on-copy":o.onCopy,"on-copy-link":o.onCopyLink,"on-cancel-install":o.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),g("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[375]||(e[375]=(...T)=>o.load_more_models&&o.load_more_models(...T))},"Load more models",512)]),_:1})],2)])):re("",!0),i.mzl_collapsed?(k(),H("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[376]||(e[376]=(...T)=>o.open_mzl&&o.open_mzl(...T))},e[730]||(e[730]=[g("i",{"data-feather":"chevron-up"},null,-1)]))):(k(),H("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[377]||(e[377]=(...T)=>o.open_mzl&&o.open_mzl(...T))},e[731]||(e[731]=[g("i",{"data-feather":"chevron-down"},null,-1)]))),g("div",Rtr,[g("div",Ntr,[g("div",null,[g("div",Dtr,[e[732]||(e[732]=g("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Create a reference from local file path:",-1)),J(g("input",{type:"text","onUpdate:modelValue":e[378]||(e[378]=T=>i.reference_path=T),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),[[we,i.reference_path]])]),g("button",{type:"button",onClick:e[379]||(e[379]=he(T=>o.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?re("",!0):(k(),H("div",Itr,[g("div",ktr,[e[733]||(e[733]=g("label",{class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"},"Download from web:",-1)),J(g("input",{type:"text","onUpdate:modelValue":e[380]||(e[380]=T=>i.addModel.url=T),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),[[we,i.addModel.url]])]),g("button",{type:"button",onClick:e[381]||(e[381]=he(T=>o.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?(k(),H("div",Ptr,[e[735]||(e[735]=g("div",{role:"status",class:"justify-center"},null,-1)),g("div",Htr,[g("div",Vtr,[g("div",Btr,[e[734]||(e[734]=Fl(' Downloading Loading...',1)),g("span",Ftr,le(Math.floor(i.addModel.progress))+"%",1)]),g("div",{class:"mx-1 opacity-80 line-clamp-1",title:i.addModel.url},le(i.addModel.url),9,$tr),g("div",Utr,[g("div",{class:"bg-blue-600 h-2.5 rounded-full",style:xn({width:i.addModel.progress+"%"})},null,4)]),g("div",Gtr,[g("span",qtr,"Download speed: "+le(o.speed_computed)+"/s",1),g("span",ztr,le(o.downloaded_size_computed)+"/"+le(o.total_size_computed),1)])])]),g("div",jtr,[g("div",Wtr,[g("div",Ytr,[g("button",{onClick:e[382]||(e[382]=he((...T)=>o.onCancelInstall&&o.onCancelInstall(...T),["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 ")])])])])):re("",!0)])])],2)]),g("div",Ktr,[g("div",Ztr,[g("button",{onClick:e[385]||(e[385]=he(T=>i.pzc_collapsed=!i.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[J(g("div",null,e[737]||(e[737]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.pzc_collapsed]]),J(g("div",null,e[738]||(e[738]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.pzc_collapsed]]),e[741]||(e[741]=g("p",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," Personalities zoo",-1)),o.configFile.personalities?(k(),H("div",Xtr,"|")):re("",!0),g("div",Jtr,le(o.active_pesonality),1),o.configFile.personalities?(k(),H("div",enr,"|")):re("",!0),o.configFile.personalities?(k(),H("div",tnr,[o.mountedPersArr.length>0?(k(),H("div",nnr,[(k(!0),H(Ue,null,ot(o.mountedPersArr,(T,Q)=>(k(),H("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:Q+"-"+T.name,ref_for:!0,ref:"mountedPersonalities"},[g("div",rnr,[g("button",{onClick:he(_=>o.onPersonalitySelected(T),["stop"])},[g("img",{src:i.bUrl+T.avatar,onError:e[383]||(e[383]=(..._)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(..._)),class:je(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",o.configFile.active_personality_id==o.configFile.personalities.indexOf(T.full_path)?"border-secondary":"border-transparent z-0"]),title:T.name},null,42,onr)],8,inr),g("button",{onClick:he(_=>o.unmountPersonality(T),["stop"])},e[739]||(e[739]=[g("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"},[g("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"},[g("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,snr)])]))),128))])):re("",!0)])):re("",!0),g("button",{onClick:e[384]||(e[384]=he(T=>o.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[740]||(e[740]=[g("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"},[g("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)]))])]),g("div",{class:je([{hidden:i.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[g("div",anr,[e[744]||(e[744]=g("label",{for:"personality-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1)),g("div",lnr,[g("div",cnr,[i.searchPersonalityInProgress?(k(),H("div",unr,e[742]||(e[742]=[g("div",{role:"status"},[g("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"},[g("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"}),g("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"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):re("",!0),i.searchPersonalityInProgress?re("",!0):(k(),H("div",dnr,e[743]||(e[743]=[g("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"},[g("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)])))]),J(g("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[386]||(e[386]=T=>i.searchPersonality=T),onKeyup:e[387]||(e[387]=he((...T)=>o.searchPersonality_func&&o.searchPersonality_func(...T),["stop"]))},null,544),[[we,i.searchPersonality]]),i.searchPersonality?(k(),H("button",{key:0,onClick:e[388]||(e[388]=he(T=>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")):re("",!0)])]),i.searchPersonality?re("",!0):(k(),H("div",fnr,[g("label",pnr," Personalities Category: ("+le(i.persCatgArr.length)+") ",1),g("select",{id:"persCat",onChange:e[389]||(e[389]=T=>o.update_personality_category(T.target.value,o.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"},[(k(!0),H(Ue,null,ot(i.persCatgArr,(T,Q)=>(k(),H("option",{key:Q,selected:T==this.configFile.personality_category},le(T),9,hnr))),128))],32)])),g("div",null,[i.personalitiesFiltered.length>0?(k(),H("div",Tnr,[g("label",mnr,le(i.searchPersonality?"Search results":"Personalities")+": ("+le(i.personalitiesFiltered.length)+") ",1),g("div",{class:je(["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"])},[oe(Ns,{name:"bounce"},{default:He(()=>[(k(!0),H(Ue,null,ot(i.personalitiesFiltered,(T,Q)=>(k(),wt(h,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+Q+"-"+T.name,personality:T,select_language:!0,full_path:T.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(_=>_===T.full_path||_===T.full_path+":"+T.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-edit":o.editPersonality,"on-copy-to-custom":o.copyToCustom,"on-reinstall":o.onPersonalityReinstall,"on-settings":o.onSettingsPersonality,"on-copy-personality-name":o.onCopyPersonalityName,"on-copy-to_custom":o.onCopyToCustom,"on-open-folder":o.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)])):re("",!0)]),i.pzl_collapsed?(k(),H("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[390]||(e[390]=T=>i.pzl_collapsed=!i.pzl_collapsed)},e[745]||(e[745]=[g("i",{"data-feather":"chevron-up"},null,-1)]))):(k(),H("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[391]||(e[391]=T=>i.pzl_collapsed=!i.pzl_collapsed)},e[746]||(e[746]=[g("i",{"data-feather":"chevron-down"},null,-1)])))],2)]),g("div",gnr,[g("div",_nr,[g("button",{onClick:e[392]||(e[392]=he(T=>i.mc_collapsed=!i.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[J(g("div",null,e[747]||(e[747]=[g("i",{"data-feather":"chevron-right"},null,-1)]),512),[[Pt,i.mc_collapsed]]),J(g("div",null,e[748]||(e[748]=[g("i",{"data-feather":"chevron-down"},null,-1)]),512),[[Pt,!i.mc_collapsed]]),e[749]||(e[749]=g("p",{class:"text-lg font-semibold cursor-pointer select-none"}," Model Configuration",-1))])]),g("div",{class:je([{hidden:i.mc_collapsed},"flex flex-col mb-2 p-2"])},[g("div",Qnr,[g("div",vnr,[J(g("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[393]||(e[393]=he(()=>{},["stop"])),"onUpdate:modelValue":e[394]||(e[394]=T=>o.configFile.override_personality_model_parameters=T),onChange:e[395]||(e[395]=T=>o.update_setting("override_personality_model_parameters",o.configFile.override_personality_model_parameters))},null,544),[[ut,o.configFile.override_personality_model_parameters]]),e[750]||(e[750]=g("label",{for:"override-model-parameters",class:"block text-sm font-medium"}," Override personality model parameters ",-1))])]),g("div",{class:je(o.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[g("div",ynr,[e[751]||(e[751]=g("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1)),J(g("input",{type:"text",id:"seed","onUpdate:modelValue":e[396]||(e[396]=T=>o.configFile.seed=T),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),[[we,o.configFile.seed]])]),g("div",bnr,[g("div",Enr,[g("div",xnr,[e[752]||(e[752]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1)),g("p",Snr,[J(g("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[397]||(e[397]=T=>o.configFile.temperature=T),onChange:e[398]||(e[398]=T=>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),[[we,o.configFile.temperature]])])]),J(g("input",{id:"temperature",onChange:e[399]||(e[399]=T=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[400]||(e[400]=T=>o.configFile.temperature=T),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),[[we,o.configFile.temperature]])])]),g("div",Lnr,[g("div",Cnr,[g("div",Anr,[e[753]||(e[753]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1)),g("p",wnr,[J(g("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[401]||(e[401]=T=>o.configFile.n_predict=T),onChange:e[402]||(e[402]=T=>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),[[we,o.configFile.n_predict]])])]),J(g("input",{id:"predict",type:"range",onChange:e[403]||(e[403]=T=>i.settingsChanged=!0),"onUpdate:modelValue":e[404]||(e[404]=T=>o.configFile.n_predict=T),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),[[we,o.configFile.n_predict]])])]),g("div",Mnr,[g("div",Onr,[g("div",Rnr,[e[754]||(e[754]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1)),g("p",Nnr,[J(g("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[405]||(e[405]=T=>o.configFile.top_k=T),onChange:e[406]||(e[406]=T=>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),[[we,o.configFile.top_k]])])]),J(g("input",{id:"top_k",type:"range",onChange:e[407]||(e[407]=T=>i.settingsChanged=!0),"onUpdate:modelValue":e[408]||(e[408]=T=>o.configFile.top_k=T),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),[[we,o.configFile.top_k]])])]),g("div",Dnr,[g("div",Inr,[g("div",knr,[e[755]||(e[755]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1)),g("p",Pnr,[J(g("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[409]||(e[409]=T=>o.configFile.top_p=T),onChange:e[410]||(e[410]=T=>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),[[we,o.configFile.top_p]])])]),J(g("input",{id:"top_p",type:"range","onUpdate:modelValue":e[411]||(e[411]=T=>o.configFile.top_p=T),min:"0",max:"1",step:"0.01",onChange:e[412]||(e[412]=T=>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),[[we,o.configFile.top_p]])])]),g("div",Hnr,[g("div",Vnr,[g("div",Bnr,[e[756]||(e[756]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1)),g("p",Fnr,[J(g("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[413]||(e[413]=T=>o.configFile.repeat_penalty=T),onChange:e[414]||(e[414]=T=>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),[[we,o.configFile.repeat_penalty]])])]),J(g("input",{id:"repeat_penalty",onChange:e[415]||(e[415]=T=>i.settingsChanged=!0),type:"range","onUpdate:modelValue":e[416]||(e[416]=T=>o.configFile.repeat_penalty=T),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),[[we,o.configFile.repeat_penalty]])])]),g("div",$nr,[g("div",Unr,[g("div",Gnr,[e[757]||(e[757]=g("p",{class:"absolute left-0 mt-6"},[g("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1)),g("p",qnr,[J(g("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[417]||(e[417]=T=>o.configFile.repeat_last_n=T),onChange:e[418]||(e[418]=T=>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),[[we,o.configFile.repeat_last_n]])])]),J(g("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[419]||(e[419]=T=>o.configFile.repeat_last_n=T),min:"0",max:"100",step:"1",onChange:e[420]||(e[420]=T=>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),[[we,o.configFile.repeat_last_n]])])])],2)],2)])],2)]),oe(f,{ref:"addmodeldialog"},null,512),oe(m,{class:"z-20",show:i.variantSelectionDialogVisible,choices:i.variant_choices,onChoiceSelected:o.onVariantChoiceSelected,onCloseDialog:o.oncloseVariantChoiceDialog,onChoiceValidated:o.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const jnr=yt(Ejn,[["render",znr],["__scopeId","data-v-845a0c0b"]]),Wnr={components:{ClipBoardTextInput:gb,Card:Q9},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const t={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};Qe.post("/start_training",t).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(t){const e=t.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(t){console.log("watching model_name",t),this.$refs.clipboardInput.inputValue=t}}},Ynr={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"},Knr={class:"mb-4"},Znr=["value"],Xnr={class:"mb-4"},Jnr={class:"mb-4"},err={class:"mb-4"},trr={class:"mb-4"},nrr={class:"mb-4"},rrr={class:"mb-4"},irr={key:1};function orr(t,e,n,r,i,o){const s=pt("Card"),a=pt("ClipBoardTextInput");return o.selectedModel!==null&&o.selectedModel.toLowerCase().includes("gptq")?(k(),H("div",Ynr,[g("form",{onSubmit:e[2]||(e[2]=he((...l)=>o.submitForm&&o.submitForm(...l),["prevent"])),class:""},[oe(s,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[oe(s,{title:"Model",class:"",isHorizontal:!1},{default:He(()=>[g("div",Knr,[e[3]||(e[3]=g("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),J(g("select",{"onUpdate:modelValue":e[0]||(e[0]=l=>o.selectedModel=l),onChange:e[1]||(e[1]=(...l)=>t.setModel&&t.setModel(...l)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(k(!0),H(Ue,null,ot(o.models,l=>(k(),H("option",{key:l,value:l},le(l),9,Znr))),128))],544),[[pn,o.selectedModel]])])]),_:1}),oe(s,{title:"Data",isHorizontal:!1},{default:He(()=>[g("div",Xnr,[e[4]||(e[4]=g("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1)),oe(a,{id:"model_path",inputType:"file",value:i.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),oe(s,{title:"Training",isHorizontal:!1},{default:He(()=>[g("div",Jnr,[e[5]||(e[5]=g("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.lr},null,8,["value"])]),g("div",err,[e[6]||(e[6]=g("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.num_epochs},null,8,["value"])]),g("div",trr,[e[7]||(e[7]=g("label",{for:"max_length",class:"text-sm"},"Max Length:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.max_length},null,8,["value"])]),g("div",nrr,[e[8]||(e[8]=g("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1)),oe(a,{id:"model_path",inputType:"integer",value:i.batch_size},null,8,["value"])])]),_:1}),oe(s,{title:"Output",isHorizontal:!1},{default:He(()=>[g("div",rrr,[e[9]||(e[9]=g("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1)),oe(a,{id:"model_path",inputType:"text",value:t.output_dir},null,8,["value"])])]),_:1})]),_:1}),oe(s,{disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>e[10]||(e[10]=[g("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1)])),_:1})],32)])):(k(),H("div",irr,[oe(s,{title:"Info",class:"",isHorizontal:!1},{default:He(()=>e[11]||(e[11]=[nt(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")])),_:1})]))}const srr=yt(Wnr,[["render",orr]]),arr={components:{ClipBoardTextInput:gb,Card:Q9},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(t){var n;console.log("here");const e=(n=t.target.files[0])==null?void 0:n.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(t){const e=t.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},lrr={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"},crr={class:"mb-4"},urr={class:"mb-4"};function drr(t,e,n,r,i,o){const s=pt("ClipBoardTextInput"),a=pt("Card");return k(),H("div",lrr,[g("form",{onSubmit:e[0]||(e[0]=he((...l)=>o.submitForm&&o.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[oe(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>[oe(a,{title:"Model",class:"",isHorizontal:!1},{default:He(()=>[g("div",crr,[e[1]||(e[1]=g("label",{for:"model_name",class:"text-sm"},"Model Name:",-1)),oe(s,{id:"model_path",inputType:"text",value:i.model_name},null,8,["value"])]),g("div",urr,[e[2]||(e[2]=g("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1)),oe(s,{id:"model_path",inputType:"text",value:i.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),oe(a,{disableHoverAnimation:!0,disableFocus:!0},{default:He(()=>e[3]||(e[3]=[g("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1)])),_:1})],32)])}const frr=yt(arr,[["render",drr]]),prr={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(t){this.newTitle=t},checkedChangeEvent(t,e){this.$emit("checked",t,e)}},mounted(){this.newTitle=this.title,ze(()=>{Ze.replace()})},watch:{showConfirmation(){ze(()=>{Ze.replace()})},editTitleMode(t){this.showConfirmation=t,this.editTitle=t,t&&ze(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(t){this.showConfirmation=t,t&&ze(()=>{this.$refs.titleBox.focus()})},makeTitleMode(t){this.showConfirmation=t},checkBoxValue(t,e){this.checkBoxValue_local=t}}},hrr=["id"],Trr={class:"flex flex-row items-center gap-2"},mrr={key:0},grr={class:"flex flex-row items-center w-full"},_rr=["title"],Qrr=["value"],vrr={class:"absolute top-0 right-0 h-full flex items-center group"},yrr={class:"discussion-toolbox"},brr={key:0,class:"flex gap-2 items-center"},Err={key:1,class:"flex gap-2 items-center"};function xrr(t,e,n,r,i,o){return k(),H("div",{class:je([n.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-"+n.id,onClick:e[13]||(e[13]=he(s=>o.selectEvent(),["stop"]))},[g("div",Trr,[n.isCheckbox?(k(),H("div",mrr,[J(g("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]=he(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=s=>i.checkBoxValue_local=s),onInput:e[2]||(e[2]=s=>o.checkedChangeEvent(s,n.id))},null,544),[[ut,i.checkBoxValue_local]])])):re("",!0),n.selected?(k(),H("div",{key:1,class:je(["min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent":"bg-secondary"])},null,2)):re("",!0),n.selected?re("",!0):(k(),H("div",{key:2,class:je(["w-2",n.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent":""])},null,2))]),g("div",grr,[i.editTitle?re("",!0):(k(),H("p",{key:0,title:n.title,class:"line-clamp-1 w-full ml-1 -mx-5 text-xs"},le(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,_rr)),i.editTitle?(k(),H("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:n.title,required:"",onKeydown:[e[3]||(e[3]=Xr(he(s=>o.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=Xr(he(s=>i.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=s=>o.chnageTitle(s.target.value)),onClick:e[6]||(e[6]=he(()=>{},["stop"]))},null,40,Qrr)):re("",!0)]),g("div",vrr,[g("div",yrr,[i.showConfirmation?(k(),H("div",brr,[g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=he(s=>o.cancel(),["stop"]))},e[14]||(e[14]=[g("i",{"data-feather":"x"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=he(s=>i.editTitleMode?o.editTitleEvent():i.deleteMode?o.deleteEvent():o.makeTitleEvent(),["stop"]))},e[15]||(e[15]=[g("i",{"data-feather":"check"},null,-1)]))])):re("",!0),i.showConfirmation?re("",!0):(k(),H("div",Err,[n.openfolder_enabled?(k(),H("button",{key:0,class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=he(s=>o.openFolderEvent(),["stop"]))},e[16]||(e[16]=[g("i",{"data-feather":"folder"},null,-1)]))):re("",!0),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=he(s=>i.makeTitleMode=!0,["stop"]))},e[17]||(e[17]=[g("i",{"data-feather":"type"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=he(s=>i.editTitleMode=!0,["stop"]))},e[18]||(e[18]=[g("i",{"data-feather":"edit-2"},null,-1)])),g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=he(s=>i.deleteMode=!0,["stop"]))},e[19]||(e[19]=[g("i",{"data-feather":"trash"},null,-1)]))]))])])],10,hrr)}const kb=yt(prr,[["render",xrr],["__scopeId","data-v-2b3580ce"]]),Srr={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(t){this.prompt=t}}},Lrr={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},Crr={class:"bg-white p-8 rounded"},Arr={class:"text-xl font-bold mb-4"};function wrr(t,e,n,r,i,o){return k(),H("div",null,[i.show?(k(),H("div",Lrr,[g("div",Crr,[g("h2",Arr,le(n.promptText),1),J(g("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=s=>i.inputText=s),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[we,i.inputText]]),g("button",{onClick:e[1]||(e[1]=(...s)=>o.ok&&o.ok(...s)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),g("button",{onClick:e[2]||(e[2]=(...s)=>o.cancel&&o.cancel(...s)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):re("",!0)])}const Mrr=yt(Srr,[["render",wrr]]),Orr={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:kb,MarkdownRenderer:T9},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){Qe.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(t=>{this.categories=t.data.categories}).catch(t=>{console.error("Error fetching categories:",t)})},fetchTitles(){console.log("Fetching categories"),Qe.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(t=>{this.titles=t.data.titles,console.log("titles recovered")}).catch(t=>{console.error("Error fetching titles:",t)})},fetchContent(t){console.log("loading skill",t),Qe.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:t}).then(e=>{const n=e.data.contents[0];this.id=n.id,this.content=n.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(t){console.log("Delete category")},editCategory(t){console.log("Edit category")},checkUncheckCategory(t){console.log("Unchecked category")},deleteSkill(t){console.log("Delete skill ",t),Qe.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:t}).then(()=>{this.fetchTitles()})},editTitle(t){Qe.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:t,title:t}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(t){console.log("Make title")},checkUncheckTitle(t){},searchSkills(){}}},Rrr={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},Nrr={class:"w-[15rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},Drr={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"},Irr={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 krr(t,e,n,r,i,o){const s=pt("Discussion"),a=pt("MarkdownRenderer");return k(),H("div",{class:je([{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"])},[g("div",Rrr,[g("div",Nrr,[J(g("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]=l=>i.searchQuery=l),onKeyup:e[1]||(e[1]=Xr((...l)=>o.searchSkills&&o.searchSkills(...l),["enter"]))},null,544),[[we,i.searchQuery]]),g("div",Drr,[e[3]||(e[3]=g("h2",{class:"text-xl font-bold m-4"},"Titles",-1)),i.titles.length>0?(k(),wt(Ns,{key:0,name:"list"},{default:He(()=>[(k(!0),H(Ue,null,ot(i.titles,l=>(k(),wt(s,{key:l.id,id:l.id,title:l.title,selected:o.fetchContent(l.id),loading:i.loading,isCheckbox:i.isCheckbox,checkBoxValue:!1,openfolder_enabled:!1,onSelect:c=>o.fetchContent(l.id),onDelete:c=>o.deleteSkill(l.id),onEditTitle:o.editTitle,onMakeTitle:o.makeTitle,onChecked:o.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):re("",!0)])]),g("div",Irr,[e[4]||(e[4]=g("h2",{class:"text-xl font-bold m-4"},"Content",-1)),oe(a,{host:n.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"])])]),g("button",{onClick:e[2]||(e[2]=(...l)=>o.closeComponent&&o.closeComponent(...l)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const rU=yt(Orr,[["render",krr]]),Prr={props:{htmlContent:{type:String,required:!0}}},Hrr=["innerHTML"];function Vrr(t,e,n,r,i,o){return k(),H("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:n.htmlContent},null,8,Hrr)}const Brr=yt(Prr,[["render",Vrr]]),Frr={name:"JsonTreeView",props:{data:{type:[Object,Array],required:!0},depth:{type:Number,default:0}},data(){return{collapsedKeys:new Set}},methods:{isObject(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},isArray(t){return Array.isArray(t)},toggleCollapse(t){this.collapsedKeys.has(t)?this.collapsedKeys.delete(t):this.collapsedKeys.add(t)},isCollapsed(t){return this.collapsedKeys.has(t)},getValueType(t){return typeof t=="string"?"string":typeof t=="number"?"number":typeof t=="boolean"?"boolean":t===null?"null":""},formatValue(t){return typeof t=="string"?`"${t}"`:String(t)}}},$rr={class:"json-tree-view"},Urr=["onClick"],Grr={key:0,class:"toggle-icon"},qrr={class:"key"},zrr={key:0,class:"json-nested"};function jrr(t,e,n,r,i,o){const s=pt("json-tree-view",!0);return k(),H("div",$rr,[(k(!0),H(Ue,null,ot(n.data,(a,l)=>(k(),H("div",{key:l,class:"json-item"},[g("div",{class:"json-key",onClick:c=>o.toggleCollapse(l)},[o.isObject(a)||o.isArray(a)?(k(),H("span",Grr,[g("i",{class:je(o.isCollapsed(l)?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)])):re("",!0),g("span",qrr,le(l)+":",1),!o.isObject(a)&&!o.isArray(a)?(k(),H("span",{key:1,class:je(["value",o.getValueType(a)])},le(o.formatValue(a)),3)):re("",!0)],8,Urr),(o.isObject(a)||o.isArray(a))&&!o.isCollapsed(l)?(k(),H("div",zrr,[oe(s,{data:a,depth:n.depth+1},null,8,["data","depth"])])):re("",!0)]))),128))])}const Wrr=yt(Frr,[["render",jrr],["__scopeId","data-v-40406ec6"]]),Yrr={components:{JsonTreeView:Wrr},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(t){return console.error("Error parsing JSON string:",t),{error:"Invalid JSON string"}}return this.jsonData}},methods:{toggleCollapsible(){this.collapsed=!this.collapsed}}},Krr={key:0,class:"json-viewer"},Zrr={class:"toggle-icon"},Xrr={class:"json-content panels-color"};function Jrr(t,e,n,r,i,o){const s=pt("json-tree-view");return o.isContentPresent?(k(),H("div",Krr,[g("div",{class:"collapsible-section",onClick:e[0]||(e[0]=(...a)=>o.toggleCollapsible&&o.toggleCollapsible(...a))},[g("span",Zrr,[g("i",{class:je(i.collapsed?"fas fa-chevron-right":"fas fa-chevron-down")},null,2)]),nt(" "+le(n.jsonFormText),1)]),J(g("div",Xrr,[oe(s,{data:o.parsedJsonData,depth:0},null,8,["data"])],512),[[Pt,!i.collapsed]])])):re("",!0)}const eir=yt(Yrr,[["render",Jrr],["__scopeId","data-v-83fc9727"]]),tir={props:{done:Boolean,text:String,status:Boolean,description:String}},nir={class:"step-wrapper"},rir={class:"step-icon"},iir={key:0,class:"icon-success",viewBox:"0 0 24 24"},oir={key:1,class:"icon-fail",viewBox:"0 0 24 24"},sir={key:1,class:"icon-spinner"},air={class:"step-content"},lir={class:"step-text"},cir={key:0,class:"step-description"};function uir(t,e,n,r,i,o){return k(),H("div",{class:je(["step-container",{"step-done":n.done}])},[g("div",nir,[g("div",rir,[n.done?(k(),H(Ue,{key:0},[n.status?(k(),H("svg",iir,e[0]||(e[0]=[g("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},null,-1)]))):(k(),H("svg",oir,e[1]||(e[1]=[g("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)):(k(),H("div",sir))]),g("div",air,[g("h3",lir,le(n.text||"No text provided"),1),n.description?(k(),H("p",cir,le(n.description),1)):re("",!0)])])],2)}const dir=yt(tir,[["render",uir]]),fir="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",pir="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",hir="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",iU="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",Tir="/",mir={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:T9,Step:dir,RenderHTMLJS:Brr,JsonViewer:eir,DynamicUIRenderer:nU,ToolbarButton:_b,DropdownMenu:G$},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{ui_componentKey:0,isSynthesizingVoice:!1,cpp_block:M$,html5_block:O$,LaTeX_block:R$,json_block:w$,javascript_block:A$,process_svg:fir,ok_svg:pir,failed_svg:hir,loading_svg:D$,sendGlobe:iU,code_block:L$,python_block:C$,bash_block:N$,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."),ze(()=>{Ze.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 t of this.message.metadata)Object.prototype.hasOwnProperty.call(t,"audio_url")&&t.audio_url!=null&&(this.audio_url=t.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{toggleExpanded(){this.expanded=!this.expanded},computeTimeDiff(t,e){let n=e.getTime()-t.getTime();const r=Math.floor(n/(1e3*60*60));n-=r*(1e3*60*60);const i=Math.floor(n/(1e3*60));n-=i*(1e3*60);const o=Math.floor(n/1e3);return n-=o*1e3,[r,i,o]},insertTab(t){const e=t.target,n=e.selectionStart,r=e.selectionEnd,i=t.shiftKey;if(n===r)if(i){if(e.value.substring(n-4,n)==" "){const o=e.value.substring(0,n-4),s=e.value.substring(r),a=o+s;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n-4})}}else{const o=e.value.substring(0,n),s=e.value.substring(r),a=o+" "+s;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=n+4})}else{const s=e.value.substring(n,r).split(` `).map(u=>u.trim()===""?u:i?u.startsWith(" ")?u.substring(4):u:" "+u),a=e.value.substring(0,n),l=e.value.substring(r),c=a+s.join(` `)+l;this.message.content=c,this.$nextTick(()=>{e.selectionStart=n,e.selectionEnd=r+s.length*4})}t.preventDefault()},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},read(){this.isSynthesizingVoice?(this.isSynthesizingVoice=!1,this.$refs.audio_player.pause()):(this.isSynthesizingVoice=!0,Qe.post("./text2wav",{text:this.message.content}).then(t=>{this.isSynthesizingVoice=!1;let e=t.data.url;console.log(e),this.audio_url=e,this.message.metadata||(this.message.metadata=[]);let n=!1;for(let r of this.message.metadata)Object.prototype.hasOwnProperty.call(r,"audio_url")&&(r.audio_url=this.audio_url,n=!0);n||this.message.metadata.push({audio_url:this.audio_url}),this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url)}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,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,Qe.post("./stop",{text:this.message.content}).then(t=>{this.isSpeaking=!1}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSpeaking=!1})):(this.isSpeaking=!0,Qe.post("./text2Audio",{client_id:this.$store.state.client_id,text:this.message.content}).then(t=>{this.isSpeaking=!1}).catch(t=>{this.$store.state.toast.showToast(`Error: ${t}`,4,!1),this.isSpeaking=!1}));else{if(this.msg){this.speechSynthesis.cancel(),this.msg=null,this.isSpeaking=!1;return}let t=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 n=i=>{let o=this.message.content.substring(i,i+e);const s=[".","!","?",` `];let a=-1;return s.forEach(l=>{const c=o.lastIndexOf(l);c>a&&(a=c)}),a==-1&&(a=o.length),console.log(a),a+i+1},r=()=>{if(this.message.status_message=="Done"||this.message.content.includes(".")||this.message.content.includes("?")||this.message.content.includes("!")){const i=n(t),o=this.message.content.substring(t,i);this.msg.text=o,t=i+1,this.msg.onend=s=>{t{r()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",i))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{r()},1)};console.log("Speaking chunk"),r()}},toggleModel(){this.expanded=!this.expanded},addBlock(t){let e=this.$refs.mdTextarea.selectionStart,n=this.$refs.mdTextarea.selectionEnd;e==n?speechSynthesis==0||this.message.content[e-1]==` `?(this.message.content=this.message.content.slice(0,e)+"```"+t+"\n\n```\n"+this.message.content.slice(e),e=e+4+t.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+t+"\n\n```\n"+this.message.content.slice(e),e=e+3+t.length):speechSynthesis==0||this.message.content[e-1]==` `?(this.message.content=this.message.content.slice(0,e)+"```"+t+` `+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),e=e+4+t.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+t+` -`+this.message.content.slice(e,n)+"\n```\n"+this.message.content.slice(n),p=p+3+t.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(t){this.$emit("resendMessage",this.message.id,this.message.content,t)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?lir+this.avatar:(console.log("No avatar found"),co)},defaultImg(t){t.target.src=co},parseDate(t){let e=new Date(Date.parse(t)),r=Math.floor((new Date-e)/1e3);return r<=1?"just now":r<20?r+" seconds ago":r<40?"half a minute ago":r<60?"less than a minute ago":r<=90?"one minute ago":r<=3540?Math.round(r/60)+" minutes ago":r<=5400?"1 hour ago":r<=86400?Math.round(r/3600)+" hours ago":r<=129600?"1 day ago":r<604800?Math.round(r/86400)+" days ago":r<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,r=Math.floor(n/86400);if(!(isNaN(r)||r<0||r>=31))return r==0&&(n<60&&"just now"||n<120&&"1 minute ago"||n<3600&&Math.floor(n/60)+" minutes ago"||n<7200&&"1 hour ago"||n<86400&&Math.floor(n/3600)+" hours ago")||r==1&&"Yesterday"||r<7&&r+" days ago"||r<31&&Math.ceil(r/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(t){t&&(this.$refs.audio_player.src=t)},"message.content":function(t){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(t){console.log("ui changed to",t),this.ui_componentKey++},showConfirmation(){ze(()=>{Ze.replace()})},deleteMsgMode(){ze(()=>{Ze.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(t){this.message.open=t,this.editMsgMode_=t,ze(()=>{Ze.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 t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!t.getTime()||!e.getTime())return;let[r,i,o]=this.computeTimeDiff(t,e);function s(l){return l<10&&(l="0"+l),l}return s(r)+"h:"+s(i)+"m:"+s(o)+"s"},warmup_duration(){const t=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, ",t," -> ",e),e.getTime()===t.getTime())return 0;if(!t.getTime()||!e.getTime())return;let r,i,o;[r,i,o]=this.computeTimeDiff(t,e);function s(l){return l<10&&(l="0"+l),l}return s(r)+"h:"+s(i)+"m:"+s(o)+"s"},generation_rate(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),n=this.message.nb_tokens;if(e.getTime()===t.getTime()||!n||!t.getTime()||!e.getTime())return;let i=e.getTime()-t.getTime();const o=Math.floor(i/1e3),s=n/o;return Math.round(s)+" t/s"}}},uir={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"},dir={class:"flex flex-row gap-2"},fir={class:"flex-shrink-0"},pir={class:"group/avatar"},hir=["src","data-popover-target"],Tir={class:"flex flex-col w-full flex-grow-0"},mir={class:"flex flex-row flex-grow items-start"},gir={class:"flex flex-col mb-2"},_ir={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},Qir=["title"],vir={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"},yir={key:1},bir=["src"],Eir={class:"message-details"},xir={key:0,class:"steps-container"},Sir={class:"steps-icon"},Lir={class:"steps-summary"},Cir={class:"steps-status"},Air={class:"toggle-icon"},wir={key:0,class:"steps-content"},Mir={class:"steps-list"},Oir={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"},Rir={class:"flex-row justify-end mx-2"},Nir={class:"invisible group-hover:visible flex flex-row"},Dir={key:0},Iir={key:1},kir={key:2},Pir={key:3},Hir={key:4,class:"flex items-center duration-75"},Vir={class:"flex flex-row items-center"},Bir={class:"flex flex-row items-center"},Fir={key:6,class:"flex flex-row items-center"},$ir=["src"],Uir={class:"text-sm text-gray-400 mt-2"},Gir={class:"flex flex-row items-center gap-2"},qir={key:0},zir={class:"font-thin"},jir={key:1},Wir={class:"font-thin"},Yir={key:2},Kir={class:"font-thin"},Zir={key:3},Xir=["title"],Jir={key:4},eor=["title"],tor={key:5},nor=["title"],ror={key:6},ior=["title"];function oor(t,e,n,r,i,o){var T;const s=pt("MarkdownRenderer"),a=pt("JsonViewer"),l=pt("DynamicUIRenderer"),c=pt("StatusIcon"),u=pt("Step"),d=pt("RenderHTMLJS"),h=pt("ToolbarButton"),f=pt("DropdownSubmenu"),m=pt("DropdownMenu");return k(),H("div",uir,[g("div",dir,[g("div",fir,[g("div",pir,[g("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=Q=>o.defaultImg(Q)),"data-popover-target":"avatar"+n.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,hir)])]),g("div",Tir,[g("div",mir,[g("div",gir,[g("div",_ir,le(n.message.sender),1),n.message.created_at?(k(),H("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+o.created_at_parsed},le(o.created_at),9,Qir)):re("",!0)]),e[46]||(e[46]=g("div",{class:"flex-grow"},null,-1))]),g("div",vir,[o.editMsgMode?re("",!0):(k(),wt(s,{key:0,ref:"mdRender",host:n.host,"markdown-text":n.message.content,message_id:n.message.id,discussion_id:n.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),g("div",null,[n.message.open?J((k(),H("textarea",{key:0,ref:"mdTextarea",onKeydown:e[1]||(e[1]=Xr(he((...Q)=>o.insertTab&&o.insertTab(...Q),["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]=Q=>n.message.content=Q)}," ",544)),[[we,n.message.content]]):re("",!0)]),n.message.metadata!==null?(k(),H("div",yir,[(k(!0),H(Ue,null,ot(((T=n.message.metadata)==null?void 0:T.filter(Q=>Q!=null&&Q.hasOwnProperty("title")&&Q.hasOwnProperty("content")))||[],(Q,_)=>(k(),H("div",{key:"json-"+n.message.id+"-"+_,class:"json font-bold"},[(k(),wt(a,{jsonFormText:Q.title,jsonData:Q.content,key:"msgjson-"+n.message.id},null,8,["jsonFormText","jsonData"]))]))),128))])):re("",!0),n.message.ui?(k(),wt(l,{ref:"ui",class:"w-full",ui:n.message.ui,key:"msgui-"+n.message.id},null,8,["ui"])):re("",!0),i.audio_url!=null?(k(),H("audio",{controls:"",key:i.audio_url},[g("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,bir),e[47]||(e[47]=nt(" Your browser does not support the audio element. "))])):re("",!0),g("div",Eir,[n.message.steps.length>0?(k(),H("div",xir,[g("div",{class:"steps-header",onClick:e[3]||(e[3]=(...Q)=>o.toggleExpanded&&o.toggleExpanded(...Q))},[g("div",Sir,[oe(c,{status:n.message.status_message,icon:!0},null,8,["status"])]),g("div",Lir,[e[48]||(e[48]=g("h3",{class:"steps-title"},"Processing Info",-1)),g("p",Cir,le(n.message.status_message),1)]),g("span",Air,le(i.expanded?"▲":"▼"),1)]),oe(qi,{name:"fade"},{default:He(()=>[i.expanded?(k(),H("div",wir,[g("ul",Mir,[(k(!0),H(Ue,null,ot(n.message.steps,(Q,_)=>(k(),H("li",{key:`step-${n.message.id}-${_}`,class:"step-item"},[oe(u,{done:Q.done,text:Q.text,status:Q.status,description:Q.description},null,8,["done","text","status","description"])]))),128))])])):re("",!0)]),_:1})])):re("",!0),g("div",Oir,[(k(!0),H(Ue,null,ot(n.message.html_js_s,(Q,_)=>(k(),H("div",{key:`htmljs-${n.message.id}-${_}`,class:"font-bold animate-fadeIn",style:xn({animationDelay:`${_*200}ms`})},[oe(d,{htmlContent:Q},null,8,["htmlContent"])],4))),128))])])]),g("div",Rir,[g("div",Nir,[o.editMsgMode?(k(),H("div",Dir,[oe(h,{onClick:e[4]||(e[4]=he(Q=>o.editMsgMode=!1,["stop"])),title:"Cancel edit",icon:"x"}),oe(h,{onClick:he(o.updateMessage,["stop"]),title:"Update message",icon:"check"},null,8,["onClick"]),oe(m,{title:"Add Block"},{default:He(()=>[oe(f,{title:"Programming Languages",icon:"code"},{default:He(()=>[oe(h,{onClick:e[5]||(e[5]=he(Q=>o.addBlock("python"),["stop"])),title:"Python",icon:"python"}),oe(h,{onClick:e[6]||(e[6]=he(Q=>o.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),oe(h,{onClick:e[7]||(e[7]=he(Q=>o.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),oe(h,{onClick:e[8]||(e[8]=he(Q=>o.addBlock("java"),["stop"])),title:"Java",icon:"java"}),oe(h,{onClick:e[9]||(e[9]=he(Q=>o.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),oe(h,{onClick:e[10]||(e[10]=he(Q=>o.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),oe(h,{onClick:e[11]||(e[11]=he(Q=>o.addBlock("go"),["stop"])),title:"Go",icon:"go"}),oe(h,{onClick:e[12]||(e[12]=he(Q=>o.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),oe(h,{onClick:e[13]||(e[13]=he(Q=>o.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),oe(h,{onClick:e[14]||(e[14]=he(Q=>o.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),oe(h,{onClick:e[15]||(e[15]=he(Q=>o.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),oe(f,{title:"Web Technologies",icon:"web"},{default:He(()=>[oe(h,{onClick:e[16]||(e[16]=he(Q=>o.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),oe(h,{onClick:e[17]||(e[17]=he(Q=>o.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),oe(h,{onClick:e[18]||(e[18]=he(Q=>o.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),oe(h,{onClick:e[19]||(e[19]=he(Q=>o.addBlock("react"),["stop"])),title:"React",icon:"react"}),oe(h,{onClick:e[20]||(e[20]=he(Q=>o.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),oe(f,{title:"Markup and Data",icon:"file-code"},{default:He(()=>[oe(h,{onClick:e[21]||(e[21]=he(Q=>o.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),oe(h,{onClick:e[22]||(e[22]=he(Q=>o.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),oe(h,{onClick:e[23]||(e[23]=he(Q=>o.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),oe(h,{onClick:e[24]||(e[24]=he(Q=>o.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),oe(h,{onClick:e[25]||(e[25]=he(Q=>o.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),oe(f,{title:"Scripting and Shell",icon:"terminal"},{default:He(()=>[oe(h,{onClick:e[26]||(e[26]=he(Q=>o.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),oe(h,{onClick:e[27]||(e[27]=he(Q=>o.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),oe(h,{onClick:e[28]||(e[28]=he(Q=>o.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),oe(f,{title:"Diagramming",icon:"sitemap"},{default:He(()=>[oe(h,{onClick:e[29]||(e[29]=he(Q=>o.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),oe(h,{onClick:e[30]||(e[30]=he(Q=>o.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),oe(h,{onClick:e[31]||(e[31]=he(Q=>o.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),oe(f,{title:"Database",icon:"database"},{default:He(()=>[oe(h,{onClick:e[32]||(e[32]=he(Q=>o.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),oe(h,{onClick:e[33]||(e[33]=he(Q=>o.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),oe(h,{onClick:e[34]||(e[34]=he(Q=>o.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1})])):(k(),H("div",Iir,[oe(h,{onClick:e[35]||(e[35]=he(Q=>o.editMsgMode=!0,["stop"])),title:"Edit message",icon:"edit"})])),oe(h,{onClick:o.copyContentToClipboard,title:"Copy message to clipboard",icon:"copy"},null,8,["onClick"]),!o.editMsgMode&&n.message.sender!==t.$store.state.mountedPers.name?(k(),H("div",kir,[oe(h,{onClick:e[36]||(e[36]=he(Q=>o.resendMessage("full_context"),["stop"])),title:"Resend message with full context",icon:"send"}),oe(h,{onClick:e[37]||(e[37]=he(Q=>o.resendMessage("full_context_with_internet"),["stop"])),title:"Resend message with internet search",icon:"globe"}),oe(h,{onClick:e[38]||(e[38]=he(Q=>o.resendMessage("simple_question"),["stop"])),title:"Resend message without context",icon:"sendSimple"})])):re("",!0),!o.editMsgMode&&n.message.sender===t.$store.state.mountedPers.name?(k(),H("div",Pir,[oe(h,{onClick:o.continueMessage,title:"Continue message",icon:"fastForward"},null,8,["onClick"])])):re("",!0),i.deleteMsgMode?(k(),H("div",Hir,[g("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]=he(Q=>i.deleteMsgMode=!1,["stop"]))},e[49]||(e[49]=[g("i",{"data-feather":"x"},null,-1)])),g("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]=he(Q=>o.deleteMsg(),["stop"]))},e[50]||(e[50]=[g("i",{"data-feather":"check"},null,-1)]))])):re("",!0),!o.editMsgMode&&!i.deleteMsgMode?(k(),H("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]=Q=>i.deleteMsgMode=!0)},e[51]||(e[51]=[g("i",{"data-feather":"trash"},null,-1)]))):re("",!0),g("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[42]||(e[42]=he(Q=>o.rankUp(),["stop"]))},e[52]||(e[52]=[g("i",{"data-feather":"thumbs-up"},null,-1)])),g("div",Vir,[g("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[43]||(e[43]=he(Q=>o.rankDown(),["stop"]))},e[53]||(e[53]=[g("i",{"data-feather":"thumbs-down"},null,-1)])),n.message.rank!=0?(k(),H("div",{key:0,class:je(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},le(n.message.rank),3)):re("",!0)]),g("div",Bir,[this.$store.state.config.active_tts_service!="None"?(k(),H("div",{key:0,class:je(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":o.isTalking}]),title:"speak",onClick:e[44]||(e[44]=he(Q=>o.speak(),["stop"]))},e[54]||(e[54]=[g("i",{"data-feather":"volume-2"},null,-1)]),2)):re("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(k(),H("div",Fir,[i.isSynthesizingVoice?(k(),H("img",{key:1,src:i.loading_svg},null,8,$ir)):(k(),H("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]=he(Q=>o.read(),["stop"]))},e[55]||(e[55]=[g("i",{"data-feather":"voicemail"},null,-1)])))])):re("",!0)])]),g("div",Uir,[g("div",Gir,[n.message.binding?(k(),H("p",qir,[e[56]||(e[56]=nt("Binding: ")),g("span",zir,le(n.message.binding),1)])):re("",!0),n.message.model?(k(),H("p",jir,[e[57]||(e[57]=nt("Model: ")),g("span",Wir,le(n.message.model),1)])):re("",!0),n.message.seed?(k(),H("p",Yir,[e[58]||(e[58]=nt("Seed: ")),g("span",Kir,le(n.message.seed),1)])):re("",!0),n.message.nb_tokens?(k(),H("p",Zir,[e[59]||(e[59]=nt("Number of tokens: ")),g("span",{class:"font-thin",title:"Number of Tokens: "+n.message.nb_tokens},le(n.message.nb_tokens),9,Xir)])):re("",!0),o.warmup_duration?(k(),H("p",Jir,[e[60]||(e[60]=nt("Warmup duration: ")),g("span",{class:"font-thin",title:"Warmup duration: "+o.warmup_duration},le(o.warmup_duration),9,eor)])):re("",!0),o.time_spent?(k(),H("p",tor,[e[61]||(e[61]=nt("Generation duration: ")),g("span",{class:"font-thin",title:"Finished generating: "+o.time_spent},le(o.time_spent),9,nor)])):re("",!0),o.generation_rate?(k(),H("p",ror,[e[62]||(e[62]=nt("Rate: ")),g("span",{class:"font-thin",title:"Generation rate: "+o.generation_rate},le(o.generation_rate),9,ior)])):re("",!0)])])])])])}const oU=yt(cir,[["render",oor]]);Qe.defaults.baseURL="/";const sor={components:{InteractiveMenu:Nb},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),ze(()=>{Ze.replace()})},methods:{isHTML(t){const n=new DOMParser().parseFromString(t,"text/html");return Array.from(n.body.childNodes).some(r=>r.nodeType===Node.ELEMENT_NODE)},selectFile(t,e){const n=document.createElement("input");n.type="file",n.accept=t,n.onchange=r=>{this.selectedFile=r.target.files[0],console.log("File selected"),e()},n.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const n={filename:this.selectedFile.name,fileData:e.result};tt.on("file_received",r=>{r.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file -`+r.error,4,!1),this.loading=!1,tt.off("file_received")}),tt.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){ze(()=>{Ze.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(t){this.showMenu=!this.showMenu,t.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(t.hasOwnProperty("file_types")?t.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(t.value)},handleClickOutside(t){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(t.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},aor={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"};function lor(t,e,n,r,i,o){const s=pt("InteractiveMenu");return i.loading?(k(),H("div",aor,e[0]||(e[0]=[g("div",{role:"status"},[g("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"},[g("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"}),g("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"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):(k(),wt(s,{key:1,commands:n.commandsList,execute_cmd:o.execute_cmd},null,8,["commands","execute_cmd"]))}const cor=yt(sor,[["render",lor],["__scopeId","data-v-1a32c141"]]),uor="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",dor="/",por={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{PersonalitiesCommands:cor,ChatBarButton:_9},setup(){},data(){return{isSendMenuVisible:!1,is_rt:!1,bindingHoveredIndex:null,modelHoveredIndex:null,personalityHoveredIndex:null,loader_v0:uor,sendGlobe:iU,bUrl:dor,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"},isdataLakeNamesValid(){return console.log("dataLakeNames:",this.dataLakeNames),console.log("Type of dataLakeNames:",typeof this.dataLakeNames),Array.isArray(this.dataLakeNames)&&this.dataLakeNames.length>0},dataLakeNames(){console.log("rag_databases",this.$store.state.config.datalakes);const t=this.$store.state.config.datalakes.map(e=>{console.log("entry",e);const n=e.mounted?"feather:check":"";return console.log("icon decision",n),{name:e.alias,value:e.alias||"default_value",icon:n,help:"mounts the datalake"}});return console.log("formatted datalake",t),t}},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(t){const e=(t.clipboardData||t.originalEvent.clipboardData).items;let n=[];for(let r of e)if(r.type.indexOf("image")!==-1){const i=r.getAsFile(),s=`image_${Date.now()+"_"+Math.random().toString(36).substr(2,9)}.png`;console.log("newFileName",s);const a=new File([i],s,{type:i.type});this.addFiles([a])}else if(r.kind==="file"){const i=r.getAsFile();n.push(i)}n.length>0&&this.addFiles(n)},emitloaded(){this.$emit("loaded")},download_files(){Qe.get("/download_files")},remove_file(t){Qe.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t}).then(e=>{console.log(e)})},clear_files(){Qe.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{console.log(t),t.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(t,e){console.log("Send file triggered");const n=new FileReader,r=24*1024;let i=0,o=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,l=i+a.byteLength>=t.size;tt.emit("send_file_chunk",{filename:t.name,chunk:a,offset:i,isLastChunk:l,chunkIndex:o}),i+=a.byteLength,o++,l?(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()):s()};function s(){const a=t.slice(i,i+r);n.readAsArrayBuffer(a)}console.log("Uploading file"),s()},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),tt.emit("start_bidirectional_audio_stream"),ze(()=>{Ze.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),tt.emit("stop_bidirectional_audio_stream"),ze(()=>{Ze.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=t=>{let e="";for(let n=t.resultIndex;n{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.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(t){return ze(()=>{Ze.replace()}),$o(t)},removeItem(t){console.log("Removing ",t.name),Qe.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=t)}),console.log(this.filesList)},sendMessageEvent(t,e="no_internet"){this.$emit("messageSentEvent",t,e)},sendCMDEvent(t){this.$emit("sendCMDEvent",t)},async mountDB(t){await Qe.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,datalake_name:t}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const t=document.createElement("input");t.type="file",t.style.display="none",t.multiple=!0,document.body.appendChild(t),t.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(t.files),document.body.removeChild(t)}),t.click()},takePicture(){tt.emit("take_picture"),tt.on("picture_taken",()=>{Qe.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.filesList=t.data.files,this.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(t){this.loading||t.which===13&&(t.preventDefault(),t.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(t){console.log("Adding files");const e=[...t];let n=0;const r=()=>{if(n>=e.length){console.log(`Files_list: ${this.filesList}`);return}const i=e[n];this.filesList.push(i),this.isFileSentList.push(!1),this.send_file(i,()=>{n++,r()})};r()}},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},model_name:{immediate:!0,handler(t){this.$nextTick(()=>{this.model_name=t})}},showfilesList(){ze(()=>{Ze.replace()})},loading(t,e){ze(()=>{Ze.replace()})},filesList:{handler(t,e){let n=0;if(t.length>0)for(let r=0;r{Ze.replace()}),console.log("Chatbar mounted"),tt.on("rtcom_status_changed",t=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",t.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(){ze(()=>{Ze.replace()})}},hor={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},Tor={key:0,class:"items-center gap-2 panels-color shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},mor={class:"flex"},gor=["title"],_or={key:0},Qor={class:"flex flex-col max-h-64"},vor=["title"],yor={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"},bor={key:0,filesList:"",role:"status"},Eor={class:"flex flex-row items-center"},xor={class:"whitespace-nowrap"},Sor=["onClick"],Lor={key:1,class:"flex mx-1 w-500"},Cor={class:"whitespace-nowrap flex flex-row gap-2"},Aor={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end panels-color"},wor={role:"status"},Mor=["src"],Oor={class:"flex w-fit relative grow w-full"},Ror={class:"chat-bar",tabindex:"0"},Nor={key:0,title:"Waiting for reply"},Dor=["src"],Ior={class:"w-fit"},kor={class:"w-fit"},Por={class:"relative grow m-0 p-0"},Hor={class:"m-0 p-0"},Vor={class:"flex items-center space-x-3"},Bor={class:"relative inline-block"},For={class:"p-4 m-0 flex flex-col gap-4 max-h-96 overflow-y-auto custom-scrollbar"},$or={class:"flex flex-col gap-2"};function Uor(t,e,n,r,i,o){const s=pt("ChatBarButton"),a=pt("PersonalitiesCommands");return k(),H("div",hor,[i.filesList.length>0?(k(),H("div",Tor,[g("div",mor,[g("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]=he(l=>i.showfilesList=!i.showfilesList,["stop"]))},e[11]||(e[11]=[g("i",{"data-feather":"list"},null,-1)]),8,gor)]),i.filesList.length>0&&i.showfilesList==!0?(k(),H("div",_or,[g("div",Qor,[oe(Ns,{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:He(()=>[(k(!0),H(Ue,null,ot(i.filesList,(l,c)=>(k(),H("div",{key:c+"-"+l.name},[g("div",{class:"m-1",title:l.name},[g("div",yor,[i.isFileSentList[c]?re("",!0):(k(),H("div",bor,e[12]||(e[12]=[g("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"},[g("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"}),g("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),g("span",{class:"sr-only"},"Loading...",-1)]))),e[14]||(e[14]=g("div",null,[g("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),g("div",{class:je(["line-clamp-1 w-3/5",i.isFileSentList[c]?"text-green-500":"text-red-200"])},le(l.name),3),e[15]||(e[15]=g("div",{class:"grow"},null,-1)),g("div",Eor,[g("p",xor,le(o.computedFileSize(l.size)),1),g("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=>o.removeItem(l)},e[13]||(e[13]=[g("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)]),8,Sor)])])],8,vor)]))),128))]),_:1})])])):re("",!0),i.filesList.length>0?(k(),H("div",Lor,[g("div",Cor,[e[16]||(e[16]=g("p",{class:"font-bold"}," Total size: ",-1)),nt(" "+le(i.totalSize)+" ("+le(i.filesList.length)+") ",1)]),e[19]||(e[19]=g("div",{class:"grow"},null,-1)),g("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]=(...l)=>o.clear_files&&o.clear_files(...l))},e[17]||(e[17]=[g("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)])),g("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]=(...l)=>o.download_files&&o.download_files(...l))},e[18]||(e[18]=[g("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)]))])):re("",!0)])):re("",!0),i.selecting_model||i.selecting_binding?(k(),H("div",Aor,[g("div",wor,[g("img",{src:i.loader_v0,class:"w-50 h-50"},null,8,Mor),e[20]||(e[20]=g("span",{class:"sr-only"},"Selecting model...",-1))])])):re("",!0),g("div",Oor,[g("div",Ror,[n.loading?(k(),H("div",Nor,[g("img",{src:i.loader_v0},null,8,Dor),e[21]||(e[21]=g("div",{role:"status"},[g("span",{class:"sr-only"},"Loading...")],-1))])):re("",!0),oe(s,{onClick:o.toggleLeftPanel,class:je({"text-red-500":o.leftPanelCollapsed}),title:"Toggle View Mode"},{default:He(()=>[J(g("div",null,e[22]||(e[22]=[g("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"},[g("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[Pt,o.leftPanelCollapsed]]),J(g("div",null,e[23]||(e[23]=[g("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"},[g("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[Pt,!o.leftPanelCollapsed]])]),_:1},8,["onClick","class"]),g("div",Ior,[this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(k(),wt(a,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:o.sendCMDEvent,"on-show-toast-message":n.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):re("",!0)]),g("div",kor,[o.isdataLakeNamesValid?(k(),wt(a,{key:0,icon:"feather:book",commandsList:o.dataLakeNames,sendCommand:o.mountDB,"on-show-toast-message":n.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):re("",!0)]),g("div",Por,[g("form",Hor,[J(g("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[3]||(e[3]=l=>i.message=l),onPaste:e[4]||(e[4]=(...l)=>o.handlePaste&&o.handlePaste(...l)),onKeydown:e[5]||(e[5]=Xr(he(l=>o.submitOnEnter(l),["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),[[we,i.message]])])]),g("div",Vor,[n.loading?(k(),wt(s,{key:0,onClick:o.stopGenerating,class:"bg-red-500 dark:bg-red-600 hover:bg-red-600 dark:hover:bg-red-700"},{icon:He(()=>e[24]||(e[24]=[g("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[g("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),g("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:He(()=>[e[25]||(e[25]=g("span",null,"Stop",-1))]),_:1},8,["onClick"])):(k(),wt(s,{key:1,onClick:o.submit,title:"Send"},{icon:He(()=>e[26]||(e[26]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"])),oe(s,{onClick:o.submitWithInternetSearch,title:"Send with internet search"},{icon:He(()=>e[27]||(e[27]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),oe(s,{onClick:o.startSpeechRecognition,class:je({"text-red-500":i.isListeningToVoice}),title:"Voice input"},{icon:He(()=>e[28]||(e[28]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),t.$store.state.config.active_tts_service!="None"&&t.$store.state.config.active_tts_service!=null&&this.$store.state.config.active_stt_service!="None"&&this.$store.state.config.active_stt_service!=null?(k(),wt(s,{key:2,onClick:o.updateRT,class:je(i.is_rt?"bg-red-500 dark:bg-red-600":"bg-green-500 dark:bg-green-600"),title:"Real-time audio mode"},{icon:He(()=>e[29]||(e[29]=[nt(" 🌟 ")])),_:1},8,["onClick","class"])):re("",!0),n.loading?re("",!0):(k(),H("div",{key:3,class:"relative",onMouseleave:e[9]||(e[9]=(...l)=>o.hideSendMenu&&o.hideSendMenu(...l))},[g("div",Bor,[J(g("div",{onMouseenter:e[6]||(e[6]=(...l)=>o.showSendMenu&&o.showSendMenu(...l)),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"},[g("div",For,[g("div",$or,[oe(s,{onClick:o.add_file,title:"Send file"},{icon:He(()=>e[30]||(e[30]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),oe(s,{onClick:o.takePicture,title:"Take picture"},{icon:He(()=>e[31]||(e[31]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"}),g("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"]),oe(s,{onClick:o.addWebLink,title:"Add web link"},{icon:He(()=>e[32]||(e[32]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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),[[Pt,i.isSendMenuVisible]]),g("div",{onMouseenter:e[8]||(e[8]=(...l)=>o.showSendMenu&&o.showSendMenu(...l))},[g("button",{onClick:e[7]||(e[7]=he((...l)=>t.toggleSendMenu&&t.toggleSendMenu(...l),["prevent"])),class:"chat-bar-button"},e[33]||(e[33]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)),oe(s,{onClick:o.makeAnEmptyUserMessage,title:"New user message"},{icon:He(()=>e[34]||(e[34]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),oe(s,{onClick:o.makeAnEmptyAIMessage,title:"New AI message",class:"text-red-400 dark:text-red-300"},{icon:He(()=>e[35]||(e[35]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),oe(s,{onClick:o.toggleRightPanel,class:je({"text-red-500":!o.rightPanelCollapsed}),title:"Toggle right Panel"},{default:He(()=>[J(g("div",null,e[36]||(e[36]=[g("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"},[g("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[Pt,o.rightPanelCollapsed]]),J(g("div",null,e[37]||(e[37]=[g("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"},[g("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[Pt,!o.rightPanelCollapsed]])]),_:1},8,["onClick","class"])]),g("input",{type:"file",ref:"fileDialog",onChange:e[10]||(e[10]=(...l)=>o.addFiles&&o.addFiles(...l)),multiple:"",style:{display:"none"}},null,544)]),e[38]||(e[38]=g("div",{class:"ml-auto gap-2"},null,-1))])])}const sU=yt(por,[["render",Uor],["__scopeId","data-v-cc0f8d41"]]),Gor={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}`:co}},methods:{async fetchLatestNews(){try{const t=await Qe.get("/get_news");this.latestNews=t.data}catch(t){console.error("Failed to fetch latest news:",t),this.error="Unable to fetch the latest news. Please try again later."}},async fetchVideoUrl(){try{const t=await Qe.get("/get_last_video_url");this.videoUrl=t.data.url,this.videoType=t.data.type,this.checkVideoUpdate()}catch(t){console.error("Failed to fetch video information:",t),this.error="Unable to fetch the latest video information. Please try again later."}},async handleClick(){await Qe.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 Qe.get("/get_last_viewed_video_url")).data;console.log("storedVideoUrl"),console.log(e),this.videoUrl!==e&&(this.showVideoButton=!0)}},mounted(){this.fetchLatestNews(),this.fetchVideoUrl()}},qor={class:"flex flex-col items-center justify-center w-full h-full min-h-screen p-8"},zor={class:"text-center max-w-4xl"},jor={class:"flex items-center justify-center gap-8 mb-12"},Wor={class:"relative w-24 h-24"},Yor=["src"],Kor={class:"flex flex-col items-start"},Zor={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"},Xor={class:"space-y-8 animate-fade-in-up"},Jor={class:"text-4xl font-semibold"},esr={class:"text-xl max-w-3xl mx-auto"},tsr={key:0,class:"mt-12 p-6 rounded-lg shadow-md animate-fade-in-up overflow-y-scroll scrollbar-thin"},nsr=["innerHTML"],rsr={key:1,class:"mt-6 text-red-500"},isr={key:0,class:"floating-button-container"},osr=["href"],ssr=["src","alt"];function asr(t,e,n,r,i,o){return k(),H("div",qor,[g("div",zor,[g("div",jor,[g("div",Wor,[g("img",{src:o.logoSrc,alt:"LoLLMS Logo",class:"w-24 h-24 rounded-full absolute animate-rolling-ball"},null,8,Yor)]),g("div",Kor,[g("h1",Zor,le(t.$store.state.theme_vars.lollms_title),1),e[1]||(e[1]=g("p",{class:"text-2xl italic mt-2"}," Lord of Large Language And Multimodal Systems ",-1))])]),g("div",Xor,[g("h2",Jor,le(t.$store.state.theme_vars.lollms_welcome_short_message),1),g("p",esr,le(t.$store.state.theme_vars.lollms_welcome_message),1)]),i.latestNews?(k(),H("div",tsr,[e[2]||(e[2]=g("h3",null,"Latest LoLLMS News",-1)),g("p",{innerHTML:i.latestNews},null,8,nsr)])):re("",!0),i.error?(k(),H("div",rsr,le(i.error),1)):re("",!0)]),i.showVideoButton?(k(),H("div",isr,[g("a",{href:i.videoUrl,target:"_blank",class:"floating-button",onClick:e[0]||(e[0]=(...s)=>o.handleClick&&o.handleClick(...s))},[e[3]||(e[3]=g("span",{class:"tooltip"},"New ParisNeo Video!",-1)),g("img",{src:o.getImageForVideoType,alt:"New "+i.videoType,class:"w-full h-full object-cover"},null,8,ssr)],8,osr)])):re("",!0)])}const aU=yt(Gor,[["render",asr],["__scopeId","data-v-d9375d3e"]]);var lsr=function(){function t(e,n){n===void 0&&(n=[]),this._eventType=e,this._eventFunctions=n}return t.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(e._eventType,n)})},t}(),nd=function(){return nd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{const e=t.data;console.log("Done"),e.status?(this.currentPersonConfig=e.config,this.showPersonalityEditor=!0):console.error(e.error)}).catch(t=>{console.error(t)})}}},dsr={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},fsr={class:"relative w-full max-h-full bg-bg-light dark:bg-bg-dark"},psr={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"},hsr={class:"justify-center text-center items-center w-full bg-bg-light dark:bg-bg-dark"},Tsr={class:"w-full flex flex-row mt-4 text-center justify-center"},msr={class:"w-full max-h-full container bg-bg-light dark:bg-bg-dark"},gsr={class:"mb-4 w-full"},_sr={class:"w-full bg-bg-light dark:bg-bg-dark"};function Qsr(t,e,n,r,i,o){return i.show?(k(),H("div",dsr,[g("div",fsr,[g("div",psr,[g("button",{type:"button",onClick:e[0]||(e[0]=s=>o.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]=[g("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[g("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),g("span",{class:"sr-only"},"Close modal",-1)])),g("div",hsr,[g("div",Tsr,[g("button",{type:"submit",onClick:e[1]||(e[1]=he((...s)=>o.submitForm&&o.submitForm(...s),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Commit AI to Server "),g("button",{onClick:e[2]||(e[2]=he(s=>o.hide(),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Close ")]),g("div",msr,[g("form",gsr,[g("table",_sr,[g("tr",null,[e[18]||(e[18]=g("td",null,[g("label",{for:"personalityConditioning"},"Personality Conditioning:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"personalityConditioning","onUpdate:modelValue":e[3]||(e[3]=s=>n.config.personality_conditioning=s)},null,512),[[we,n.config.personality_conditioning]])])]),g("tr",null,[e[19]||(e[19]=g("td",null,[g("label",{for:"userMessagePrefix"},"User Message Prefix:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"userMessagePrefix","onUpdate:modelValue":e[4]||(e[4]=s=>n.config.user_message_prefix=s)},null,512),[[we,n.config.user_message_prefix]])])]),g("tr",null,[e[20]||(e[20]=g("td",null,[g("label",{for:"aiMessagePrefix"},"AI Message Prefix:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"aiMessagePrefix","onUpdate:modelValue":e[5]||(e[5]=s=>n.config.ai_message_prefix=s)},null,512),[[we,n.config.ai_message_prefix]])])]),g("tr",null,[e[21]||(e[21]=g("td",null,[g("label",{for:"linkText"},"Link Text:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"linkText","onUpdate:modelValue":e[6]||(e[6]=s=>n.config.link_text=s)},null,512),[[we,n.config.link_text]])])]),g("tr",null,[e[22]||(e[22]=g("td",null,[g("label",{for:"welcomeMessage"},"Welcome Message:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"welcomeMessage","onUpdate:modelValue":e[7]||(e[7]=s=>n.config.welcome_message=s)},null,512),[[we,n.config.welcome_message]])])]),g("tr",null,[e[23]||(e[23]=g("td",null,[g("label",{for:"modelTemperature"},"Model Temperature:")],-1)),g("td",null,[J(g("input",{type:"number",id:"modelTemperature","onUpdate:modelValue":e[8]||(e[8]=s=>n.config.model_temperature=s)},null,512),[[we,n.config.model_temperature]])])]),g("tr",null,[e[24]||(e[24]=g("td",null,[g("label",{for:"modelTopK"},"Model Top K:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopK","onUpdate:modelValue":e[9]||(e[9]=s=>n.config.model_top_k=s)},null,512),[[we,n.config.model_top_k]])])]),g("tr",null,[e[25]||(e[25]=g("td",null,[g("label",{for:"modelTopP"},"Model Top P:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopP","onUpdate:modelValue":e[10]||(e[10]=s=>n.config.model_top_p=s)},null,512),[[we,n.config.model_top_p]])])]),g("tr",null,[e[26]||(e[26]=g("td",null,[g("label",{for:"modelRepeatPenalty"},"Model Repeat Penalty:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatPenalty","onUpdate:modelValue":e[11]||(e[11]=s=>n.config.model_repeat_penalty=s)},null,512),[[we,n.config.model_repeat_penalty]])])]),g("tr",null,[e[27]||(e[27]=g("td",null,[g("label",{for:"modelRepeatLastN"},"Model Repeat Last N:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatLastN","onUpdate:modelValue":e[12]||(e[12]=s=>n.config.model_repeat_last_n=s)},null,512),[[we,n.config.model_repeat_last_n]])])]),g("tr",null,[e[28]||(e[28]=g("td",null,[g("label",{for:"recommendedBinding"},"Recommended Binding:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedBinding","onUpdate:modelValue":e[13]||(e[13]=s=>n.config.recommended_binding=s)},null,512),[[we,n.config.recommended_binding]])])]),g("tr",null,[e[29]||(e[29]=g("td",null,[g("label",{for:"recommendedModel"},"Recommended Model:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedModel","onUpdate:modelValue":e[14]||(e[14]=s=>n.config.recommended_model=s)},null,512),[[we,n.config.recommended_model]])])]),g("tr",null,[e[30]||(e[30]=g("td",null,[g("label",{class:"dark:bg-black dark:text-primary w-full",for:"dependencies"},"Dependencies:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"dependencies","onUpdate:modelValue":e[15]||(e[15]=s=>n.config.dependencies=s)},null,512),[[we,n.config.dependencies]])])]),g("tr",null,[e[31]||(e[31]=g("td",null,[g("label",{for:"antiPrompts"},"Anti Prompts:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"antiPrompts","onUpdate:modelValue":e[16]||(e[16]=s=>n.config.anti_prompts=s)},null,512),[[we,n.config.anti_prompts]])])])])])])])])])])):re("",!0)}const QU=yt(usr,[["render",Qsr]]),vsr={data(){return{showPopup:!1,webpageUrl:"https://lollms.com/"}},methods:{show(){this.showPopup=!0},hide(){this.showPopup=!1},save_configuration(){Qe.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config}).then(t=>{this.isLoading=!1,t.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)})}}},ysr={key:0,class:"fixed inset-0 flex items-center justify-center z-50"},bsr={class:"popup-container"},Esr=["src"],xsr={class:"checkbox-container"};function Ssr(t,e,n,r,i,o){return k(),wt(qi,{name:"fade"},{default:He(()=>[i.showPopup?(k(),H("div",ysr,[g("div",bsr,[g("button",{onClick:e[0]||(e[0]=(...s)=>o.hide&&o.hide(...s)),class:"close-button"}," X "),g("iframe",{src:i.webpageUrl,class:"iframe-content"},null,8,Esr),g("div",xsr,[J(g("input",{type:"checkbox",id:"startup",class:"styled-checkbox","onUpdate:modelValue":e[1]||(e[1]=s=>this.$store.state.config.show_news_panel=s),onChange:e[2]||(e[2]=(...s)=>o.save_configuration&&o.save_configuration(...s))},null,544),[[ut,this.$store.state.config.show_news_panel]]),e[3]||(e[3]=g("label",{for:"startup",class:"checkbox-label"},"Show at startup",-1))])])])):re("",!0)]),_:1})}const vU=yt(vsr,[["render",Ssr],["__scopeId","data-v-d504dfc9"]]),Lsr="/assets/fastapi-BQj-rjUJ.png",Csr="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",Asr="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",wsr="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",Msr="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",Osr="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",Rsr="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",Nsr="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",Dsr="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",Isr="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",ksr="/assets/robot-CQPaMbxU.svg",Psr="/";Qe.defaults.baseURL="/";const Hsr={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:db,UniversalForm:d$},data(){return{bUrl:Psr,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(t){this.$store.commit("setConfig",t)}},mountedPers:{get(){return console.log("asked for:",this.$store.state.mountedPers),this.$store.state.mountedPers},set(t){this.$store.commit("setMountedPers",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0;let e=await Qe.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),r={client_id:this.$store.state.client_id,id:n};e=await Qe.post("/select_personality",r),console.log("Generating message from ",e.data.status),tt.emit("generate_msg_from",{id:-1})}},async remount_personality(){const t=this.mountedPers;if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await Qe.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(t){try{Qe.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 - "+t.name,"Save changes","Cancel").then(n=>{try{Qe.post("/set_active_personality_settings",n).then(r=>{r&&r.data?(console.log("personality set with new settings",r.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,n)+"\n```\n"+this.message.content.slice(n),p=p+3+t.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(t){this.$emit("resendMessage",this.message.id,this.message.content,t)},continueMessage(){this.$emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?Tir+this.avatar:(console.log("No avatar found"),co)},defaultImg(t){t.target.src=co},parseDate(t){let e=new Date(Date.parse(t)),r=Math.floor((new Date-e)/1e3);return r<=1?"just now":r<20?r+" seconds ago":r<40?"half a minute ago":r<60?"less than a minute ago":r<=90?"one minute ago":r<=3540?Math.round(r/60)+" minutes ago":r<=5400?"1 hour ago":r<=86400?Math.round(r/3600)+" hours ago":r<=129600?"1 day ago":r<604800?Math.round(r/86400)+" days ago":r<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,r=Math.floor(n/86400);if(!(isNaN(r)||r<0||r>=31))return r==0&&(n<60&&"just now"||n<120&&"1 minute ago"||n<3600&&Math.floor(n/60)+" minutes ago"||n<7200&&"1 hour ago"||n<86400&&Math.floor(n/3600)+" hours ago")||r==1&&"Yesterday"||r<7&&r+" days ago"||r<31&&Math.ceil(r/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{audio_url(t){t&&(this.$refs.audio_player.src=t)},"message.content":function(t){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(t){console.log("ui changed to",t),this.ui_componentKey++},showConfirmation(){ze(()=>{Ze.replace()})},deleteMsgMode(){ze(()=>{Ze.replace()})}},computed:{editMsgMode:{get(){return this.message.hasOwnProperty("open")?this.editMsgMode_||this.message.open:this.editMsgMode_},set(t){this.message.open=t,this.editMsgMode_=t,ze(()=>{Ze.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 t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!t.getTime()||!e.getTime())return;let[r,i,o]=this.computeTimeDiff(t,e);function s(l){return l<10&&(l="0"+l),l}return s(r)+"h:"+s(i)+"m:"+s(o)+"s"},warmup_duration(){const t=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, ",t," -> ",e),e.getTime()===t.getTime())return 0;if(!t.getTime()||!e.getTime())return;let r,i,o;[r,i,o]=this.computeTimeDiff(t,e);function s(l){return l<10&&(l="0"+l),l}return s(r)+"h:"+s(i)+"m:"+s(o)+"s"},generation_rate(){const t=new Date(Date.parse(this.message.started_generating_at)),e=new Date(Date.parse(this.message.finished_generating_at)),n=this.message.nb_tokens;if(e.getTime()===t.getTime()||!n||!t.getTime()||!e.getTime())return;let i=e.getTime()-t.getTime();const o=Math.floor(i/1e3),s=n/o;return Math.round(s)+" t/s"}}},gir={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"},_ir={class:"flex flex-row gap-2"},Qir={class:"flex-shrink-0"},vir={class:"group/avatar"},yir=["src","data-popover-target"],bir={class:"flex flex-col w-full flex-grow-0"},Eir={class:"flex flex-row flex-grow items-start"},xir={class:"flex flex-col mb-2"},Sir={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},Lir=["title"],Cir={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"},Air={key:1},wir=["src"],Mir={class:"message-details"},Oir={key:0,class:"steps-container"},Rir={class:"steps-icon"},Nir={class:"steps-summary"},Dir={class:"steps-status"},Iir={class:"toggle-icon"},kir={key:0,class:"steps-content"},Pir={class:"steps-list"},Hir={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"},Vir={class:"flex-row justify-end mx-2"},Bir={class:"invisible group-hover:visible flex flex-row"},Fir={key:0},$ir={key:1},Uir={key:2},Gir={key:3},qir={key:4,class:"flex items-center duration-75"},zir={class:"flex flex-row items-center"},jir={class:"flex flex-row items-center"},Wir={key:6,class:"flex flex-row items-center"},Yir=["src"],Kir={class:"text-sm text-gray-400 mt-2"},Zir={class:"flex flex-row items-center gap-2"},Xir={key:0},Jir={class:"font-thin"},eor={key:1},tor={class:"font-thin"},nor={key:2},ror={class:"font-thin"},ior={key:3},oor=["title"],sor={key:4},aor=["title"],lor={key:5},cor=["title"],uor={key:6},dor=["title"];function por(t,e,n,r,i,o){var T;const s=pt("MarkdownRenderer"),a=pt("JsonViewer"),l=pt("DynamicUIRenderer"),c=pt("StatusIcon"),u=pt("Step"),d=pt("RenderHTMLJS"),h=pt("ToolbarButton"),f=pt("DropdownSubmenu"),m=pt("DropdownMenu");return k(),H("div",gir,[g("div",_ir,[g("div",Qir,[g("div",vir,[g("img",{src:o.getImgUrl(),onError:e[0]||(e[0]=Q=>o.defaultImg(Q)),"data-popover-target":"avatar"+n.message.id,"data-popover-placement":"bottom",class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,yir)])]),g("div",bir,[g("div",Eir,[g("div",xir,[g("div",Sir,le(n.message.sender),1),n.message.created_at?(k(),H("div",{key:0,class:"text-sm text-gray-400 font-thin",title:"Created at: "+o.created_at_parsed},le(o.created_at),9,Lir)):re("",!0)]),e[46]||(e[46]=g("div",{class:"flex-grow"},null,-1))]),g("div",Cir,[o.editMsgMode?re("",!0):(k(),wt(s,{key:0,ref:"mdRender",host:n.host,"markdown-text":n.message.content,message_id:n.message.id,discussion_id:n.message.discussion_id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])),g("div",null,[n.message.open?J((k(),H("textarea",{key:0,ref:"mdTextarea",onKeydown:e[1]||(e[1]=Xr(he((...Q)=>o.insertTab&&o.insertTab(...Q),["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]=Q=>n.message.content=Q)}," ",544)),[[we,n.message.content]]):re("",!0)]),n.message.metadata!==null?(k(),H("div",Air,[(k(!0),H(Ue,null,ot(((T=n.message.metadata)==null?void 0:T.filter(Q=>Q!=null&&Q.hasOwnProperty("title")&&Q.hasOwnProperty("content")))||[],(Q,_)=>(k(),H("div",{key:"json-"+n.message.id+"-"+_,class:"json font-bold"},[(k(),wt(a,{jsonFormText:Q.title,jsonData:Q.content,key:"msgjson-"+n.message.id},null,8,["jsonFormText","jsonData"]))]))),128))])):re("",!0),n.message.ui?(k(),wt(l,{ref:"ui",class:"w-full",ui:n.message.ui,key:"msgui-"+n.message.id},null,8,["ui"])):re("",!0),i.audio_url!=null?(k(),H("audio",{controls:"",key:i.audio_url},[g("source",{src:i.audio_url,type:"audio/wav",ref:"audio_player"},null,8,wir),e[47]||(e[47]=nt(" Your browser does not support the audio element. "))])):re("",!0),g("div",Mir,[n.message.steps.length>0?(k(),H("div",Oir,[g("div",{class:"steps-header",onClick:e[3]||(e[3]=(...Q)=>o.toggleExpanded&&o.toggleExpanded(...Q))},[g("div",Rir,[oe(c,{status:n.message.status_message,icon:!0},null,8,["status"])]),g("div",Nir,[e[48]||(e[48]=g("h3",{class:"steps-title"},"Processing Info",-1)),g("p",Dir,le(n.message.status_message),1)]),g("span",Iir,le(i.expanded?"▲":"▼"),1)]),oe(qi,{name:"fade"},{default:He(()=>[i.expanded?(k(),H("div",kir,[g("ul",Pir,[(k(!0),H(Ue,null,ot(n.message.steps,(Q,_)=>(k(),H("li",{key:`step-${n.message.id}-${_}`,class:"step-item"},[oe(u,{done:Q.done,text:Q.text,status:Q.status,description:Q.description},null,8,["done","text","status","description"])]))),128))])])):re("",!0)]),_:1})])):re("",!0),g("div",Hir,[(k(!0),H(Ue,null,ot(n.message.html_js_s,(Q,_)=>(k(),H("div",{key:`htmljs-${n.message.id}-${_}`,class:"font-bold animate-fadeIn",style:xn({animationDelay:`${_*200}ms`})},[oe(d,{htmlContent:Q},null,8,["htmlContent"])],4))),128))])])]),g("div",Vir,[g("div",Bir,[o.editMsgMode?(k(),H("div",Fir,[oe(h,{onClick:e[4]||(e[4]=he(Q=>o.editMsgMode=!1,["stop"])),title:"Cancel edit",icon:"x"}),oe(h,{onClick:he(o.updateMessage,["stop"]),title:"Update message",icon:"check"},null,8,["onClick"]),oe(m,{title:"Add Block"},{default:He(()=>[oe(f,{title:"Programming Languages",icon:"code"},{default:He(()=>[oe(h,{onClick:e[5]||(e[5]=he(Q=>o.addBlock("python"),["stop"])),title:"Python",icon:"python"}),oe(h,{onClick:e[6]||(e[6]=he(Q=>o.addBlock("javascript"),["stop"])),title:"JavaScript",icon:"js"}),oe(h,{onClick:e[7]||(e[7]=he(Q=>o.addBlock("typescript"),["stop"])),title:"TypeScript",icon:"typescript"}),oe(h,{onClick:e[8]||(e[8]=he(Q=>o.addBlock("java"),["stop"])),title:"Java",icon:"java"}),oe(h,{onClick:e[9]||(e[9]=he(Q=>o.addBlock("c++"),["stop"])),title:"C++",icon:"cplusplus"}),oe(h,{onClick:e[10]||(e[10]=he(Q=>o.addBlock("csharp"),["stop"])),title:"C#",icon:"csharp"}),oe(h,{onClick:e[11]||(e[11]=he(Q=>o.addBlock("go"),["stop"])),title:"Go",icon:"go"}),oe(h,{onClick:e[12]||(e[12]=he(Q=>o.addBlock("rust"),["stop"])),title:"Rust",icon:"rust"}),oe(h,{onClick:e[13]||(e[13]=he(Q=>o.addBlock("swift"),["stop"])),title:"Swift",icon:"swift"}),oe(h,{onClick:e[14]||(e[14]=he(Q=>o.addBlock("kotlin"),["stop"])),title:"Kotlin",icon:"kotlin"}),oe(h,{onClick:e[15]||(e[15]=he(Q=>o.addBlock("r"),["stop"])),title:"R",icon:"r-project"})]),_:1}),oe(f,{title:"Web Technologies",icon:"web"},{default:He(()=>[oe(h,{onClick:e[16]||(e[16]=he(Q=>o.addBlock("html"),["stop"])),title:"HTML",icon:"html5"}),oe(h,{onClick:e[17]||(e[17]=he(Q=>o.addBlock("css"),["stop"])),title:"CSS",icon:"css3"}),oe(h,{onClick:e[18]||(e[18]=he(Q=>o.addBlock("vue"),["stop"])),title:"Vue.js",icon:"vuejs"}),oe(h,{onClick:e[19]||(e[19]=he(Q=>o.addBlock("react"),["stop"])),title:"React",icon:"react"}),oe(h,{onClick:e[20]||(e[20]=he(Q=>o.addBlock("angular"),["stop"])),title:"Angular",icon:"angular"})]),_:1}),oe(f,{title:"Markup and Data",icon:"file-code"},{default:He(()=>[oe(h,{onClick:e[21]||(e[21]=he(Q=>o.addBlock("xml"),["stop"])),title:"XML",icon:"xml"}),oe(h,{onClick:e[22]||(e[22]=he(Q=>o.addBlock("json"),["stop"])),title:"JSON",icon:"json"}),oe(h,{onClick:e[23]||(e[23]=he(Q=>o.addBlock("yaml"),["stop"])),title:"YAML",icon:"yaml"}),oe(h,{onClick:e[24]||(e[24]=he(Q=>o.addBlock("markdown"),["stop"])),title:"Markdown",icon:"markdown"}),oe(h,{onClick:e[25]||(e[25]=he(Q=>o.addBlock("latex"),["stop"])),title:"LaTeX",icon:"latex"})]),_:1}),oe(f,{title:"Scripting and Shell",icon:"terminal"},{default:He(()=>[oe(h,{onClick:e[26]||(e[26]=he(Q=>o.addBlock("bash"),["stop"])),title:"Bash",icon:"bash"}),oe(h,{onClick:e[27]||(e[27]=he(Q=>o.addBlock("powershell"),["stop"])),title:"PowerShell",icon:"powershell"}),oe(h,{onClick:e[28]||(e[28]=he(Q=>o.addBlock("perl"),["stop"])),title:"Perl",icon:"perl"})]),_:1}),oe(f,{title:"Diagramming",icon:"sitemap"},{default:He(()=>[oe(h,{onClick:e[29]||(e[29]=he(Q=>o.addBlock("mermaid"),["stop"])),title:"Mermaid",icon:"mermaid"}),oe(h,{onClick:e[30]||(e[30]=he(Q=>o.addBlock("graphviz"),["stop"])),title:"Graphviz",icon:"graphviz"}),oe(h,{onClick:e[31]||(e[31]=he(Q=>o.addBlock("plantuml"),["stop"])),title:"PlantUML",icon:"plantuml"})]),_:1}),oe(f,{title:"Database",icon:"database"},{default:He(()=>[oe(h,{onClick:e[32]||(e[32]=he(Q=>o.addBlock("sql"),["stop"])),title:"SQL",icon:"sql"}),oe(h,{onClick:e[33]||(e[33]=he(Q=>o.addBlock("mongodb"),["stop"])),title:"MongoDB",icon:"mongodb"})]),_:1}),oe(h,{onClick:e[34]||(e[34]=he(Q=>o.addBlock(""),["stop"])),title:"Generic Block",icon:"code"})]),_:1})])):(k(),H("div",$ir,[oe(h,{onClick:e[35]||(e[35]=he(Q=>o.editMsgMode=!0,["stop"])),title:"Edit message",icon:"edit"})])),oe(h,{onClick:o.copyContentToClipboard,title:"Copy message to clipboard",icon:"copy"},null,8,["onClick"]),!o.editMsgMode&&n.message.sender!==t.$store.state.mountedPers.name?(k(),H("div",Uir,[oe(h,{onClick:e[36]||(e[36]=he(Q=>o.resendMessage("full_context"),["stop"])),title:"Resend message with full context",icon:"send"}),oe(h,{onClick:e[37]||(e[37]=he(Q=>o.resendMessage("full_context_with_internet"),["stop"])),title:"Resend message with internet search",icon:"globe"}),oe(h,{onClick:e[38]||(e[38]=he(Q=>o.resendMessage("simple_question"),["stop"])),title:"Resend message without context",icon:"sendSimple"})])):re("",!0),!o.editMsgMode&&n.message.sender===t.$store.state.mountedPers.name?(k(),H("div",Gir,[oe(h,{onClick:o.continueMessage,title:"Continue message",icon:"fastForward"},null,8,["onClick"])])):re("",!0),i.deleteMsgMode?(k(),H("div",qir,[g("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]=he(Q=>i.deleteMsgMode=!1,["stop"]))},e[49]||(e[49]=[g("i",{"data-feather":"x"},null,-1)])),g("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]=he(Q=>o.deleteMsg(),["stop"]))},e[50]||(e[50]=[g("i",{"data-feather":"check"},null,-1)]))])):re("",!0),!o.editMsgMode&&!i.deleteMsgMode?(k(),H("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]=Q=>i.deleteMsgMode=!0)},e[51]||(e[51]=[g("i",{"data-feather":"trash"},null,-1)]))):re("",!0),g("div",{class:"text-lg hover:text-secondary duration-75 active:scale-90 p-2 cursor-pointer",title:"Upvote",onClick:e[42]||(e[42]=he(Q=>o.rankUp(),["stop"]))},e[52]||(e[52]=[g("i",{"data-feather":"thumbs-up"},null,-1)])),g("div",zir,[g("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",title:"Downvote",onClick:e[43]||(e[43]=he(Q=>o.rankDown(),["stop"]))},e[53]||(e[53]=[g("i",{"data-feather":"thumbs-down"},null,-1)])),n.message.rank!=0?(k(),H("div",{key:0,class:je(["rounded-full px-2 text-sm flex items-center justify-center font-bold cursor-pointer",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},le(n.message.rank),3)):re("",!0)]),g("div",jir,[this.$store.state.config.active_tts_service!="None"?(k(),H("div",{key:0,class:je(["text-lg hover:text-red-600 duration-75 active:scale-90 p-2 cursor-pointer",{"text-red-500":o.isTalking}]),title:"speak",onClick:e[44]||(e[44]=he(Q=>o.speak(),["stop"]))},e[54]||(e[54]=[g("i",{"data-feather":"volume-2"},null,-1)]),2)):re("",!0)]),this.$store.state.config.xtts_enable&&!this.$store.state.config.xtts_use_streaming_mode?(k(),H("div",Wir,[i.isSynthesizingVoice?(k(),H("img",{key:1,src:i.loading_svg},null,8,Yir)):(k(),H("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]=he(Q=>o.read(),["stop"]))},e[55]||(e[55]=[g("i",{"data-feather":"voicemail"},null,-1)])))])):re("",!0)])]),g("div",Kir,[g("div",Zir,[n.message.binding?(k(),H("p",Xir,[e[56]||(e[56]=nt("Binding: ")),g("span",Jir,le(n.message.binding),1)])):re("",!0),n.message.model?(k(),H("p",eor,[e[57]||(e[57]=nt("Model: ")),g("span",tor,le(n.message.model),1)])):re("",!0),n.message.seed?(k(),H("p",nor,[e[58]||(e[58]=nt("Seed: ")),g("span",ror,le(n.message.seed),1)])):re("",!0),n.message.nb_tokens?(k(),H("p",ior,[e[59]||(e[59]=nt("Number of tokens: ")),g("span",{class:"font-thin",title:"Number of Tokens: "+n.message.nb_tokens},le(n.message.nb_tokens),9,oor)])):re("",!0),o.warmup_duration?(k(),H("p",sor,[e[60]||(e[60]=nt("Warmup duration: ")),g("span",{class:"font-thin",title:"Warmup duration: "+o.warmup_duration},le(o.warmup_duration),9,aor)])):re("",!0),o.time_spent?(k(),H("p",lor,[e[61]||(e[61]=nt("Generation duration: ")),g("span",{class:"font-thin",title:"Finished generating: "+o.time_spent},le(o.time_spent),9,cor)])):re("",!0),o.generation_rate?(k(),H("p",uor,[e[62]||(e[62]=nt("Rate: ")),g("span",{class:"font-thin",title:"Generation rate: "+o.generation_rate},le(o.generation_rate),9,dor)])):re("",!0)])])])])])}const oU=yt(mir,[["render",por]]);Qe.defaults.baseURL="/";const hor={components:{InteractiveMenu:Nb},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),ze(()=>{Ze.replace()})},methods:{isHTML(t){const n=new DOMParser().parseFromString(t,"text/html");return Array.from(n.body.childNodes).some(r=>r.nodeType===Node.ELEMENT_NODE)},selectFile(t,e){const n=document.createElement("input");n.type="file",n.accept=t,n.onchange=r=>{this.selectedFile=r.target.files[0],console.log("File selected"),e()},n.click()},uploadFile(){new FormData().append("file",this.selectedFile),console.log("Uploading file"),this.loading=!0;const e=new FileReader;e.onload=()=>{const n={filename:this.selectedFile.name,fileData:e.result};Je.on("file_received",r=>{r.status?this.onShowToastMessage("File uploaded successfully",4,!0):this.onShowToastMessage(`Couldn't upload file +`+r.error,4,!1),this.loading=!1,Je.off("file_received")}),Je.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){ze(()=>{Ze.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(t){this.showMenu=!this.showMenu,t.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(t.hasOwnProperty("file_types")?t.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(t.value)},handleClickOutside(t){const e=this.$el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(t.target)&&(this.showMenu=!1)}},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},Tor={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"};function mor(t,e,n,r,i,o){const s=pt("InteractiveMenu");return i.loading?(k(),H("div",Tor,e[0]||(e[0]=[g("div",{role:"status"},[g("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"},[g("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"}),g("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"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):(k(),wt(s,{key:1,commands:n.commandsList,execute_cmd:o.execute_cmd},null,8,["commands","execute_cmd"]))}const gor=yt(hor,[["render",mor],["__scopeId","data-v-1a32c141"]]),_or="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",Qor="/",vor={name:"ChatBox",emits:["messageSentEvent","sendCMDEvent","stopGenerating","loaded","createEmptyUserMessage","createEmptyAIMessage","personalitySelected","addWebLink"],props:{onTalk:Function,discussionList:Array,loading:{default:!1},onShowToastMessage:Function},components:{PersonalitiesCommands:gor,ChatBarButton:_9},setup(){},data(){return{isSendMenuVisible:!1,is_rt:!1,bindingHoveredIndex:null,modelHoveredIndex:null,personalityHoveredIndex:null,loader_v0:_or,sendGlobe:iU,bUrl:Qor,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"},isdataLakeNamesValid(){return console.log("dataLakeNames:",this.dataLakeNames),console.log("Type of dataLakeNames:",typeof this.dataLakeNames),Array.isArray(this.dataLakeNames)&&this.dataLakeNames.length>0},dataLakeNames(){console.log("rag_databases",this.$store.state.config.datalakes);const t=this.$store.state.config.datalakes.map(e=>{console.log("entry",e);const n=e.mounted?"feather:check":"";return console.log("icon decision",n),{name:e.alias,value:e.alias||"default_value",icon:n,help:"mounts the datalake"}});return console.log("formatted datalake",t),t}},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(t){const e=(t.clipboardData||t.originalEvent.clipboardData).items;let n=[];for(let r of e)if(r.type.indexOf("image")!==-1){const i=r.getAsFile(),s=`image_${Date.now()+"_"+Math.random().toString(36).substr(2,9)}.png`;console.log("newFileName",s);const a=new File([i],s,{type:i.type});this.addFiles([a])}else if(r.kind==="file"){const i=r.getAsFile();n.push(i)}n.length>0&&this.addFiles(n)},emitloaded(){this.$emit("loaded")},download_files(){Qe.get("/download_files")},remove_file(t){Qe.get("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t}).then(e=>{console.log(e)})},clear_files(){Qe.post("/clear_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{console.log(t),t.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(t,e){console.log("Send file triggered");const n=new FileReader,r=24*1024;let i=0,o=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,l=i+a.byteLength>=t.size;Je.emit("send_file_chunk",{filename:t.name,chunk:a,offset:i,isLastChunk:l,chunkIndex:o}),i+=a.byteLength,o++,l?(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()):s()};function s(){const a=t.slice(i,i+r);n.readAsArrayBuffer(a)}console.log("Uploading file"),s()},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),Je.emit("start_bidirectional_audio_stream"),ze(()=>{Ze.replace()})},stopRTCom(){this.is_rt=!1,console.log("is_rt:",this.is_rt),Je.emit("stop_bidirectional_audio_stream"),ze(()=>{Ze.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=t=>{let e="";for(let n=t.resultIndex;n{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.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(t){return ze(()=>{Ze.replace()}),$o(t)},removeItem(t){console.log("Removing ",t.name),Qe.post("/remove_discussion_file",{client_id:this.$store.state.client_id,name:t.name},{headers:this.posts_headers}).then(()=>{this.filesList=this.filesList.filter(e=>e!=t)}),console.log(this.filesList)},sendMessageEvent(t,e="no_internet"){this.$emit("messageSentEvent",t,e)},sendCMDEvent(t){this.$emit("sendCMDEvent",t)},async mountDB(t){await Qe.post("/toggle_mount_rag_database",{client_id:this.$store.state.client_id,datalake_name:t}),await this.$store.dispatch("refreshConfig"),console.log("Refreshed")},addWebLink(){console.log("Emitting addWebLink"),this.$emit("addWebLink")},add_file(){const t=document.createElement("input");t.type="file",t.style.display="none",t.multiple=!0,document.body.appendChild(t),t.addEventListener("change",()=>{console.log("Calling Add file..."),this.addFiles(t.files),document.body.removeChild(t)}),t.click()},takePicture(){Je.emit("take_picture"),Je.on("picture_taken",()=>{Qe.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.filesList=t.data.files,this.isFileSentList=t.data.files.map(e=>!0),console.log(`Files recovered: ${this.filesList}`)})})},submitOnEnter(t){this.loading||t.which===13&&(t.preventDefault(),t.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(t){console.log("Adding files");const e=[...t];let n=0;const r=()=>{if(n>=e.length){console.log(`Files_list: ${this.filesList}`);return}const i=e[n];this.filesList.push(i),this.isFileSentList.push(!1),this.send_file(i,()=>{n++,r()})};r()}},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},model_name:{immediate:!0,handler(t){this.$nextTick(()=>{this.model_name=t})}},showfilesList(){ze(()=>{Ze.replace()})},loading(t,e){ze(()=>{Ze.replace()})},filesList:{handler(t,e){let n=0;if(t.length>0)for(let r=0;r{Ze.replace()}),console.log("Chatbar mounted"),Je.on("rtcom_status_changed",t=>{this.$store.dispatch("fetchisRTOn"),console.log("rtcom_status_changed: ",t.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(){ze(()=>{Ze.replace()})}},yor={class:"absolute bottom-0 left-0 w-fit min-w-96 w-full justify-center text-center"},bor={key:0,class:"items-center gap-2 panels-color shadow-sm hover:shadow-none dark:border-gray-800 w-fit"},Eor={class:"flex"},xor=["title"],Sor={key:0},Lor={class:"flex flex-col max-h-64"},Cor=["title"],Aor={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"},wor={key:0,filesList:"",role:"status"},Mor={class:"flex flex-row items-center"},Oor={class:"whitespace-nowrap"},Ror=["onClick"],Nor={key:1,class:"flex mx-1 w-500"},Dor={class:"whitespace-nowrap flex flex-row gap-2"},Ior={key:1,title:"Selecting model",class:"flex flex-row flex-grow justify-end panels-color"},kor={role:"status"},Por=["src"],Hor={class:"flex w-fit relative grow w-full"},Vor={class:"chat-bar",tabindex:"0"},Bor={key:0,title:"Waiting for reply"},For=["src"],$or={class:"w-fit"},Uor={class:"w-fit"},Gor={class:"relative grow m-0 p-0"},qor={class:"m-0 p-0"},zor={class:"flex items-center space-x-3"},jor={class:"relative inline-block"},Wor={class:"p-4 m-0 flex flex-col gap-4 max-h-96 overflow-y-auto custom-scrollbar"},Yor={class:"flex flex-col gap-2"};function Kor(t,e,n,r,i,o){const s=pt("ChatBarButton"),a=pt("PersonalitiesCommands");return k(),H("div",yor,[i.filesList.length>0?(k(),H("div",bor,[g("div",Eor,[g("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]=he(l=>i.showfilesList=!i.showfilesList,["stop"]))},e[11]||(e[11]=[g("i",{"data-feather":"list"},null,-1)]),8,xor)]),i.filesList.length>0&&i.showfilesList==!0?(k(),H("div",Sor,[g("div",Lor,[oe(Ns,{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:He(()=>[(k(!0),H(Ue,null,ot(i.filesList,(l,c)=>(k(),H("div",{key:c+"-"+l.name},[g("div",{class:"m-1",title:l.name},[g("div",Aor,[i.isFileSentList[c]?re("",!0):(k(),H("div",wor,e[12]||(e[12]=[g("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"},[g("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"}),g("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),g("span",{class:"sr-only"},"Loading...",-1)]))),e[14]||(e[14]=g("div",null,[g("i",{"data-feather":"file",class:"w-5 h-5"})],-1)),g("div",{class:je(["line-clamp-1 w-3/5",i.isFileSentList[c]?"text-green-500":"text-red-200"])},le(l.name),3),e[15]||(e[15]=g("div",{class:"grow"},null,-1)),g("div",Mor,[g("p",Oor,le(o.computedFileSize(l.size)),1),g("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=>o.removeItem(l)},e[13]||(e[13]=[g("i",{"data-feather":"x",class:"w-5 h-5"},null,-1)]),8,Ror)])])],8,Cor)]))),128))]),_:1})])])):re("",!0),i.filesList.length>0?(k(),H("div",Nor,[g("div",Dor,[e[16]||(e[16]=g("p",{class:"font-bold"}," Total size: ",-1)),nt(" "+le(i.totalSize)+" ("+le(i.filesList.length)+") ",1)]),e[19]||(e[19]=g("div",{class:"grow"},null,-1)),g("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]=(...l)=>o.clear_files&&o.clear_files(...l))},e[17]||(e[17]=[g("i",{"data-feather":"trash",class:"w-5 h-5"},null,-1)])),g("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]=(...l)=>o.download_files&&o.download_files(...l))},e[18]||(e[18]=[g("i",{"data-feather":"download-cloud",class:"w-5 h-5"},null,-1)]))])):re("",!0)])):re("",!0),i.selecting_model||i.selecting_binding?(k(),H("div",Ior,[g("div",kor,[g("img",{src:i.loader_v0,class:"w-50 h-50"},null,8,Por),e[20]||(e[20]=g("span",{class:"sr-only"},"Selecting model...",-1))])])):re("",!0),g("div",Hor,[g("div",Vor,[n.loading?(k(),H("div",Bor,[g("img",{src:i.loader_v0},null,8,For),e[21]||(e[21]=g("div",{role:"status"},[g("span",{class:"sr-only"},"Loading...")],-1))])):re("",!0),oe(s,{onClick:o.toggleLeftPanel,class:je({"text-red-500":o.leftPanelCollapsed}),title:"Toggle View Mode"},{default:He(()=>[J(g("div",null,e[22]||(e[22]=[g("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"},[g("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[Pt,o.leftPanelCollapsed]]),J(g("div",null,e[23]||(e[23]=[g("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"},[g("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[Pt,!o.leftPanelCollapsed]])]),_:1},8,["onClick","class"]),g("div",$or,[this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands!=""?(k(),wt(a,{key:0,commandsList:this.$store.state.mountedPersArr[this.$store.state.config.active_personality_id].commands,sendCommand:o.sendCMDEvent,"on-show-toast-message":n.onShowToastMessage,ref:"personalityCMD"},null,8,["commandsList","sendCommand","on-show-toast-message"])):re("",!0)]),g("div",Uor,[o.isdataLakeNamesValid?(k(),wt(a,{key:0,icon:"feather:book",commandsList:o.dataLakeNames,sendCommand:o.mountDB,"on-show-toast-message":n.onShowToastMessage,ref:"databasesList"},null,8,["commandsList","sendCommand","on-show-toast-message"])):re("",!0)]),g("div",Gor,[g("form",qor,[J(g("textarea",{id:"chat",rows:"1","onUpdate:modelValue":e[3]||(e[3]=l=>i.message=l),onPaste:e[4]||(e[4]=(...l)=>o.handlePaste&&o.handlePaste(...l)),onKeydown:e[5]||(e[5]=Xr(he(l=>o.submitOnEnter(l),["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),[[we,i.message]])])]),g("div",zor,[n.loading?(k(),wt(s,{key:0,onClick:o.stopGenerating,class:"bg-red-500 dark:bg-red-600 hover:bg-red-600 dark:hover:bg-red-700"},{icon:He(()=>e[24]||(e[24]=[g("svg",{class:"animate-spin h-5 w-5",viewBox:"0 0 24 24"},[g("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),g("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:He(()=>[e[25]||(e[25]=g("span",null,"Stop",-1))]),_:1},8,["onClick"])):(k(),wt(s,{key:1,onClick:o.submit,title:"Send"},{icon:He(()=>e[26]||(e[26]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"])),oe(s,{onClick:o.submitWithInternetSearch,title:"Send with internet search"},{icon:He(()=>e[27]||(e[27]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),oe(s,{onClick:o.startSpeechRecognition,class:je({"text-red-500":i.isListeningToVoice}),title:"Voice input"},{icon:He(()=>e[28]||(e[28]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),t.$store.state.config.active_tts_service!="None"&&t.$store.state.config.active_tts_service!=null&&this.$store.state.config.active_stt_service!="None"&&this.$store.state.config.active_stt_service!=null?(k(),wt(s,{key:2,onClick:o.updateRT,class:je(i.is_rt?"bg-red-500 dark:bg-red-600":"bg-green-500 dark:bg-green-600"),title:"Real-time audio mode"},{icon:He(()=>e[29]||(e[29]=[nt(" 🌟 ")])),_:1},8,["onClick","class"])):re("",!0),n.loading?re("",!0):(k(),H("div",{key:3,class:"relative",onMouseleave:e[9]||(e[9]=(...l)=>o.hideSendMenu&&o.hideSendMenu(...l))},[g("div",jor,[J(g("div",{onMouseenter:e[6]||(e[6]=(...l)=>o.showSendMenu&&o.showSendMenu(...l)),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"},[g("div",Wor,[g("div",Yor,[oe(s,{onClick:o.add_file,title:"Send file"},{icon:He(()=>e[30]||(e[30]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),oe(s,{onClick:o.takePicture,title:"Take picture"},{icon:He(()=>e[31]||(e[31]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"}),g("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"]),oe(s,{onClick:o.addWebLink,title:"Add web link"},{icon:He(()=>e[32]||(e[32]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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),[[Pt,i.isSendMenuVisible]]),g("div",{onMouseenter:e[8]||(e[8]=(...l)=>o.showSendMenu&&o.showSendMenu(...l))},[g("button",{onClick:e[7]||(e[7]=he((...l)=>t.toggleSendMenu&&t.toggleSendMenu(...l),["prevent"])),class:"chat-bar-button"},e[33]||(e[33]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)),oe(s,{onClick:o.makeAnEmptyUserMessage,title:"New user message"},{icon:He(()=>e[34]||(e[34]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),oe(s,{onClick:o.makeAnEmptyAIMessage,title:"New AI message",class:"text-red-400 dark:text-red-300"},{icon:He(()=>e[35]||(e[35]=[g("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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"]),oe(s,{onClick:o.toggleRightPanel,class:je({"text-red-500":!o.rightPanelCollapsed}),title:"Toggle right Panel"},{default:He(()=>[J(g("div",null,e[36]||(e[36]=[g("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"},[g("polyline",{points:"15 18 9 12 15 6"})],-1)]),512),[[Pt,o.rightPanelCollapsed]]),J(g("div",null,e[37]||(e[37]=[g("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"},[g("polyline",{points:"9 18 15 12 9 6"})],-1)]),512),[[Pt,!o.rightPanelCollapsed]])]),_:1},8,["onClick","class"])]),g("input",{type:"file",ref:"fileDialog",onChange:e[10]||(e[10]=(...l)=>o.addFiles&&o.addFiles(...l)),multiple:"",style:{display:"none"}},null,544)]),e[38]||(e[38]=g("div",{class:"ml-auto gap-2"},null,-1))])])}const sU=yt(vor,[["render",Kor],["__scopeId","data-v-cc0f8d41"]]),Zor={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}`:co}},methods:{async fetchLatestNews(){try{const t=await Qe.get("/get_news");this.latestNews=t.data}catch(t){console.error("Failed to fetch latest news:",t),this.error="Unable to fetch the latest news. Please try again later."}},async fetchVideoUrl(){try{const t=await Qe.get("/get_last_video_url");this.videoUrl=t.data.url,this.videoType=t.data.type,this.checkVideoUpdate()}catch(t){console.error("Failed to fetch video information:",t),this.error="Unable to fetch the latest video information. Please try again later."}},async handleClick(){await Qe.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 Qe.get("/get_last_viewed_video_url")).data;console.log("storedVideoUrl"),console.log(e),this.videoUrl!==e&&(this.showVideoButton=!0)}},mounted(){this.fetchLatestNews(),this.fetchVideoUrl()}},Xor={class:"flex flex-col items-center justify-center w-full h-full min-h-screen p-8"},Jor={class:"text-center max-w-4xl"},esr={class:"flex items-center justify-center gap-8 mb-12"},tsr={class:"relative w-24 h-24"},nsr=["src"],rsr={class:"flex flex-col items-start"},isr={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"},osr={class:"space-y-8 animate-fade-in-up"},ssr={class:"text-4xl font-semibold"},asr={class:"text-xl max-w-3xl mx-auto"},lsr={key:0,class:"mt-12 p-6 rounded-lg shadow-md animate-fade-in-up overflow-y-scroll scrollbar-thin"},csr=["innerHTML"],usr={key:1,class:"mt-6 text-red-500"},dsr={key:0,class:"floating-button-container"},fsr=["href"],psr=["src","alt"];function hsr(t,e,n,r,i,o){return k(),H("div",Xor,[g("div",Jor,[g("div",esr,[g("div",tsr,[g("img",{src:o.logoSrc,alt:"LoLLMS Logo",class:"w-24 h-24 rounded-full absolute animate-rolling-ball"},null,8,nsr)]),g("div",rsr,[g("h1",isr,le(t.$store.state.theme_vars.lollms_title),1),e[1]||(e[1]=g("p",{class:"text-2xl italic mt-2"}," Lord of Large Language And Multimodal Systems ",-1))])]),g("div",osr,[g("h2",ssr,le(t.$store.state.theme_vars.lollms_welcome_short_message),1),g("p",asr,le(t.$store.state.theme_vars.lollms_welcome_message),1)]),i.latestNews?(k(),H("div",lsr,[e[2]||(e[2]=g("h3",null,"Latest LoLLMS News",-1)),g("p",{innerHTML:i.latestNews},null,8,csr)])):re("",!0),i.error?(k(),H("div",usr,le(i.error),1)):re("",!0)]),i.showVideoButton?(k(),H("div",dsr,[g("a",{href:i.videoUrl,target:"_blank",class:"floating-button",onClick:e[0]||(e[0]=(...s)=>o.handleClick&&o.handleClick(...s))},[e[3]||(e[3]=g("span",{class:"tooltip"},"New ParisNeo Video!",-1)),g("img",{src:o.getImageForVideoType,alt:"New "+i.videoType,class:"w-full h-full object-cover"},null,8,psr)],8,fsr)])):re("",!0)])}const aU=yt(Zor,[["render",hsr],["__scopeId","data-v-d9375d3e"]]);var Tsr=function(){function t(e,n){n===void 0&&(n=[]),this._eventType=e,this._eventFunctions=n}return t.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(e._eventType,n)})},t}(),nd=function(){return nd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{const e=t.data;console.log("Done"),e.status?(this.currentPersonConfig=e.config,this.showPersonalityEditor=!0):console.error(e.error)}).catch(t=>{console.error(t)})}}},_sr={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50 z-20"},Qsr={class:"relative w-full max-h-full bg-bg-light dark:bg-bg-dark"},vsr={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"},ysr={class:"justify-center text-center items-center w-full bg-bg-light dark:bg-bg-dark"},bsr={class:"w-full flex flex-row mt-4 text-center justify-center"},Esr={class:"w-full max-h-full container bg-bg-light dark:bg-bg-dark"},xsr={class:"mb-4 w-full"},Ssr={class:"w-full bg-bg-light dark:bg-bg-dark"};function Lsr(t,e,n,r,i,o){return i.show?(k(),H("div",_sr,[g("div",Qsr,[g("div",vsr,[g("button",{type:"button",onClick:e[0]||(e[0]=s=>o.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]=[g("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[g("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),g("span",{class:"sr-only"},"Close modal",-1)])),g("div",ysr,[g("div",bsr,[g("button",{type:"submit",onClick:e[1]||(e[1]=he((...s)=>o.submitForm&&o.submitForm(...s),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Commit AI to Server "),g("button",{onClick:e[2]||(e[2]=he(s=>o.hide(),["prevent"])),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded"}," Close ")]),g("div",Esr,[g("form",xsr,[g("table",Ssr,[g("tr",null,[e[18]||(e[18]=g("td",null,[g("label",{for:"personalityConditioning"},"Personality Conditioning:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"personalityConditioning","onUpdate:modelValue":e[3]||(e[3]=s=>n.config.personality_conditioning=s)},null,512),[[we,n.config.personality_conditioning]])])]),g("tr",null,[e[19]||(e[19]=g("td",null,[g("label",{for:"userMessagePrefix"},"User Message Prefix:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"userMessagePrefix","onUpdate:modelValue":e[4]||(e[4]=s=>n.config.user_message_prefix=s)},null,512),[[we,n.config.user_message_prefix]])])]),g("tr",null,[e[20]||(e[20]=g("td",null,[g("label",{for:"aiMessagePrefix"},"AI Message Prefix:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"aiMessagePrefix","onUpdate:modelValue":e[5]||(e[5]=s=>n.config.ai_message_prefix=s)},null,512),[[we,n.config.ai_message_prefix]])])]),g("tr",null,[e[21]||(e[21]=g("td",null,[g("label",{for:"linkText"},"Link Text:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"linkText","onUpdate:modelValue":e[6]||(e[6]=s=>n.config.link_text=s)},null,512),[[we,n.config.link_text]])])]),g("tr",null,[e[22]||(e[22]=g("td",null,[g("label",{for:"welcomeMessage"},"Welcome Message:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"welcomeMessage","onUpdate:modelValue":e[7]||(e[7]=s=>n.config.welcome_message=s)},null,512),[[we,n.config.welcome_message]])])]),g("tr",null,[e[23]||(e[23]=g("td",null,[g("label",{for:"modelTemperature"},"Model Temperature:")],-1)),g("td",null,[J(g("input",{type:"number",id:"modelTemperature","onUpdate:modelValue":e[8]||(e[8]=s=>n.config.model_temperature=s)},null,512),[[we,n.config.model_temperature]])])]),g("tr",null,[e[24]||(e[24]=g("td",null,[g("label",{for:"modelTopK"},"Model Top K:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopK","onUpdate:modelValue":e[9]||(e[9]=s=>n.config.model_top_k=s)},null,512),[[we,n.config.model_top_k]])])]),g("tr",null,[e[25]||(e[25]=g("td",null,[g("label",{for:"modelTopP"},"Model Top P:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelTopP","onUpdate:modelValue":e[10]||(e[10]=s=>n.config.model_top_p=s)},null,512),[[we,n.config.model_top_p]])])]),g("tr",null,[e[26]||(e[26]=g("td",null,[g("label",{for:"modelRepeatPenalty"},"Model Repeat Penalty:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatPenalty","onUpdate:modelValue":e[11]||(e[11]=s=>n.config.model_repeat_penalty=s)},null,512),[[we,n.config.model_repeat_penalty]])])]),g("tr",null,[e[27]||(e[27]=g("td",null,[g("label",{for:"modelRepeatLastN"},"Model Repeat Last N:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"number",id:"modelRepeatLastN","onUpdate:modelValue":e[12]||(e[12]=s=>n.config.model_repeat_last_n=s)},null,512),[[we,n.config.model_repeat_last_n]])])]),g("tr",null,[e[28]||(e[28]=g("td",null,[g("label",{for:"recommendedBinding"},"Recommended Binding:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedBinding","onUpdate:modelValue":e[13]||(e[13]=s=>n.config.recommended_binding=s)},null,512),[[we,n.config.recommended_binding]])])]),g("tr",null,[e[29]||(e[29]=g("td",null,[g("label",{for:"recommendedModel"},"Recommended Model:")],-1)),g("td",null,[J(g("input",{class:"dark:bg-black dark:text-primary w-full",type:"text",id:"recommendedModel","onUpdate:modelValue":e[14]||(e[14]=s=>n.config.recommended_model=s)},null,512),[[we,n.config.recommended_model]])])]),g("tr",null,[e[30]||(e[30]=g("td",null,[g("label",{class:"dark:bg-black dark:text-primary w-full",for:"dependencies"},"Dependencies:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"dependencies","onUpdate:modelValue":e[15]||(e[15]=s=>n.config.dependencies=s)},null,512),[[we,n.config.dependencies]])])]),g("tr",null,[e[31]||(e[31]=g("td",null,[g("label",{for:"antiPrompts"},"Anti Prompts:")],-1)),g("td",null,[J(g("textarea",{class:"dark:bg-black dark:text-primary w-full",id:"antiPrompts","onUpdate:modelValue":e[16]||(e[16]=s=>n.config.anti_prompts=s)},null,512),[[we,n.config.anti_prompts]])])])])])])])])])])):re("",!0)}const QU=yt(gsr,[["render",Lsr]]),Csr={data(){return{showPopup:!1,webpageUrl:"https://lollms.com/"}},methods:{show(){this.showPopup=!0},hide(){this.showPopup=!1},save_configuration(){Qe.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config}).then(t=>{this.isLoading=!1,t.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)})}}},Asr={key:0,class:"fixed inset-0 flex items-center justify-center z-50"},wsr={class:"popup-container"},Msr=["src"],Osr={class:"checkbox-container"};function Rsr(t,e,n,r,i,o){return k(),wt(qi,{name:"fade"},{default:He(()=>[i.showPopup?(k(),H("div",Asr,[g("div",wsr,[g("button",{onClick:e[0]||(e[0]=(...s)=>o.hide&&o.hide(...s)),class:"close-button"}," X "),g("iframe",{src:i.webpageUrl,class:"iframe-content"},null,8,Msr),g("div",Osr,[J(g("input",{type:"checkbox",id:"startup",class:"styled-checkbox","onUpdate:modelValue":e[1]||(e[1]=s=>this.$store.state.config.show_news_panel=s),onChange:e[2]||(e[2]=(...s)=>o.save_configuration&&o.save_configuration(...s))},null,544),[[ut,this.$store.state.config.show_news_panel]]),e[3]||(e[3]=g("label",{for:"startup",class:"checkbox-label"},"Show at startup",-1))])])])):re("",!0)]),_:1})}const vU=yt(Csr,[["render",Rsr],["__scopeId","data-v-d504dfc9"]]),Nsr="/assets/fastapi-BQj-rjUJ.png",Dsr="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",Isr="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",ksr="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",Psr="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",Hsr="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",Vsr="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",Bsr="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",Fsr="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",$sr="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",Usr="/assets/robot-CQPaMbxU.svg",Gsr="/";Qe.defaults.baseURL="/";const qsr={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{Toast:db,UniversalForm:d$},data(){return{bUrl:Gsr,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(t){this.$store.commit("setConfig",t)}},mountedPers:{get(){return console.log("asked for:",this.$store.state.mountedPers),this.$store.state.mountedPers},set(t){this.$store.commit("setMountedPers",t)}},personalities:{get(){return this.$store.state.personalities},set(t){this.$store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this.$store.state.mountedPersArr},set(t){this.$store.commit("setMountedPers",t)}}},methods:{async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0;let e=await Qe.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),r={client_id:this.$store.state.client_id,id:n};e=await Qe.post("/select_personality",r),console.log("Generating message from ",e.data.status),Je.emit("generate_msg_from",{id:-1})}},async remount_personality(){const t=this.mountedPers;if(console.log("Remounting personality ",t),!t)return{status:!1,error:"no personality - mount_personality"};try{console.log("before");const e={client_id:this.$store.state.client_id,category:t.category,folder:t.folder,language:t.language};console.log("after");const n=await Qe.post("/remount_personality",e);if(console.log("Remounting personality executed:",n),n)return console.log("Remounting personality res"),this.$store.state.toast.showToast("Personality remounted",4,!0),n.data;console.log("failed remount_personality")}catch(e){console.log(e.message,"remount_personality - settings");return}},onSettingsPersonality(t){try{Qe.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 - "+t.name,"Save changes","Cancel").then(n=>{try{Qe.post("/set_active_personality_settings",n).then(r=>{r&&r.data?(console.log("personality set with new settings",r.data),this.$store.state.toast.showToast("Personality settings updated successfully!",4,!0)):this.$store.state.toast.showToast(`Did not get Personality settings responses. `+r,4,!1)})}catch(r){this.$store.state.toast.showToast(`Did not get Personality settings responses. - Endpoint error: `+r.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(ze(()=>{Ze.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await Qe.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=Db}}},Vsr={class:"relative group/item"},Bsr=["src","alt"],Fsr={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"},$sr={class:"p-1 bg-gray-500 rounded-full text-white hover:bg-gray-600 focus:outline-none ml-1",title:"Show more"},Usr={class:"text-xs font-bold"};function Gsr(t,e,n,r,i,o){const s=pt("UniversalForm");return k(),H(Ue,null,[g("div",Vsr,[g("button",{onClick:e[1]||(e[1]=he((...a)=>o.onSettingsPersonality&&o.onSettingsPersonality(...a),["prevent"])),class:je(["w-6 h-6 rounded-full overflow-hidden transition-transform duration-200 transform group-hover/item:scale-110 focus:outline-none relative",{"glow-effect":t.$store.state.config.activate_skills_lib}])},[g("img",{src:o.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...a)),alt:o.mountedPers.name,class:je(["w-full h-full object-cover",{"border-2 border-secondary":t.isActive}])},null,42,Bsr)],2),g("div",Fsr,[g("button",{onClick:e[2]||(e[2]=he(a=>o.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]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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)])),g("button",{onClick:e[3]||(e[3]=he(a=>o.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]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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)])),g("button",$sr,[g("span",Usr,"+"+le(o.mountedPersArr.length-1),1)])])]),oe(s,{ref:"universalForm",class:"z-50"},null,512)],64)}const yU=yt(Hsr,[["render",Gsr],["__scopeId","data-v-85f3dede"]]),qsr={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center overflow-hidden"},zsr={key:0,class:"absolute inset-0 pointer-events-none overflow-hidden"},jsr={class:"flex flex-col items-center text-center max-w-4xl w-full px-4 relative z-10"},Wsr={class:"mb-8 w-full"},Ysr={class:"text-5xl md:text-6xl font-bold mb-2 hover:scale-105 transition-transform lollms-title-style"},Ksr={class:"bottom-0 text-2xl italic"},Zsr={class:"text-lg"},Xsr=["innerHTML"],Jsr={class:"animated-progressbar-bg"},ear={class:"w-full max-w-2xl"},tar={role:"status",class:"w-full"},nar={class:"text-xl"},rar={class:"text-2xl font-bold mt-2"},iar={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-[16rem]"},oar={class:"logo-container"},sar=["src"],aar={class:"toolbar discussion"},lar={class:"toolbar-container"},car={class:"p-4 flex flex-wrap gap-2 items-center"},uar={class:"p-4 flex flex-wrap gap-2 items-center"},dar={class:"relative"},far={class:"relative"},par={key:0,title:"Loading..",class:"flex justify-center"},har={key:1,class:"flex justify-center space-x-4"},Tar={key:2,class:"flex flex-col space-y-2"},mar={class:"relative inline-block"},gar={class:"p-2 border-b border-gray-200 dark:border-gray-700"},_ar={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Qar={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},yar=["onClick","title"],bar=["src","alt"],Ear=["title"],xar={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"},Sar=["onClick"],Lar={class:"flex space-x-1"},Car=["onClick"],Aar=["src","title"],war={class:"relative inline-block"},Mar={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Oar={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Rar={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Nar=["onClick","title"],Dar=["src","alt"],Iar=["title"],kar={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"},Par=["onClick"],Har={class:"flex space-x-1"},Var=["onClick"],Bar=["src","title"],Far={class:"relative inline-block"},$ar={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Uar={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Gar={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},qar=["onClick","title"],zar=["src","alt"],jar=["title"],War={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"},Yar=["onClick"],Kar={class:"flex space-x-1"},Zar=["onClick"],Xar=["onClick"],Jar=["onClick"],e1r={class:"personalities-container"},t1r={class:"w-auto max-w-md mx-auto p-2"},n1r={class:"flex items-center"},r1r={class:"relative flex-grow"},i1r={key:0,class:"w-full p-4 bg-bg-light dark:bg-bg-dark"},o1r={class:"flex flex-col space-y-2"},s1r={key:0},a1r={key:1,class:"flex space-x-2"},l1r={key:1,class:"flex space-x-2"},c1r={class:"flex space-x-2"},u1r={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},d1r={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"},f1r={class:"flex flex-row items-center justify-center panels-color"},p1r={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},h1r={key:0,class:"relative flex flex-col flex-grow"},T1r={class:"container pt-4 pb-50 mb-50 w-full"},m1r={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"},g1r={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"},_1r={class:"flex flex-nowrap gap-6 p-4 min-w-full"},Q1r=["title","onClick"],v1r={class:"space-y-3"},y1r=["title"],b1r=["title"],E1r={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},x1r={class:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] flex flex-col"},S1r={class:"flex-1 flex flex-col min-h-0"},L1r={class:"mb-4 p-4 bg-gray-100 dark:bg-gray-700 rounded-lg"},C1r={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"},A1r={class:"text-base whitespace-pre-wrap"},w1r={class:"flex-1 overflow-y-auto"},M1r={class:"space-y-4"},O1r=["for"],R1r=["id","onUpdate:modelValue","placeholder"],N1r=["id","onUpdate:modelValue"],D1r=["id","onUpdate:modelValue"],I1r=["id","onUpdate:modelValue"],k1r={key:4,class:"border rounded-md overflow-hidden"},P1r={class:"bg-gray-200 dark:bg-gray-900 p-2 text-sm"},H1r=["id","onUpdate:modelValue"],V1r=["id","onUpdate:modelValue"],B1r=["value"],F1r={class:"mt-6 flex justify-end space-x-4"},$1r={key:0,class:"flex flex-row items-center justify-center h-10"},U1r={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"},G1r={ref:"isolatedContent",class:"h-full"},q1r={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"},z1r={class:"text-2xl animate-pulse mt-2 text-white"},j1r={id:"app"},W1r=t=>{const e=t.replace("[","").replace("]","").split("::"),n=e[0];if(e.length===1)return{label:n,type:"text",fullText:t};const r=e[1],i={label:n,type:r,fullText:t};switch(r){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(o=>o.trim()):[];break;default:i.type="text"}return i},Y1r="/",K1r={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, Saïph, Nexus, Pulsar.","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","Version 17 of LoLLMs, nicknamed 'Pulsar', draws inspiration from the most precise natural clocks in the universe - pulsating neutron stars. Just as pulsars emit precise, regular signals that help navigate spacecraft, LoLLMs Pulsar orchestrates precise communication between different AI systems. The version number 17 wasn't just sequential - pulsars rotate up to 1.7 thousand times per second, making '17' a cosmic nod to these incredible stellar lighthouses of space!"],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:Asr,animated_info:wsr,normal_mode:Osr,fun_mode:Msr,is_first_connection:!0,discord:Csr,FastAPI:Lsr,modelImgPlaceholder:ri,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: `+r.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(ze(()=>{Ze.replace()});this.$store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await Qe.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=Db}}},zsr={class:"relative group/item"},jsr=["src","alt"],Wsr={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"},Ysr={class:"p-1 bg-gray-500 rounded-full text-white hover:bg-gray-600 focus:outline-none ml-1",title:"Show more"},Ksr={class:"text-xs font-bold"};function Zsr(t,e,n,r,i,o){const s=pt("UniversalForm");return k(),H(Ue,null,[g("div",zsr,[g("button",{onClick:e[1]||(e[1]=he((...a)=>o.onSettingsPersonality&&o.onSettingsPersonality(...a),["prevent"])),class:je(["w-6 h-6 rounded-full overflow-hidden transition-transform duration-200 transform group-hover/item:scale-110 focus:outline-none relative",{"glow-effect":t.$store.state.config.activate_skills_lib}])},[g("img",{src:o.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...a)),alt:o.mountedPers.name,class:je(["w-full h-full object-cover",{"border-2 border-secondary":t.isActive}])},null,42,jsr)],2),g("div",Wsr,[g("button",{onClick:e[2]||(e[2]=he(a=>o.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]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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)])),g("button",{onClick:e[3]||(e[3]=he(a=>o.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]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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)])),g("button",Ysr,[g("span",Ksr,"+"+le(o.mountedPersArr.length-1),1)])])]),oe(s,{ref:"universalForm",class:"z-50"},null,512)],64)}const yU=yt(qsr,[["render",Zsr],["__scopeId","data-v-85f3dede"]]),Xsr={key:0,class:"fixed top-0 left-0 w-screen h-screen flex items-center justify-center overflow-hidden"},Jsr={key:0,class:"absolute inset-0 pointer-events-none overflow-hidden"},ear={class:"flex flex-col items-center text-center max-w-4xl w-full px-4 relative z-10"},tar={class:"mb-8 w-full"},nar={class:"text-5xl md:text-6xl font-bold mb-2 hover:scale-105 transition-transform lollms-title-style"},rar={class:"bottom-0 text-2xl italic"},iar={class:"text-lg"},oar=["innerHTML"],sar={class:"animated-progressbar-bg"},aar={class:"w-full max-w-2xl"},lar={role:"status",class:"w-full"},car={class:"text-xl"},uar={class:"text-2xl font-bold mt-2"},dar={key:0,class:"relative flex flex-col no-scrollbar shadow-lg w-[16rem]"},far={class:"logo-container"},par=["src"],har={class:"toolbar discussion"},Tar={class:"toolbar-container"},mar={class:"p-4 flex flex-wrap gap-2 items-center"},gar={class:"p-4 flex flex-wrap gap-2 items-center"},_ar={class:"relative"},Qar={class:"relative"},yar={key:0,title:"Loading..",class:"flex justify-center"},bar={key:1,class:"flex justify-center space-x-4"},Ear={key:2,class:"flex flex-col space-y-2"},xar={class:"relative inline-block"},Sar={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Lar={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Car={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Aar=["onClick","title"],war=["src","alt"],Mar=["title"],Oar={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"},Rar=["onClick"],Nar={class:"flex space-x-1"},Dar=["onClick"],Iar=["src","title"],kar={class:"relative inline-block"},Par={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Har={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Var={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Bar=["onClick","title"],Far=["src","alt"],$ar=["title"],Uar={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"},Gar=["onClick"],qar={class:"flex space-x-1"},zar=["onClick"],jar=["src","title"],War={class:"relative inline-block"},Yar={class:"p-2 border-b border-gray-200 dark:border-gray-700"},Kar={class:"p-4 grid grid-cols-3 gap-4 max-h-80 overflow-y-auto custom-scrollbar"},Zar={class:"flex flex-col items-center hover:bg-blue-100 dark:hover:bg-blue-900 p-2 rounded-md w-full cursor-pointer"},Xar=["onClick","title"],Jar=["src","alt"],e1r=["title"],t1r={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"},n1r=["onClick"],r1r={class:"flex space-x-1"},i1r=["onClick"],o1r=["onClick"],s1r=["onClick"],a1r={class:"personalities-container"},l1r={class:"w-auto max-w-md mx-auto p-2"},c1r={class:"flex items-center"},u1r={class:"relative flex-grow"},d1r={key:0,class:"w-full p-4 bg-bg-light dark:bg-bg-dark"},f1r={class:"flex flex-col space-y-2"},p1r={key:0},h1r={key:1,class:"flex space-x-2"},T1r={key:1,class:"flex space-x-2"},m1r={class:"flex space-x-2"},g1r={class:"relative flex flex-row flex-grow mb-10 z-0 w-full"},_1r={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"},Q1r={class:"flex flex-row items-center justify-center panels-color"},v1r={class:"text-center font-large font-bold text-l drop-shadow-md align-middle"},y1r={key:0,class:"relative flex flex-col flex-grow"},b1r={class:"container pt-4 pb-50 mb-50 w-full"},E1r={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"},x1r={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"},S1r={class:"flex flex-nowrap gap-6 p-4 min-w-full"},L1r=["title","onClick"],C1r={class:"space-y-3"},A1r=["title"],w1r=["title"],M1r={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},O1r={class:"bg-white dark:bg-gray-800 p-6 rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] flex flex-col"},R1r={class:"flex-1 flex flex-col min-h-0"},N1r={class:"mb-4 p-4 bg-gray-100 dark:bg-gray-700 rounded-lg"},D1r={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"},I1r={class:"text-base whitespace-pre-wrap"},k1r={class:"flex-1 overflow-y-auto"},P1r={class:"space-y-4"},H1r=["for"],V1r=["id","onUpdate:modelValue","placeholder"],B1r=["id","onUpdate:modelValue"],F1r=["id","onUpdate:modelValue"],$1r=["id","onUpdate:modelValue"],U1r={key:4,class:"border rounded-md overflow-hidden"},G1r={class:"bg-gray-200 dark:bg-gray-900 p-2 text-sm"},q1r=["id","onUpdate:modelValue"],z1r=["id","onUpdate:modelValue"],j1r=["value"],W1r={class:"mt-6 flex justify-end space-x-4"},Y1r={key:0,class:"flex flex-row items-center justify-center h-10"},K1r={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"},Z1r={ref:"isolatedContent",class:"h-full"},X1r={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"},J1r={class:"text-2xl animate-pulse mt-2 text-white"},e2r={id:"app"},t2r=t=>{const e=t.replace("[","").replace("]","").split("::"),n=e[0];if(e.length===1)return{label:n,type:"text",fullText:t};const r=e[1],i={label:n,type:r,fullText:t};switch(r){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(o=>o.trim()):[];break;default:i.type="text"}return i},n2r="/",r2r={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, Saïph, Nexus, Pulsar.","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","Version 17 of LoLLMs, nicknamed 'Pulsar', draws inspiration from the most precise natural clocks in the universe - pulsating neutron stars. Just as pulsars emit precise, regular signals that help navigate spacecraft, LoLLMs Pulsar orchestrates precise communication between different AI systems. The version number 17 wasn't just sequential - pulsars rotate up to 1.7 thousand times per second, making '17' a cosmic nod to these incredible stellar lighthouses of space!"],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:Isr,animated_info:ksr,normal_mode:Hsr,fun_mode:Psr,is_first_connection:!0,discord:Dsr,FastAPI:Nsr,modelImgPlaceholder:ri,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:` @@ -391,7 +391,7 @@ If You are using windows, this will install wsl so you need to activate it. - `,memory_icon:Rsr,active_skills:Nsr,inactive_skills:Dsr,skillsRegistry:Isr,robot:ksr,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},discussionsList:[],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 t;do t=this.interestingFacts[Math.floor(Math.random()*this.interestingFacts.length)];while(t===this.randomFact&&this.interestingFacts.length>1);this.randomFact=t},async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await Qe.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),r={client_id:this.$store.state.client_id,id:n};e=await Qe.post("/select_personality",r),console.log("Generating message from ",e.data.status),tt.emit("generate_msg_from",{id:-1})}},onPersonalitiesReadyFun(){this.$store.state.personalities_ready=!0},async showBindingHoveredIn(t){this.bindingHoveredIndex=t},async showBindingHoveredOut(){this.bindingHoveredIndex=null},async showModelHoveredIn(t){this.modelHoveredIndex=t},async showModelHoveredOut(){this.modelHoveredIndex=null},async showPersonalityHoveredIn(t){this.personalityHoveredIndex=t},async showPersonalityHoveredOut(){this.personalityHoveredIndex=null},async onPersonalitySelected(t){if(this.hidePersonalitiesMenu(),t){if(t.selected){this.$store.state.toast.showToast("Personality already selected",4,!0);return}const e=t.full_path;if(this.$store.state.config.personalities.includes(e)){const n=await this.select_personality(t);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"),n&&n.status&&n.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: + `,memory_icon:Vsr,active_skills:Bsr,inactive_skills:Fsr,skillsRegistry:$sr,robot:Usr,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},discussionsList:[],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 t;do t=this.interestingFacts[Math.floor(Math.random()*this.interestingFacts.length)];while(t===this.randomFact&&this.interestingFacts.length>1);this.randomFact=t},async handleOnTalk(){const t=this.mountedPers;console.log("pers:",t),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await Qe.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),r={client_id:this.$store.state.client_id,id:n};e=await Qe.post("/select_personality",r),console.log("Generating message from ",e.data.status),Je.emit("generate_msg_from",{id:-1})}},onPersonalitiesReadyFun(){this.$store.state.personalities_ready=!0},async showBindingHoveredIn(t){this.bindingHoveredIndex=t},async showBindingHoveredOut(){this.bindingHoveredIndex=null},async showModelHoveredIn(t){this.modelHoveredIndex=t},async showModelHoveredOut(){this.modelHoveredIndex=null},async showPersonalityHoveredIn(t){this.personalityHoveredIndex=t},async showPersonalityHoveredOut(){this.personalityHoveredIndex=null},async onPersonalitySelected(t){if(this.hidePersonalitiesMenu(),t){if(t.selected){this.$store.state.toast.showToast("Personality already selected",4,!0);return}const e=t.full_path;if(this.$store.state.config.personalities.includes(e)){const n=await this.select_personality(t);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"),n&&n.status&&n.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: `+t.name,4,!0):this.$store.state.toast.showToast(`Error on select personality: `+t.name,4,!1)}this.$emit("personalitySelected"),ze(()=>{Ze.replace()})}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};const e=t.full_path,n=this.$store.state.config.personalities.findIndex(i=>i===e),r={client_id:this.$store.state.client_id,id:n};try{const i=await Qe.post("/select_personality",r);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(t){navigator.clipboard.writeText(this.binding_name+"::"+t),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(t){this.selecting_binding=!0,this.selectedBinding=t,this.$store.state.messageBox.showBlockingMessage("Loading binding"),Qe.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"binding_name",setting_value:t.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(t){this.selecting_model=!0,this.selectedModel=t,this.$store.state.messageBox.showBlockingMessage("Loading model"),Qe.post("/update_setting",{client_id:this.$store.state.client_id,setting_name:"model_name",setting_value:t.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,Qe.get("/get_active_binding_settings").then(t=>{this.isLoading=!1,t&&(t.data&&Object.keys(t.data).length>0?this.$store.state.universalForm.showForm(t.data,"Binding settings ","Save changes","Cancel").then(e=>{try{Qe.post("/set_active_binding_settings",{client_id:this.$store.state.client_id,settings:e}).then(n=>{n&&n.data?this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0):(this.$store.state.toast.showToast(`Did not get binding settings responses. `+n,4,!1),this.isLoading=!1)})}catch(n){this.$store.state.toast.showToast(`Did not get binding settings responses. @@ -401,7 +401,7 @@ Error: `+e.error,4,!1)},async unmount_personality(t){if(!t)return{status:!1,erro ${this.lastMessageHtml} `),e.close()}},async triggerRobotAction(){this.rightPanelCollapsed=!this.rightPanelCollapsed,this.rightPanelCollapsed||(this.$store.commit("setleftPanelCollapsed",!1),this.$nextTick(()=>{this.extractHtml()}))},add_webpage(){this.$refs.web_url_input_box.showPanel()},addWebpage(){Qe.post("/add_webpage",{client_id:this.client_id,url:this.$refs.web_url_input_box.inputText},{headers:this.posts_headers}).then(t=>{t&&t.status&&this.recoverFiles()})},show_progress(t){this.progress_visibility_val=!0},hide_progress(t){this.progress_visibility_val=!1},update_progress(t){this.progress_value=t.value},onSettingsBinding(){try{this.isLoading=!0,Qe.get("/get_active_binding_settings").then(t=>{if(this.isLoading=!1,t)if(t.data&&Object.keys(t.data).length>0){const e=this.$store.state.bindingsZoo.find(n=>n.name==this.state.config.binding_name);this.$store.state.universalForm.showForm(t.data,"Binding settings - "+e.binding.name,"Save changes","Cancel").then(n=>{try{Qe.post("/set_active_binding_settings",{client_id:this.$store.state.client_id,settings:n}).then(r=>{r&&r.data?this.$store.state.toast.showToast("Binding settings updated successfully!",4,!0):(this.$store.state.toast.showToast(`Did not get binding settings responses. `+r,4,!1),this.isLoading=!1)})}catch(r){this.$store.state.toast.showToast(`Did not get binding settings responses. - Endpoint error: `+r.message,4,!1),this.isLoading=!1}})}else this.$store.state.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1})}catch(t){this.isLoading=!1,this.$store.state.toast.showToast("Could not open binding settings. Endpoint error: "+t.message,4,!1)}},showDatabaseSelector(){this.database_selectorDialogVisible=!0},async ondatabase_selectorDialogRemoved(t){console.log("Deleted:",t)},async ondatabase_selectorDialogSelected(t){console.log("Selected:",t)},onclosedatabase_selectorDialog(){this.database_selectorDialogVisible=!1},async onvalidatedatabase_selectorChoice(t){this.database_selectorDialogVisible=!1;const e={client_id:this.client_id,name:typeof t=="string"?t:t.name};if((await Qe.post("/select_database",e,{headers:this.posts_headers})).status){this.$store.state.config=await Qe.post("/get_config",{client_id:this.client_id});let r=await Qe.get("/list_databases").data;this.$store.state.databases=r,location.reload()}},async addDiscussion2SkillsLibrary(){(await Qe.post("/add_discussion_to_skills_library",{client_id:this.client_id},{headers:this.posts_headers})).status&&console.log("done")},async toggleSkillsLib(){this.$store.state.config.activate_skills_lib=!this.$store.state.config.activate_skills_lib,await this.applyConfiguration()},async showSkillsLib(){this.$refs.skills_lib.showSkillsLibrary()},async applyConfiguration(){this.loading=!0;const t=await Qe.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config});this.loading=!1,t.data.status?this.$store.state.toast.showToast("Configuration changed successfully.",4,!0):this.$store.state.toast.showToast("Configuration change failed.",4,!1),ze(()=>{Ze.replace()})},save_configuration(){this.showConfirmation=!1,Qe.post("/save_settings",{}).then(t=>{if(t)return t.status?this.$store.state.toast.showToast("Settings saved!",4,!0):this.$store.state.messageBox.showMessage("Error: Couldn't save settings!"),t.data}).catch(t=>(this.$store.state.messageBox.showMessage("Couldn't save settings!"),{status:!1}))},showToastMessage(t,e,n){this.$store.state.toast.showToast(t,e,n)},toggleDropdown(){this.isOpen=!this.isOpen},importChatGPT(){},async api_get_req(t){try{const e=await Qe.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req");return}},async list_discussions(){try{const t=await Qe.get("/list_discussions");if(t)return this.createDiscussionList(t.data),t.data}catch(t){return console.log("Error: Could not list discussions",t.message),[]}},load_discussion(t,e){t&&(this.loading=!0,this.discussionArr=[],this.setDiscussionLoading(t,this.loading),tt.on("discussion",n=>{this.loading=!1,this.setDiscussionLoading(t,this.loading),n&&(this.discussionArr=n.filter(r=>r.message_type==this.msgTypes.MSG_TYPE_CONTENT||r.message_type==this.msgTypes.MSG_TYPE_CONTENT_INVISIBLE_TO_AI),this.discussionArr.forEach(r=>{r.status_message="Done"}),e&&e()),tt.off("discussion"),this.extractHtml()}),tt.emit("load_discussion",{id:t}))},recoverFiles(){Qe.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.$refs.chatBox.filesList=t.data.files,this.$refs.chatBox.isFileSentList=t.data.files.map(e=>!0)})},new_discussion(t){try{this.loading=!0,tt.on("discussion_created",e=>{tt.off("discussion_created"),this.list_discussions().then(()=>{const n=this.discussionsList.findIndex(i=>i.id==e.id),r=this.discussionsList[n];this.selectDiscussion(r),this.load_discussion(e.id,()=>{this.loading=!1,this.recoverFiles(),ze(()=>{const i=document.getElementById("dis-"+e.id);this.scrollToElement(i),console.log("Scrolling tp "+i)})})})}),tt.emit("new_discussion",{title:t})}catch(e){return console.log("Error: Could not create new discussion",e.message),{}}},async delete_discussion(t){try{t&&(this.loading=!0,this.setDiscussionLoading(t,this.loading),await Qe.post("/delete_discussion",{client_id:this.client_id,id:t},{headers:this.posts_headers}),this.loading=!1,this.setDiscussionLoading(t,this.loading))}catch(e){console.log("Error: Could not delete discussion",e.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async edit_title(t,e){try{if(t){this.loading=!0,this.setDiscussionLoading(t,this.loading);const n=await Qe.post("/edit_title",{client_id:this.client_id,id:t,title:e},{headers:this.posts_headers});if(this.loading=!1,this.setDiscussionLoading(t,this.loading),n.status==200){const r=this.discussionsList.findIndex(o=>o.id==t),i=this.discussionsList[r];i.title=e,this.tempList=this.discussionsList}}}catch(n){console.log("Error: Could not edit title",n.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async make_title(t){try{if(t){this.loading=!0,this.setDiscussionLoading(t,this.loading);const e=await Qe.post("/make_title",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(this.loading=!1,this.setDiscussionLoading(t,this.loading),e.status==200){const n=this.discussionsList.findIndex(i=>i.id==t),r=this.discussionsList[n];r.title=e.data.title,this.tempList=this.discussionsList}}}catch(e){console.log("Error: Could not edit title",e.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async delete_message(t){try{const e=await Qe.post("/delete_message",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could delete message",e.message),{}}},async stop_gen(){try{if(this.discussionArr.length>0){const t=this.discussionArr[this.discussionArr.length-1];t.status_message="Generation canceled"}if(tt.emit("cancel_generation"),res)return res.data}catch(t){return console.log("Error: Could not stop generating",t.message),{}}},async message_rank_up(t){try{const e=await Qe.post("/message_rank_up",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank up message",e.message),{}}},async message_rank_down(t){try{const e=await Qe.post("/message_rank_down",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank down message",e.message),{}}},async edit_message(t,e,n){try{const r=await Qe.post("/edit_message",{client_id:this.client_id,id:t,message:e,metadata:[{audio_url:n}]},{headers:this.posts_headers});if(r)return r.data}catch(r){return console.log("Error: Could not update message",r.message),{}}},async export_multiple_discussions(t,e){try{if(t.length>0){const n=await Qe.post("/export_multiple_discussions",{client_id:this.$store.state.client_id,discussion_ids:t,export_format:e},{headers:this.posts_headers});if(n)return n.data}}catch(n){return console.log("Error: Could not export multiple discussions",n.message),{}}},async import_multiple_discussions(t){try{if(t.length>0){const e=await Qe.post("/import_multiple_discussions",{client_id:this.$store.state.client_id,jArray:t},{headers:this.posts_headers});if(e)return e.data}}catch(e){console.log("Error: Could not import multiple discussions",e.message);return}},handleSearch(){this.filterTitle.trim()&&(this.isSearching=!0,clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.filterDiscussions(),this.isSearching=!1},300))},clearSearch(){this.filterTitle="",this.searchResults=[]},filterDiscussions(){this.filterInProgress||(this.filterInProgress=!0,setTimeout(()=>{this.filterTitle?this.discussionsList=this.tempList.filter(t=>t.title&&t.title.includes(this.filterTitle)):this.discussionsList=this.tempList,this.filterInProgress=!1},100))},async selectDiscussion(t){if(this.isGenerating){this.$store.state.toast.showToast("You are currently generating a text. Please wait for text generation to finish or stop it before trying to select another discussion",4,!1);return}t&&(this.currentDiscussion===void 0?(this.currentDiscussion=t,this.setPageTitle(t),localStorage.setItem("selected_discussion",this.currentDiscussion.id),localStorage.getItem("selected_discussion"),this.load_discussion(t.id,()=>{this.discussionArr.length>1&&((this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content),this.recoverFiles())})):this.currentDiscussion.id!=t.id&&(this.currentDiscussion=t,this.setPageTitle(t),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(t.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content),this.recoverFiles()})),ze(()=>{const e=document.getElementById("dis-"+this.currentDiscussion.id);this.scrollToElementInContainer(e,"leftPanel");const n=document.getElementById("messages-list");this.scrollBottom(n)}))},scrollToElement(t){t?t.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}):console.log("Error: scrollToElement")},scrollToElementInContainer(t,e){try{const n=t.offsetTop;document.getElementById(e).scrollTo({top:n,behavior:"smooth"})}catch{console.log("error")}},scrollBottom(t){t?t.scrollTo({top:t.scrollHeight,behavior:"smooth"}):console.log("Error: scrollBottom")},scrollTop(t){t?t.scrollTo({top:0,behavior:"smooth"}):console.log("Error: scrollTop")},createUserMsg(t){let e={content:t.message,id:t.id,rank:0,sender:t.user,created_at:t.created_at,steps:[],html_js_s:[],status_message:"Warming up"};this.discussionArr.push(e),ze(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)})},updateLastUserMsg(t){const e=this.discussionArr.indexOf(r=>r.id=t.user_id),n={binding:t.binding,content:t.message,created_at:t.created_at,type:t.type,finished_generating_at:t.finished_generating_at,id:t.user_id,model:t.model,personality:t.personality,sender:t.user,steps:[]};e!==-1&&(this.discussionArr[e]=n)},async socketIOConnected(){console.log("socketIOConnected")},socketIODisconnected(){return console.log("socketIOConnected"),this.currentDiscussion=null,this.$store.dispatch("refreshModels"),this.$store.state.isConnected=!1,!0},new_message(t){t.sender_type==this.SENDER_TYPES_AI&&(this.isGenerating=!0);let e={sender:t.sender,message_type:t.message_type,sender_type:t.sender_type,content:t.content,id:t.id,discussion_id:t.discussion_id,parent_id:t.parent_id,binding:t.binding,model:t.model,personality:t.personality,created_at:t.created_at,finished_generating_at:t.finished_generating_at,rank:0,ui:t.ui,steps:[],parameters:t.parameters,metadata:t.metadata,open:t.open};e.status_message="Warming up",this.discussionArr.push(e),ze(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)}),(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,t.message)},async talk(t){this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await Qe.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),r={client_id:this.$store.state.client_id,id:n};e=await Qe.post("/select_personality",r),tt.emit("generate_msg_from",{id:-1})}},createEmptyUserMessage(t){tt.emit("create_empty_message",{type:0,message:t})},createEmptyAIMessage(){tt.emit("create_empty_message",{type:1})},sendMsg(t,e){if(!t){this.$store.state.toast.showToast("Message contains no content!",4,!1);return}this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Qe.get("/get_generation_status",{}).then(n=>{if(n)if(n.data.status)console.log("Already generating");else{e=="internet"?tt.emit("generate_msg_with_internet",{prompt:t}):tt.emit("generate_msg",{prompt:t});let r=0;this.discussionArr.length>0&&(r=Number(this.discussionArr[this.discussionArr.length-1].id)+1);let i={message:t,id:r,rank:0,user:this.$store.state.config.user_name,created_at:new Date().toLocaleString(),sender:this.$store.state.config.user_name,message_type:this.operationTypes.MSG_TYPE_CONTENT,sender_type:this.senderTypes.SENDER_TYPES_USER,content:t,id:r,discussion_id:this.discussion_id,parent_id:r,binding:"",model:"",personality:"",created_at:new Date().toLocaleString(),finished_generating_at:new Date().toLocaleString(),rank:0,steps:[],parameters:null,metadata:[],ui:null};this.createUserMsg(i)}}).catch(n=>{console.log("Error: Could not get generation status",n)})},sendCmd(t){this.isGenerating=!0,tt.emit("execute_command",{command:t,parameters:[]})},notify(t){self.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),ze(()=>{const e=document.getElementById("messages-list");this.scrollBottom(e)}),t.display_type==0?this.$store.state.toast.showToast(t.content,t.duration,t.notification_type):t.display_type==1?this.$store.state.messageBox.showMessage(t.content):t.display_type==2?(this.$store.state.messageBox.hideMessage(),this.$store.state.yesNoDialog.askQuestion(t.content,"Yes","No").then(e=>{tt.emit("yesNoRes",{yesRes:e})})):t.display_type==3?this.$store.state.messageBox.showBlockingMessage(t.content):t.display_type==4&&this.$store.state.messageBox.hideMessage(),this.chime.play()},update_message(t){if(this.discussion_id=t.discussion_id,this.setDiscussionLoading(this.discussion_id,!0),this.currentDiscussion.id==this.discussion_id){const e=this.discussionArr.findIndex(r=>r.id==t.id),n=this.discussionArr[e];if(n&&(t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_SET_CONTENT||t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI))this.isGenerating=!0,n.content=t.content,n.created_at=t.created_at,n.started_generating_at=t.started_generating_at,n.nb_tokens=t.nb_tokens,n.finished_generating_at=t.finished_generating_at,this.extractHtml();else if(n&&t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_ADD_CHUNK)this.isGenerating=!0,n.content+=t.content,n.created_at=t.created_at,n.started_generating_at=t.started_generating_at,n.nb_tokens=t.nb_tokens,n.finished_generating_at=t.finished_generating_at,this.extractHtml();else if(t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_STEP||t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_STEP_START||t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_STEP_END_SUCCESS||t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_STEP_END_FAILURE)Array.isArray(t.steps)?(console.log("Received steps:",t.steps),n.status_message=t.steps[t.steps.length-1].text,n.steps=t.steps):console.error("Invalid steps data:",t.steps);else if(t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_JSON_INFOS)if(typeof t.metadata=="string")try{n.metadata=JSON.parse(t.metadata)}catch(r){console.error("Error parsing metadata string:",r),n.metadata={raw:t.metadata}}else Array.isArray(t.metadata)||typeof t.metadata=="object"?n.metadata=t.metadata:n.metadata={value:t.metadata};else t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_UI?n.ui=t.ui:t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_EXCEPTION&&this.$store.state.toast.showToast(t.content,5,!1)}this.$nextTick(()=>{Ze.replace()})},async changeTitleUsingUserMSG(t,e){const n=this.discussionsList.findIndex(i=>i.id==t),r=this.discussionsList[n];e&&(r.title=e,this.tempList=this.discussionsList,await this.edit_title(t,e))},async createNewDiscussion(){this.new_discussion(null)},loadLastUsedDiscussion(){const t=localStorage.getItem("selected_discussion");if(t){const e=this.discussionsList.findIndex(r=>r.id==t),n=this.discussionsList[e];n&&this.selectDiscussion(n)}},onCopyPersonalityName(t){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(t.name)},async deleteDiscussion(t){await this.delete_discussion(t),this.currentDiscussion.id==t&&(this.currentDiscussion={},this.discussionArr=[],this.setPageTitle()),this.discussionsList.splice(this.discussionsList.findIndex(e=>e.id==t),1),this.createDiscussionList(this.discussionsList)},async deleteDiscussionMulti(){const t=this.selectedDiscussions;for(let e=0;er.id==n.id),1)}this.tempList=this.discussionsList,this.isCheckbox=!1,this.$store.state.toast.showToast("Removed ("+t.length+") items",4,!0),this.showConfirmation=!1},async deleteMessage(t){await this.delete_message(t).then(()=>{this.discussionArr.splice(this.discussionArr.findIndex(e=>e.id==t),1)}).catch(()=>{this.$store.state.toast.showToast("Could not remove message",4,!1),console.log("Error: Could not delete message")})},async openFolder(t){const e=JSON.stringify({client_id:this.$store.state.client_id,discussion_id:t.id});await Qe.post("/open_discussion_folder",e,{method:"POST",headers:{"Content-Type":"application/json"}})},async editTitle(t){const e=this.discussionsList.findIndex(r=>r.id==t.id),n=this.discussionsList[e];n.title=t.title,n.loading=!0,await this.edit_title(t.id,t.title),n.loading=!1},async makeTitle(t){this.discussionsList.findIndex(e=>e.id==t.id),await this.make_title(t.id)},checkUncheckDiscussion(t,e){const n=this.discussionsList.findIndex(i=>i.id==e),r=this.discussionsList[n];r.checkBoxValue=t.target.checked,this.tempList=this.discussionsList},selectAllDiscussions(){this.isSelectAll=!this.tempList.filter(t=>t.checkBoxValue==!1).length>0;for(let t=0;t({id:n.id,title:n.title,selected:!1,loading:!1,checkBoxValue:!1})).sort(function(n,r){return r.id-n.id});this.discussionsList=e,this.tempList=e}},setDiscussionLoading(t,e){try{const n=this.discussionsList.findIndex(i=>i.id==t),r=this.discussionsList[n];r.loading=e}catch{console.log("Error setting discussion loading")}},setPageTitle(t){if(t)if(t.id){const e=t.title?t.title==="untitled"?"New discussion":t.title:"New discussion";document.title="L🌟LLMS WebUI - "+e}else{const e=t||"Welcome";document.title="L🌟LLMS WebUI - "+e}else{const e=t||"Welcome";document.title="L🌟LLMS WebUI - "+e}},async rankUpMessage(t){await this.message_rank_up(t).then(e=>{const n=this.discussionArr[this.discussionArr.findIndex(r=>r.id==t)];n.rank=e.new_rank}).catch(()=>{this.$store.state.toast.showToast("Could not rank up message",4,!1),console.log("Error: Could not rank up message")})},async rankDownMessage(t){await this.message_rank_down(t).then(e=>{const n=this.discussionArr[this.discussionArr.findIndex(r=>r.id==t)];n.rank=e.new_rank}).catch(()=>{this.$store.state.toast.showToast("Could not rank down message",4,!1),console.log("Error: Could not rank down message")})},async updateMessage(t,e,n){await this.edit_message(t,e,n).then(()=>{const r=this.discussionArr[this.discussionArr.findIndex(i=>i.id==t)];r.content=e}).catch(()=>{this.$store.state.toast.showToast("Could not update message",4,!1),console.log("Error: Could not update message")})},resendMessage(t,e,n){ze(()=>{Ze.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Qe.get("/get_generation_status",{}).then(r=>{r&&(r.data.status?(this.$store.state.toast.showToast("The server is busy. Wait",4,!1),console.log("Already generating")):tt.emit("generate_msg_from",{prompt:e,id:t,msg_type:n}))}).catch(r=>{console.log("Error: Could not get generation status",r)})},continueMessage(t,e){ze(()=>{Ze.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Qe.get("/get_generation_status",{}).then(n=>{n&&(n.data.status?console.log("Already generating"):tt.emit("continue_generate_msg_from",{prompt:e,id:t}))}).catch(n=>{console.log("Error: Could not get generation status",n)})},stopGenerating(){this.stop_gen(),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),ze(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)})},finalMsgEvent(t){let e=0;this.discussion_id=t.discussion_id,this.currentDiscussion.id==this.discussion_id&&(e=this.discussionArr.findIndex(r=>r.id==t.id),this.discussionArr[e].content=t.content,this.discussionArr[e].finished_generating_at=t.finished_generating_at,this.discussionArr[e].nb_tokens=t.nb_tokens,this.discussionArr[e].binding=t.binding,this.discussionArr[e].model=t.model,this.discussionArr[e].personality=t.personality),ze(()=>{const r=document.getElementById("messages-list");this.scrollBottom(r),this.recoverFiles()}),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),this.chime.play(),e=this.discussionArr.findIndex(r=>r.id==t.id);const n=this.discussionArr[e];if(n.status_message="Done",this.$store.state.config.auto_speak&&this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode){e=this.discussionArr.findIndex(i=>i.id==t.id);let r=this.$refs["msg-"+t.id][0];console.log(r),r.speak()}},copyToClipBoard(t){let e="";if(t.message.content&&(e=t.message.content),this.$store.state.config.copy_to_clipboard_add_all_details){let n="";t.message.binding&&(n=`Binding: ${t.message.binding}`);let r="";t.message.personality&&(r=` + Endpoint error: `+r.message,4,!1),this.isLoading=!1}})}else this.$store.state.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1})}catch(t){this.isLoading=!1,this.$store.state.toast.showToast("Could not open binding settings. Endpoint error: "+t.message,4,!1)}},showDatabaseSelector(){this.database_selectorDialogVisible=!0},async ondatabase_selectorDialogRemoved(t){console.log("Deleted:",t)},async ondatabase_selectorDialogSelected(t){console.log("Selected:",t)},onclosedatabase_selectorDialog(){this.database_selectorDialogVisible=!1},async onvalidatedatabase_selectorChoice(t){this.database_selectorDialogVisible=!1;const e={client_id:this.client_id,name:typeof t=="string"?t:t.name};if((await Qe.post("/select_database",e,{headers:this.posts_headers})).status){this.$store.state.config=await Qe.post("/get_config",{client_id:this.client_id});let r=await Qe.get("/list_databases").data;this.$store.state.databases=r,location.reload()}},async addDiscussion2SkillsLibrary(){(await Qe.post("/add_discussion_to_skills_library",{client_id:this.client_id},{headers:this.posts_headers})).status&&console.log("done")},async toggleSkillsLib(){this.$store.state.config.activate_skills_lib=!this.$store.state.config.activate_skills_lib,await this.applyConfiguration()},async showSkillsLib(){this.$refs.skills_lib.showSkillsLibrary()},async applyConfiguration(){this.loading=!0;const t=await Qe.post("/apply_settings",{client_id:this.$store.state.client_id,config:this.$store.state.config});this.loading=!1,t.data.status?this.$store.state.toast.showToast("Configuration changed successfully.",4,!0):this.$store.state.toast.showToast("Configuration change failed.",4,!1),ze(()=>{Ze.replace()})},save_configuration(){this.showConfirmation=!1,Qe.post("/save_settings",{}).then(t=>{if(t)return t.status?this.$store.state.toast.showToast("Settings saved!",4,!0):this.$store.state.messageBox.showMessage("Error: Couldn't save settings!"),t.data}).catch(t=>(this.$store.state.messageBox.showMessage("Couldn't save settings!"),{status:!1}))},showToastMessage(t,e,n){this.$store.state.toast.showToast(t,e,n)},toggleDropdown(){this.isOpen=!this.isOpen},importChatGPT(){},async api_get_req(t){try{const e=await Qe.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req");return}},async list_discussions(){try{const t=await Qe.get("/list_discussions");if(t)return this.createDiscussionList(t.data),t.data}catch(t){return console.log("Error: Could not list discussions",t.message),[]}},load_discussion(t,e){t&&(this.loading=!0,this.discussionArr=[],this.setDiscussionLoading(t,this.loading),Je.on("discussion",n=>{this.loading=!1,this.setDiscussionLoading(t,this.loading),n&&(this.discussionArr=n.filter(r=>r.message_type==this.msgTypes.MSG_TYPE_CONTENT||r.message_type==this.msgTypes.MSG_TYPE_CONTENT_INVISIBLE_TO_AI),this.discussionArr.forEach(r=>{r.status_message="Done"}),e&&e()),Je.off("discussion"),this.extractHtml()}),Je.emit("load_discussion",{id:t}))},recoverFiles(){Qe.post("/get_discussion_files_list",{client_id:this.$store.state.client_id}).then(t=>{this.$refs.chatBox.filesList=t.data.files,this.$refs.chatBox.isFileSentList=t.data.files.map(e=>!0)})},new_discussion(t){try{this.loading=!0,Je.on("discussion_created",e=>{Je.off("discussion_created"),this.list_discussions().then(()=>{const n=this.discussionsList.findIndex(i=>i.id==e.id),r=this.discussionsList[n];this.selectDiscussion(r),this.load_discussion(e.id,()=>{this.loading=!1,this.recoverFiles(),ze(()=>{const i=document.getElementById("dis-"+e.id);this.scrollToElement(i),console.log("Scrolling tp "+i)})})})}),Je.emit("new_discussion",{title:t})}catch(e){return console.log("Error: Could not create new discussion",e.message),{}}},async delete_discussion(t){try{t&&(this.loading=!0,this.setDiscussionLoading(t,this.loading),await Qe.post("/delete_discussion",{client_id:this.client_id,id:t},{headers:this.posts_headers}),this.loading=!1,this.setDiscussionLoading(t,this.loading))}catch(e){console.log("Error: Could not delete discussion",e.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async edit_title(t,e){try{if(t){this.loading=!0,this.setDiscussionLoading(t,this.loading);const n=await Qe.post("/edit_title",{client_id:this.client_id,id:t,title:e},{headers:this.posts_headers});if(this.loading=!1,this.setDiscussionLoading(t,this.loading),n.status==200){const r=this.discussionsList.findIndex(o=>o.id==t),i=this.discussionsList[r];i.title=e,this.tempList=this.discussionsList}}}catch(n){console.log("Error: Could not edit title",n.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async make_title(t){try{if(t){this.loading=!0,this.setDiscussionLoading(t,this.loading);const e=await Qe.post("/make_title",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(this.loading=!1,this.setDiscussionLoading(t,this.loading),e.status==200){const n=this.discussionsList.findIndex(i=>i.id==t),r=this.discussionsList[n];r.title=e.data.title,this.tempList=this.discussionsList}}}catch(e){console.log("Error: Could not edit title",e.message),this.loading=!1,this.setDiscussionLoading(t,this.loading)}},async delete_message(t){try{const e=await Qe.post("/delete_message",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could delete message",e.message),{}}},async stop_gen(){try{if(this.discussionArr.length>0){const t=this.discussionArr[this.discussionArr.length-1];t.status_message="Generation canceled"}if(Je.emit("cancel_generation"),res)return res.data}catch(t){return console.log("Error: Could not stop generating",t.message),{}}},async message_rank_up(t){try{const e=await Qe.post("/message_rank_up",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank up message",e.message),{}}},async message_rank_down(t){try{const e=await Qe.post("/message_rank_down",{client_id:this.client_id,id:t},{headers:this.posts_headers});if(e)return e.data}catch(e){return console.log("Error: Could not rank down message",e.message),{}}},async edit_message(t,e,n){try{const r=await Qe.post("/edit_message",{client_id:this.client_id,id:t,message:e,metadata:[{audio_url:n}]},{headers:this.posts_headers});if(r)return r.data}catch(r){return console.log("Error: Could not update message",r.message),{}}},async export_multiple_discussions(t,e){try{if(t.length>0){const n=await Qe.post("/export_multiple_discussions",{client_id:this.$store.state.client_id,discussion_ids:t,export_format:e},{headers:this.posts_headers});if(n)return n.data}}catch(n){return console.log("Error: Could not export multiple discussions",n.message),{}}},async import_multiple_discussions(t){try{if(t.length>0){const e=await Qe.post("/import_multiple_discussions",{client_id:this.$store.state.client_id,jArray:t},{headers:this.posts_headers});if(e)return e.data}}catch(e){console.log("Error: Could not import multiple discussions",e.message);return}},handleSearch(){this.filterTitle.trim()&&(this.isSearching=!0,clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.filterDiscussions(),this.isSearching=!1},300))},clearSearch(){this.filterTitle="",this.searchResults=[]},filterDiscussions(){this.filterInProgress||(this.filterInProgress=!0,setTimeout(()=>{this.filterTitle?this.discussionsList=this.tempList.filter(t=>t.title&&t.title.includes(this.filterTitle)):this.discussionsList=this.tempList,this.filterInProgress=!1},100))},async selectDiscussion(t){if(this.isGenerating){this.$store.state.toast.showToast("You are currently generating a text. Please wait for text generation to finish or stop it before trying to select another discussion",4,!1);return}t&&(this.currentDiscussion===void 0?(this.currentDiscussion=t,this.setPageTitle(t),localStorage.setItem("selected_discussion",this.currentDiscussion.id),localStorage.getItem("selected_discussion"),this.load_discussion(t.id,()=>{this.discussionArr.length>1&&((this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content),this.recoverFiles())})):this.currentDiscussion.id!=t.id&&(this.currentDiscussion=t,this.setPageTitle(t),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(t.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content),this.recoverFiles()})),ze(()=>{const e=document.getElementById("dis-"+this.currentDiscussion.id);this.scrollToElementInContainer(e,"leftPanel");const n=document.getElementById("messages-list");this.scrollBottom(n)}))},scrollToElement(t){t?t.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}):console.log("Error: scrollToElement")},scrollToElementInContainer(t,e){try{const n=t.offsetTop;document.getElementById(e).scrollTo({top:n,behavior:"smooth"})}catch{console.log("error")}},scrollBottom(t){t?t.scrollTo({top:t.scrollHeight,behavior:"smooth"}):console.log("Error: scrollBottom")},scrollTop(t){t?t.scrollTo({top:0,behavior:"smooth"}):console.log("Error: scrollTop")},createUserMsg(t){let e={content:t.message,id:t.id,rank:0,sender:t.user,created_at:t.created_at,steps:[],html_js_s:[],status_message:"Warming up"};this.discussionArr.push(e),ze(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)})},updateLastUserMsg(t){const e=this.discussionArr.indexOf(r=>r.id=t.user_id),n={binding:t.binding,content:t.message,created_at:t.created_at,type:t.type,finished_generating_at:t.finished_generating_at,id:t.user_id,model:t.model,personality:t.personality,sender:t.user,steps:[]};e!==-1&&(this.discussionArr[e]=n)},async socketIOConnected(){console.log("socketIOConnected")},socketIODisconnected(){return console.log("socketIOConnected"),this.currentDiscussion=null,this.$store.dispatch("refreshModels"),this.$store.state.isConnected=!1,!0},new_message(t){t.sender_type==this.SENDER_TYPES_AI&&(this.isGenerating=!0);let e={sender:t.sender,message_type:t.message_type,sender_type:t.sender_type,content:t.content,id:t.id,discussion_id:t.discussion_id,parent_id:t.parent_id,binding:t.binding,model:t.model,personality:t.personality,created_at:t.created_at,finished_generating_at:t.finished_generating_at,rank:0,ui:t.ui,steps:[],parameters:t.parameters,metadata:t.metadata,open:t.open};e.status_message="Warming up",this.discussionArr.push(e),ze(()=>{const n=document.getElementById("messages-list");this.scrollBottom(n)}),(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,t.message)},async talk(t){this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating);let e=await Qe.get("/get_generation_status",{});if(e)if(e.data.status)console.log("Already generating");else{const n=this.$store.state.config.personalities.findIndex(i=>i===t.full_path),r={client_id:this.$store.state.client_id,id:n};e=await Qe.post("/select_personality",r),Je.emit("generate_msg_from",{id:-1})}},createEmptyUserMessage(t){Je.emit("create_empty_message",{type:0,message:t})},createEmptyAIMessage(){Je.emit("create_empty_message",{type:1})},sendMsg(t,e){if(!t){this.$store.state.toast.showToast("Message contains no content!",4,!1);return}this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Qe.get("/get_generation_status",{}).then(n=>{if(n)if(n.data.status)console.log("Already generating");else{e=="internet"?Je.emit("generate_msg_with_internet",{prompt:t}):Je.emit("generate_msg",{prompt:t});let r=0;this.discussionArr.length>0&&(r=Number(this.discussionArr[this.discussionArr.length-1].id)+1);let i={message:t,id:r,rank:0,user:this.$store.state.config.user_name,created_at:new Date().toLocaleString(),sender:this.$store.state.config.user_name,message_type:this.operationTypes.MSG_TYPE_CONTENT,sender_type:this.senderTypes.SENDER_TYPES_USER,content:t,id:r,discussion_id:this.discussion_id,parent_id:r,binding:"",model:"",personality:"",created_at:new Date().toLocaleString(),finished_generating_at:new Date().toLocaleString(),rank:0,steps:[],parameters:null,metadata:[],ui:null};this.createUserMsg(i)}}).catch(n=>{console.log("Error: Could not get generation status",n)})},sendCmd(t){this.isGenerating=!0,Je.emit("execute_command",{command:t,parameters:[]})},notify(t){self.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),ze(()=>{const e=document.getElementById("messages-list");this.scrollBottom(e)}),t.display_type==0?this.$store.state.toast.showToast(t.content,t.duration,t.notification_type):t.display_type==1?this.$store.state.messageBox.showMessage(t.content):t.display_type==2?(this.$store.state.messageBox.hideMessage(),this.$store.state.yesNoDialog.askQuestion(t.content,"Yes","No").then(e=>{Je.emit("yesNoRes",{yesRes:e})})):t.display_type==3?this.$store.state.messageBox.showBlockingMessage(t.content):t.display_type==4&&this.$store.state.messageBox.hideMessage(),this.chime.play()},update_message(t){if(this.discussion_id=t.discussion_id,this.setDiscussionLoading(this.discussion_id,!0),this.currentDiscussion.id==this.discussion_id){const e=this.discussionArr.findIndex(r=>r.id==t.id),n=this.discussionArr[e];if(n&&(t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_SET_CONTENT||t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_SET_CONTENT_INVISIBLE_TO_AI))this.isGenerating=!0,n.content=t.content,n.created_at=t.created_at,n.started_generating_at=t.started_generating_at,n.nb_tokens=t.nb_tokens,n.finished_generating_at=t.finished_generating_at,this.extractHtml();else if(n&&t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_ADD_CHUNK)this.isGenerating=!0,n.content+=t.content,n.created_at=t.created_at,n.started_generating_at=t.started_generating_at,n.nb_tokens=t.nb_tokens,n.finished_generating_at=t.finished_generating_at,this.extractHtml();else if(t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_STEP||t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_STEP_START||t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_STEP_END_SUCCESS||t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_STEP_END_FAILURE)Array.isArray(t.steps)?(console.log("Received steps:",t.steps),n.status_message=t.steps[t.steps.length-1].text,n.steps=t.steps):console.error("Invalid steps data:",t.steps);else if(t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_JSON_INFOS)if(typeof t.metadata=="string")try{n.metadata=JSON.parse(t.metadata)}catch(r){console.error("Error parsing metadata string:",r),n.metadata={raw:t.metadata}}else Array.isArray(t.metadata)||typeof t.metadata=="object"?n.metadata=t.metadata:n.metadata={value:t.metadata};else t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_UI?n.ui=t.ui:t.operation_type==this.operationTypes.MSG_OPERATION_TYPE_EXCEPTION&&this.$store.state.toast.showToast(t.content,5,!1)}this.$nextTick(()=>{Ze.replace()})},async changeTitleUsingUserMSG(t,e){const n=this.discussionsList.findIndex(i=>i.id==t),r=this.discussionsList[n];e&&(r.title=e,this.tempList=this.discussionsList,await this.edit_title(t,e))},async createNewDiscussion(){this.new_discussion(null)},loadLastUsedDiscussion(){const t=localStorage.getItem("selected_discussion");if(t){const e=this.discussionsList.findIndex(r=>r.id==t),n=this.discussionsList[e];n&&this.selectDiscussion(n)}},onCopyPersonalityName(t){this.$store.state.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(t.name)},async deleteDiscussion(t){await this.delete_discussion(t),this.currentDiscussion.id==t&&(this.currentDiscussion={},this.discussionArr=[],this.setPageTitle()),this.discussionsList.splice(this.discussionsList.findIndex(e=>e.id==t),1),this.createDiscussionList(this.discussionsList)},async deleteDiscussionMulti(){const t=this.selectedDiscussions;for(let e=0;er.id==n.id),1)}this.tempList=this.discussionsList,this.isCheckbox=!1,this.$store.state.toast.showToast("Removed ("+t.length+") items",4,!0),this.showConfirmation=!1},async deleteMessage(t){await this.delete_message(t).then(()=>{this.discussionArr.splice(this.discussionArr.findIndex(e=>e.id==t),1)}).catch(()=>{this.$store.state.toast.showToast("Could not remove message",4,!1),console.log("Error: Could not delete message")})},async openFolder(t){const e=JSON.stringify({client_id:this.$store.state.client_id,discussion_id:t.id});await Qe.post("/open_discussion_folder",e,{method:"POST",headers:{"Content-Type":"application/json"}})},async editTitle(t){const e=this.discussionsList.findIndex(r=>r.id==t.id),n=this.discussionsList[e];n.title=t.title,n.loading=!0,await this.edit_title(t.id,t.title),n.loading=!1},async makeTitle(t){this.discussionsList.findIndex(e=>e.id==t.id),await this.make_title(t.id)},checkUncheckDiscussion(t,e){const n=this.discussionsList.findIndex(i=>i.id==e),r=this.discussionsList[n];r.checkBoxValue=t.target.checked,this.tempList=this.discussionsList},selectAllDiscussions(){this.isSelectAll=!this.tempList.filter(t=>t.checkBoxValue==!1).length>0;for(let t=0;t({id:n.id,title:n.title,selected:!1,loading:!1,checkBoxValue:!1})).sort(function(n,r){return r.id-n.id});this.discussionsList=e,this.tempList=e}},setDiscussionLoading(t,e){try{const n=this.discussionsList.findIndex(i=>i.id==t),r=this.discussionsList[n];r.loading=e}catch{console.log("Error setting discussion loading")}},setPageTitle(t){if(t)if(t.id){const e=t.title?t.title==="untitled"?"New discussion":t.title:"New discussion";document.title="L🌟LLMS WebUI - "+e}else{const e=t||"Welcome";document.title="L🌟LLMS WebUI - "+e}else{const e=t||"Welcome";document.title="L🌟LLMS WebUI - "+e}},async rankUpMessage(t){await this.message_rank_up(t).then(e=>{const n=this.discussionArr[this.discussionArr.findIndex(r=>r.id==t)];n.rank=e.new_rank}).catch(()=>{this.$store.state.toast.showToast("Could not rank up message",4,!1),console.log("Error: Could not rank up message")})},async rankDownMessage(t){await this.message_rank_down(t).then(e=>{const n=this.discussionArr[this.discussionArr.findIndex(r=>r.id==t)];n.rank=e.new_rank}).catch(()=>{this.$store.state.toast.showToast("Could not rank down message",4,!1),console.log("Error: Could not rank down message")})},async updateMessage(t,e,n){await this.edit_message(t,e,n).then(()=>{const r=this.discussionArr[this.discussionArr.findIndex(i=>i.id==t)];r.content=e}).catch(()=>{this.$store.state.toast.showToast("Could not update message",4,!1),console.log("Error: Could not update message")})},resendMessage(t,e,n){ze(()=>{Ze.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Qe.get("/get_generation_status",{}).then(r=>{r&&(r.data.status?(this.$store.state.toast.showToast("The server is busy. Wait",4,!1),console.log("Already generating")):Je.emit("generate_msg_from",{prompt:e,id:t,msg_type:n}))}).catch(r=>{console.log("Error: Could not get generation status",r)})},continueMessage(t,e){ze(()=>{Ze.replace()}),this.isGenerating=!0,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),Qe.get("/get_generation_status",{}).then(n=>{n&&(n.data.status?console.log("Already generating"):Je.emit("continue_generate_msg_from",{prompt:e,id:t}))}).catch(n=>{console.log("Error: Could not get generation status",n)})},stopGenerating(){this.stop_gen(),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),ze(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)})},finalMsgEvent(t){let e=0;this.discussion_id=t.discussion_id,this.currentDiscussion.id==this.discussion_id&&(e=this.discussionArr.findIndex(r=>r.id==t.id),this.discussionArr[e].content=t.content,this.discussionArr[e].finished_generating_at=t.finished_generating_at,this.discussionArr[e].nb_tokens=t.nb_tokens,this.discussionArr[e].binding=t.binding,this.discussionArr[e].model=t.model,this.discussionArr[e].personality=t.personality),ze(()=>{const r=document.getElementById("messages-list");this.scrollBottom(r),this.recoverFiles()}),this.isGenerating=!1,this.setDiscussionLoading(this.currentDiscussion.id,this.isGenerating),this.chime.play(),e=this.discussionArr.findIndex(r=>r.id==t.id);const n=this.discussionArr[e];if(n.status_message="Done",this.$store.state.config.auto_speak&&this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode){e=this.discussionArr.findIndex(i=>i.id==t.id);let r=this.$refs["msg-"+t.id][0];console.log(r),r.speak()}},copyToClipBoard(t){let e="";if(t.message.content&&(e=t.message.content),this.$store.state.config.copy_to_clipboard_add_all_details){let n="";t.message.binding&&(n=`Binding: ${t.message.binding}`);let r="";t.message.personality&&(r=` Personality: ${t.message.personality}`);let i="";t.created_at_parsed&&(i=` Created: ${t.created_at_parsed}`);let o="";t.message.model&&(o=`Model: ${t.message.model}`);let s="";t.message.seed&&(s=`Seed: ${t.message.seed}`);let a="";t.time_spent&&(a=` Time spent: ${t.time_spent}`);let l="";l=`${n} ${o} ${s} ${a}`.trim();const c=`${t.message.sender}${r}${i} @@ -410,15 +410,15 @@ ${e} ${l}`;navigator.clipboard.writeText(c)}else navigator.clipboard.writeText(e);this.$store.state.toast.showToast("Copied to clipboard successfully",4,!0),ze(()=>{Ze.replace()})},closeToast(){this.showToast=!1},saveJSONtoFile(t,e){e=e||"data.json";const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([JSON.stringify(t,null,2)],{type:"text/plain"})),n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n)},saveMarkdowntoFile(t,e){e=e||"data.md";const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([t],{type:"text/plain"})),n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n)},parseJsonObj(t){try{return JSON.parse(t)}catch(e){return this.$store.state.toast.showToast(`Could not parse JSON. `+e.message,4,!1),null}},async parseJsonFile(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=i=>e(this.parseJsonObj(i.target.result)),r.onerror=i=>n(i),r.readAsText(t)})},async exportDiscussionsAsMarkdown(){const t=this.discussionsList.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(t.length>0){let e=new Date;const n=e.getFullYear(),r=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),c="discussions_export_"+(n+"."+r+"."+i+"."+o+s+a)+".md";this.loading=!0;const u=await this.export_multiple_discussions(t,"markdown");u?(this.saveMarkdowntoFile(u,c),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 t=this.discussionsList.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(t.length>0){let e=new Date;const n=e.getFullYear(),r=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),c="discussions_export_"+(n+"."+r+"."+i+"."+o+s+a)+".json";this.loading=!0;const u=await this.export_multiple_discussions(t,"json");u?(this.saveJSONtoFile(u,c),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(t){},async importDiscussions(t){const e=await this.parseJsonFile(t.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 t=this.$store.state.personalities;this.personalityAvatars=t.map(e=>({name:e.name,avatar:e.avatar}))},getAvatar(t){if(t.toLowerCase().trim()==this.$store.state.config.user_name.toLowerCase().trim())return"user_infos/"+this.$store.state.config.user_avatar;const e=this.personalityAvatars.findIndex(r=>r.name===t),n=this.personalityAvatars[e];if(n)return n.avatar},setFileListChat(t){try{this.$refs.chatBox.fileList=this.$refs.chatBox.fileList.concat(t)}catch(e){this.$store.state.toast.showToast(`Failed to set filelist in chatbox -`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(t){if(t.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(t[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 Qe.get("/get_versionID")).data.versionId;tt.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(()=>{Ze.replace()});try{this.$store.state.loading_infos="Getting version",this.$store.state.loading_progress=30,await this.$store.dispatch("getVersion")}catch(n){console.log("Error cought:",n)}try{for(this.$store.state.loading_infos="Loading Configuration";tt.id===void 0;)await new Promise(n=>setTimeout(n,100));this.$store.state.client_id=tt.id,await this.$store.dispatch("refreshConfig")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Loading Database",this.$store.state.loading_progress=20,await this.$store.dispatch("refreshDatabase")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting Bindings list",this.$store.state.loading_progress=40,await this.$store.dispatch("refreshBindings")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting personalities zoo",this.$store.state.loading_progress=70,await this.$store.dispatch("refreshPersonalitiesZoo")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting mounted personalities",this.$store.state.loading_progress=80,await this.$store.dispatch("refreshMountedPersonalities")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting models zoo",this.$store.state.loading_progress=90,await this.$store.dispatch("refreshModelsZoo")}catch(n){console.log("Error cought:",n)}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(n){console.log("Error cought:",n)}try{await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage")}catch(n){console.log("Error cought:",n)}try{await this.$store.dispatch("fetchisRTOn")}catch(n){console.log("Error cought:",n)}this.$store.state.isConnected=!0,this.$store.state.client_id=tt.id,this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),this.isCreated=!0,this.$store.state.ready=!0,tt.on("connected",this.socketIOConnected),tt.on("disconnected",this.socketIODisconnected),tt.on("show_progress",this.show_progress),tt.on("hide_progress",this.hide_progress),tt.on("update_progress",this.update_progress),tt.on("notification",this.notify),tt.on("new_message",this.new_message),tt.on("update_message",this.update_message),tt.on("close_message",this.finalMsgEvent),tt.on("disucssion_renamed",n=>{const r=this.discussionsList.findIndex(o=>o.id==n.discussion_id),i=this.discussionsList[r];i.title=n.title}),tt.onclose=n=>{this.socketIODisconnected()},tt.on("connect_error",n=>{n.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",n),this.$store.state.isConnected=!1}),tt.onerror=n=>{console.log("WebSocket connection error:",n.code,n.reason),this.socketIODisconnected(),tt.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),tt.on("refresh_files",()=>{this.recoverFiles()})},async activated(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&ze(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)}),this.$store.state.config.show_news_panel&&this.$store.state.news.show()},components:{Discussion:kb,Message:oU,ChatBox:sU,WelcomeComponent:aU,ChoiceDialog:Ib,ProgressBar:ub,InputBox:Err,SkillsLibraryViewer:rU,PersonalityEditor:QU,PopupViewer:vU,ActionButton:FH,SocialIcon:$H,MountedPersonalities:yU,ChatBarButton:_9},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},"$store.state.config.fun_mode":function(t,e){},"$store.state.isConnected":function(t,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()),ze(()=>{Ze.replace()})},messages:{handler:"extractHtml",deep:!0},progress_visibility_val(t){console.log("progress_visibility changed to "+t)},filterTitle(t){t==""&&(this.filterInProgress=!0,this.discussionsList=this.tempList,this.filterInProgress=!1)},isCheckbox(t){ze(()=>{Ze.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){ze(()=>{Ze.replace()})}},computed:{parsedPlaceholders(){const t=new Map;return this.placeholders.forEach(e=>{const n=W1r(e);t.set(n.fullText,n)}),Array.from(t.values())},filteredBindings(){return this.installedBindings.filter(t=>t.name.toLowerCase().includes(this.bindingSearchQuery.toLowerCase()))},filteredModels(){return this.installedModels.filter(t=>t.name.toLowerCase().includes(this.modelSearchQuery.toLowerCase()))},filteredPersonalities(){return this.mountedPersonalities.filter(t=>t.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?co:this.$store.state.config.app_custom_logo!=""?"/user_infos/"+this.$store.state.config.app_custom_logo:co},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(t){return console.error("Oopsie! Looks like we hit a snag: ",t),!1}},isModelOK(){return this.$store.state.isModelOk},isGenerating(){return this.$store.state.isGenerating},isConnected(){return this.$store.state.isConnected},...pW({versionId:t=>t.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(t){this.$store.state.isModelOk=t}},isGenerating:{get(){return this.$store.state.isGenerating},set(t){this.$store.state.isGenerating=t}},personality(){const t=this.$store.state.config.personalities[this.$store.state.config.active_personality_id].split(":")[0];return this.$store.state.personalities.find(n=>n.full_path===t)},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 tt.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 ze(()=>{Ze.replace()}),this.discussionsList.filter(t=>t.checkBoxValue==!0)}}},Z1r=Object.assign(K1r,{__name:"DiscussionsView",setup(t){return Zo(()=>{_U()}),Qe.defaults.baseURL="/",(e,n)=>(k(),H(Ue,null,[oe(qi,{name:"fade-and-fly"},{default:He(()=>[e.isReady?re("",!0):(k(),H("div",qsr,[e.$store.state.theme_vars.activate_dropping_animation?(k(),H("div",zsr,[(k(),H(Ue,null,ot(50,r=>g("div",{key:r,class:"absolute animate-fall animate-giggle",style:xn({left:`${Math.random()*100}%`,top:"-20px",animationDuration:`${3+Math.random()*7}s`,animationDelay:`${Math.random()*5}s`})},le(e.$store.state.theme_vars.falling_object),5)),64))])):re("",!0),g("div",jsr,[g("div",Wsr,[g("div",Ysr,le(e.$store.state.theme_vars.lollms_title),1),n[61]||(n[61]=g("p",{class:"text-2xl italic"}," One tool to rule them all ",-1)),n[62]||(n[62]=g("p",{class:"text-xl mb-6"}," by ParisNeo ",-1)),g("p",Ksr,le(e.version_info),1),g("div",{class:"interesting-facts transition-transform duration-300 cursor-pointer",onClick:n[0]||(n[0]=(...r)=>e.updateRandomFact&&e.updateRandomFact(...r))},[g("p",Zsr,[n[60]||(n[60]=g("span",{class:"font-semibold"},"🤔 Fun Fact: ",-1)),g("span",{innerHTML:e.randomFact},null,8,Xsr)])]),g("div",Jsr,[g("div",{class:"animated-progressbar-fg",style:xn({width:`${e.loading_progress}%`})},null,4),g("div",{class:"absolute top-0 h-full flex items-center transition-all duration-300",style:xn({left:`${e.loading_progress}%`,transform:"translateX(-50%)"})},null,4)])]),g("div",ear,[g("div",tar,[g("p",nar,le(e.loading_infos)+"... ",1),g("p",rar,le(Math.round(e.loading_progress))+"% ",1)])])])]))]),_:1}),oe(qi,{name:"slide-right"},{default:He(()=>[e.showLeftPanel?(k(),H("div",iar,[oe(Bt(Qu),{to:{name:"discussions"},class:"flex items-center space-x-2"},{default:He(()=>[g("div",oar,[g("img",{class:"w-12 h-12 rounded-full object-cover logo-image",src:e.$store.state.config==null?Bt(co):e.$store.state.config.app_custom_logo!=""?"/user_infos/"+e.$store.state.config.app_custom_logo:Bt(co),alt:"Logo",title:"LoLLMS WebUI"},null,8,sar)]),n[63]||(n[63]=g("div",{class:"flex flex-col justify-center"},[g("div",{class:"text-center p-2"},[g("div",{class:"text-md relative inline-block"},[g("span",{class:"relative inline-block font-bold tracking-wide text-black dark:text-white"}," LoLLMS "),g("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"})])]),g("p",{class:"text-gray-400 text-sm"},"One tool to rule them all")],-1))]),_:1}),g("div",aar,[g("div",lar,[g("button",{class:"toolbar-button",title:"Create new discussion",onClick:n[1]||(n[1]=(...r)=>e.createNewDiscussion&&e.createNewDiscussion(...r))},n[64]||(n[64]=[g("i",{"data-feather":"plus"},null,-1)])),e.loading?re("",!0):(k(),H("div",{key:0,class:"toolbar-button",onMouseleave:n[8]||(n[8]=(...r)=>e.hideSkillsLibraryMenu&&e.hideSkillsLibraryMenu(...r))},[J(g("div",{onMouseenter:n[6]||(n[6]=(...r)=>e.showSkillsLibraryMenu&&e.showSkillsLibraryMenu(...r)),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"},[g("div",car,[e.loading?re("",!0):(k(),H("button",{key:0,type:"button",onClick:n[2]||(n[2]=he((...r)=>e.addDiscussion2SkillsLibrary&&e.addDiscussion2SkillsLibrary(...r),["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"},n[65]||(n[65]=[g("i",{"data-feather":"plus"},null,-1)]))),!e.loading&&e.$store.state.config.activate_skills_lib?(k(),H("button",{key:1,type:"button",onClick:n[3]||(n[3]=he((...r)=>e.toggleSkillsLib&&e.toggleSkillsLib(...r),["stop"])),title:"Skills database is activated",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[66]||(n[66]=[g("i",{"data-feather":"check-circle"},null,-1)]))):re("",!0),!e.loading&&!e.$store.state.config.activate_skills_lib?(k(),H("button",{key:2,type:"button",onClick:n[4]||(n[4]=he((...r)=>e.toggleSkillsLib&&e.toggleSkillsLib(...r),["stop"])),title:"Skills database is deactivated",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[67]||(n[67]=[g("i",{"data-feather":"x-octagon"},null,-1)]))):re("",!0),e.loading?re("",!0):(k(),H("button",{key:3,type:"button",onClick:n[5]||(n[5]=he((...r)=>e.showSkillsLib&&e.showSkillsLib(...r),["stop"])),title:"Show Skills database",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[68]||(n[68]=[g("i",{"data-feather":"book"},null,-1)])))])],544),[[Pt,e.isSkillsLibraryMenuVisible]]),g("div",{onMouseenter:n[7]||(n[7]=(...r)=>e.showSkillsLibraryMenu&&e.showSkillsLibraryMenu(...r)),class:"menu-hover-area"},n[69]||(n[69]=[g("button",{class:"w-8 h-8",title:"Toggle Skills library menu"},[g("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M4 4v16h16V4H4zm2 2h12v12H6V6zm2 2h2v8H8V8zm3 0h2v8h-2V8zm3 0h2v8h-2V8z",fill:"currentColor"})])],-1)]),32)],32)),e.loading?re("",!0):(k(),H("div",{key:1,class:"toolbar-button",onMouseleave:n[22]||(n[22]=(...r)=>e.hideMenu&&e.hideMenu(...r))},[J(g("div",{onMouseenter:n[20]||(n[20]=(...r)=>e.showMenu&&e.showMenu(...r)),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"},[g("div",uar,[g("button",{class:je(["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:n[9]||(n[9]=r=>e.isCheckbox=!e.isCheckbox)},n[70]||(n[70]=[g("i",{"data-feather":"check-square"},null,-1)]),2),g("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:n[10]||(n[10]=he(()=>{},["stop"]))},n[71]||(n[71]=[g("i",{"data-feather":"trash-2"},null,-1)])),g("button",{class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95",title:"Export database",type:"button",onClick:n[11]||(n[11]=he(r=>e.database_selectorDialogVisible=!0,["stop"]))},n[72]||(n[72]=[g("i",{"data-feather":"database"},null,-1)])),g("div",dar,[g("input",{type:"file",ref:"fileDialog",class:"hidden",onChange:n[12]||(n[12]=(...r)=>e.importDiscussions&&e.importDiscussions(...r))},null,544),g("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:n[13]||(n[13]=he(r=>e.$refs.fileDialog.click(),["stop"]))},n[73]||(n[73]=[g("i",{"data-feather":"log-in"},null,-1)]))]),g("div",far,[g("input",{type:"file",ref:"bundleLoadingDialog",class:"hidden",onChange:n[14]||(n[14]=(...r)=>e.importDiscussionsBundle&&e.importDiscussionsBundle(...r))},null,544),e.showSaveConfirmation?re("",!0):(k(),H("button",{key:0,title:"Import discussion bundle",onClick:n[15]||(n[15]=he(r=>e.$refs.bundleLoadingDialog.click(),["stop"])),class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[74]||(n[74]=[g("i",{"data-feather":"folder"},null,-1)])))]),e.loading?(k(),H("div",par,n[75]||(n[75]=[g("div",{role:"status"},[g("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"},[g("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"}),g("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"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):re("",!0),e.showSaveConfirmation?(k(),H("div",har,[g("button",{class:"text-3xl hover:text-red-500 dark:hover:text-red-400 duration-150 active:scale-95",title:"Cancel",type:"button",onClick:n[16]||(n[16]=he(r=>e.showSaveConfirmation=!1,["stop"]))},n[76]||(n[76]=[g("i",{"data-feather":"x"},null,-1)])),g("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:n[17]||(n[17]=he(r=>e.save_configuration(),["stop"]))},n[77]||(n[77]=[g("i",{"data-feather":"check"},null,-1)]))])):re("",!0),e.isOpen?(k(),H("div",Tar,[g("button",{onClick:n[18]||(n[18]=(...r)=>e.importDiscussions&&e.importDiscussions(...r)),class:"text-sm hover:text-secondary dark:hover:text-secondary-light"},"LOLLMS"),g("button",{onClick:n[19]||(n[19]=(...r)=>e.importChatGPT&&e.importChatGPT(...r)),class:"text-sm hover:text-secondary dark:hover:text-secondary-light"},"ChatGPT")])):re("",!0)])],544),[[Pt,e.isMenuVisible]]),g("div",{onMouseenter:n[21]||(n[21]=(...r)=>e.showMenu&&e.showMenu(...r)),class:"menu-hover-area"},n[78]||(n[78]=[g("button",{class:"w-8 h-8",title:"Toggle menu"},[g("i",{"data-feather":"menu"})],-1)]),32)],32)),e.loading?re("",!0):(k(),H("div",{key:2,class:"toolbar-button",onMouseleave:n[28]||(n[28]=(...r)=>e.hideBindingsMenu&&e.hideBindingsMenu(...r))},[g("div",mar,[J(g("div",{onMouseenter:n[25]||(n[25]=(...r)=>e.showBindingsMenu&&e.showBindingsMenu(...r)),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"},[g("div",gar,[J(g("input",{type:"text","onUpdate:modelValue":n[23]||(n[23]=r=>e.bindingSearchQuery=r),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),[[we,e.bindingSearchQuery]])]),g("div",_ar,[(k(!0),H(Ue,null,ot(e.filteredBindings,(r,i)=>(k(),H("div",{key:i,class:"relative group/item flex flex-col items-center"},[g("div",Qar,[g("button",{onClick:he(o=>e.setBinding(r),["prevent"]),title:r.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[g("img",{src:r.icon?r.icon:Bt(ri),onError:n[24]||(n[24]=(...o)=>Bt(ri)&&Bt(ri)(...o)),alt:r.name,class:je(["w-full h-full object-cover",{"border-2 border-secondary":r.name==e.binding_name}])},null,42,bar)],8,yar),g("span",{class:"mt-1 text-xs text-center w-full truncate",title:r.name},le(r.name),9,Ear)]),g("div",xar,[g("span",{class:"text-xs font-medium mb-2 text-center",onClick:he(o=>e.setBinding(r),["prevent"])},le(r.name),9,Sar),g("div",Lar,[g("button",{onClick:he(o=>e.showModelConfig(r),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Configure Binding"},n[79]||(n[79]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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"}),g("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,Car)])])]))),128))])],544),[[Pt,e.isBindingsMenuVisible]]),g("div",{onMouseenter:n[27]||(n[27]=(...r)=>e.showBindingsMenu&&e.showBindingsMenu(...r)),class:"bindings-hover-area"},[g("button",{onClick:n[26]||(n[26]=he(r=>e.showModelConfig(),["prevent"])),class:"w-6 h-6"},[g("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,Aar)])],32)])],32)),e.loading?re("",!0):(k(),H("div",{key:3,class:"toolbar-button",onMouseleave:n[34]||(n[34]=(...r)=>e.hideModelsMenu&&e.hideModelsMenu(...r))},[g("div",war,[J(g("div",{onMouseenter:n[31]||(n[31]=(...r)=>e.showModelsMenu&&e.showModelsMenu(...r)),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"},[g("div",Mar,[J(g("input",{type:"text","onUpdate:modelValue":n[29]||(n[29]=r=>e.modelSearchQuery=r),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),[[we,e.modelSearchQuery]])]),g("div",Oar,[(k(!0),H(Ue,null,ot(e.filteredModels,(r,i)=>(k(),H("div",{key:i,class:"relative group/item flex flex-col items-center"},[g("div",Rar,[g("button",{onClick:he(o=>e.setModel(r),["prevent"]),title:r.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[g("img",{src:r.icon?r.icon:Bt(ri),onError:n[30]||(n[30]=(...o)=>e.personalityImgPlacehodler&&e.personalityImgPlacehodler(...o)),alt:r.name,class:je(["w-full h-full object-cover",{"border-2 border-secondary":r.name==e.model_name}])},null,42,Dar)],8,Nar),g("span",{class:"mt-1 text-xs text-center w-full truncate",title:r.name},le(r.name),9,Iar)]),g("div",kar,[g("span",{class:"text-xs font-medium mb-2 text-center",onClick:he(o=>e.setModel(r),["prevent"])},le(r.name),9,Par),g("div",Har,[g("button",{onClick:he(o=>e.copyModelNameFrom(r.name),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Copy Model Name"},n[80]||(n[80]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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,Var)])])]))),128))])],544),[[Pt,e.isModelsMenuVisible]]),g("div",{onMouseenter:n[33]||(n[33]=(...r)=>e.showModelsMenu&&e.showModelsMenu(...r)),class:"models-hover-area"},[g("button",{onClick:n[32]||(n[32]=he(r=>e.copyModelName(),["prevent"])),class:"w-6 h-6"},[g("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,Bar)])],32)])],32)),e.loading?re("",!0):(k(),H("div",{key:4,class:"toolbar-button",onMouseleave:n[39]||(n[39]=(...r)=>e.hidePersonalitiesMenu&&e.hidePersonalitiesMenu(...r))},[g("div",Far,[J(g("div",{onMouseenter:n[37]||(n[37]=(...r)=>e.showPersonalitiesMenu&&e.showPersonalitiesMenu(...r)),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"},[g("div",$ar,[J(g("input",{type:"text","onUpdate:modelValue":n[35]||(n[35]=r=>e.personalitySearchQuery=r),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),[[we,e.personalitySearchQuery]])]),g("div",Uar,[(k(!0),H(Ue,null,ot(e.filteredPersonalities,(r,i)=>(k(),H("div",{key:i,class:"relative group/item flex flex-col items-center"},[g("div",Gar,[g("button",{onClick:he(o=>e.onPersonalitySelected(r),["prevent"]),title:r.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[g("img",{src:Bt(Y1r)+r.avatar,onError:n[36]||(n[36]=(...o)=>e.personalityImgPlacehodler&&e.personalityImgPlacehodler(...o)),alt:r.name,class:je(["w-full h-full object-cover",{"border-2 border-secondary":e.$store.state.active_personality_id==e.$store.state.personalities.indexOf(r.full_path)}])},null,42,zar)],8,qar),g("span",{class:"mt-1 text-xs text-center w-full truncate",title:r.name},le(r.name),9,jar)]),g("div",War,[g("span",{class:"text-xs font-medium mb-2 text-center",onClick:he(o=>e.onPersonalitySelected(r),["prevent"])},le(r.name),9,Yar),g("div",Kar,[g("button",{onClick:he(o=>e.unmountPersonality(r),["prevent"]),class:"p-1 bg-red-500 rounded-full text-white hover:bg-red-600 focus:outline-none",title:"Unmount"},n[81]||(n[81]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]),8,Zar),g("button",{onClick:he(o=>e.remount_personality(r),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Remount"},n[82]||(n[82]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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,Xar),g("button",{onClick:he(o=>e.handleOnTalk(r),["prevent"]),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none",title:"Talk"},n[83]||(n[83]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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,Jar)])])]))),128))])],544),[[Pt,e.isPersonalitiesMenuVisible]]),g("div",e1r,[g("div",{onMouseenter:n[38]||(n[38]=(...r)=>e.showPersonalitiesMenu&&e.showPersonalitiesMenu(...r)),class:"personalities-hover-area"},[oe(yU,{ref:"mountedPers",onShowPersList:e.onShowPersList,onReady:e.onPersonalitiesReady},null,8,["onShowPersList","onReady"])],32)])])],32))])]),g("div",t1r,[g("form",{onSubmit:n[42]||(n[42]=he((...r)=>e.handleSearch&&e.handleSearch(...r),["prevent"])),class:"relative"},[g("div",n1r,[g("div",r1r,[J(g("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":n[40]||(n[40]=r=>e.filterTitle=r),onKeyup:n[41]||(n[41]=Xr((...r)=>e.handleSearch&&e.handleSearch(...r),["enter"]))},null,544),[[we,e.filterTitle]]),n[84]||(n[84]=g("div",{class:"absolute left-2 top-1/2 -translate-y-1/2"},[g("i",{"data-feather":"search",class:"w-4 h-4 text-gray-400"})],-1)),n[85]||(n[85]=g("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"},[g("i",{"data-feather":"arrow-right",class:"w-4 h-4"})],-1))])])],32)]),e.isCheckbox?(k(),H("div",i1r,[g("div",o1r,[e.selectedDiscussions.length>0?(k(),H("p",s1r,"Selected: "+le(e.selectedDiscussions.length),1)):re("",!0),e.selectedDiscussions.length>0?(k(),H("div",a1r,[e.showConfirmation?re("",!0):(k(),H("button",{key:0,class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:n[43]||(n[43]=he(r=>e.showConfirmation=!0,["stop"]))},n[86]||(n[86]=[g("i",{"data-feather":"trash"},null,-1)]))),e.showConfirmation?(k(),H("div",l1r,[g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:n[44]||(n[44]=he((...r)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...r),["stop"]))},n[87]||(n[87]=[g("i",{"data-feather":"check"},null,-1)])),g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:n[45]||(n[45]=he(r=>e.showConfirmation=!1,["stop"]))},n[88]||(n[88]=[g("i",{"data-feather":"x"},null,-1)]))])):re("",!0)])):re("",!0),g("div",c1r,[g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:n[46]||(n[46]=he((...r)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...r),["stop"]))},n[89]||(n[89]=[g("i",{"data-feather":"codepen"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a markdown file",type:"button",onClick:n[47]||(n[47]=he((...r)=>e.exportDiscussions&&e.exportDiscussions(...r),["stop"]))},n[90]||(n[90]=[g("i",{"data-feather":"folder"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a markdown file",type:"button",onClick:n[48]||(n[48]=he((...r)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...r),["stop"]))},n[91]||(n[91]=[g("i",{"data-feather":"bookmark"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:n[49]||(n[49]=he((...r)=>e.selectAllDiscussions&&e.selectAllDiscussions(...r),["stop"]))},n[92]||(n[92]=[g("i",{"data-feather":"list"},null,-1)]))])])])):re("",!0),g("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll overflow-x-hidden custom-scrollbar",onDragover:n[50]||(n[50]=he(r=>e.setDropZoneDiscussion(),["stop","prevent"]))},[g("div",u1r,[g("div",{class:je(["mx-0 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[g("div",{id:"dis-list",class:je([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full pb-80"])},[e.discussionsList.length>0?(k(),wt(Ns,{key:0,name:"discussionsList"},{default:He(()=>[(k(!0),H(Ue,null,ot(e.discussionsList,(r,i)=>(k(),wt(kb,{key:r.id,id:r.id,title:r.title,selected:e.currentDiscussion.id==r.id,loading:r.loading,isCheckbox:e.isCheckbox,checkBoxValue:r.checkBoxValue,openfolder_enabled:!0,onSelect:o=>e.selectDiscussion(r),onDelete:o=>e.deleteDiscussion(r.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})):re("",!0),e.discussionsList.length<1?(k(),H("div",d1r,n[93]||(n[93]=[g("p",{class:"px-3"},"No discussions are found",-1)]))):re("",!0)],2)],2)])],32),g("div",f1r,[g("div",{class:"chat-bar text-center flex items-center",onClick:n[51]||(n[51]=(...r)=>e.showDatabaseSelector&&e.showDatabaseSelector(...r))},[oe(_9,null,{default:He(()=>n[94]||(n[94]=[g("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"},[g("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),g("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),g("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})],-1)])),_:1}),g("p",p1r,le(e.formatted_database_name.replace("_"," ")),1)])])])):re("",!0)]),_:1}),e.isReady?(k(),H("div",h1r,[g("div",{id:"messages-list",class:je(["w-full z-0 flex flex-col flex-grow overflow-y-auto scrollbar",e.isDragOverChat?"pointer-events-none":""])},[g("div",T1r,[e.discussionArr.length>0?(k(),wt(Ns,{key:0,name:"list"},{default:He(()=>[(k(!0),H(Ue,null,ot(e.discussionArr,(r,i)=>(k(),wt(oU,{key:r.id,message:r,id:"msg-"+r.id,ref_for:!0,ref:"msg-"+r.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(r.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?(k(),H("div",m1r,[n[99]||(n[99]=g("h2",{class:"text-2xl font-bold mb-6 text-gray-800 dark:text-gray-200"},"Prompt Examples",-1)),g("div",g1r,[g("div",_1r,[(k(!0),H(Ue,null,ot(e.personality.prompts_list,(r,i)=>(k(),H("div",{title:e.extractTitle(r),key:i,onClick:o=>e.handlePromptSelection(r),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"},[g("div",v1r,[g("h3",{class:"font-bold text-lg text-gray-900 dark:text-gray-100 mb-2 truncate",title:e.extractTitle(r)},le(e.extractTitle(r)),9,y1r),g("div",{title:r,class:"text-base text-gray-700 dark:text-gray-300 overflow-hidden line-clamp-4"},le(e.getPromptContent(r)),9,b1r)]),n[95]||(n[95]=g("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,Q1r))),128))])]),e.showPlaceholderModal?(k(),H("div",E1r,[g("div",x1r,[n[98]||(n[98]=g("h3",{class:"text-lg font-semibold mb-4"},"Fill in the placeholders",-1)),g("div",S1r,[g("div",L1r,[n[96]||(n[96]=g("h4",{class:"text-sm font-medium mb-2 text-gray-600 dark:text-gray-400"},"Live Preview:",-1)),g("div",C1r,[g("span",A1r,le(e.getPromptContent(e.previewPrompt)),1)])]),g("div",w1r,[g("div",M1r,[(k(!0),H(Ue,null,ot(e.parsedPlaceholders,(r,i)=>(k(),H("div",{key:r.fullText,class:"flex flex-col"},[g("label",{for:"placeholder-"+i,class:"text-sm font-medium mb-1"},le(r.label),9,O1r),r.type==="text"?J((k(),H("input",{key:0,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,type:"text",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",placeholder:r.label,onInput:n[52]||(n[52]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,R1r)),[[we,e.placeholderValues[i]]]):re("",!0),r.type==="int"?J((k(),H("input",{key:1,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,type:"number",step:"1",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:n[53]||(n[53]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,N1r)),[[we,e.placeholderValues[i],void 0,{number:!0}]]):re("",!0),r.type==="float"?J((k(),H("input",{key:2,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,type:"number",step:"0.01",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:n[54]||(n[54]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,D1r)),[[we,e.placeholderValues[i],void 0,{number:!0}]]):re("",!0),r.type==="multiline"?J((k(),H("textarea",{key:3,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,rows:"4",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:n[55]||(n[55]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,I1r)),[[we,e.placeholderValues[i]]]):re("",!0),r.type==="code"?(k(),H("div",k1r,[g("div",P1r,le(r.language||"Plain text"),1),J(g("textarea",{id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,rows:"8",class:"w-full p-2 font-mono bg-gray-100 dark:bg-gray-900 border-t",onInput:n[56]||(n[56]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,H1r),[[we,e.placeholderValues[i]]])])):re("",!0),r.type==="options"?J((k(),H("select",{key:5,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onChange:n[57]||(n[57]=(...o)=>e.updatePreview&&e.updatePreview(...o))},[n[97]||(n[97]=g("option",{value:"",disabled:""},"Select an option",-1)),(k(!0),H(Ue,null,ot(r.options,o=>(k(),H("option",{key:o,value:o},le(o),9,B1r))),128))],40,V1r)),[[pn,e.placeholderValues[i]]]):re("",!0)]))),128))])])]),g("div",F1r,[g("button",{onClick:n[58]||(n[58]=(...r)=>e.cancelPlaceholders&&e.cancelPlaceholders(...r)),class:"px-4 py-2 text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"}," Cancel "),g("button",{onClick:n[59]||(n[59]=(...r)=>e.applyPlaceholders&&e.applyPlaceholders(...r)),class:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600"}," Apply ")])])])):re("",!0)])):re("",!0)]),_:1})):re("",!0),e.currentDiscussion.id?re("",!0):(k(),wt(aU,{key:1})),n[100]||(n[100]=g("div",null,[g("br"),g("br"),g("br"),g("br"),g("br"),g("br"),g("br")],-1))]),n[101]||(n[101]=g("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?(k(),H("div",$1r,[oe(sU,{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"])])):re("",!0)])):re("",!0),oe(qi,{name:"slide-left"},{default:He(()=>[e.showRightPanel?(k(),H("div",U1r,[g("div",G1r,null,512)])):re("",!0)]),_:1}),oe(Ib,{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"]),J(g("div",q1r,[oe(ub,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),g("p",z1r,le(e.loading_infos)+" ...",1)],512),[[Pt,e.progress_visibility]]),oe(QU,{ref:"personality_editor",config:e.currentPersonConfig,personality:e.selectedPersonality},null,8,["config","personality"]),g("div",j1r,[oe(vU,{ref:"news"},null,512)]),oe(rU,{ref:"skills_lib"},null,512)],64))}}),X1r=yt(Z1r,[["__scopeId","data-v-533fa73a"]]);/** +`+e.message,4,!1)}this.isDragOverChat=!1},async setFileListDiscussion(t){if(t.length>1){this.$store.state.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(t[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 Qe.get("/get_versionID")).data.versionId;Je.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(()=>{Ze.replace()});try{this.$store.state.loading_infos="Getting version",this.$store.state.loading_progress=30,await this.$store.dispatch("getVersion")}catch(n){console.log("Error cought:",n)}try{for(this.$store.state.loading_infos="Loading Configuration";Je.id===void 0;)await new Promise(n=>setTimeout(n,100));this.$store.state.client_id=Je.id,await this.$store.dispatch("refreshConfig")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Loading Database",this.$store.state.loading_progress=20,await this.$store.dispatch("refreshDatabase")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting Bindings list",this.$store.state.loading_progress=40,await this.$store.dispatch("refreshBindings")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting personalities zoo",this.$store.state.loading_progress=70,await this.$store.dispatch("refreshPersonalitiesZoo")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting mounted personalities",this.$store.state.loading_progress=80,await this.$store.dispatch("refreshMountedPersonalities")}catch(n){console.log("Error cought:",n)}try{this.$store.state.loading_infos="Getting models zoo",this.$store.state.loading_progress=90,await this.$store.dispatch("refreshModelsZoo")}catch(n){console.log("Error cought:",n)}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(n){console.log("Error cought:",n)}try{await this.$store.dispatch("fetchLanguages"),await this.$store.dispatch("fetchLanguage")}catch(n){console.log("Error cought:",n)}try{await this.$store.dispatch("fetchisRTOn")}catch(n){console.log("Error cought:",n)}this.$store.state.isConnected=!0,this.$store.state.client_id=Je.id,this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),this.isCreated=!0,this.$store.state.ready=!0,Je.on("connected",this.socketIOConnected),Je.on("disconnected",this.socketIODisconnected),Je.on("show_progress",this.show_progress),Je.on("hide_progress",this.hide_progress),Je.on("update_progress",this.update_progress),Je.on("notification",this.notify),Je.on("new_message",this.new_message),Je.on("update_message",this.update_message),Je.on("close_message",this.finalMsgEvent),Je.on("disucssion_renamed",n=>{const r=this.discussionsList.findIndex(o=>o.id==n.discussion_id),i=this.discussionsList[r];i.title=n.title}),Je.onclose=n=>{this.socketIODisconnected()},Je.on("connect_error",n=>{n.message==="ERR_CONNECTION_REFUSED"?console.error("Connection refused. The server is not available."):console.error("Connection error:",n),this.$store.state.isConnected=!1}),Je.onerror=n=>{console.log("WebSocket connection error:",n.code,n.reason),this.socketIODisconnected(),Je.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),Je.on("refresh_files",()=>{this.recoverFiles()})},async activated(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&ze(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)}),this.$store.state.config.show_news_panel&&this.$store.state.news.show()},components:{Discussion:kb,Message:oU,ChatBox:sU,WelcomeComponent:aU,ChoiceDialog:Ib,ProgressBar:ub,InputBox:Mrr,SkillsLibraryViewer:rU,PersonalityEditor:QU,PopupViewer:vU,ActionButton:FH,SocialIcon:$H,MountedPersonalities:yU,ChatBarButton:_9},watch:{installedModels:{immediate:!0,handler(t){this.$nextTick(()=>{this.installedModels=t})}},"$store.state.config.fun_mode":function(t,e){},"$store.state.isConnected":function(t,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()),ze(()=>{Ze.replace()})},messages:{handler:"extractHtml",deep:!0},progress_visibility_val(t){console.log("progress_visibility changed to "+t)},filterTitle(t){t==""&&(this.filterInProgress=!0,this.discussionsList=this.tempList,this.filterInProgress=!1)},isCheckbox(t){ze(()=>{Ze.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){ze(()=>{Ze.replace()})}},computed:{parsedPlaceholders(){const t=new Map;return this.placeholders.forEach(e=>{const n=t2r(e);t.set(n.fullText,n)}),Array.from(t.values())},filteredBindings(){return this.installedBindings.filter(t=>t.name.toLowerCase().includes(this.bindingSearchQuery.toLowerCase()))},filteredModels(){return this.installedModels.filter(t=>t.name.toLowerCase().includes(this.modelSearchQuery.toLowerCase()))},filteredPersonalities(){return this.mountedPersonalities.filter(t=>t.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?co:this.$store.state.config.app_custom_logo!=""?"/user_infos/"+this.$store.state.config.app_custom_logo:co},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(t){return console.error("Oopsie! Looks like we hit a snag: ",t),!1}},isModelOK(){return this.$store.state.isModelOk},isGenerating(){return this.$store.state.isGenerating},isConnected(){return this.$store.state.isConnected},...pW({versionId:t=>t.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(t){this.$store.state.isModelOk=t}},isGenerating:{get(){return this.$store.state.isGenerating},set(t){this.$store.state.isGenerating=t}},personality(){const t=this.$store.state.config.personalities[this.$store.state.config.active_personality_id].split(":")[0];return this.$store.state.personalities.find(n=>n.full_path===t)},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 Je.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 ze(()=>{Ze.replace()}),this.discussionsList.filter(t=>t.checkBoxValue==!0)}}},i2r=Object.assign(r2r,{__name:"DiscussionsView",setup(t){return Zo(()=>{_U()}),Qe.defaults.baseURL="/",(e,n)=>(k(),H(Ue,null,[oe(qi,{name:"fade-and-fly"},{default:He(()=>[e.isReady?re("",!0):(k(),H("div",Xsr,[e.$store.state.theme_vars.activate_dropping_animation?(k(),H("div",Jsr,[(k(),H(Ue,null,ot(50,r=>g("div",{key:r,class:"absolute animate-fall animate-giggle",style:xn({left:`${Math.random()*100}%`,top:"-20px",animationDuration:`${3+Math.random()*7}s`,animationDelay:`${Math.random()*5}s`})},le(e.$store.state.theme_vars.falling_object),5)),64))])):re("",!0),g("div",ear,[g("div",tar,[g("div",nar,le(e.$store.state.theme_vars.lollms_title),1),n[61]||(n[61]=g("p",{class:"text-2xl italic"}," One tool to rule them all ",-1)),n[62]||(n[62]=g("p",{class:"text-xl mb-6"}," by ParisNeo ",-1)),g("p",rar,le(e.version_info),1),g("div",{class:"interesting-facts transition-transform duration-300 cursor-pointer",onClick:n[0]||(n[0]=(...r)=>e.updateRandomFact&&e.updateRandomFact(...r))},[g("p",iar,[n[60]||(n[60]=g("span",{class:"font-semibold"},"🤔 Fun Fact: ",-1)),g("span",{innerHTML:e.randomFact},null,8,oar)])]),g("div",sar,[g("div",{class:"animated-progressbar-fg",style:xn({width:`${e.loading_progress}%`})},null,4),g("div",{class:"absolute top-0 h-full flex items-center transition-all duration-300",style:xn({left:`${e.loading_progress}%`,transform:"translateX(-50%)"})},null,4)])]),g("div",aar,[g("div",lar,[g("p",car,le(e.loading_infos)+"... ",1),g("p",uar,le(Math.round(e.loading_progress))+"% ",1)])])])]))]),_:1}),oe(qi,{name:"slide-right"},{default:He(()=>[e.showLeftPanel?(k(),H("div",dar,[oe(Bt(Qu),{to:{name:"discussions"},class:"flex items-center space-x-2"},{default:He(()=>[g("div",far,[g("img",{class:"w-12 h-12 rounded-full object-cover logo-image",src:e.$store.state.config==null?Bt(co):e.$store.state.config.app_custom_logo!=""?"/user_infos/"+e.$store.state.config.app_custom_logo:Bt(co),alt:"Logo",title:"LoLLMS WebUI"},null,8,par)]),n[63]||(n[63]=g("div",{class:"flex flex-col justify-center"},[g("div",{class:"text-center p-2"},[g("div",{class:"text-md relative inline-block"},[g("span",{class:"relative inline-block font-bold tracking-wide text-black dark:text-white"}," LoLLMS "),g("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"})])]),g("p",{class:"text-gray-400 text-sm"},"One tool to rule them all")],-1))]),_:1}),g("div",har,[g("div",Tar,[g("button",{class:"toolbar-button",title:"Create new discussion",onClick:n[1]||(n[1]=(...r)=>e.createNewDiscussion&&e.createNewDiscussion(...r))},n[64]||(n[64]=[g("i",{"data-feather":"plus"},null,-1)])),e.loading?re("",!0):(k(),H("div",{key:0,class:"toolbar-button",onMouseleave:n[8]||(n[8]=(...r)=>e.hideSkillsLibraryMenu&&e.hideSkillsLibraryMenu(...r))},[J(g("div",{onMouseenter:n[6]||(n[6]=(...r)=>e.showSkillsLibraryMenu&&e.showSkillsLibraryMenu(...r)),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"},[g("div",mar,[e.loading?re("",!0):(k(),H("button",{key:0,type:"button",onClick:n[2]||(n[2]=he((...r)=>e.addDiscussion2SkillsLibrary&&e.addDiscussion2SkillsLibrary(...r),["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"},n[65]||(n[65]=[g("i",{"data-feather":"plus"},null,-1)]))),!e.loading&&e.$store.state.config.activate_skills_lib?(k(),H("button",{key:1,type:"button",onClick:n[3]||(n[3]=he((...r)=>e.toggleSkillsLib&&e.toggleSkillsLib(...r),["stop"])),title:"Skills database is activated",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[66]||(n[66]=[g("i",{"data-feather":"check-circle"},null,-1)]))):re("",!0),!e.loading&&!e.$store.state.config.activate_skills_lib?(k(),H("button",{key:2,type:"button",onClick:n[4]||(n[4]=he((...r)=>e.toggleSkillsLib&&e.toggleSkillsLib(...r),["stop"])),title:"Skills database is deactivated",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[67]||(n[67]=[g("i",{"data-feather":"x-octagon"},null,-1)]))):re("",!0),e.loading?re("",!0):(k(),H("button",{key:3,type:"button",onClick:n[5]||(n[5]=he((...r)=>e.showSkillsLib&&e.showSkillsLib(...r),["stop"])),title:"Show Skills database",class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[68]||(n[68]=[g("i",{"data-feather":"book"},null,-1)])))])],544),[[Pt,e.isSkillsLibraryMenuVisible]]),g("div",{onMouseenter:n[7]||(n[7]=(...r)=>e.showSkillsLibraryMenu&&e.showSkillsLibraryMenu(...r)),class:"menu-hover-area"},n[69]||(n[69]=[g("button",{class:"w-8 h-8",title:"Toggle Skills library menu"},[g("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M4 4v16h16V4H4zm2 2h12v12H6V6zm2 2h2v8H8V8zm3 0h2v8h-2V8zm3 0h2v8h-2V8z",fill:"currentColor"})])],-1)]),32)],32)),e.loading?re("",!0):(k(),H("div",{key:1,class:"toolbar-button",onMouseleave:n[22]||(n[22]=(...r)=>e.hideMenu&&e.hideMenu(...r))},[J(g("div",{onMouseenter:n[20]||(n[20]=(...r)=>e.showMenu&&e.showMenu(...r)),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"},[g("div",gar,[g("button",{class:je(["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:n[9]||(n[9]=r=>e.isCheckbox=!e.isCheckbox)},n[70]||(n[70]=[g("i",{"data-feather":"check-square"},null,-1)]),2),g("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:n[10]||(n[10]=he(()=>{},["stop"]))},n[71]||(n[71]=[g("i",{"data-feather":"trash-2"},null,-1)])),g("button",{class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95",title:"Export database",type:"button",onClick:n[11]||(n[11]=he(r=>e.database_selectorDialogVisible=!0,["stop"]))},n[72]||(n[72]=[g("i",{"data-feather":"database"},null,-1)])),g("div",_ar,[g("input",{type:"file",ref:"fileDialog",class:"hidden",onChange:n[12]||(n[12]=(...r)=>e.importDiscussions&&e.importDiscussions(...r))},null,544),g("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:n[13]||(n[13]=he(r=>e.$refs.fileDialog.click(),["stop"]))},n[73]||(n[73]=[g("i",{"data-feather":"log-in"},null,-1)]))]),g("div",Qar,[g("input",{type:"file",ref:"bundleLoadingDialog",class:"hidden",onChange:n[14]||(n[14]=(...r)=>e.importDiscussionsBundle&&e.importDiscussionsBundle(...r))},null,544),e.showSaveConfirmation?re("",!0):(k(),H("button",{key:0,title:"Import discussion bundle",onClick:n[15]||(n[15]=he(r=>e.$refs.bundleLoadingDialog.click(),["stop"])),class:"text-3xl hover:text-secondary dark:hover:text-secondary-light duration-150 active:scale-95"},n[74]||(n[74]=[g("i",{"data-feather":"folder"},null,-1)])))]),e.loading?(k(),H("div",yar,n[75]||(n[75]=[g("div",{role:"status"},[g("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"},[g("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"}),g("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"})]),g("span",{class:"sr-only"},"Loading...")],-1)]))):re("",!0),e.showSaveConfirmation?(k(),H("div",bar,[g("button",{class:"text-3xl hover:text-red-500 dark:hover:text-red-400 duration-150 active:scale-95",title:"Cancel",type:"button",onClick:n[16]||(n[16]=he(r=>e.showSaveConfirmation=!1,["stop"]))},n[76]||(n[76]=[g("i",{"data-feather":"x"},null,-1)])),g("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:n[17]||(n[17]=he(r=>e.save_configuration(),["stop"]))},n[77]||(n[77]=[g("i",{"data-feather":"check"},null,-1)]))])):re("",!0),e.isOpen?(k(),H("div",Ear,[g("button",{onClick:n[18]||(n[18]=(...r)=>e.importDiscussions&&e.importDiscussions(...r)),class:"text-sm hover:text-secondary dark:hover:text-secondary-light"},"LOLLMS"),g("button",{onClick:n[19]||(n[19]=(...r)=>e.importChatGPT&&e.importChatGPT(...r)),class:"text-sm hover:text-secondary dark:hover:text-secondary-light"},"ChatGPT")])):re("",!0)])],544),[[Pt,e.isMenuVisible]]),g("div",{onMouseenter:n[21]||(n[21]=(...r)=>e.showMenu&&e.showMenu(...r)),class:"menu-hover-area"},n[78]||(n[78]=[g("button",{class:"w-8 h-8",title:"Toggle menu"},[g("i",{"data-feather":"menu"})],-1)]),32)],32)),e.loading?re("",!0):(k(),H("div",{key:2,class:"toolbar-button",onMouseleave:n[28]||(n[28]=(...r)=>e.hideBindingsMenu&&e.hideBindingsMenu(...r))},[g("div",xar,[J(g("div",{onMouseenter:n[25]||(n[25]=(...r)=>e.showBindingsMenu&&e.showBindingsMenu(...r)),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"},[g("div",Sar,[J(g("input",{type:"text","onUpdate:modelValue":n[23]||(n[23]=r=>e.bindingSearchQuery=r),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),[[we,e.bindingSearchQuery]])]),g("div",Lar,[(k(!0),H(Ue,null,ot(e.filteredBindings,(r,i)=>(k(),H("div",{key:i,class:"relative group/item flex flex-col items-center"},[g("div",Car,[g("button",{onClick:he(o=>e.setBinding(r),["prevent"]),title:r.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[g("img",{src:r.icon?r.icon:Bt(ri),onError:n[24]||(n[24]=(...o)=>Bt(ri)&&Bt(ri)(...o)),alt:r.name,class:je(["w-full h-full object-cover",{"border-2 border-secondary":r.name==e.binding_name}])},null,42,war)],8,Aar),g("span",{class:"mt-1 text-xs text-center w-full truncate",title:r.name},le(r.name),9,Mar)]),g("div",Oar,[g("span",{class:"text-xs font-medium mb-2 text-center",onClick:he(o=>e.setBinding(r),["prevent"])},le(r.name),9,Rar),g("div",Nar,[g("button",{onClick:he(o=>e.showModelConfig(r),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Configure Binding"},n[79]||(n[79]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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"}),g("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,Dar)])])]))),128))])],544),[[Pt,e.isBindingsMenuVisible]]),g("div",{onMouseenter:n[27]||(n[27]=(...r)=>e.showBindingsMenu&&e.showBindingsMenu(...r)),class:"bindings-hover-area"},[g("button",{onClick:n[26]||(n[26]=he(r=>e.showModelConfig(),["prevent"])),class:"w-6 h-6"},[g("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,Iar)])],32)])],32)),e.loading?re("",!0):(k(),H("div",{key:3,class:"toolbar-button",onMouseleave:n[34]||(n[34]=(...r)=>e.hideModelsMenu&&e.hideModelsMenu(...r))},[g("div",kar,[J(g("div",{onMouseenter:n[31]||(n[31]=(...r)=>e.showModelsMenu&&e.showModelsMenu(...r)),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"},[g("div",Par,[J(g("input",{type:"text","onUpdate:modelValue":n[29]||(n[29]=r=>e.modelSearchQuery=r),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),[[we,e.modelSearchQuery]])]),g("div",Har,[(k(!0),H(Ue,null,ot(e.filteredModels,(r,i)=>(k(),H("div",{key:i,class:"relative group/item flex flex-col items-center"},[g("div",Var,[g("button",{onClick:he(o=>e.setModel(r),["prevent"]),title:r.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[g("img",{src:r.icon?r.icon:Bt(ri),onError:n[30]||(n[30]=(...o)=>e.personalityImgPlacehodler&&e.personalityImgPlacehodler(...o)),alt:r.name,class:je(["w-full h-full object-cover",{"border-2 border-secondary":r.name==e.model_name}])},null,42,Far)],8,Bar),g("span",{class:"mt-1 text-xs text-center w-full truncate",title:r.name},le(r.name),9,$ar)]),g("div",Uar,[g("span",{class:"text-xs font-medium mb-2 text-center",onClick:he(o=>e.setModel(r),["prevent"])},le(r.name),9,Gar),g("div",qar,[g("button",{onClick:he(o=>e.copyModelNameFrom(r.name),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Copy Model Name"},n[80]||(n[80]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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,zar)])])]))),128))])],544),[[Pt,e.isModelsMenuVisible]]),g("div",{onMouseenter:n[33]||(n[33]=(...r)=>e.showModelsMenu&&e.showModelsMenu(...r)),class:"models-hover-area"},[g("button",{onClick:n[32]||(n[32]=he(r=>e.copyModelName(),["prevent"])),class:"w-6 h-6"},[g("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,jar)])],32)])],32)),e.loading?re("",!0):(k(),H("div",{key:4,class:"toolbar-button",onMouseleave:n[39]||(n[39]=(...r)=>e.hidePersonalitiesMenu&&e.hidePersonalitiesMenu(...r))},[g("div",War,[J(g("div",{onMouseenter:n[37]||(n[37]=(...r)=>e.showPersonalitiesMenu&&e.showPersonalitiesMenu(...r)),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"},[g("div",Yar,[J(g("input",{type:"text","onUpdate:modelValue":n[35]||(n[35]=r=>e.personalitySearchQuery=r),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),[[we,e.personalitySearchQuery]])]),g("div",Kar,[(k(!0),H(Ue,null,ot(e.filteredPersonalities,(r,i)=>(k(),H("div",{key:i,class:"relative group/item flex flex-col items-center"},[g("div",Zar,[g("button",{onClick:he(o=>e.onPersonalitySelected(r),["prevent"]),title:r.name,class:"w-12 h-12 rounded-md overflow-hidden transition-transform duration-200 transform group-hover/item:scale-105 focus:outline-none"},[g("img",{src:Bt(n2r)+r.avatar,onError:n[36]||(n[36]=(...o)=>e.personalityImgPlacehodler&&e.personalityImgPlacehodler(...o)),alt:r.name,class:je(["w-full h-full object-cover",{"border-2 border-secondary":e.$store.state.active_personality_id==e.$store.state.personalities.indexOf(r.full_path)}])},null,42,Jar)],8,Xar),g("span",{class:"mt-1 text-xs text-center w-full truncate",title:r.name},le(r.name),9,e1r)]),g("div",t1r,[g("span",{class:"text-xs font-medium mb-2 text-center",onClick:he(o=>e.onPersonalitySelected(r),["prevent"])},le(r.name),9,n1r),g("div",r1r,[g("button",{onClick:he(o=>e.unmountPersonality(r),["prevent"]),class:"p-1 bg-red-500 rounded-full text-white hover:bg-red-600 focus:outline-none",title:"Unmount"},n[81]||(n[81]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]),8,i1r),g("button",{onClick:he(o=>e.remount_personality(r),["prevent"]),class:"p-1 bg-blue-500 rounded-full text-white hover:bg-blue-600 focus:outline-none",title:"Remount"},n[82]||(n[82]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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,o1r),g("button",{onClick:he(o=>e.handleOnTalk(r),["prevent"]),class:"p-1 bg-green-500 rounded-full text-white hover:bg-green-600 focus:outline-none",title:"Talk"},n[83]||(n[83]=[g("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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,s1r)])])]))),128))])],544),[[Pt,e.isPersonalitiesMenuVisible]]),g("div",a1r,[g("div",{onMouseenter:n[38]||(n[38]=(...r)=>e.showPersonalitiesMenu&&e.showPersonalitiesMenu(...r)),class:"personalities-hover-area"},[oe(yU,{ref:"mountedPers",onShowPersList:e.onShowPersList,onReady:e.onPersonalitiesReady},null,8,["onShowPersList","onReady"])],32)])])],32))])]),g("div",l1r,[g("form",{onSubmit:n[42]||(n[42]=he((...r)=>e.handleSearch&&e.handleSearch(...r),["prevent"])),class:"relative"},[g("div",c1r,[g("div",u1r,[J(g("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":n[40]||(n[40]=r=>e.filterTitle=r),onKeyup:n[41]||(n[41]=Xr((...r)=>e.handleSearch&&e.handleSearch(...r),["enter"]))},null,544),[[we,e.filterTitle]]),n[84]||(n[84]=g("div",{class:"absolute left-2 top-1/2 -translate-y-1/2"},[g("i",{"data-feather":"search",class:"w-4 h-4 text-gray-400"})],-1)),n[85]||(n[85]=g("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"},[g("i",{"data-feather":"arrow-right",class:"w-4 h-4"})],-1))])])],32)]),e.isCheckbox?(k(),H("div",d1r,[g("div",f1r,[e.selectedDiscussions.length>0?(k(),H("p",p1r,"Selected: "+le(e.selectedDiscussions.length),1)):re("",!0),e.selectedDiscussions.length>0?(k(),H("div",h1r,[e.showConfirmation?re("",!0):(k(),H("button",{key:0,class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove selected",type:"button",onClick:n[43]||(n[43]=he(r=>e.showConfirmation=!0,["stop"]))},n[86]||(n[86]=[g("i",{"data-feather":"trash"},null,-1)]))),e.showConfirmation?(k(),H("div",T1r,[g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:n[44]||(n[44]=he((...r)=>e.deleteDiscussionMulti&&e.deleteDiscussionMulti(...r),["stop"]))},n[87]||(n[87]=[g("i",{"data-feather":"check"},null,-1)])),g("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:n[45]||(n[45]=he(r=>e.showConfirmation=!1,["stop"]))},n[88]||(n[88]=[g("i",{"data-feather":"x"},null,-1)]))])):re("",!0)])):re("",!0),g("div",m1r,[g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a json file",type:"button",onClick:n[46]||(n[46]=he((...r)=>e.exportDiscussionsAsJson&&e.exportDiscussionsAsJson(...r),["stop"]))},n[89]||(n[89]=[g("i",{"data-feather":"codepen"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a markdown file",type:"button",onClick:n[47]||(n[47]=he((...r)=>e.exportDiscussions&&e.exportDiscussions(...r),["stop"]))},n[90]||(n[90]=[g("i",{"data-feather":"folder"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90 rotate-90",title:"Export selected to a markdown file",type:"button",onClick:n[48]||(n[48]=he((...r)=>e.exportDiscussionsAsMarkdown&&e.exportDiscussionsAsMarkdown(...r),["stop"]))},n[91]||(n[91]=[g("i",{"data-feather":"bookmark"},null,-1)])),g("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Select All",type:"button",onClick:n[49]||(n[49]=he((...r)=>e.selectAllDiscussions&&e.selectAllDiscussions(...r),["stop"]))},n[92]||(n[92]=[g("i",{"data-feather":"list"},null,-1)]))])])])):re("",!0),g("div",{id:"leftPanel",class:"flex flex-col flex-grow overflow-y-scroll overflow-x-hidden custom-scrollbar",onDragover:n[50]||(n[50]=he(r=>e.setDropZoneDiscussion(),["stop","prevent"]))},[g("div",g1r,[g("div",{class:je(["mx-0 flex flex-col flex-grow w-full",e.isDragOverDiscussion?"pointer-events-none":""])},[g("div",{id:"dis-list",class:je([e.filterInProgress?"opacity-20 pointer-events-none":"","flex flex-col flex-grow w-full pb-80"])},[e.discussionsList.length>0?(k(),wt(Ns,{key:0,name:"discussionsList"},{default:He(()=>[(k(!0),H(Ue,null,ot(e.discussionsList,(r,i)=>(k(),wt(kb,{key:r.id,id:r.id,title:r.title,selected:e.currentDiscussion.id==r.id,loading:r.loading,isCheckbox:e.isCheckbox,checkBoxValue:r.checkBoxValue,openfolder_enabled:!0,onSelect:o=>e.selectDiscussion(r),onDelete:o=>e.deleteDiscussion(r.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})):re("",!0),e.discussionsList.length<1?(k(),H("div",_1r,n[93]||(n[93]=[g("p",{class:"px-3"},"No discussions are found",-1)]))):re("",!0)],2)],2)])],32),g("div",Q1r,[g("div",{class:"chat-bar text-center flex items-center",onClick:n[51]||(n[51]=(...r)=>e.showDatabaseSelector&&e.showDatabaseSelector(...r))},[oe(_9,null,{default:He(()=>n[94]||(n[94]=[g("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"},[g("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),g("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),g("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})],-1)])),_:1}),g("p",v1r,le(e.formatted_database_name.replace("_"," ")),1)])])])):re("",!0)]),_:1}),e.isReady?(k(),H("div",y1r,[g("div",{id:"messages-list",class:je(["w-full z-0 flex flex-col flex-grow overflow-y-auto scrollbar",e.isDragOverChat?"pointer-events-none":""])},[g("div",b1r,[e.discussionArr.length>0?(k(),wt(Ns,{key:0,name:"list"},{default:He(()=>[(k(!0),H(Ue,null,ot(e.discussionArr,(r,i)=>(k(),wt(oU,{key:r.id,message:r,id:"msg-"+r.id,ref_for:!0,ref:"msg-"+r.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(r.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?(k(),H("div",E1r,[n[99]||(n[99]=g("h2",{class:"text-2xl font-bold mb-6 text-gray-800 dark:text-gray-200"},"Prompt Examples",-1)),g("div",x1r,[g("div",S1r,[(k(!0),H(Ue,null,ot(e.personality.prompts_list,(r,i)=>(k(),H("div",{title:e.extractTitle(r),key:i,onClick:o=>e.handlePromptSelection(r),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"},[g("div",C1r,[g("h3",{class:"font-bold text-lg text-gray-900 dark:text-gray-100 mb-2 truncate",title:e.extractTitle(r)},le(e.extractTitle(r)),9,A1r),g("div",{title:r,class:"text-base text-gray-700 dark:text-gray-300 overflow-hidden line-clamp-4"},le(e.getPromptContent(r)),9,w1r)]),n[95]||(n[95]=g("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,L1r))),128))])]),e.showPlaceholderModal?(k(),H("div",M1r,[g("div",O1r,[n[98]||(n[98]=g("h3",{class:"text-lg font-semibold mb-4"},"Fill in the placeholders",-1)),g("div",R1r,[g("div",N1r,[n[96]||(n[96]=g("h4",{class:"text-sm font-medium mb-2 text-gray-600 dark:text-gray-400"},"Live Preview:",-1)),g("div",D1r,[g("span",I1r,le(e.getPromptContent(e.previewPrompt)),1)])]),g("div",k1r,[g("div",P1r,[(k(!0),H(Ue,null,ot(e.parsedPlaceholders,(r,i)=>(k(),H("div",{key:r.fullText,class:"flex flex-col"},[g("label",{for:"placeholder-"+i,class:"text-sm font-medium mb-1"},le(r.label),9,H1r),r.type==="text"?J((k(),H("input",{key:0,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,type:"text",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",placeholder:r.label,onInput:n[52]||(n[52]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,V1r)),[[we,e.placeholderValues[i]]]):re("",!0),r.type==="int"?J((k(),H("input",{key:1,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,type:"number",step:"1",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:n[53]||(n[53]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,B1r)),[[we,e.placeholderValues[i],void 0,{number:!0}]]):re("",!0),r.type==="float"?J((k(),H("input",{key:2,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,type:"number",step:"0.01",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:n[54]||(n[54]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,F1r)),[[we,e.placeholderValues[i],void 0,{number:!0}]]):re("",!0),r.type==="multiline"?J((k(),H("textarea",{key:3,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,rows:"4",class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onInput:n[55]||(n[55]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,$1r)),[[we,e.placeholderValues[i]]]):re("",!0),r.type==="code"?(k(),H("div",U1r,[g("div",G1r,le(r.language||"Plain text"),1),J(g("textarea",{id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,rows:"8",class:"w-full p-2 font-mono bg-gray-100 dark:bg-gray-900 border-t",onInput:n[56]||(n[56]=(...o)=>e.updatePreview&&e.updatePreview(...o))},null,40,q1r),[[we,e.placeholderValues[i]]])])):re("",!0),r.type==="options"?J((k(),H("select",{key:5,id:"placeholder-"+i,"onUpdate:modelValue":o=>e.placeholderValues[i]=o,class:"border rounded-md p-2 dark:bg-gray-700 dark:border-gray-600",onChange:n[57]||(n[57]=(...o)=>e.updatePreview&&e.updatePreview(...o))},[n[97]||(n[97]=g("option",{value:"",disabled:""},"Select an option",-1)),(k(!0),H(Ue,null,ot(r.options,o=>(k(),H("option",{key:o,value:o},le(o),9,j1r))),128))],40,z1r)),[[pn,e.placeholderValues[i]]]):re("",!0)]))),128))])])]),g("div",W1r,[g("button",{onClick:n[58]||(n[58]=(...r)=>e.cancelPlaceholders&&e.cancelPlaceholders(...r)),class:"px-4 py-2 text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"}," Cancel "),g("button",{onClick:n[59]||(n[59]=(...r)=>e.applyPlaceholders&&e.applyPlaceholders(...r)),class:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600"}," Apply ")])])])):re("",!0)])):re("",!0)]),_:1})):re("",!0),e.currentDiscussion.id?re("",!0):(k(),wt(aU,{key:1})),n[100]||(n[100]=g("div",null,[g("br"),g("br"),g("br"),g("br"),g("br"),g("br"),g("br")],-1))]),n[101]||(n[101]=g("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?(k(),H("div",Y1r,[oe(sU,{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"])])):re("",!0)])):re("",!0),oe(qi,{name:"slide-left"},{default:He(()=>[e.showRightPanel?(k(),H("div",K1r,[g("div",Z1r,null,512)])):re("",!0)]),_:1}),oe(Ib,{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"]),J(g("div",X1r,[oe(ub,{ref:"progress",progress:e.progress_value,class:"w-full h-4"},null,8,["progress"]),g("p",J1r,le(e.loading_infos)+" ...",1)],512),[[Pt,e.progress_visibility]]),oe(QU,{ref:"personality_editor",config:e.currentPersonConfig,personality:e.selectedPersonality},null,8,["config","personality"]),g("div",e2r,[oe(vU,{ref:"news"},null,512)]),oe(rU,{ref:"skills_lib"},null,512)],64))}}),o2r=yt(i2r,[["__scopeId","data-v-533fa73a"]]);/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const Wb="159",J1r=0,TD=1,e2r=2,bU=1,t2r=2,Es=3,Us=0,ui=1,ko=2,ka=0,Pl=1,mD=2,gD=3,_D=4,n2r=5,B1=100,r2r=101,i2r=102,QD=103,vD=104,o2r=200,s2r=201,a2r=202,l2r=203,VQ=204,BQ=205,c2r=206,u2r=207,d2r=208,f2r=209,p2r=210,h2r=211,T2r=212,m2r=213,g2r=214,_2r=0,Q2r=1,v2r=2,dd=3,y2r=4,b2r=5,E2r=6,x2r=7,Yb=0,S2r=1,L2r=2,Pa=0,C2r=1,A2r=2,w2r=3,M2r=4,O2r=5,yD="attached",R2r="detached",EU=300,cc=301,uc=302,FQ=303,$Q=304,E9=306,dc=1e3,Pi=1001,fd=1002,hr=1003,UQ=1004,tu=1005,ii=1006,xU=1007,m2=1008,Ha=1009,N2r=1010,D2r=1011,Kb=1012,SU=1013,Oa=1014,Ms=1015,o0=1016,LU=1017,CU=1018,Z1=1020,I2r=1021,Hi=1023,k2r=1024,P2r=1025,X1=1026,fc=1027,H2r=1028,AU=1029,V2r=1030,wU=1031,MU=1033,Ig=33776,kg=33777,Pg=33778,Hg=33779,bD=35840,ED=35841,xD=35842,SD=35843,OU=36196,LD=37492,CD=37496,AD=37808,wD=37809,MD=37810,OD=37811,RD=37812,ND=37813,DD=37814,ID=37815,kD=37816,PD=37817,HD=37818,VD=37819,BD=37820,FD=37821,Vg=36492,$D=36494,UD=36495,B2r=36283,GD=36284,qD=36285,zD=36286,s0=2300,pc=2301,Bg=2302,jD=2400,WD=2401,YD=2402,F2r=2500,$2r=0,RU=1,GQ=2,NU=3e3,J1=3001,U2r=3200,G2r=3201,Zb=0,q2r=1,Vi="",jn="srgb",Sr="srgb-linear",Xb="display-p3",x9="display-p3-linear",pd="linear",kn="srgb",hd="rec709",Td="p3",tl=7680,KD=519,z2r=512,j2r=513,W2r=514,DU=515,Y2r=516,K2r=517,Z2r=518,X2r=519,qQ=35044,ZD="300 es",zQ=1035,Os=2e3,md=2001;class zc{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const r=this._listeners[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let o=0,s=i.length;o>8&255]+Mr[t>>16&255]+Mr[t>>24&255]+"-"+Mr[e&255]+Mr[e>>8&255]+"-"+Mr[e>>16&15|64]+Mr[e>>24&255]+"-"+Mr[n&63|128]+Mr[n>>8&255]+"-"+Mr[n>>16&255]+Mr[n>>24&255]+Mr[r&255]+Mr[r>>8&255]+Mr[r>>16&255]+Mr[r>>24&255]).toLowerCase()}function Dr(t,e,n){return Math.max(e,Math.min(n,t))}function Jb(t,e){return(t%e+e)%e}function J2r(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function elr(t,e,n){return t!==e?(n-t)/(e-t):0}function R4(t,e,n){return(1-n)*t+n*e}function tlr(t,e,n,r){return R4(t,e,1-Math.exp(-n*r))}function nlr(t,e=1){return e-Math.abs(Jb(t,e*2)-e)}function rlr(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function ilr(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function olr(t,e){return t+Math.floor(Math.random()*(e-t+1))}function slr(t,e){return t+Math.random()*(e-t)}function alr(t){return t*(.5-Math.random())}function llr(t){t!==void 0&&(XD=t);let e=XD+=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 clr(t){return t*O4}function ulr(t){return t*hc}function jQ(t){return(t&t-1)===0&&t!==0}function dlr(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function gd(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function flr(t,e,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((e+r)/2),u=s((e+r)/2),d=o((e-r)/2),h=s((e-r)/2),f=o((r-e)/2),m=s((r-e)/2);switch(i){case"XYX":t.set(a*u,l*d,l*h,a*c);break;case"YZY":t.set(l*h,a*u,l*d,a*c);break;case"ZXZ":t.set(l*d,l*h,a*u,a*c);break;case"XZX":t.set(a*u,l*m,l*f,a*c);break;case"YXY":t.set(l*f,a*u,l*m,a*c);break;case"ZYZ":t.set(l*m,l*f,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Po(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function bn(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const plr={DEG2RAD:O4,RAD2DEG:hc,generateUUID:uo,clamp:Dr,euclideanModulo:Jb,mapLinear:J2r,inverseLerp:elr,lerp:R4,damp:tlr,pingpong:nlr,smoothstep:rlr,smootherstep:ilr,randInt:olr,randFloat:slr,randFloatSpread:alr,seededRandom:llr,degToRad:clr,radToDeg:ulr,isPowerOfTwo:jQ,ceilPowerOfTwo:dlr,floorPowerOfTwo:gd,setQuaternionFromProperEuler:flr,normalize:bn,denormalize:Po};class Yt{constructor(e=0,n=0){Yt.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.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 n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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 n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Dr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),o=this.x-e.x,s=this.y-e.y;return this.x=o*r-s*i+e.x,this.y=o*i+s*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class qt{constructor(e,n,r,i,o,s,a,l,c){qt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,s,a,l,c)}set(e,n,r,i,o,s,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=o,u[5]=l,u[6]=r,u[7]=s,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,s=r[0],a=r[3],l=r[6],c=r[1],u=r[4],d=r[7],h=r[2],f=r[5],m=r[8],T=i[0],Q=i[3],_=i[6],v=i[1],y=i[4],b=i[7],E=i[2],x=i[5],L=i[8];return o[0]=s*T+a*v+l*E,o[3]=s*Q+a*y+l*x,o[6]=s*_+a*b+l*L,o[1]=c*T+u*v+d*E,o[4]=c*Q+u*y+d*x,o[7]=c*_+u*b+d*L,o[2]=h*T+f*v+m*E,o[5]=h*Q+f*y+m*x,o[8]=h*_+f*b+m*L,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*s*u-n*a*c-r*o*u+r*a*l+i*o*c-i*s*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*s-a*c,h=a*l-u*o,f=c*o-s*l,m=n*d+r*h+i*f;if(m===0)return this.set(0,0,0,0,0,0,0,0,0);const T=1/m;return e[0]=d*T,e[1]=(i*c-u*r)*T,e[2]=(a*r-i*s)*T,e[3]=h*T,e[4]=(u*n-i*l)*T,e[5]=(i*o-a*n)*T,e[6]=f*T,e[7]=(r*l-c*n)*T,e[8]=(s*n-r*o)*T,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,o,s,a){const l=Math.cos(o),c=Math.sin(o);return this.set(r*l,r*c,-r*(l*s+c*a)+s+e,-i*c,i*l,-i*(-c*s+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(Fg.makeScale(e,n)),this}rotate(e){return this.premultiply(Fg.makeRotation(-e)),this}translate(e,n){return this.premultiply(Fg.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Fg=new qt;function IU(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function a0(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function hlr(){const t=a0("canvas");return t.style.display="block",t}const JD={};function N4(t){t in JD||(JD[t]=!0,console.warn(t))}const eI=new qt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),tI=new qt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),d5={[Sr]:{transfer:pd,primaries:hd,toReference:t=>t,fromReference:t=>t},[jn]:{transfer:kn,primaries:hd,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[x9]:{transfer:pd,primaries:Td,toReference:t=>t.applyMatrix3(tI),fromReference:t=>t.applyMatrix3(eI)},[Xb]:{transfer:kn,primaries:Td,toReference:t=>t.convertSRGBToLinear().applyMatrix3(tI),fromReference:t=>t.applyMatrix3(eI).convertLinearToSRGB()}},Tlr=new Set([Sr,x9]),Tn={enabled:!0,_workingColorSpace:Sr,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!Tlr.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=d5[e].toReference,i=d5[n].fromReference;return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return d5[t].primaries},getTransfer:function(t){return t===Vi?pd:d5[t].transfer}};function Hl(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function $g(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let nl;class kU{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{nl===void 0&&(nl=a0("canvas")),nl.width=e.width,nl.height=e.height;const r=nl.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=nl}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.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 n=a0("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),o=i.data;for(let s=0;s0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==EU)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case dc:e.x=e.x-Math.floor(e.x);break;case Pi:e.x=e.x<0?0:1;break;case fd: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 dc:e.y=e.y-Math.floor(e.y);break;case Pi:e.y=e.y<0?0:1;break;case fd: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 N4("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===jn?J1:NU}set encoding(e){N4("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===J1?jn:Vi}}xr.DEFAULT_IMAGE=null;xr.DEFAULT_MAPPING=EU;xr.DEFAULT_ANISOTROPY=1;class Mn{constructor(e=0,n=0,r=0,i=1){Mn.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,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,n,r,i){return this.x=e,this.y=n,this.z=r,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.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 n=this.x,r=this.y,i=this.z,o=this.w,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i+s[12]*o,this.y=s[1]*n+s[5]*r+s[9]*i+s[13]*o,this.z=s[2]*n+s[6]*r+s[10]*i+s[14]*o,this.w=s[3]*n+s[7]*r+s[11]*i+s[15]*o,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,o;const l=e.elements,c=l[0],u=l[4],d=l[8],h=l[1],f=l[5],m=l[9],T=l[2],Q=l[6],_=l[10];if(Math.abs(u-h)<.01&&Math.abs(d-T)<.01&&Math.abs(m-Q)<.01){if(Math.abs(u+h)<.1&&Math.abs(d+T)<.1&&Math.abs(m+Q)<.1&&Math.abs(c+f+_-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const y=(c+1)/2,b=(f+1)/2,E=(_+1)/2,x=(u+h)/4,L=(d+T)/4,M=(m+Q)/4;return y>b&&y>E?y<.01?(r=0,i=.707106781,o=.707106781):(r=Math.sqrt(y),i=x/r,o=L/r):b>E?b<.01?(r=.707106781,i=0,o=.707106781):(i=Math.sqrt(b),r=x/i,o=M/i):E<.01?(r=.707106781,i=.707106781,o=0):(o=Math.sqrt(E),r=L/o,i=M/o),this.set(r,i,o,n),this}let v=Math.sqrt((Q-m)*(Q-m)+(d-T)*(d-T)+(h-u)*(h-u));return Math.abs(v)<.001&&(v=1),this.x=(Q-m)/v,this.y=(d-T)/v,this.z=(h-u)/v,this.w=Math.acos((c+f+_-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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),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 _lr extends zc{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Mn(0,0,e,n),this.scissorTest=!1,this.viewport=new Mn(0,0,e,n);const i={width:e,height:n,depth:1};r.encoding!==void 0&&(N4("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),r.colorSpace=r.encoding===J1?jn:Vi),r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ii,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},r),this.texture=new xr(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=r.generateMipmaps,this.texture.internalFormat=r.internalFormat,this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,this.depthTexture=r.depthTexture,this.samples=r.samples}setSize(e,n,r=1){(this.width!==e||this.height!==n||this.depth!==r)&&(this.width=e,this.height=n,this.depth=r,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=r,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}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 n=Object.assign({},e.texture.image);return this.texture.source=new PU(n),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 g2 extends _lr{constructor(e=1,n=1,r={}){super(e,n,r),this.isWebGLRenderTarget=!0}}class HU extends xr{constructor(e=null,n=1,r=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=hr,this.minFilter=hr,this.wrapR=Pi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Qlr extends xr{constructor(e=null,n=1,r=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=hr,this.minFilter=hr,this.wrapR=Pi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class n1{constructor(e=0,n=0,r=0,i=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=r,this._w=i}static slerpFlat(e,n,r,i,o,s,a){let l=r[i+0],c=r[i+1],u=r[i+2],d=r[i+3];const h=o[s+0],f=o[s+1],m=o[s+2],T=o[s+3];if(a===0){e[n+0]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d;return}if(a===1){e[n+0]=h,e[n+1]=f,e[n+2]=m,e[n+3]=T;return}if(d!==T||l!==h||c!==f||u!==m){let Q=1-a;const _=l*h+c*f+u*m+d*T,v=_>=0?1:-1,y=1-_*_;if(y>Number.EPSILON){const E=Math.sqrt(y),x=Math.atan2(E,_*v);Q=Math.sin(Q*x)/E,a=Math.sin(a*x)/E}const b=a*v;if(l=l*Q+h*b,c=c*Q+f*b,u=u*Q+m*b,d=d*Q+T*b,Q===1-a){const E=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=E,c*=E,u*=E,d*=E}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d}static multiplyQuaternionsFlat(e,n,r,i,o,s){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],d=o[s],h=o[s+1],f=o[s+2],m=o[s+3];return e[n]=a*m+u*d+l*f-c*h,e[n+1]=l*m+u*h+c*d-a*f,e[n+2]=c*m+u*f+a*h-l*d,e[n+3]=u*m-a*d-l*h-c*f,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,n,r,i){return this._x=e,this._y=n,this._z=r,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,n){const r=e._x,i=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),d=a(o/2),h=l(r/2),f=l(i/2),m=l(o/2);switch(s){case"XYZ":this._x=h*u*d+c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d-h*f*m;break;case"YXZ":this._x=h*u*d+c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d+h*f*m;break;case"ZXY":this._x=h*u*d-c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d-h*f*m;break;case"ZYX":this._x=h*u*d-c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d+h*f*m;break;case"YZX":this._x=h*u*d+c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d-h*f*m;break;case"XZY":this._x=h*u*d-c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d+h*f*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],o=n[8],s=n[1],a=n[5],l=n[9],c=n[2],u=n[6],d=n[10],h=r+a+d;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(u-l)*f,this._y=(o-c)*f,this._z=(s-i)*f}else if(r>a&&r>d){const f=2*Math.sqrt(1+r-a-d);this._w=(u-l)/f,this._x=.25*f,this._y=(i+s)/f,this._z=(o+c)/f}else if(a>d){const f=2*Math.sqrt(1+a-r-d);this._w=(o-c)/f,this._x=(i+s)/f,this._y=.25*f,this._z=(l+u)/f}else{const f=2*Math.sqrt(1+d-r-a);this._w=(s-i)/f,this._x=(o+c)/f,this._y=(l+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Dr(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);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,n){const r=e._x,i=e._y,o=e._z,s=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+s*a+i*c-o*l,this._y=i*u+s*l+o*a-r*c,this._z=o*u+s*c+r*l-i*a,this._w=s*u-r*a-i*l-o*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,o=this._z,s=this._w;let a=s*e._w+r*e._x+i*e._y+o*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=s,this._x=r,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const f=1-n;return this._w=f*s+n*this._w,this._x=f*r+n*this._x,this._y=f*i+n*this._y,this._z=f*o+n*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),d=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=s*d+this._w*h,this._x=r*d+this._x*h,this._y=i*d+this._y*h,this._z=o*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=Math.random(),n=Math.sqrt(1-e),r=Math.sqrt(e),i=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(n*Math.cos(i),r*Math.sin(o),r*Math.cos(o),n*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),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 Ee{constructor(e=0,n=0,r=0){Ee.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.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,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(nI.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(nI.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=e.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*s,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*s,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*s,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*i-a*r),u=2*(a*n-o*i),d=2*(o*r-s*n);return this.x=n+l*c+s*d-a*u,this.y=r+l*u+a*c-o*d,this.z=i+l*d+o*u-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,o=e.z,s=n.x,a=n.y,l=n.z;return this.x=i*l-o*a,this.y=o*s-r*l,this.z=r*a-i*s,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return Gg.copy(this).projectOnVector(e),this.sub(Gg)}reflect(e){return this.sub(Gg.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Dr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+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,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*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,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,r=Math.sqrt(1-e**2);return this.x=r*Math.cos(n),this.y=r*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Gg=new Ee,nI=new n1;class Ks{constructor(e=new Ee(1/0,1/0,1/0),n=new Ee(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;nthis.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,n){return n.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,no),no.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(i4),p5.subVectors(this.max,i4),rl.subVectors(e.a,i4),il.subVectors(e.b,i4),ol.subVectors(e.c,i4),da.subVectors(il,rl),fa.subVectors(ol,il),A1.subVectors(rl,ol);let n=[0,-da.z,da.y,0,-fa.z,fa.y,0,-A1.z,A1.y,da.z,0,-da.x,fa.z,0,-fa.x,A1.z,0,-A1.x,-da.y,da.x,0,-fa.y,fa.x,0,-A1.y,A1.x,0];return!qg(n,rl,il,ol,p5)||(n=[1,0,0,0,1,0,0,0,1],!qg(n,rl,il,ol,p5))?!1:(h5.crossVectors(da,fa),n=[h5.x,h5.y,h5.z],qg(n,rl,il,ol,p5))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,no).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(no).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:(ms[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ms[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ms[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ms[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ms[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ms[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ms[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ms[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ms),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 ms=[new Ee,new Ee,new Ee,new Ee,new Ee,new Ee,new Ee,new Ee],no=new Ee,f5=new Ks,rl=new Ee,il=new Ee,ol=new Ee,da=new Ee,fa=new Ee,A1=new Ee,i4=new Ee,p5=new Ee,h5=new Ee,w1=new Ee;function qg(t,e,n,r,i){for(let o=0,s=t.length-3;o<=s;o+=3){w1.fromArray(t,o);const a=i.x*Math.abs(w1.x)+i.y*Math.abs(w1.y)+i.z*Math.abs(w1.z),l=e.dot(w1),c=n.dot(w1),u=r.dot(w1);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const vlr=new Ks,o4=new Ee,zg=new Ee;class ns{constructor(e=new Ee,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):vlr.setFromPoints(e).getCenter(r);let i=0;for(let o=0,s=e.length;othis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}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;o4.subVectors(e,this.center);const n=o4.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(o4,i/r),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):(zg.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(o4.copy(e.center).add(zg)),this.expandByPoint(o4.copy(e.center).sub(zg))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const gs=new Ee,jg=new Ee,T5=new Ee,pa=new Ee,Wg=new Ee,m5=new Ee,Yg=new Ee;class S9{constructor(e=new Ee,n=new Ee(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.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,gs)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=gs.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(gs.copy(this.origin).addScaledVector(this.direction,n),gs.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){jg.copy(e).add(n).multiplyScalar(.5),T5.copy(n).sub(e).normalize(),pa.copy(this.origin).sub(jg);const o=e.distanceTo(n)*.5,s=-this.direction.dot(T5),a=pa.dot(this.direction),l=-pa.dot(T5),c=pa.lengthSq(),u=Math.abs(1-s*s);let d,h,f,m;if(u>0)if(d=s*l-a,h=s*a-l,m=o*u,d>=0)if(h>=-m)if(h<=m){const T=1/u;d*=T,h*=T,f=d*(d+s*h+2*a)+h*(s*d+h+2*l)+c}else h=o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;else h=-o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;else h<=-m?(d=Math.max(0,-(-s*o+a)),h=d>0?-o:Math.min(Math.max(-o,-l),o),f=-d*d+h*(h+2*l)+c):h<=m?(d=0,h=Math.min(Math.max(-o,-l),o),f=h*(h+2*l)+c):(d=Math.max(0,-(s*o+a)),h=d>0?o:Math.min(Math.max(-o,-l),o),f=-d*d+h*(h+2*l)+c);else h=s>0?-o:o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,d),i&&i.copy(jg).addScaledVector(T5,h),f}intersectSphere(e,n){gs.subVectors(e.center,this.origin);const r=gs.dot(this.direction),i=gs.dot(gs)-r*r,o=e.radius*e.radius;if(i>o)return null;const s=Math.sqrt(o-i),a=r-s,l=r+s;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,o,s,a,l;const c=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,h=this.origin;return c>=0?(r=(e.min.x-h.x)*c,i=(e.max.x-h.x)*c):(r=(e.max.x-h.x)*c,i=(e.min.x-h.x)*c),u>=0?(o=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(o=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),r>s||o>i||((o>r||isNaN(r))&&(r=o),(s=0?(a=(e.min.z-h.z)*d,l=(e.max.z-h.z)*d):(a=(e.max.z-h.z)*d,l=(e.min.z-h.z)*d),r>l||a>i)||((a>r||r!==r)&&(r=a),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,gs)!==null}intersectTriangle(e,n,r,i,o){Wg.subVectors(n,e),m5.subVectors(r,e),Yg.crossVectors(Wg,m5);let s=this.direction.dot(Yg),a;if(s>0){if(i)return null;a=1}else if(s<0)a=-1,s=-s;else return null;pa.subVectors(this.origin,e);const l=a*this.direction.dot(m5.crossVectors(pa,m5));if(l<0)return null;const c=a*this.direction.dot(Wg.cross(pa));if(c<0||l+c>s)return null;const u=-a*pa.dot(Yg);return u<0?null:this.at(u/s,o)}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 zt{constructor(e,n,r,i,o,s,a,l,c,u,d,h,f,m,T,Q){zt.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,n,r,i,o,s,a,l,c,u,d,h,f,m,T,Q)}set(e,n,r,i,o,s,a,l,c,u,d,h,f,m,T,Q){const _=this.elements;return _[0]=e,_[4]=n,_[8]=r,_[12]=i,_[1]=o,_[5]=s,_[9]=a,_[13]=l,_[2]=c,_[6]=u,_[10]=d,_[14]=h,_[3]=f,_[7]=m,_[11]=T,_[15]=Q,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 zt().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/sl.setFromMatrixColumn(e,0).length(),o=1/sl.setFromMatrixColumn(e,1).length(),s=1/sl.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*s,n[9]=r[9]*s,n[10]=r[10]*s,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,o=e.z,s=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),d=Math.sin(o);if(e.order==="XYZ"){const h=s*u,f=s*d,m=a*u,T=a*d;n[0]=l*u,n[4]=-l*d,n[8]=c,n[1]=f+m*c,n[5]=h-T*c,n[9]=-a*l,n[2]=T-h*c,n[6]=m+f*c,n[10]=s*l}else if(e.order==="YXZ"){const h=l*u,f=l*d,m=c*u,T=c*d;n[0]=h+T*a,n[4]=m*a-f,n[8]=s*c,n[1]=s*d,n[5]=s*u,n[9]=-a,n[2]=f*a-m,n[6]=T+h*a,n[10]=s*l}else if(e.order==="ZXY"){const h=l*u,f=l*d,m=c*u,T=c*d;n[0]=h-T*a,n[4]=-s*d,n[8]=m+f*a,n[1]=f+m*a,n[5]=s*u,n[9]=T-h*a,n[2]=-s*c,n[6]=a,n[10]=s*l}else if(e.order==="ZYX"){const h=s*u,f=s*d,m=a*u,T=a*d;n[0]=l*u,n[4]=m*c-f,n[8]=h*c+T,n[1]=l*d,n[5]=T*c+h,n[9]=f*c-m,n[2]=-c,n[6]=a*l,n[10]=s*l}else if(e.order==="YZX"){const h=s*l,f=s*c,m=a*l,T=a*c;n[0]=l*u,n[4]=T-h*d,n[8]=m*d+f,n[1]=d,n[5]=s*u,n[9]=-a*u,n[2]=-c*u,n[6]=f*d+m,n[10]=h-T*d}else if(e.order==="XZY"){const h=s*l,f=s*c,m=a*l,T=a*c;n[0]=l*u,n[4]=-d,n[8]=c*u,n[1]=h*d+T,n[5]=s*u,n[9]=f*d-m,n[2]=m*d-f,n[6]=a*u,n[10]=T*d+h}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(ylr,e,blr)}lookAt(e,n,r){const i=this.elements;return _i.subVectors(e,n),_i.lengthSq()===0&&(_i.z=1),_i.normalize(),ha.crossVectors(r,_i),ha.lengthSq()===0&&(Math.abs(r.z)===1?_i.x+=1e-4:_i.z+=1e-4,_i.normalize(),ha.crossVectors(r,_i)),ha.normalize(),g5.crossVectors(_i,ha),i[0]=ha.x,i[4]=g5.x,i[8]=_i.x,i[1]=ha.y,i[5]=g5.y,i[9]=_i.y,i[2]=ha.z,i[6]=g5.z,i[10]=_i.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,s=r[0],a=r[4],l=r[8],c=r[12],u=r[1],d=r[5],h=r[9],f=r[13],m=r[2],T=r[6],Q=r[10],_=r[14],v=r[3],y=r[7],b=r[11],E=r[15],x=i[0],L=i[4],M=i[8],C=i[12],A=i[1],I=i[5],N=i[9],P=i[13],O=i[2],F=i[6],V=i[10],U=i[14],G=i[3],K=i[7],W=i[11],te=i[15];return o[0]=s*x+a*A+l*O+c*G,o[4]=s*L+a*I+l*F+c*K,o[8]=s*M+a*N+l*V+c*W,o[12]=s*C+a*P+l*U+c*te,o[1]=u*x+d*A+h*O+f*G,o[5]=u*L+d*I+h*F+f*K,o[9]=u*M+d*N+h*V+f*W,o[13]=u*C+d*P+h*U+f*te,o[2]=m*x+T*A+Q*O+_*G,o[6]=m*L+T*I+Q*F+_*K,o[10]=m*M+T*N+Q*V+_*W,o[14]=m*C+T*P+Q*U+_*te,o[3]=v*x+y*A+b*O+E*G,o[7]=v*L+y*I+b*F+E*K,o[11]=v*M+y*N+b*V+E*W,o[15]=v*C+y*P+b*U+E*te,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],u=e[2],d=e[6],h=e[10],f=e[14],m=e[3],T=e[7],Q=e[11],_=e[15];return m*(+o*l*d-i*c*d-o*a*h+r*c*h+i*a*f-r*l*f)+T*(+n*l*f-n*c*h+o*s*h-i*s*f+i*c*u-o*l*u)+Q*(+n*c*d-n*a*f-o*s*d+r*s*f+o*a*u-r*c*u)+_*(-i*a*u-n*l*d+n*a*h+i*s*d-r*s*h+r*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=e[9],h=e[10],f=e[11],m=e[12],T=e[13],Q=e[14],_=e[15],v=d*Q*c-T*h*c+T*l*f-a*Q*f-d*l*_+a*h*_,y=m*h*c-u*Q*c-m*l*f+s*Q*f+u*l*_-s*h*_,b=u*T*c-m*d*c+m*a*f-s*T*f-u*a*_+s*d*_,E=m*d*l-u*T*l-m*a*h+s*T*h+u*a*Q-s*d*Q,x=n*v+r*y+i*b+o*E;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/x;return e[0]=v*L,e[1]=(T*h*o-d*Q*o-T*i*f+r*Q*f+d*i*_-r*h*_)*L,e[2]=(a*Q*o-T*l*o+T*i*c-r*Q*c-a*i*_+r*l*_)*L,e[3]=(d*l*o-a*h*o-d*i*c+r*h*c+a*i*f-r*l*f)*L,e[4]=y*L,e[5]=(u*Q*o-m*h*o+m*i*f-n*Q*f-u*i*_+n*h*_)*L,e[6]=(m*l*o-s*Q*o-m*i*c+n*Q*c+s*i*_-n*l*_)*L,e[7]=(s*h*o-u*l*o+u*i*c-n*h*c-s*i*f+n*l*f)*L,e[8]=b*L,e[9]=(m*d*o-u*T*o-m*r*f+n*T*f+u*r*_-n*d*_)*L,e[10]=(s*T*o-m*a*o+m*r*c-n*T*c-s*r*_+n*a*_)*L,e[11]=(u*a*o-s*d*o-u*r*c+n*d*c+s*r*f-n*a*f)*L,e[12]=E*L,e[13]=(u*T*i-m*d*i+m*r*h-n*T*h-u*r*Q+n*d*Q)*L,e[14]=(m*a*i-s*T*i-m*r*l+n*T*l+s*r*Q-n*a*Q)*L,e[15]=(s*d*i-u*a*i+u*r*l-n*d*l-s*r*h+n*a*h)*L,this}scale(e){const n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=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(n,r,i))}makeTranslation(e,n,r){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,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),o=1-r,s=e.x,a=e.y,l=e.z,c=o*s,u=o*a;return this.set(c*s+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*s,0,c*l-i*a,u*l+i*s,o*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,o,s){return this.set(1,r,o,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,o=n._x,s=n._y,a=n._z,l=n._w,c=o+o,u=s+s,d=a+a,h=o*c,f=o*u,m=o*d,T=s*u,Q=s*d,_=a*d,v=l*c,y=l*u,b=l*d,E=r.x,x=r.y,L=r.z;return i[0]=(1-(T+_))*E,i[1]=(f+b)*E,i[2]=(m-y)*E,i[3]=0,i[4]=(f-b)*x,i[5]=(1-(h+_))*x,i[6]=(Q+v)*x,i[7]=0,i[8]=(m+y)*L,i[9]=(Q-v)*L,i[10]=(1-(h+T))*L,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let o=sl.set(i[0],i[1],i[2]).length();const s=sl.set(i[4],i[5],i[6]).length(),a=sl.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],ro.copy(this);const c=1/o,u=1/s,d=1/a;return ro.elements[0]*=c,ro.elements[1]*=c,ro.elements[2]*=c,ro.elements[4]*=u,ro.elements[5]*=u,ro.elements[6]*=u,ro.elements[8]*=d,ro.elements[9]*=d,ro.elements[10]*=d,n.setFromRotationMatrix(ro),r.x=o,r.y=s,r.z=a,this}makePerspective(e,n,r,i,o,s,a=Os){const l=this.elements,c=2*o/(n-e),u=2*o/(r-i),d=(n+e)/(n-e),h=(r+i)/(r-i);let f,m;if(a===Os)f=-(s+o)/(s-o),m=-2*s*o/(s-o);else if(a===md)f=-s/(s-o),m=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=f,l[14]=m,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,o,s,a=Os){const l=this.elements,c=1/(n-e),u=1/(r-i),d=1/(s-o),h=(n+e)*c,f=(r+i)*u;let m,T;if(a===Os)m=(s+o)*d,T=-2*d;else if(a===md)m=o*d,T=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-f,l[2]=0,l[6]=0,l[10]=T,l[14]=-m,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const sl=new Ee,ro=new zt,ylr=new Ee(0,0,0),blr=new Ee(1,1,1),ha=new Ee,g5=new Ee,_i=new Ee,rI=new zt,iI=new n1;class L9{constructor(e=0,n=0,r=0,i=L9.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,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,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,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,n=this._order,r=!0){const i=e.elements,o=i[0],s=i[4],a=i[8],l=i[1],c=i[5],u=i[9],d=i[2],h=i[6],f=i[10];switch(n){case"XYZ":this._y=Math.asin(Dr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,f),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Dr(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,o),this._z=0);break;case"ZXY":this._x=Math.asin(Dr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-d,f),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Dr(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(h,f),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(Dr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(a,f));break;case"XZY":this._z=Math.asin(-Dr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-u,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return rI.makeRotationFromQuaternion(e),this.setFromRotationMatrix(rI,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return iI.setFromEuler(this),this.setFromQuaternion(iI,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=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+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}}L9.DEFAULT_ORDER="XYZ";class VU{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(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 o(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.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=o(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),d.length>0&&(r.shapes=d),h.length>0&&(r.skeletons=h),f.length>0&&(r.animations=f),m.length>0&&(r.nodes=m)}return r.object=i,r;function s(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!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)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,n,r,i,o){io.subVectors(i,n),Qs.subVectors(r,n),Kg.subVectors(e,n);const s=io.dot(io),a=io.dot(Qs),l=io.dot(Kg),c=Qs.dot(Qs),u=Qs.dot(Kg),d=s*c-a*a;if(d===0)return o.set(-2,-1,-1);const h=1/d,f=(c*l-a*u)*h,m=(s*u-a*l)*h;return o.set(1-f-m,m,f)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,vs),vs.x>=0&&vs.y>=0&&vs.x+vs.y<=1}static getUV(e,n,r,i,o,s,a,l){return Q5===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Q5=!0),this.getInterpolation(e,n,r,i,o,s,a,l)}static getInterpolation(e,n,r,i,o,s,a,l){return this.getBarycoord(e,n,r,i,vs),l.setScalar(0),l.addScaledVector(o,vs.x),l.addScaledVector(s,vs.y),l.addScaledVector(a,vs.z),l}static isFrontFacing(e,n,r,i){return io.subVectors(r,n),Qs.subVectors(e,n),io.cross(Qs).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),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 io.subVectors(this.c,this.b),Qs.subVectors(this.a,this.b),io.cross(Qs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ao.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return ao.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,r,i,o){return Q5===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Q5=!0),ao.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}getInterpolation(e,n,r,i,o){return ao.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}containsPoint(e){return ao.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ao.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,o=this.c;let s,a;ll.subVectors(i,r),cl.subVectors(o,r),Zg.subVectors(e,r);const l=ll.dot(Zg),c=cl.dot(Zg);if(l<=0&&c<=0)return n.copy(r);Xg.subVectors(e,i);const u=ll.dot(Xg),d=cl.dot(Xg);if(u>=0&&d<=u)return n.copy(i);const h=l*d-u*c;if(h<=0&&l>=0&&u<=0)return s=l/(l-u),n.copy(r).addScaledVector(ll,s);Jg.subVectors(e,o);const f=ll.dot(Jg),m=cl.dot(Jg);if(m>=0&&f<=m)return n.copy(o);const T=f*c-l*m;if(T<=0&&c>=0&&m<=0)return a=c/(c-m),n.copy(r).addScaledVector(cl,a);const Q=u*m-f*d;if(Q<=0&&d-u>=0&&f-m>=0)return cI.subVectors(o,i),a=(d-u)/(d-u+(f-m)),n.copy(i).addScaledVector(cI,a);const _=1/(Q+T+h);return s=T*_,a=h*_,n.copy(r).addScaledVector(ll,s).addScaledVector(cl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const BU={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},Ta={h:0,s:0,l:0},v5={h:0,s:0,l:0};function e_(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class Nt{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,r)}set(e,n,r){if(n===void 0&&r===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,n,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=jn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Tn.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=Tn.workingColorSpace){return this.r=e,this.g=n,this.b=r,Tn.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=Tn.workingColorSpace){if(e=Jb(e,1),n=Dr(n,0,1),r=Dr(r,0,1),n===0)this.r=this.g=this.b=r;else{const o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=e_(s,o,e+1/3),this.g=e_(s,o,e),this.b=e_(s,o,e-1/3)}return Tn.toWorkingColorSpace(this,i),this}setStyle(e,n=jn){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,n);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,n);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=i[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(o,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=jn){const r=BU[e.toLowerCase()];return r!==void 0?this.setHex(r,n):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=Hl(e.r),this.g=Hl(e.g),this.b=Hl(e.b),this}copyLinearToSRGB(e){return this.r=$g(e.r),this.g=$g(e.g),this.b=$g(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=jn){return Tn.fromWorkingColorSpace(Or.copy(this),e),Math.round(Dr(Or.r*255,0,255))*65536+Math.round(Dr(Or.g*255,0,255))*256+Math.round(Dr(Or.b*255,0,255))}getHexString(e=jn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Tn.workingColorSpace){Tn.fromWorkingColorSpace(Or.copy(this),n);const r=Or.r,i=Or.g,o=Or.b,s=Math.max(r,i,o),a=Math.min(r,i,o);let l,c;const u=(a+s)/2;if(a===s)l=0,c=0;else{const d=s-a;switch(c=u<=.5?d/(s+a):d/(2-s-a),s){case r:l=(i-o)/d+(i0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==Pl&&(r.blending=this.blending),this.side!==Us&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==VQ&&(r.blendSrc=this.blendSrc),this.blendDst!==BQ&&(r.blendDst=this.blendDst),this.blendEquation!==B1&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==dd&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==KD&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==tl&&(r.stencilFail=this.stencilFail),this.stencilZFail!==tl&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==tl&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(o){const s=[];for(const a in o){const l=o[a];delete l.metadata,s.push(l)}return s}if(n){const o=i(e.textures),s=i(e.images);o.length>0&&(r.textures=o),s.length>0&&(r.images=s)}return r}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 n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let o=0;o!==i;++o)r[o]=n[o].clone()}return this.clippingPlanes=r,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 Ra extends fo{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Nt(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=Yb,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 Jn=new Ee,y5=new Yt;class Kr{constructor(e,n,r=!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=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=qQ,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ms,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,n){this.updateRanges.push({start:e,count:n})}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,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,o=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let o=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let d=0,h=c.length;d0&&(i[l]=u,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));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 n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(n))}const o=e.morphAttributes;for(const c in o){const u=[],d=o[c];for(let h=0,f=d.length;h0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o(e.far-e.near)**2))&&(uI.copy(o).invert(),M1.copy(e.ray).applyMatrix4(uI),!(r.boundingBox!==null&&M1.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,M1)))}_computeIntersections(e,n,r){let i;const o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,u=o.attributes.uv1,d=o.attributes.normal,h=o.groups,f=o.drawRange;if(a!==null)if(Array.isArray(s))for(let m=0,T=h.length;mn.far?null:{distance:c,point:A5.clone(),object:t}}function w5(t,e,n,r,i,o,s,a,l,c){t.getVertexPosition(a,dl),t.getVertexPosition(l,fl),t.getVertexPosition(c,pl);const u=Mlr(t,e,n,r,dl,fl,pl,C5);if(u){i&&(x5.fromBufferAttribute(i,a),S5.fromBufferAttribute(i,l),L5.fromBufferAttribute(i,c),u.uv=ao.getInterpolation(C5,dl,fl,pl,x5,S5,L5,new Yt)),o&&(x5.fromBufferAttribute(o,a),S5.fromBufferAttribute(o,l),L5.fromBufferAttribute(o,c),u.uv1=ao.getInterpolation(C5,dl,fl,pl,x5,S5,L5,new Yt),u.uv2=u.uv1),s&&(fI.fromBufferAttribute(s,a),pI.fromBufferAttribute(s,l),hI.fromBufferAttribute(s,c),u.normal=ao.getInterpolation(C5,dl,fl,pl,fI,pI,hI,new Ee),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const d={a,b:l,c,normal:new Ee,materialIndex:0};ao.getNormal(dl,fl,pl,d.normal),u.face=d}return u}class Va extends rs{constructor(e=1,n=1,r=1,i=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:s};const a=this;i=Math.floor(i),o=Math.floor(o),s=Math.floor(s);const l=[],c=[],u=[],d=[];let h=0,f=0;m("z","y","x",-1,-1,r,n,e,s,o,0),m("z","y","x",1,-1,r,n,-e,s,o,1),m("x","z","y",1,1,e,r,n,i,s,2),m("x","z","y",1,-1,e,r,-n,i,s,3),m("x","y","z",1,-1,e,n,r,i,o,4),m("x","y","z",-1,-1,e,n,-r,i,o,5),this.setIndex(l),this.setAttribute("position",new Vs(c,3)),this.setAttribute("normal",new Vs(u,3)),this.setAttribute("uv",new Vs(d,2));function m(T,Q,_,v,y,b,E,x,L,M,C){const A=b/L,I=E/M,N=b/2,P=E/2,O=x/2,F=L+1,V=M+1;let U=0,G=0;const K=new Ee;for(let W=0;W0?1:-1,u.push(K.x,K.y,K.z),d.push(de/L),d.push(1-W/M),U+=1}}for(let W=0;W>8&255]+Mr[t>>16&255]+Mr[t>>24&255]+"-"+Mr[e&255]+Mr[e>>8&255]+"-"+Mr[e>>16&15|64]+Mr[e>>24&255]+"-"+Mr[n&63|128]+Mr[n>>8&255]+"-"+Mr[n>>16&255]+Mr[n>>24&255]+Mr[r&255]+Mr[r>>8&255]+Mr[r>>16&255]+Mr[r>>24&255]).toLowerCase()}function Dr(t,e,n){return Math.max(e,Math.min(n,t))}function Jb(t,e){return(t%e+e)%e}function slr(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function alr(t,e,n){return t!==e?(n-t)/(e-t):0}function R4(t,e,n){return(1-n)*t+n*e}function llr(t,e,n,r){return R4(t,e,1-Math.exp(-n*r))}function clr(t,e=1){return e-Math.abs(Jb(t,e*2)-e)}function ulr(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function dlr(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function flr(t,e){return t+Math.floor(Math.random()*(e-t+1))}function plr(t,e){return t+Math.random()*(e-t)}function hlr(t){return t*(.5-Math.random())}function Tlr(t){t!==void 0&&(XD=t);let e=XD+=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 mlr(t){return t*O4}function glr(t){return t*hc}function jQ(t){return(t&t-1)===0&&t!==0}function _lr(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function gd(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Qlr(t,e,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((e+r)/2),u=s((e+r)/2),d=o((e-r)/2),h=s((e-r)/2),f=o((r-e)/2),m=s((r-e)/2);switch(i){case"XYX":t.set(a*u,l*d,l*h,a*c);break;case"YZY":t.set(l*h,a*u,l*d,a*c);break;case"ZXZ":t.set(l*d,l*h,a*u,a*c);break;case"XZX":t.set(a*u,l*m,l*f,a*c);break;case"YXY":t.set(l*f,a*u,l*m,a*c);break;case"ZYZ":t.set(l*m,l*f,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Po(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function bn(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const vlr={DEG2RAD:O4,RAD2DEG:hc,generateUUID:uo,clamp:Dr,euclideanModulo:Jb,mapLinear:slr,inverseLerp:alr,lerp:R4,damp:llr,pingpong:clr,smoothstep:ulr,smootherstep:dlr,randInt:flr,randFloat:plr,randFloatSpread:hlr,seededRandom:Tlr,degToRad:mlr,radToDeg:glr,isPowerOfTwo:jQ,ceilPowerOfTwo:_lr,floorPowerOfTwo:gd,setQuaternionFromProperEuler:Qlr,normalize:bn,denormalize:Po};class Yt{constructor(e=0,n=0){Yt.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.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 n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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 n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Dr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),o=this.x-e.x,s=this.y-e.y;return this.x=o*r-s*i+e.x,this.y=o*i+s*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class qt{constructor(e,n,r,i,o,s,a,l,c){qt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,r,i,o,s,a,l,c)}set(e,n,r,i,o,s,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=o,u[5]=l,u[6]=r,u[7]=s,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,s=r[0],a=r[3],l=r[6],c=r[1],u=r[4],d=r[7],h=r[2],f=r[5],m=r[8],T=i[0],Q=i[3],_=i[6],v=i[1],y=i[4],b=i[7],E=i[2],x=i[5],L=i[8];return o[0]=s*T+a*v+l*E,o[3]=s*Q+a*y+l*x,o[6]=s*_+a*b+l*L,o[1]=c*T+u*v+d*E,o[4]=c*Q+u*y+d*x,o[7]=c*_+u*b+d*L,o[2]=h*T+f*v+m*E,o[5]=h*Q+f*y+m*x,o[8]=h*_+f*b+m*L,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*s*u-n*a*c-r*o*u+r*a*l+i*o*c-i*s*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*s-a*c,h=a*l-u*o,f=c*o-s*l,m=n*d+r*h+i*f;if(m===0)return this.set(0,0,0,0,0,0,0,0,0);const T=1/m;return e[0]=d*T,e[1]=(i*c-u*r)*T,e[2]=(a*r-i*s)*T,e[3]=h*T,e[4]=(u*n-i*l)*T,e[5]=(i*o-a*n)*T,e[6]=f*T,e[7]=(r*l-c*n)*T,e[8]=(s*n-r*o)*T,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,o,s,a){const l=Math.cos(o),c=Math.sin(o);return this.set(r*l,r*c,-r*(l*s+c*a)+s+e,-i*c,i*l,-i*(-c*s+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(Fg.makeScale(e,n)),this}rotate(e){return this.premultiply(Fg.makeRotation(-e)),this}translate(e,n){return this.premultiply(Fg.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Fg=new qt;function IU(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function a0(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function ylr(){const t=a0("canvas");return t.style.display="block",t}const JD={};function N4(t){t in JD||(JD[t]=!0,console.warn(t))}const eI=new qt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),tI=new qt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),d5={[Sr]:{transfer:pd,primaries:hd,toReference:t=>t,fromReference:t=>t},[jn]:{transfer:kn,primaries:hd,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[x9]:{transfer:pd,primaries:Td,toReference:t=>t.applyMatrix3(tI),fromReference:t=>t.applyMatrix3(eI)},[Xb]:{transfer:kn,primaries:Td,toReference:t=>t.convertSRGBToLinear().applyMatrix3(tI),fromReference:t=>t.applyMatrix3(eI).convertLinearToSRGB()}},blr=new Set([Sr,x9]),Tn={enabled:!0,_workingColorSpace:Sr,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!blr.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=d5[e].toReference,i=d5[n].fromReference;return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return d5[t].primaries},getTransfer:function(t){return t===Vi?pd:d5[t].transfer}};function Hl(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function $g(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let nl;class kU{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{nl===void 0&&(nl=a0("canvas")),nl.width=e.width,nl.height=e.height;const r=nl.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=nl}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.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 n=a0("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),o=i.data;for(let s=0;s0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==EU)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case dc:e.x=e.x-Math.floor(e.x);break;case Pi:e.x=e.x<0?0:1;break;case fd: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 dc:e.y=e.y-Math.floor(e.y);break;case Pi:e.y=e.y<0?0:1;break;case fd: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 N4("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===jn?J1:NU}set encoding(e){N4("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===J1?jn:Vi}}xr.DEFAULT_IMAGE=null;xr.DEFAULT_MAPPING=EU;xr.DEFAULT_ANISOTROPY=1;class Mn{constructor(e=0,n=0,r=0,i=1){Mn.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,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,n,r,i){return this.x=e,this.y=n,this.z=r,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.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 n=this.x,r=this.y,i=this.z,o=this.w,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i+s[12]*o,this.y=s[1]*n+s[5]*r+s[9]*i+s[13]*o,this.z=s[2]*n+s[6]*r+s[10]*i+s[14]*o,this.w=s[3]*n+s[7]*r+s[11]*i+s[15]*o,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,o;const l=e.elements,c=l[0],u=l[4],d=l[8],h=l[1],f=l[5],m=l[9],T=l[2],Q=l[6],_=l[10];if(Math.abs(u-h)<.01&&Math.abs(d-T)<.01&&Math.abs(m-Q)<.01){if(Math.abs(u+h)<.1&&Math.abs(d+T)<.1&&Math.abs(m+Q)<.1&&Math.abs(c+f+_-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const y=(c+1)/2,b=(f+1)/2,E=(_+1)/2,x=(u+h)/4,L=(d+T)/4,M=(m+Q)/4;return y>b&&y>E?y<.01?(r=0,i=.707106781,o=.707106781):(r=Math.sqrt(y),i=x/r,o=L/r):b>E?b<.01?(r=.707106781,i=0,o=.707106781):(i=Math.sqrt(b),r=x/i,o=M/i):E<.01?(r=.707106781,i=.707106781,o=0):(o=Math.sqrt(E),r=L/o,i=M/o),this.set(r,i,o,n),this}let v=Math.sqrt((Q-m)*(Q-m)+(d-T)*(d-T)+(h-u)*(h-u));return Math.abs(v)<.001&&(v=1),this.x=(Q-m)/v,this.y=(d-T)/v,this.z=(h-u)/v,this.w=Math.acos((c+f+_-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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),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 Slr extends zc{constructor(e=1,n=1,r={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Mn(0,0,e,n),this.scissorTest=!1,this.viewport=new Mn(0,0,e,n);const i={width:e,height:n,depth:1};r.encoding!==void 0&&(N4("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),r.colorSpace=r.encoding===J1?jn:Vi),r=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:ii,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},r),this.texture=new xr(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=r.generateMipmaps,this.texture.internalFormat=r.internalFormat,this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,this.depthTexture=r.depthTexture,this.samples=r.samples}setSize(e,n,r=1){(this.width!==e||this.height!==n||this.depth!==r)&&(this.width=e,this.height=n,this.depth=r,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=r,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}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 n=Object.assign({},e.texture.image);return this.texture.source=new PU(n),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 g2 extends Slr{constructor(e=1,n=1,r={}){super(e,n,r),this.isWebGLRenderTarget=!0}}class HU extends xr{constructor(e=null,n=1,r=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=hr,this.minFilter=hr,this.wrapR=Pi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Llr extends xr{constructor(e=null,n=1,r=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=hr,this.minFilter=hr,this.wrapR=Pi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class n1{constructor(e=0,n=0,r=0,i=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=r,this._w=i}static slerpFlat(e,n,r,i,o,s,a){let l=r[i+0],c=r[i+1],u=r[i+2],d=r[i+3];const h=o[s+0],f=o[s+1],m=o[s+2],T=o[s+3];if(a===0){e[n+0]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d;return}if(a===1){e[n+0]=h,e[n+1]=f,e[n+2]=m,e[n+3]=T;return}if(d!==T||l!==h||c!==f||u!==m){let Q=1-a;const _=l*h+c*f+u*m+d*T,v=_>=0?1:-1,y=1-_*_;if(y>Number.EPSILON){const E=Math.sqrt(y),x=Math.atan2(E,_*v);Q=Math.sin(Q*x)/E,a=Math.sin(a*x)/E}const b=a*v;if(l=l*Q+h*b,c=c*Q+f*b,u=u*Q+m*b,d=d*Q+T*b,Q===1-a){const E=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=E,c*=E,u*=E,d*=E}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d}static multiplyQuaternionsFlat(e,n,r,i,o,s){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],d=o[s],h=o[s+1],f=o[s+2],m=o[s+3];return e[n]=a*m+u*d+l*f-c*h,e[n+1]=l*m+u*h+c*d-a*f,e[n+2]=c*m+u*f+a*h-l*d,e[n+3]=u*m-a*d-l*h-c*f,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,n,r,i){return this._x=e,this._y=n,this._z=r,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,n){const r=e._x,i=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),d=a(o/2),h=l(r/2),f=l(i/2),m=l(o/2);switch(s){case"XYZ":this._x=h*u*d+c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d-h*f*m;break;case"YXZ":this._x=h*u*d+c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d+h*f*m;break;case"ZXY":this._x=h*u*d-c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d-h*f*m;break;case"ZYX":this._x=h*u*d-c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d+h*f*m;break;case"YZX":this._x=h*u*d+c*f*m,this._y=c*f*d+h*u*m,this._z=c*u*m-h*f*d,this._w=c*u*d-h*f*m;break;case"XZY":this._x=h*u*d-c*f*m,this._y=c*f*d-h*u*m,this._z=c*u*m+h*f*d,this._w=c*u*d+h*f*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],o=n[8],s=n[1],a=n[5],l=n[9],c=n[2],u=n[6],d=n[10],h=r+a+d;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(u-l)*f,this._y=(o-c)*f,this._z=(s-i)*f}else if(r>a&&r>d){const f=2*Math.sqrt(1+r-a-d);this._w=(u-l)/f,this._x=.25*f,this._y=(i+s)/f,this._z=(o+c)/f}else if(a>d){const f=2*Math.sqrt(1+a-r-d);this._w=(o-c)/f,this._x=(i+s)/f,this._y=.25*f,this._z=(l+u)/f}else{const f=2*Math.sqrt(1+d-r-a);this._w=(s-i)/f,this._x=(o+c)/f,this._y=(l+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Dr(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);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,n){const r=e._x,i=e._y,o=e._z,s=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+s*a+i*c-o*l,this._y=i*u+s*l+o*a-r*c,this._z=o*u+s*c+r*l-i*a,this._w=s*u-r*a-i*l-o*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,o=this._z,s=this._w;let a=s*e._w+r*e._x+i*e._y+o*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=s,this._x=r,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const f=1-n;return this._w=f*s+n*this._w,this._x=f*r+n*this._x,this._y=f*i+n*this._y,this._z=f*o+n*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),d=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=s*d+this._w*h,this._x=r*d+this._x*h,this._y=i*d+this._y*h,this._z=o*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=Math.random(),n=Math.sqrt(1-e),r=Math.sqrt(e),i=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(n*Math.cos(i),r*Math.sin(o),r*Math.cos(o),n*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),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 Ee{constructor(e=0,n=0,r=0){Ee.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,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,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;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,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,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,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.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,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(nI.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(nI.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=e.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*s,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*s,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*s,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*i-a*r),u=2*(a*n-o*i),d=2*(o*r-s*n);return this.x=n+l*c+s*d-a*u,this.y=r+l*u+a*c-o*d,this.z=i+l*d+o*u-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[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,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}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,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,o=e.z,s=n.x,a=n.y,l=n.z;return this.x=i*l-o*a,this.y=o*s-r*l,this.z=r*a-i*s,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return Gg.copy(this).projectOnVector(e),this.sub(Gg)}reflect(e){return this.sub(Gg.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Dr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+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,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*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,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,r=Math.sqrt(1-e**2);return this.x=r*Math.cos(n),this.y=r*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Gg=new Ee,nI=new n1;class Ks{constructor(e=new Ee(1/0,1/0,1/0),n=new Ee(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;nthis.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,n){return n.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,no),no.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(i4),p5.subVectors(this.max,i4),rl.subVectors(e.a,i4),il.subVectors(e.b,i4),ol.subVectors(e.c,i4),da.subVectors(il,rl),fa.subVectors(ol,il),A1.subVectors(rl,ol);let n=[0,-da.z,da.y,0,-fa.z,fa.y,0,-A1.z,A1.y,da.z,0,-da.x,fa.z,0,-fa.x,A1.z,0,-A1.x,-da.y,da.x,0,-fa.y,fa.x,0,-A1.y,A1.x,0];return!qg(n,rl,il,ol,p5)||(n=[1,0,0,0,1,0,0,0,1],!qg(n,rl,il,ol,p5))?!1:(h5.crossVectors(da,fa),n=[h5.x,h5.y,h5.z],qg(n,rl,il,ol,p5))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,no).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(no).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:(ms[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ms[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ms[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ms[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ms[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ms[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ms[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ms[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ms),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 ms=[new Ee,new Ee,new Ee,new Ee,new Ee,new Ee,new Ee,new Ee],no=new Ee,f5=new Ks,rl=new Ee,il=new Ee,ol=new Ee,da=new Ee,fa=new Ee,A1=new Ee,i4=new Ee,p5=new Ee,h5=new Ee,w1=new Ee;function qg(t,e,n,r,i){for(let o=0,s=t.length-3;o<=s;o+=3){w1.fromArray(t,o);const a=i.x*Math.abs(w1.x)+i.y*Math.abs(w1.y)+i.z*Math.abs(w1.z),l=e.dot(w1),c=n.dot(w1),u=r.dot(w1);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const Clr=new Ks,o4=new Ee,zg=new Ee;class ns{constructor(e=new Ee,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):Clr.setFromPoints(e).getCenter(r);let i=0;for(let o=0,s=e.length;othis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}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;o4.subVectors(e,this.center);const n=o4.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(o4,i/r),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):(zg.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(o4.copy(e.center).add(zg)),this.expandByPoint(o4.copy(e.center).sub(zg))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const gs=new Ee,jg=new Ee,T5=new Ee,pa=new Ee,Wg=new Ee,m5=new Ee,Yg=new Ee;class S9{constructor(e=new Ee,n=new Ee(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.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,gs)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=gs.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(gs.copy(this.origin).addScaledVector(this.direction,n),gs.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){jg.copy(e).add(n).multiplyScalar(.5),T5.copy(n).sub(e).normalize(),pa.copy(this.origin).sub(jg);const o=e.distanceTo(n)*.5,s=-this.direction.dot(T5),a=pa.dot(this.direction),l=-pa.dot(T5),c=pa.lengthSq(),u=Math.abs(1-s*s);let d,h,f,m;if(u>0)if(d=s*l-a,h=s*a-l,m=o*u,d>=0)if(h>=-m)if(h<=m){const T=1/u;d*=T,h*=T,f=d*(d+s*h+2*a)+h*(s*d+h+2*l)+c}else h=o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;else h=-o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;else h<=-m?(d=Math.max(0,-(-s*o+a)),h=d>0?-o:Math.min(Math.max(-o,-l),o),f=-d*d+h*(h+2*l)+c):h<=m?(d=0,h=Math.min(Math.max(-o,-l),o),f=h*(h+2*l)+c):(d=Math.max(0,-(s*o+a)),h=d>0?o:Math.min(Math.max(-o,-l),o),f=-d*d+h*(h+2*l)+c);else h=s>0?-o:o,d=Math.max(0,-(s*h+a)),f=-d*d+h*(h+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,d),i&&i.copy(jg).addScaledVector(T5,h),f}intersectSphere(e,n){gs.subVectors(e.center,this.origin);const r=gs.dot(this.direction),i=gs.dot(gs)-r*r,o=e.radius*e.radius;if(i>o)return null;const s=Math.sqrt(o-i),a=r-s,l=r+s;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,o,s,a,l;const c=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,h=this.origin;return c>=0?(r=(e.min.x-h.x)*c,i=(e.max.x-h.x)*c):(r=(e.max.x-h.x)*c,i=(e.min.x-h.x)*c),u>=0?(o=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(o=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),r>s||o>i||((o>r||isNaN(r))&&(r=o),(s=0?(a=(e.min.z-h.z)*d,l=(e.max.z-h.z)*d):(a=(e.max.z-h.z)*d,l=(e.min.z-h.z)*d),r>l||a>i)||((a>r||r!==r)&&(r=a),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,gs)!==null}intersectTriangle(e,n,r,i,o){Wg.subVectors(n,e),m5.subVectors(r,e),Yg.crossVectors(Wg,m5);let s=this.direction.dot(Yg),a;if(s>0){if(i)return null;a=1}else if(s<0)a=-1,s=-s;else return null;pa.subVectors(this.origin,e);const l=a*this.direction.dot(m5.crossVectors(pa,m5));if(l<0)return null;const c=a*this.direction.dot(Wg.cross(pa));if(c<0||l+c>s)return null;const u=-a*pa.dot(Yg);return u<0?null:this.at(u/s,o)}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 zt{constructor(e,n,r,i,o,s,a,l,c,u,d,h,f,m,T,Q){zt.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,n,r,i,o,s,a,l,c,u,d,h,f,m,T,Q)}set(e,n,r,i,o,s,a,l,c,u,d,h,f,m,T,Q){const _=this.elements;return _[0]=e,_[4]=n,_[8]=r,_[12]=i,_[1]=o,_[5]=s,_[9]=a,_[13]=l,_[2]=c,_[6]=u,_[10]=d,_[14]=h,_[3]=f,_[7]=m,_[11]=T,_[15]=Q,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 zt().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/sl.setFromMatrixColumn(e,0).length(),o=1/sl.setFromMatrixColumn(e,1).length(),s=1/sl.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*s,n[9]=r[9]*s,n[10]=r[10]*s,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,o=e.z,s=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),d=Math.sin(o);if(e.order==="XYZ"){const h=s*u,f=s*d,m=a*u,T=a*d;n[0]=l*u,n[4]=-l*d,n[8]=c,n[1]=f+m*c,n[5]=h-T*c,n[9]=-a*l,n[2]=T-h*c,n[6]=m+f*c,n[10]=s*l}else if(e.order==="YXZ"){const h=l*u,f=l*d,m=c*u,T=c*d;n[0]=h+T*a,n[4]=m*a-f,n[8]=s*c,n[1]=s*d,n[5]=s*u,n[9]=-a,n[2]=f*a-m,n[6]=T+h*a,n[10]=s*l}else if(e.order==="ZXY"){const h=l*u,f=l*d,m=c*u,T=c*d;n[0]=h-T*a,n[4]=-s*d,n[8]=m+f*a,n[1]=f+m*a,n[5]=s*u,n[9]=T-h*a,n[2]=-s*c,n[6]=a,n[10]=s*l}else if(e.order==="ZYX"){const h=s*u,f=s*d,m=a*u,T=a*d;n[0]=l*u,n[4]=m*c-f,n[8]=h*c+T,n[1]=l*d,n[5]=T*c+h,n[9]=f*c-m,n[2]=-c,n[6]=a*l,n[10]=s*l}else if(e.order==="YZX"){const h=s*l,f=s*c,m=a*l,T=a*c;n[0]=l*u,n[4]=T-h*d,n[8]=m*d+f,n[1]=d,n[5]=s*u,n[9]=-a*u,n[2]=-c*u,n[6]=f*d+m,n[10]=h-T*d}else if(e.order==="XZY"){const h=s*l,f=s*c,m=a*l,T=a*c;n[0]=l*u,n[4]=-d,n[8]=c*u,n[1]=h*d+T,n[5]=s*u,n[9]=f*d-m,n[2]=m*d-f,n[6]=a*u,n[10]=T*d+h}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Alr,e,wlr)}lookAt(e,n,r){const i=this.elements;return _i.subVectors(e,n),_i.lengthSq()===0&&(_i.z=1),_i.normalize(),ha.crossVectors(r,_i),ha.lengthSq()===0&&(Math.abs(r.z)===1?_i.x+=1e-4:_i.z+=1e-4,_i.normalize(),ha.crossVectors(r,_i)),ha.normalize(),g5.crossVectors(_i,ha),i[0]=ha.x,i[4]=g5.x,i[8]=_i.x,i[1]=ha.y,i[5]=g5.y,i[9]=_i.y,i[2]=ha.z,i[6]=g5.z,i[10]=_i.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,s=r[0],a=r[4],l=r[8],c=r[12],u=r[1],d=r[5],h=r[9],f=r[13],m=r[2],T=r[6],Q=r[10],_=r[14],v=r[3],y=r[7],b=r[11],E=r[15],x=i[0],L=i[4],M=i[8],C=i[12],A=i[1],I=i[5],N=i[9],P=i[13],O=i[2],F=i[6],V=i[10],U=i[14],G=i[3],K=i[7],W=i[11],te=i[15];return o[0]=s*x+a*A+l*O+c*G,o[4]=s*L+a*I+l*F+c*K,o[8]=s*M+a*N+l*V+c*W,o[12]=s*C+a*P+l*U+c*te,o[1]=u*x+d*A+h*O+f*G,o[5]=u*L+d*I+h*F+f*K,o[9]=u*M+d*N+h*V+f*W,o[13]=u*C+d*P+h*U+f*te,o[2]=m*x+T*A+Q*O+_*G,o[6]=m*L+T*I+Q*F+_*K,o[10]=m*M+T*N+Q*V+_*W,o[14]=m*C+T*P+Q*U+_*te,o[3]=v*x+y*A+b*O+E*G,o[7]=v*L+y*I+b*F+E*K,o[11]=v*M+y*N+b*V+E*W,o[15]=v*C+y*P+b*U+E*te,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],u=e[2],d=e[6],h=e[10],f=e[14],m=e[3],T=e[7],Q=e[11],_=e[15];return m*(+o*l*d-i*c*d-o*a*h+r*c*h+i*a*f-r*l*f)+T*(+n*l*f-n*c*h+o*s*h-i*s*f+i*c*u-o*l*u)+Q*(+n*c*d-n*a*f-o*s*d+r*s*f+o*a*u-r*c*u)+_*(-i*a*u-n*l*d+n*a*h+i*s*d-r*s*h+r*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=e[9],h=e[10],f=e[11],m=e[12],T=e[13],Q=e[14],_=e[15],v=d*Q*c-T*h*c+T*l*f-a*Q*f-d*l*_+a*h*_,y=m*h*c-u*Q*c-m*l*f+s*Q*f+u*l*_-s*h*_,b=u*T*c-m*d*c+m*a*f-s*T*f-u*a*_+s*d*_,E=m*d*l-u*T*l-m*a*h+s*T*h+u*a*Q-s*d*Q,x=n*v+r*y+i*b+o*E;if(x===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/x;return e[0]=v*L,e[1]=(T*h*o-d*Q*o-T*i*f+r*Q*f+d*i*_-r*h*_)*L,e[2]=(a*Q*o-T*l*o+T*i*c-r*Q*c-a*i*_+r*l*_)*L,e[3]=(d*l*o-a*h*o-d*i*c+r*h*c+a*i*f-r*l*f)*L,e[4]=y*L,e[5]=(u*Q*o-m*h*o+m*i*f-n*Q*f-u*i*_+n*h*_)*L,e[6]=(m*l*o-s*Q*o-m*i*c+n*Q*c+s*i*_-n*l*_)*L,e[7]=(s*h*o-u*l*o+u*i*c-n*h*c-s*i*f+n*l*f)*L,e[8]=b*L,e[9]=(m*d*o-u*T*o-m*r*f+n*T*f+u*r*_-n*d*_)*L,e[10]=(s*T*o-m*a*o+m*r*c-n*T*c-s*r*_+n*a*_)*L,e[11]=(u*a*o-s*d*o-u*r*c+n*d*c+s*r*f-n*a*f)*L,e[12]=E*L,e[13]=(u*T*i-m*d*i+m*r*h-n*T*h-u*r*Q+n*d*Q)*L,e[14]=(m*a*i-s*T*i-m*r*l+n*T*l+s*r*Q-n*a*Q)*L,e[15]=(s*d*i-u*a*i+u*r*l-n*d*l-s*r*h+n*a*h)*L,this}scale(e){const n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=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(n,r,i))}makeTranslation(e,n,r){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,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),o=1-r,s=e.x,a=e.y,l=e.z,c=o*s,u=o*a;return this.set(c*s+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*s,0,c*l-i*a,u*l+i*s,o*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,o,s){return this.set(1,r,o,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,o=n._x,s=n._y,a=n._z,l=n._w,c=o+o,u=s+s,d=a+a,h=o*c,f=o*u,m=o*d,T=s*u,Q=s*d,_=a*d,v=l*c,y=l*u,b=l*d,E=r.x,x=r.y,L=r.z;return i[0]=(1-(T+_))*E,i[1]=(f+b)*E,i[2]=(m-y)*E,i[3]=0,i[4]=(f-b)*x,i[5]=(1-(h+_))*x,i[6]=(Q+v)*x,i[7]=0,i[8]=(m+y)*L,i[9]=(Q-v)*L,i[10]=(1-(h+T))*L,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let o=sl.set(i[0],i[1],i[2]).length();const s=sl.set(i[4],i[5],i[6]).length(),a=sl.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],ro.copy(this);const c=1/o,u=1/s,d=1/a;return ro.elements[0]*=c,ro.elements[1]*=c,ro.elements[2]*=c,ro.elements[4]*=u,ro.elements[5]*=u,ro.elements[6]*=u,ro.elements[8]*=d,ro.elements[9]*=d,ro.elements[10]*=d,n.setFromRotationMatrix(ro),r.x=o,r.y=s,r.z=a,this}makePerspective(e,n,r,i,o,s,a=Os){const l=this.elements,c=2*o/(n-e),u=2*o/(r-i),d=(n+e)/(n-e),h=(r+i)/(r-i);let f,m;if(a===Os)f=-(s+o)/(s-o),m=-2*s*o/(s-o);else if(a===md)f=-s/(s-o),m=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=f,l[14]=m,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,r,i,o,s,a=Os){const l=this.elements,c=1/(n-e),u=1/(r-i),d=1/(s-o),h=(n+e)*c,f=(r+i)*u;let m,T;if(a===Os)m=(s+o)*d,T=-2*d;else if(a===md)m=o*d,T=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-f,l[2]=0,l[6]=0,l[10]=T,l[14]=-m,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const sl=new Ee,ro=new zt,Alr=new Ee(0,0,0),wlr=new Ee(1,1,1),ha=new Ee,g5=new Ee,_i=new Ee,rI=new zt,iI=new n1;class L9{constructor(e=0,n=0,r=0,i=L9.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,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,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,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,n=this._order,r=!0){const i=e.elements,o=i[0],s=i[4],a=i[8],l=i[1],c=i[5],u=i[9],d=i[2],h=i[6],f=i[10];switch(n){case"XYZ":this._y=Math.asin(Dr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,f),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Dr(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,o),this._z=0);break;case"ZXY":this._x=Math.asin(Dr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-d,f),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Dr(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(h,f),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(Dr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(a,f));break;case"XZY":this._z=Math.asin(-Dr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-u,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return rI.makeRotationFromQuaternion(e),this.setFromRotationMatrix(rI,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return iI.setFromEuler(this),this.setFromQuaternion(iI,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=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+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}}L9.DEFAULT_ORDER="XYZ";class VU{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(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 o(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.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=o(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),d.length>0&&(r.shapes=d),h.length>0&&(r.skeletons=h),f.length>0&&(r.animations=f),m.length>0&&(r.nodes=m)}return r.object=i,r;function s(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!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)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,n,r,i,o){io.subVectors(i,n),Qs.subVectors(r,n),Kg.subVectors(e,n);const s=io.dot(io),a=io.dot(Qs),l=io.dot(Kg),c=Qs.dot(Qs),u=Qs.dot(Kg),d=s*c-a*a;if(d===0)return o.set(-2,-1,-1);const h=1/d,f=(c*l-a*u)*h,m=(s*u-a*l)*h;return o.set(1-f-m,m,f)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,vs),vs.x>=0&&vs.y>=0&&vs.x+vs.y<=1}static getUV(e,n,r,i,o,s,a,l){return Q5===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Q5=!0),this.getInterpolation(e,n,r,i,o,s,a,l)}static getInterpolation(e,n,r,i,o,s,a,l){return this.getBarycoord(e,n,r,i,vs),l.setScalar(0),l.addScaledVector(o,vs.x),l.addScaledVector(s,vs.y),l.addScaledVector(a,vs.z),l}static isFrontFacing(e,n,r,i){return io.subVectors(r,n),Qs.subVectors(e,n),io.cross(Qs).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),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 io.subVectors(this.c,this.b),Qs.subVectors(this.a,this.b),io.cross(Qs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ao.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return ao.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,r,i,o){return Q5===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Q5=!0),ao.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}getInterpolation(e,n,r,i,o){return ao.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}containsPoint(e){return ao.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ao.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,o=this.c;let s,a;ll.subVectors(i,r),cl.subVectors(o,r),Zg.subVectors(e,r);const l=ll.dot(Zg),c=cl.dot(Zg);if(l<=0&&c<=0)return n.copy(r);Xg.subVectors(e,i);const u=ll.dot(Xg),d=cl.dot(Xg);if(u>=0&&d<=u)return n.copy(i);const h=l*d-u*c;if(h<=0&&l>=0&&u<=0)return s=l/(l-u),n.copy(r).addScaledVector(ll,s);Jg.subVectors(e,o);const f=ll.dot(Jg),m=cl.dot(Jg);if(m>=0&&f<=m)return n.copy(o);const T=f*c-l*m;if(T<=0&&c>=0&&m<=0)return a=c/(c-m),n.copy(r).addScaledVector(cl,a);const Q=u*m-f*d;if(Q<=0&&d-u>=0&&f-m>=0)return cI.subVectors(o,i),a=(d-u)/(d-u+(f-m)),n.copy(i).addScaledVector(cI,a);const _=1/(Q+T+h);return s=T*_,a=h*_,n.copy(r).addScaledVector(ll,s).addScaledVector(cl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const BU={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},Ta={h:0,s:0,l:0},v5={h:0,s:0,l:0};function e_(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class Nt{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,r)}set(e,n,r){if(n===void 0&&r===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,n,r);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=jn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Tn.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=Tn.workingColorSpace){return this.r=e,this.g=n,this.b=r,Tn.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=Tn.workingColorSpace){if(e=Jb(e,1),n=Dr(n,0,1),r=Dr(r,0,1),n===0)this.r=this.g=this.b=r;else{const o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=e_(s,o,e+1/3),this.g=e_(s,o,e),this.b=e_(s,o,e-1/3)}return Tn.toWorkingColorSpace(this,i),this}setStyle(e,n=jn){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,n);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,n);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return r(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=i[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(o,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=jn){const r=BU[e.toLowerCase()];return r!==void 0?this.setHex(r,n):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=Hl(e.r),this.g=Hl(e.g),this.b=Hl(e.b),this}copyLinearToSRGB(e){return this.r=$g(e.r),this.g=$g(e.g),this.b=$g(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=jn){return Tn.fromWorkingColorSpace(Or.copy(this),e),Math.round(Dr(Or.r*255,0,255))*65536+Math.round(Dr(Or.g*255,0,255))*256+Math.round(Dr(Or.b*255,0,255))}getHexString(e=jn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Tn.workingColorSpace){Tn.fromWorkingColorSpace(Or.copy(this),n);const r=Or.r,i=Or.g,o=Or.b,s=Math.max(r,i,o),a=Math.min(r,i,o);let l,c;const u=(a+s)/2;if(a===s)l=0,c=0;else{const d=s-a;switch(c=u<=.5?d/(s+a):d/(2-s-a),s){case r:l=(i-o)/d+(i0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(r.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(r.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(r.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==Pl&&(r.blending=this.blending),this.side!==Us&&(r.side=this.side),this.vertexColors===!0&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=!0),this.blendSrc!==VQ&&(r.blendSrc=this.blendSrc),this.blendDst!==BQ&&(r.blendDst=this.blendDst),this.blendEquation!==B1&&(r.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(r.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(r.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(r.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(r.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(r.blendAlpha=this.blendAlpha),this.depthFunc!==dd&&(r.depthFunc=this.depthFunc),this.depthTest===!1&&(r.depthTest=this.depthTest),this.depthWrite===!1&&(r.depthWrite=this.depthWrite),this.colorWrite===!1&&(r.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(r.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==KD&&(r.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(r.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(r.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==tl&&(r.stencilFail=this.stencilFail),this.stencilZFail!==tl&&(r.stencilZFail=this.stencilZFail),this.stencilZPass!==tl&&(r.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(r.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaHash===!0&&(r.alphaHash=!0),this.alphaToCoverage===!0&&(r.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=!0),this.forceSinglePass===!0&&(r.forceSinglePass=!0),this.wireframe===!0&&(r.wireframe=!0),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=!0),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(o){const s=[];for(const a in o){const l=o[a];delete l.metadata,s.push(l)}return s}if(n){const o=i(e.textures),s=i(e.images);o.length>0&&(r.textures=o),s.length>0&&(r.images=s)}return r}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 n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let o=0;o!==i;++o)r[o]=n[o].clone()}return this.clippingPlanes=r,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 Ra extends fo{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Nt(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=Yb,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 Jn=new Ee,y5=new Yt;class Kr{constructor(e,n,r=!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=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=qQ,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ms,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,n){this.updateRanges.push({start:e,count:n})}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,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,o=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let o=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let d=0,h=c.length;d0&&(i[l]=u,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));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 n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(n))}const o=e.morphAttributes;for(const c in o){const u=[],d=o[c];for(let h=0,f=d.length;h0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o(e.far-e.near)**2))&&(uI.copy(o).invert(),M1.copy(e.ray).applyMatrix4(uI),!(r.boundingBox!==null&&M1.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,M1)))}_computeIntersections(e,n,r){let i;const o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,u=o.attributes.uv1,d=o.attributes.normal,h=o.groups,f=o.drawRange;if(a!==null)if(Array.isArray(s))for(let m=0,T=h.length;mn.far?null:{distance:c,point:A5.clone(),object:t}}function w5(t,e,n,r,i,o,s,a,l,c){t.getVertexPosition(a,dl),t.getVertexPosition(l,fl),t.getVertexPosition(c,pl);const u=Plr(t,e,n,r,dl,fl,pl,C5);if(u){i&&(x5.fromBufferAttribute(i,a),S5.fromBufferAttribute(i,l),L5.fromBufferAttribute(i,c),u.uv=ao.getInterpolation(C5,dl,fl,pl,x5,S5,L5,new Yt)),o&&(x5.fromBufferAttribute(o,a),S5.fromBufferAttribute(o,l),L5.fromBufferAttribute(o,c),u.uv1=ao.getInterpolation(C5,dl,fl,pl,x5,S5,L5,new Yt),u.uv2=u.uv1),s&&(fI.fromBufferAttribute(s,a),pI.fromBufferAttribute(s,l),hI.fromBufferAttribute(s,c),u.normal=ao.getInterpolation(C5,dl,fl,pl,fI,pI,hI,new Ee),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const d={a,b:l,c,normal:new Ee,materialIndex:0};ao.getNormal(dl,fl,pl,d.normal),u.face=d}return u}class Va extends rs{constructor(e=1,n=1,r=1,i=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:s};const a=this;i=Math.floor(i),o=Math.floor(o),s=Math.floor(s);const l=[],c=[],u=[],d=[];let h=0,f=0;m("z","y","x",-1,-1,r,n,e,s,o,0),m("z","y","x",1,-1,r,n,-e,s,o,1),m("x","z","y",1,1,e,r,n,i,s,2),m("x","z","y",1,-1,e,r,-n,i,s,3),m("x","y","z",1,-1,e,n,r,i,o,4),m("x","y","z",-1,-1,e,n,-r,i,o,5),this.setIndex(l),this.setAttribute("position",new Vs(c,3)),this.setAttribute("normal",new Vs(u,3)),this.setAttribute("uv",new Vs(d,2));function m(T,Q,_,v,y,b,E,x,L,M,C){const A=b/L,I=E/M,N=b/2,P=E/2,O=x/2,F=L+1,V=M+1;let U=0,G=0;const K=new Ee;for(let W=0;W0?1:-1,u.push(K.x,K.y,K.z),d.push(de/L),d.push(1-W/M),U+=1}}for(let W=0;W0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class GU extends $n{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new zt,this.projectionMatrix=new zt,this.projectionMatrixInverse=new zt,this.coordinateSystem=Os}copy(e,n){return super.copy(e,n),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,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Wr extends GU{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),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 n=.5*this.getFilmHeight()/e;this.fov=hc*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(O4*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return hc*2*Math.atan(Math.tan(O4*.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,n,r,i,o,s){this.aspect=e/n,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=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(O4*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i;const s=this.view;if(this.view!==null&&this.view.enabled){const l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*i/l,n-=s.offsetY*r/c,i*=s.width/l,r*=s.height/c}const a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const hl=-90,Tl=1;class Ilr extends $n{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Wr(hl,Tl,e,n);i.layers=this.layers,this.add(i);const o=new Wr(hl,Tl,e,n);o.layers=this.layers,this.add(o);const s=new Wr(hl,Tl,e,n);s.layers=this.layers,this.add(s);const a=new Wr(hl,Tl,e,n);a.layers=this.layers,this.add(a);const l=new Wr(hl,Tl,e,n);l.layers=this.layers,this.add(l);const c=new Wr(hl,Tl,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,o,s,a,l]=n;for(const c of n)this.remove(c);if(e===Os)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===md)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[o,s,a,l,c,u]=this.children,d=e.getRenderTarget(),h=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),m=e.xr.enabled;e.xr.enabled=!1;const T=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,o),e.setRenderTarget(r,1,i),e.render(n,s),e.setRenderTarget(r,2,i),e.render(n,a),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,c),r.texture.generateMipmaps=T,e.setRenderTarget(r,5,i),e.render(n,u),e.setRenderTarget(d,h,f),e.xr.enabled=m,r.texture.needsPMREMUpdate=!0}}class qU extends xr{constructor(e,n,r,i,o,s,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:cc,super(e,n,r,i,o,s,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class klr extends g2{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];n.encoding!==void 0&&(N4("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===J1?jn:Vi),this.texture=new qU(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:ii}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class _2 extends fo{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=Blr,this.fragmentShader=Flr,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=Tc(e.uniforms),this.uniformsGroups=Hlr(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 n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const i in this.uniforms){const s=this.uniforms[i].value;s&&s.isTexture?n.uniforms[i]={type:"t",value:s.toJSON(e).uuid}:s&&s.isColor?n.uniforms[i]={type:"c",value:s.getHex()}:s&&s.isVector2?n.uniforms[i]={type:"v2",value:s.toArray()}:s&&s.isVector3?n.uniforms[i]={type:"v3",value:s.toArray()}:s&&s.isVector4?n.uniforms[i]={type:"v4",value:s.toArray()}:s&&s.isMatrix3?n.uniforms[i]={type:"m3",value:s.toArray()}:s&&s.isMatrix4?n.uniforms[i]={type:"m4",value:s.toArray()}:n.uniforms[i]={value:s}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class GU extends $n{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new zt,this.projectionMatrix=new zt,this.projectionMatrixInverse=new zt,this.coordinateSystem=Os}copy(e,n){return super.copy(e,n),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,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Wr extends GU{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),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 n=.5*this.getFilmHeight()/e;this.fov=hc*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(O4*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return hc*2*Math.atan(Math.tan(O4*.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,n,r,i,o,s){this.aspect=e/n,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=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(O4*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i;const s=this.view;if(this.view!==null&&this.view.enabled){const l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*i/l,n-=s.offsetY*r/c,i*=s.width/l,r*=s.height/c}const a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,n,n-r,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const hl=-90,Tl=1;class $lr extends $n{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Wr(hl,Tl,e,n);i.layers=this.layers,this.add(i);const o=new Wr(hl,Tl,e,n);o.layers=this.layers,this.add(o);const s=new Wr(hl,Tl,e,n);s.layers=this.layers,this.add(s);const a=new Wr(hl,Tl,e,n);a.layers=this.layers,this.add(a);const l=new Wr(hl,Tl,e,n);l.layers=this.layers,this.add(l);const c=new Wr(hl,Tl,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[r,i,o,s,a,l]=n;for(const c of n)this.remove(c);if(e===Os)r.up.set(0,1,0),r.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===md)r.up.set(0,-1,0),r.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:r,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[o,s,a,l,c,u]=this.children,d=e.getRenderTarget(),h=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),m=e.xr.enabled;e.xr.enabled=!1;const T=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0,i),e.render(n,o),e.setRenderTarget(r,1,i),e.render(n,s),e.setRenderTarget(r,2,i),e.render(n,a),e.setRenderTarget(r,3,i),e.render(n,l),e.setRenderTarget(r,4,i),e.render(n,c),r.texture.generateMipmaps=T,e.setRenderTarget(r,5,i),e.render(n,u),e.setRenderTarget(d,h,f),e.xr.enabled=m,r.texture.needsPMREMUpdate=!0}}class qU extends xr{constructor(e,n,r,i,o,s,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:cc,super(e,n,r,i,o,s,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Ulr extends g2{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];n.encoding!==void 0&&(N4("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===J1?jn:Vi),this.texture=new qU(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:ii}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -453,9 +453,9 @@ ${l}`;navigator.clipboard.writeText(c)}else navigator.clipboard.writeText(e);thi gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},i=new Va(5,5,5),o=new _2({name:"CubemapFromEquirect",uniforms:Tc(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:ui,blending:ka});o.uniforms.tEquirect.value=n;const s=new Yr(i,o),a=n.minFilter;return n.minFilter===m2&&(n.minFilter=ii),new Ilr(1,10,this).update(e,s),n.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(e,n,r,i){const o=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(n,r,i);e.setRenderTarget(o)}}const r_=new Ee,Plr=new Ee,Hlr=new qt;class k1{constructor(e=new Ee(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,r,i){return this.normal.set(e,n,r),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,r){const i=r_.subVectors(r,n).cross(Plr.subVectors(e,n)).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,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const r=e.delta(r_),i=this.normal.dot(r);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?null:n.copy(e.start).addScaledVector(r,o)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<0&&n>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,n){const r=n||Hlr.getNormalMatrix(e),i=this.coplanarPoint(r_).applyMatrix4(e),o=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(o),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 O1=new ns,M5=new Ee;class eE{constructor(e=new k1,n=new k1,r=new k1,i=new k1,o=new k1,s=new k1){this.planes=[e,n,r,i,o,s]}set(e,n,r,i,o,s){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(o),a[5].copy(s),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,n=Os){const r=this.planes,i=e.elements,o=i[0],s=i[1],a=i[2],l=i[3],c=i[4],u=i[5],d=i[6],h=i[7],f=i[8],m=i[9],T=i[10],Q=i[11],_=i[12],v=i[13],y=i[14],b=i[15];if(r[0].setComponents(l-o,h-c,Q-f,b-_).normalize(),r[1].setComponents(l+o,h+c,Q+f,b+_).normalize(),r[2].setComponents(l+s,h+u,Q+m,b+v).normalize(),r[3].setComponents(l-s,h-u,Q-m,b-v).normalize(),r[4].setComponents(l-a,h-d,Q-T,b-y).normalize(),n===Os)r[5].setComponents(l+a,h+d,Q+T,b+y).normalize();else if(n===md)r[5].setComponents(a,d,T,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),O1.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),O1.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(O1)}intersectsSprite(e){return O1.center.set(0,0,0),O1.radius=.7071067811865476,O1.applyMatrix4(e.matrixWorld),this.intersectsSphere(O1)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let o=0;o<6;o++)if(n[o].distanceToPoint(r)0?e.max.x:e.min.x,M5.y=i.normal.y>0?e.max.y:e.min.y,M5.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(M5)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function zU(){let t=null,e=!1,n=null,r=null;function i(o,s){n(o,s),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(o){n=o},setContext:function(o){t=o}}}function Vlr(t,e){const n=e.isWebGL2,r=new WeakMap;function i(c,u){const d=c.array,h=c.usage,f=d.byteLength,m=t.createBuffer();t.bindBuffer(u,m),t.bufferData(u,d,h),c.onUploadCallback();let T;if(d instanceof Float32Array)T=t.FLOAT;else if(d instanceof Uint16Array)if(c.isFloat16BufferAttribute)if(n)T=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else T=t.UNSIGNED_SHORT;else if(d instanceof Int16Array)T=t.SHORT;else if(d instanceof Uint32Array)T=t.UNSIGNED_INT;else if(d instanceof Int32Array)T=t.INT;else if(d instanceof Int8Array)T=t.BYTE;else if(d instanceof Uint8Array)T=t.UNSIGNED_BYTE;else if(d instanceof Uint8ClampedArray)T=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:m,type:T,bytesPerElement:d.BYTES_PER_ELEMENT,version:c.version,size:f}}function o(c,u,d){const h=u.array,f=u._updateRange,m=u.updateRanges;if(t.bindBuffer(d,c),f.count===-1&&m.length===0&&t.bufferSubData(d,0,h),m.length!==0){for(let T=0,Q=m.length;T1?null:n.copy(e.start).addScaledVector(r,o)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<0&&n>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,n){const r=n||qlr.getNormalMatrix(e),i=this.coplanarPoint(r_).applyMatrix4(e),o=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(o),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 O1=new ns,M5=new Ee;class eE{constructor(e=new k1,n=new k1,r=new k1,i=new k1,o=new k1,s=new k1){this.planes=[e,n,r,i,o,s]}set(e,n,r,i,o,s){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(o),a[5].copy(s),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e,n=Os){const r=this.planes,i=e.elements,o=i[0],s=i[1],a=i[2],l=i[3],c=i[4],u=i[5],d=i[6],h=i[7],f=i[8],m=i[9],T=i[10],Q=i[11],_=i[12],v=i[13],y=i[14],b=i[15];if(r[0].setComponents(l-o,h-c,Q-f,b-_).normalize(),r[1].setComponents(l+o,h+c,Q+f,b+_).normalize(),r[2].setComponents(l+s,h+u,Q+m,b+v).normalize(),r[3].setComponents(l-s,h-u,Q-m,b-v).normalize(),r[4].setComponents(l-a,h-d,Q-T,b-y).normalize(),n===Os)r[5].setComponents(l+a,h+d,Q+T,b+y).normalize();else if(n===md)r[5].setComponents(a,d,T,y).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),O1.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),O1.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(O1)}intersectsSprite(e){return O1.center.set(0,0,0),O1.radius=.7071067811865476,O1.applyMatrix4(e.matrixWorld),this.intersectsSphere(O1)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let o=0;o<6;o++)if(n[o].distanceToPoint(r)0?e.max.x:e.min.x,M5.y=i.normal.y>0?e.max.y:e.min.y,M5.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(M5)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function zU(){let t=null,e=!1,n=null,r=null;function i(o,s){n(o,s),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(o){n=o},setContext:function(o){t=o}}}function zlr(t,e){const n=e.isWebGL2,r=new WeakMap;function i(c,u){const d=c.array,h=c.usage,f=d.byteLength,m=t.createBuffer();t.bindBuffer(u,m),t.bufferData(u,d,h),c.onUploadCallback();let T;if(d instanceof Float32Array)T=t.FLOAT;else if(d instanceof Uint16Array)if(c.isFloat16BufferAttribute)if(n)T=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else T=t.UNSIGNED_SHORT;else if(d instanceof Int16Array)T=t.SHORT;else if(d instanceof Uint32Array)T=t.UNSIGNED_INT;else if(d instanceof Int32Array)T=t.INT;else if(d instanceof Int8Array)T=t.BYTE;else if(d instanceof Uint8Array)T=t.UNSIGNED_BYTE;else if(d instanceof Uint8ClampedArray)T=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:m,type:T,bytesPerElement:d.BYTES_PER_ELEMENT,version:c.version,size:f}}function o(c,u,d){const h=u.array,f=u._updateRange,m=u.updateRanges;if(t.bindBuffer(d,c),f.count===-1&&m.length===0&&t.bufferSubData(d,0,h),m.length!==0){for(let T=0,Q=m.length;T 0 +#endif`,lcr=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { @@ -652,26 +652,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #pragma unroll_loop_end if ( clipped ) discard; #endif -#endif`,ncr=`#if NUM_CLIPPING_PLANES > 0 +#endif`,ccr=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,rcr=`#if NUM_CLIPPING_PLANES > 0 +#endif`,ucr=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,icr=`#if NUM_CLIPPING_PLANES > 0 +#endif`,dcr=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,ocr=`#if defined( USE_COLOR_ALPHA ) +#endif`,fcr=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,scr=`#if defined( USE_COLOR_ALPHA ) +#endif`,pcr=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,acr=`#if defined( USE_COLOR_ALPHA ) +#endif`,hcr=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,lcr=`#if defined( USE_COLOR_ALPHA ) +#endif`,Tcr=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -681,7 +681,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`,ccr=`#define PI 3.141592653589793 +#endif`,mcr=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -759,7 +759,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`,ucr=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,gcr=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -857,7 +857,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`,dcr=`vec3 transformedNormal = objectNormal; +#endif`,_cr=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -886,18 +886,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,fcr=`#ifdef USE_DISPLACEMENTMAP +#endif`,Qcr=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,pcr=`#ifdef USE_DISPLACEMENTMAP +#endif`,vcr=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,hcr=`#ifdef USE_EMISSIVEMAP +#endif`,ycr=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,Tcr=`#ifdef USE_EMISSIVEMAP +#endif`,bcr=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,mcr="gl_FragColor = linearToOutputTexel( gl_FragColor );",gcr=` +#endif`,Ecr="gl_FragColor = linearToOutputTexel( gl_FragColor );",xcr=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -925,7 +925,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,_cr=`#ifdef USE_ENVMAP +}`,Scr=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -954,7 +954,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,Qcr=`#ifdef USE_ENVMAP +#endif`,Lcr=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -963,7 +963,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,vcr=`#ifdef USE_ENVMAP +#endif`,Ccr=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -974,7 +974,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,ycr=`#ifdef USE_ENVMAP +#endif`,Acr=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -985,7 +985,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,bcr=`#ifdef USE_ENVMAP +#endif`,wcr=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -1002,18 +1002,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,Ecr=`#ifdef USE_FOG +#endif`,Mcr=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,xcr=`#ifdef USE_FOG +#endif`,Ocr=`#ifdef USE_FOG varying float vFogDepth; -#endif`,Scr=`#ifdef USE_FOG +#endif`,Rcr=`#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`,Lcr=`#ifdef USE_FOG +#endif`,Ncr=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -1022,7 +1022,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,Ccr=`#ifdef USE_GRADIENTMAP +#endif`,Dcr=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -1034,16 +1034,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 -}`,Acr=`#ifdef USE_LIGHTMAP +}`,Icr=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,wcr=`#ifdef USE_LIGHTMAP +#endif`,kcr=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,Mcr=`LambertMaterial material; +#endif`,Pcr=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,Ocr=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,Hcr=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -1057,7 +1057,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`,Rcr=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Vcr=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -1180,7 +1180,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,Ncr=`#ifdef USE_ENVMAP +#endif`,Bcr=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -1213,8 +1213,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,Dcr=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,Icr=`varying vec3 vViewPosition; +#endif`,Fcr=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,$cr=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -1226,11 +1226,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`,kcr=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Ucr=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,Pcr=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,Gcr=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -1247,7 +1247,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`,Hcr=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,qcr=`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 ); @@ -1330,7 +1330,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`,Vcr=`struct PhysicalMaterial { +#endif`,zcr=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1630,7 +1630,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 ); -}`,Bcr=` +}`,jcr=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1745,7 +1745,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,Fcr=`#if defined( RE_IndirectDiffuse ) +#endif`,Wcr=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1764,25 +1764,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,$cr=`#if defined( RE_IndirectDiffuse ) +#endif`,Ycr=`#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`,Ucr=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,Kcr=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,Gcr=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,Zcr=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,qcr=`#ifdef USE_LOGDEPTHBUF +#endif`,Xcr=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,zcr=`#ifdef USE_LOGDEPTHBUF +#endif`,Jcr=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -1792,16 +1792,16 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,jcr=`#ifdef USE_MAP +#endif`,e3r=`#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`,Wcr=`#ifdef USE_MAP +#endif`,t3r=`#ifdef USE_MAP uniform sampler2D map; -#endif`,Ycr=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,n3r=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1813,7 +1813,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,Kcr=`#if defined( USE_POINTS_UV ) +#endif`,r3r=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1825,13 +1825,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,Zcr=`float metalnessFactor = metalness; +#endif`,i3r=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,Xcr=`#ifdef USE_METALNESSMAP +#endif`,o3r=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,Jcr=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,s3r=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1840,7 +1840,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,e3r=`#ifdef USE_MORPHNORMALS +#endif`,a3r=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1852,7 +1852,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,t3r=`#ifdef USE_MORPHTARGETS +#endif`,l3r=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1872,7 +1872,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,n3r=`#ifdef USE_MORPHTARGETS +#endif`,c3r=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1890,7 +1890,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,r3r=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,u3r=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1931,7 +1931,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,i3r=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,d3r=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1946,25 +1946,25 @@ vec3 nonPerturbedNormal = normal;`,i3r=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,o3r=`#ifndef FLAT_SHADED +#endif`,f3r=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,s3r=`#ifndef FLAT_SHADED +#endif`,p3r=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,a3r=`#ifndef FLAT_SHADED +#endif`,h3r=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,l3r=`#ifdef USE_NORMALMAP +#endif`,T3r=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1986,13 +1986,13 @@ vec3 nonPerturbedNormal = normal;`,i3r=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,c3r=`#ifdef USE_CLEARCOAT +#endif`,m3r=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,u3r=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,g3r=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,d3r=`#ifdef USE_CLEARCOATMAP +#endif`,_3r=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -2001,18 +2001,18 @@ vec3 nonPerturbedNormal = normal;`,i3r=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,f3r=`#ifdef USE_IRIDESCENCEMAP +#endif`,Q3r=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,p3r=`#ifdef OPAQUE +#endif`,v3r=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,h3r=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,y3r=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -2053,9 +2053,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 ); -}`,T3r=`#ifdef PREMULTIPLIED_ALPHA +}`,b3r=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,m3r=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,E3r=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -2063,22 +2063,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,g3r=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,x3r=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,_3r=`#ifdef DITHERING +#endif`,S3r=`#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`,Q3r=`float roughnessFactor = roughness; +#endif`,L3r=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,v3r=`#ifdef USE_ROUGHNESSMAP +#endif`,C3r=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,y3r=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,A3r=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -2255,7 +2255,7 @@ gl_Position = projectionMatrix * mvPosition;`,g3r=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,b3r=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,w3r=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -2293,7 +2293,7 @@ gl_Position = projectionMatrix * mvPosition;`,g3r=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,E3r=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,M3r=`#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 @@ -2325,7 +2325,7 @@ gl_Position = projectionMatrix * mvPosition;`,g3r=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,x3r=`float getShadowMask() { +#endif`,O3r=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -2357,12 +2357,12 @@ gl_Position = projectionMatrix * mvPosition;`,g3r=`#ifdef DITHERING #endif #endif return shadow; -}`,S3r=`#ifdef USE_SKINNING +}`,R3r=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,L3r=`#ifdef USE_SKINNING +#endif`,N3r=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2377,7 +2377,7 @@ gl_Position = projectionMatrix * mvPosition;`,g3r=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,C3r=`#ifdef USE_SKINNING +#endif`,D3r=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2385,7 +2385,7 @@ gl_Position = projectionMatrix * mvPosition;`,g3r=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,A3r=`#ifdef USE_SKINNING +#endif`,I3r=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2396,17 +2396,17 @@ gl_Position = projectionMatrix * mvPosition;`,g3r=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,w3r=`float specularStrength; +#endif`,k3r=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,M3r=`#ifdef USE_SPECULARMAP +#endif`,P3r=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,O3r=`#if defined( TONE_MAPPING ) +#endif`,H3r=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,R3r=`#ifndef saturate +#endif`,V3r=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2442,7 +2442,7 @@ vec3 ACESFilmicToneMapping( vec3 color ) { color = ACESOutputMat * color; return saturate( color ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,N3r=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,B3r=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2463,7 +2463,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,N3r=`#ifdef USE_TRANSMIS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,D3r=`#ifdef USE_TRANSMISSION +#endif`,F3r=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2569,7 +2569,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,N3r=`#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`,I3r=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,$3r=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2639,7 +2639,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,N3r=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,k3r=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,U3r=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2733,7 +2733,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,N3r=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,P3r=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,G3r=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2804,7 +2804,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,N3r=`#ifdef USE_TRANSMIS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,H3r=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,q3r=`#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; @@ -2813,12 +2813,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,N3r=`#ifdef USE_TRANSMIS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const V3r=`varying vec2 vUv; +#endif`;const z3r=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,B3r=`uniform sampler2D t2D; +}`,j3r=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2830,14 +2830,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,F3r=`varying vec3 vWorldDirection; +}`,W3r=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,$3r=`#ifdef ENVMAP_TYPE_CUBE +}`,Y3r=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2859,14 +2859,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,U3r=`varying vec3 vWorldDirection; +}`,K3r=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,G3r=`uniform samplerCube tCube; +}`,Z3r=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2876,7 +2876,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,q3r=`#include +}`,X3r=`#include #include #include #include @@ -2902,7 +2902,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,z3r=`#if DEPTH_PACKING == 3200 +}`,J3r=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2932,7 +2932,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,j3r=`#define DISTANCE +}`,e4r=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2958,7 +2958,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,W3r=`#define DISTANCE +}`,t4r=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2982,13 +2982,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,Y3r=`varying vec3 vWorldDirection; +}`,n4r=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,K3r=`uniform sampler2D tEquirect; +}`,r4r=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2997,7 +2997,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,Z3r=`uniform float scale; +}`,i4r=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -3018,7 +3018,7 @@ void main() { #include #include #include -}`,X3r=`uniform vec3 diffuse; +}`,o4r=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -3046,7 +3046,7 @@ void main() { #include #include #include -}`,J3r=`#include +}`,s4r=`#include #include #include #include @@ -3077,7 +3077,7 @@ void main() { #include #include #include -}`,e4r=`uniform vec3 diffuse; +}`,a4r=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -3125,7 +3125,7 @@ void main() { #include #include #include -}`,t4r=`#define LAMBERT +}`,l4r=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -3163,7 +3163,7 @@ void main() { #include #include #include -}`,n4r=`#define LAMBERT +}`,c4r=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3220,7 +3220,7 @@ void main() { #include #include #include -}`,r4r=`#define MATCAP +}`,u4r=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -3253,7 +3253,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,i4r=`#define MATCAP +}`,d4r=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3299,7 +3299,7 @@ void main() { #include #include #include -}`,o4r=`#define NORMAL +}`,f4r=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3331,7 +3331,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,s4r=`#define NORMAL +}`,p4r=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3352,7 +3352,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,a4r=`#define PHONG +}`,h4r=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3390,7 +3390,7 @@ void main() { #include #include #include -}`,l4r=`#define PHONG +}`,T4r=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3449,7 +3449,7 @@ void main() { #include #include #include -}`,c4r=`#define STANDARD +}`,m4r=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3491,7 +3491,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,u4r=`#define STANDARD +}`,g4r=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3613,7 +3613,7 @@ void main() { #include #include #include -}`,d4r=`#define TOON +}`,_4r=`#define TOON varying vec3 vViewPosition; #include #include @@ -3649,7 +3649,7 @@ void main() { #include #include #include -}`,f4r=`#define TOON +}`,Q4r=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3702,7 +3702,7 @@ void main() { #include #include #include -}`,p4r=`uniform float size; +}`,v4r=`uniform float size; uniform float scale; #include #include @@ -3732,7 +3732,7 @@ void main() { #include #include #include -}`,h4r=`uniform vec3 diffuse; +}`,y4r=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3757,7 +3757,7 @@ void main() { #include #include #include -}`,T4r=`#include +}`,b4r=`#include #include #include #include @@ -3779,7 +3779,7 @@ void main() { #include #include #include -}`,m4r=`uniform vec3 color; +}`,E4r=`uniform vec3 color; uniform float opacity; #include #include @@ -3795,7 +3795,7 @@ void main() { #include #include #include -}`,g4r=`uniform float rotation; +}`,x4r=`uniform float rotation; uniform vec2 center; #include #include @@ -3821,7 +3821,7 @@ void main() { #include #include #include -}`,_4r=`uniform vec3 diffuse; +}`,S4r=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3846,7 +3846,7 @@ void main() { #include #include #include -}`,Ut={alphahash_fragment:Blr,alphahash_pars_fragment:Flr,alphamap_fragment:$lr,alphamap_pars_fragment:Ulr,alphatest_fragment:Glr,alphatest_pars_fragment:qlr,aomap_fragment:zlr,aomap_pars_fragment:jlr,batching_pars_vertex:Wlr,batching_vertex:Ylr,begin_vertex:Klr,beginnormal_vertex:Zlr,bsdfs:Xlr,iridescence_fragment:Jlr,bumpmap_pars_fragment:ecr,clipping_planes_fragment:tcr,clipping_planes_pars_fragment:ncr,clipping_planes_pars_vertex:rcr,clipping_planes_vertex:icr,color_fragment:ocr,color_pars_fragment:scr,color_pars_vertex:acr,color_vertex:lcr,common:ccr,cube_uv_reflection_fragment:ucr,defaultnormal_vertex:dcr,displacementmap_pars_vertex:fcr,displacementmap_vertex:pcr,emissivemap_fragment:hcr,emissivemap_pars_fragment:Tcr,colorspace_fragment:mcr,colorspace_pars_fragment:gcr,envmap_fragment:_cr,envmap_common_pars_fragment:Qcr,envmap_pars_fragment:vcr,envmap_pars_vertex:ycr,envmap_physical_pars_fragment:Ncr,envmap_vertex:bcr,fog_vertex:Ecr,fog_pars_vertex:xcr,fog_fragment:Scr,fog_pars_fragment:Lcr,gradientmap_pars_fragment:Ccr,lightmap_fragment:Acr,lightmap_pars_fragment:wcr,lights_lambert_fragment:Mcr,lights_lambert_pars_fragment:Ocr,lights_pars_begin:Rcr,lights_toon_fragment:Dcr,lights_toon_pars_fragment:Icr,lights_phong_fragment:kcr,lights_phong_pars_fragment:Pcr,lights_physical_fragment:Hcr,lights_physical_pars_fragment:Vcr,lights_fragment_begin:Bcr,lights_fragment_maps:Fcr,lights_fragment_end:$cr,logdepthbuf_fragment:Ucr,logdepthbuf_pars_fragment:Gcr,logdepthbuf_pars_vertex:qcr,logdepthbuf_vertex:zcr,map_fragment:jcr,map_pars_fragment:Wcr,map_particle_fragment:Ycr,map_particle_pars_fragment:Kcr,metalnessmap_fragment:Zcr,metalnessmap_pars_fragment:Xcr,morphcolor_vertex:Jcr,morphnormal_vertex:e3r,morphtarget_pars_vertex:t3r,morphtarget_vertex:n3r,normal_fragment_begin:r3r,normal_fragment_maps:i3r,normal_pars_fragment:o3r,normal_pars_vertex:s3r,normal_vertex:a3r,normalmap_pars_fragment:l3r,clearcoat_normal_fragment_begin:c3r,clearcoat_normal_fragment_maps:u3r,clearcoat_pars_fragment:d3r,iridescence_pars_fragment:f3r,opaque_fragment:p3r,packing:h3r,premultiplied_alpha_fragment:T3r,project_vertex:m3r,dithering_fragment:g3r,dithering_pars_fragment:_3r,roughnessmap_fragment:Q3r,roughnessmap_pars_fragment:v3r,shadowmap_pars_fragment:y3r,shadowmap_pars_vertex:b3r,shadowmap_vertex:E3r,shadowmask_pars_fragment:x3r,skinbase_vertex:S3r,skinning_pars_vertex:L3r,skinning_vertex:C3r,skinnormal_vertex:A3r,specularmap_fragment:w3r,specularmap_pars_fragment:M3r,tonemapping_fragment:O3r,tonemapping_pars_fragment:R3r,transmission_fragment:N3r,transmission_pars_fragment:D3r,uv_pars_fragment:I3r,uv_pars_vertex:k3r,uv_vertex:P3r,worldpos_vertex:H3r,background_vert:V3r,background_frag:B3r,backgroundCube_vert:F3r,backgroundCube_frag:$3r,cube_vert:U3r,cube_frag:G3r,depth_vert:q3r,depth_frag:z3r,distanceRGBA_vert:j3r,distanceRGBA_frag:W3r,equirect_vert:Y3r,equirect_frag:K3r,linedashed_vert:Z3r,linedashed_frag:X3r,meshbasic_vert:J3r,meshbasic_frag:e4r,meshlambert_vert:t4r,meshlambert_frag:n4r,meshmatcap_vert:r4r,meshmatcap_frag:i4r,meshnormal_vert:o4r,meshnormal_frag:s4r,meshphong_vert:a4r,meshphong_frag:l4r,meshphysical_vert:c4r,meshphysical_frag:u4r,meshtoon_vert:d4r,meshtoon_frag:f4r,points_vert:p4r,points_frag:h4r,shadow_vert:T4r,shadow_frag:m4r,sprite_vert:g4r,sprite_frag:_4r},rt={common:{diffuse:{value:new Nt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new qt},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new qt}},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 qt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new qt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new qt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new qt},normalScale:{value:new Yt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new qt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new qt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new qt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new qt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Nt(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 Nt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0},uvTransform:{value:new qt}},sprite:{diffuse:{value:new Nt(16777215)},opacity:{value:1},center:{value:new Yt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new qt},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0}}},Io={basic:{uniforms:qr([rt.common,rt.specularmap,rt.envmap,rt.aomap,rt.lightmap,rt.fog]),vertexShader:Ut.meshbasic_vert,fragmentShader:Ut.meshbasic_frag},lambert:{uniforms:qr([rt.common,rt.specularmap,rt.envmap,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)}}]),vertexShader:Ut.meshlambert_vert,fragmentShader:Ut.meshlambert_frag},phong:{uniforms:qr([rt.common,rt.specularmap,rt.envmap,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)},specular:{value:new Nt(1118481)},shininess:{value:30}}]),vertexShader:Ut.meshphong_vert,fragmentShader:Ut.meshphong_frag},standard:{uniforms:qr([rt.common,rt.envmap,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.roughnessmap,rt.metalnessmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ut.meshphysical_vert,fragmentShader:Ut.meshphysical_frag},toon:{uniforms:qr([rt.common,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.gradientmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)}}]),vertexShader:Ut.meshtoon_vert,fragmentShader:Ut.meshtoon_frag},matcap:{uniforms:qr([rt.common,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.fog,{matcap:{value:null}}]),vertexShader:Ut.meshmatcap_vert,fragmentShader:Ut.meshmatcap_frag},points:{uniforms:qr([rt.points,rt.fog]),vertexShader:Ut.points_vert,fragmentShader:Ut.points_frag},dashed:{uniforms:qr([rt.common,rt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ut.linedashed_vert,fragmentShader:Ut.linedashed_frag},depth:{uniforms:qr([rt.common,rt.displacementmap]),vertexShader:Ut.depth_vert,fragmentShader:Ut.depth_frag},normal:{uniforms:qr([rt.common,rt.bumpmap,rt.normalmap,rt.displacementmap,{opacity:{value:1}}]),vertexShader:Ut.meshnormal_vert,fragmentShader:Ut.meshnormal_frag},sprite:{uniforms:qr([rt.sprite,rt.fog]),vertexShader:Ut.sprite_vert,fragmentShader:Ut.sprite_frag},background:{uniforms:{uvTransform:{value:new qt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ut.background_vert,fragmentShader:Ut.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Ut.backgroundCube_vert,fragmentShader:Ut.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ut.cube_vert,fragmentShader:Ut.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ut.equirect_vert,fragmentShader:Ut.equirect_frag},distanceRGBA:{uniforms:qr([rt.common,rt.displacementmap,{referencePosition:{value:new Ee},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ut.distanceRGBA_vert,fragmentShader:Ut.distanceRGBA_frag},shadow:{uniforms:qr([rt.lights,rt.fog,{color:{value:new Nt(0)},opacity:{value:1}}]),vertexShader:Ut.shadow_vert,fragmentShader:Ut.shadow_frag}};Io.physical={uniforms:qr([Io.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new qt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new qt},clearcoatNormalScale:{value:new Yt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new qt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new qt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new qt},sheen:{value:0},sheenColor:{value:new Nt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new qt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new qt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new qt},transmissionSamplerSize:{value:new Yt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new qt},attenuationDistance:{value:0},attenuationColor:{value:new Nt(0)},specularColor:{value:new Nt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new qt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new qt},anisotropyVector:{value:new Yt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new qt}}]),vertexShader:Ut.meshphysical_vert,fragmentShader:Ut.meshphysical_frag};const O5={r:0,b:0,g:0};function Q4r(t,e,n,r,i,o,s){const a=new Nt(0);let l=o===!0?0:1,c,u,d=null,h=0,f=null;function m(Q,_){let v=!1,y=_.isScene===!0?_.background:null;y&&y.isTexture&&(y=(_.backgroundBlurriness>0?n:e).get(y)),y===null?T(a,l):y&&y.isColor&&(T(y,1),v=!0);const b=t.xr.getEnvironmentBlendMode();b==="additive"?r.buffers.color.setClear(0,0,0,1,s):b==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,s),(t.autoClear||v)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),y&&(y.isCubeTexture||y.mapping===E9)?(u===void 0&&(u=new Yr(new Va(1,1,1),new _2({name:"BackgroundCubeMaterial",uniforms:Tc(Io.backgroundCube.uniforms),vertexShader:Io.backgroundCube.vertexShader,fragmentShader:Io.backgroundCube.fragmentShader,side:ui,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(E,x,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),u.material.uniforms.envMap.value=y,u.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=_.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,u.material.toneMapped=Tn.getTransfer(y.colorSpace)!==kn,(d!==y||h!==y.version||f!==t.toneMapping)&&(u.material.needsUpdate=!0,d=y,h=y.version,f=t.toneMapping),u.layers.enableAll(),Q.unshift(u,u.geometry,u.material,0,0,null)):y&&y.isTexture&&(c===void 0&&(c=new Yr(new tE(2,2),new _2({name:"BackgroundMaterial",uniforms:Tc(Io.background.uniforms),vertexShader:Io.background.vertexShader,fragmentShader:Io.background.fragmentShader,side:Us,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=y,c.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,c.material.toneMapped=Tn.getTransfer(y.colorSpace)!==kn,y.matrixAutoUpdate===!0&&y.updateMatrix(),c.material.uniforms.uvTransform.value.copy(y.matrix),(d!==y||h!==y.version||f!==t.toneMapping)&&(c.material.needsUpdate=!0,d=y,h=y.version,f=t.toneMapping),c.layers.enableAll(),Q.unshift(c,c.geometry,c.material,0,0,null))}function T(Q,_){Q.getRGB(O5,UU(t)),r.buffers.color.setClear(O5.r,O5.g,O5.b,_,s)}return{getClearColor:function(){return a},setClearColor:function(Q,_=1){a.set(Q),l=_,T(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(Q){l=Q,T(a,l)},render:m}}function v4r(t,e,n,r){const i=t.getParameter(t.MAX_VERTEX_ATTRIBS),o=r.isWebGL2?null:e.get("OES_vertex_array_object"),s=r.isWebGL2||o!==null,a={},l=Q(null);let c=l,u=!1;function d(O,F,V,U,G){let K=!1;if(s){const W=T(U,V,F);c!==W&&(c=W,f(c.object)),K=_(O,U,V,G),K&&v(O,U,V,G)}else{const W=F.wireframe===!0;(c.geometry!==U.id||c.program!==V.id||c.wireframe!==W)&&(c.geometry=U.id,c.program=V.id,c.wireframe=W,K=!0)}G!==null&&n.update(G,t.ELEMENT_ARRAY_BUFFER),(K||u)&&(u=!1,M(O,F,V,U),G!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get(G).buffer))}function h(){return r.isWebGL2?t.createVertexArray():o.createVertexArrayOES()}function f(O){return r.isWebGL2?t.bindVertexArray(O):o.bindVertexArrayOES(O)}function m(O){return r.isWebGL2?t.deleteVertexArray(O):o.deleteVertexArrayOES(O)}function T(O,F,V){const U=V.wireframe===!0;let G=a[O.id];G===void 0&&(G={},a[O.id]=G);let K=G[F.id];K===void 0&&(K={},G[F.id]=K);let W=K[U];return W===void 0&&(W=Q(h()),K[U]=W),W}function Q(O){const F=[],V=[],U=[];for(let G=0;G=0){const $=G[de];let ce=K[de];if(ce===void 0&&(de==="instanceMatrix"&&O.instanceMatrix&&(ce=O.instanceMatrix),de==="instanceColor"&&O.instanceColor&&(ce=O.instanceColor)),$===void 0||$.attribute!==ce||ce&&$.data!==ce.data)return!0;W++}return c.attributesNum!==W||c.index!==U}function v(O,F,V,U){const G={},K=F.attributes;let W=0;const te=V.getAttributes();for(const de in te)if(te[de].location>=0){let $=K[de];$===void 0&&(de==="instanceMatrix"&&O.instanceMatrix&&($=O.instanceMatrix),de==="instanceColor"&&O.instanceColor&&($=O.instanceColor));const ce={};ce.attribute=$,$&&$.data&&(ce.data=$.data),G[de]=ce,W++}c.attributes=G,c.attributesNum=W,c.index=U}function y(){const O=c.newAttributes;for(let F=0,V=O.length;F=0){let X=G[te];if(X===void 0&&(te==="instanceMatrix"&&O.instanceMatrix&&(X=O.instanceMatrix),te==="instanceColor"&&O.instanceColor&&(X=O.instanceColor)),X!==void 0){const $=X.normalized,ce=X.itemSize,ye=n.get(X);if(ye===void 0)continue;const z=ye.buffer,ne=ye.type,fe=ye.bytesPerElement,be=r.isWebGL2===!0&&(ne===t.INT||ne===t.UNSIGNED_INT||X.gpuType===SU);if(X.isInterleavedBufferAttribute){const Le=X.data,se=Le.stride,Y=X.offset;if(Le.isInstancedInterleavedBuffer){for(let j=0;j0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";L="mediump"}return L==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let a=n.precision!==void 0?n.precision:"highp";const l=o(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const c=s||e.has("WEBGL_draw_buffers"),u=n.logarithmicDepthBuffer===!0,d=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),f=t.getParameter(t.MAX_TEXTURE_SIZE),m=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),T=t.getParameter(t.MAX_VERTEX_ATTRIBS),Q=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),_=t.getParameter(t.MAX_VARYING_VECTORS),v=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),y=h>0,b=s||e.has("OES_texture_float"),E=y&&b,x=s?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:s,drawBuffers:c,getMaxAnisotropy:i,getMaxPrecision:o,precision:a,logarithmicDepthBuffer:u,maxTextures:d,maxVertexTextures:h,maxTextureSize:f,maxCubemapSize:m,maxAttributes:T,maxVertexUniforms:Q,maxVaryings:_,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:b,floatVertexTextures:E,maxSamples:x}}function E4r(t){const e=this;let n=null,r=0,i=!1,o=!1;const s=new k1,a=new qt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,h){const f=d.length!==0||h||r!==0||i;return i=h,r=d.length,f},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(d,h){n=u(d,h,0)},this.setState=function(d,h,f){const m=d.clippingPlanes,T=d.clipIntersection,Q=d.clipShadows,_=t.get(d);if(!i||m===null||m.length===0||o&&!Q)o?u(null):c();else{const v=o?0:r,y=v*4;let b=_.clippingState||null;l.value=b,b=u(m,h,y,f);for(let E=0;E!==y;++E)b[E]=n[E];_.clippingState=b,this.numIntersection=T?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(d,h,f,m){const T=d!==null?d.length:0;let Q=null;if(T!==0){if(Q=l.value,m!==!0||Q===null){const _=f+T*4,v=h.matrixWorldInverse;a.getNormalMatrix(v),(Q===null||Q.length<_)&&(Q=new Float32Array(_));for(let y=0,b=f;y!==T;++y,b+=4)s.copy(d[y]).applyMatrix4(v,a),s.normal.toArray(Q,b),Q[b+3]=s.constant}l.value=Q,l.needsUpdate=!0}return e.numPlanes=T,e.numIntersection=0,Q}}function x4r(t){let e=new WeakMap;function n(s,a){return a===FQ?s.mapping=cc:a===$Q&&(s.mapping=uc),s}function r(s){if(s&&s.isTexture){const a=s.mapping;if(a===FQ||a===$Q)if(e.has(s)){const l=e.get(s).texture;return n(l,s.mapping)}else{const l=s.image;if(l&&l.height>0){const c=new klr(l.height/2);return c.fromEquirectangularTexture(t,s),e.set(s,c),s.addEventListener("dispose",i),n(c.texture,s.mapping)}else return null}}return s}function i(s){const a=s.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function o(){e=new WeakMap}return{get:r,dispose:o}}class nE extends GU{constructor(e=-1,n=1,r=1,i=-1,o=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),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,n,r,i,o,s){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=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=r-e,s=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const Ll=4,TI=[.125,.215,.35,.446,.526,.582],F1=20,i_=new nE,mI=new Nt;let o_=null,s_=0,a_=0;const P1=(1+Math.sqrt(5))/2,ml=1/P1,gI=[new Ee(1,1,1),new Ee(-1,1,1),new Ee(1,1,-1),new Ee(-1,1,-1),new Ee(0,P1,ml),new Ee(0,P1,-ml),new Ee(ml,0,P1),new Ee(-ml,0,P1),new Ee(P1,ml,0),new Ee(-P1,ml,0)];class _I{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,n=0,r=.1,i=100){o_=this._renderer.getRenderTarget(),s_=this._renderer.getActiveCubeFace(),a_=this._renderer.getActiveMipmapLevel(),this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,i,o),n>0&&this._blur(o,0,0,n),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=yI(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=vI(),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?y:0,y,y),u.setRenderTarget(i),T&&u.render(m,a),u.render(e,a)}m.geometry.dispose(),m.material.dispose(),u.toneMapping=h,u.autoClear=d,e.background=Q}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===cc||e.mapping===uc;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=yI()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=vI());const o=i?this._cubemapMaterial:this._equirectMaterial,s=new Yr(this._lodPlanes[0],o),a=o.uniforms;a.envMap.value=e;const l=this._cubeSize;R5(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(s,i_)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;for(let i=1;iF1&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${Q} samples when the maximum is set to ${F1}`);const _=[];let v=0;for(let L=0;Ly-Ll?i-y+Ll:0),x=4*(this._cubeSize-b);R5(n,E,x,3*b,2*b),l.setRenderTarget(n),l.render(d,i_)}}function S4r(t){const e=[],n=[],r=[];let i=t;const o=t-Ll+1+TI.length;for(let s=0;st-Ll?l=TI[s-t+Ll-1]:s===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,d=1+c,h=[u,u,d,u,d,d,u,u,d,d,u,d],f=6,m=6,T=3,Q=2,_=1,v=new Float32Array(T*m*f),y=new Float32Array(Q*m*f),b=new Float32Array(_*m*f);for(let x=0;x2?0:-1,C=[L,M,0,L+2/3,M,0,L+2/3,M+1,0,L,M,0,L+2/3,M+1,0,L,M+1,0];v.set(C,T*m*x),y.set(h,Q*m*x);const A=[x,x,x,x,x,x];b.set(A,_*m*x)}const E=new rs;E.setAttribute("position",new Kr(v,T)),E.setAttribute("uv",new Kr(y,Q)),E.setAttribute("faceIndex",new Kr(b,_)),e.push(E),i>Ll&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function QI(t,e,n){const r=new g2(t,e,n);return r.texture.mapping=E9,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function R5(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function L4r(t,e,n){const r=new Float32Array(F1),i=new Ee(0,1,0);return new _2({name:"SphericalGaussianBlur",defines:{n:F1,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:rE(),fragmentShader:` +}`,Ut={alphahash_fragment:jlr,alphahash_pars_fragment:Wlr,alphamap_fragment:Ylr,alphamap_pars_fragment:Klr,alphatest_fragment:Zlr,alphatest_pars_fragment:Xlr,aomap_fragment:Jlr,aomap_pars_fragment:ecr,batching_pars_vertex:tcr,batching_vertex:ncr,begin_vertex:rcr,beginnormal_vertex:icr,bsdfs:ocr,iridescence_fragment:scr,bumpmap_pars_fragment:acr,clipping_planes_fragment:lcr,clipping_planes_pars_fragment:ccr,clipping_planes_pars_vertex:ucr,clipping_planes_vertex:dcr,color_fragment:fcr,color_pars_fragment:pcr,color_pars_vertex:hcr,color_vertex:Tcr,common:mcr,cube_uv_reflection_fragment:gcr,defaultnormal_vertex:_cr,displacementmap_pars_vertex:Qcr,displacementmap_vertex:vcr,emissivemap_fragment:ycr,emissivemap_pars_fragment:bcr,colorspace_fragment:Ecr,colorspace_pars_fragment:xcr,envmap_fragment:Scr,envmap_common_pars_fragment:Lcr,envmap_pars_fragment:Ccr,envmap_pars_vertex:Acr,envmap_physical_pars_fragment:Bcr,envmap_vertex:wcr,fog_vertex:Mcr,fog_pars_vertex:Ocr,fog_fragment:Rcr,fog_pars_fragment:Ncr,gradientmap_pars_fragment:Dcr,lightmap_fragment:Icr,lightmap_pars_fragment:kcr,lights_lambert_fragment:Pcr,lights_lambert_pars_fragment:Hcr,lights_pars_begin:Vcr,lights_toon_fragment:Fcr,lights_toon_pars_fragment:$cr,lights_phong_fragment:Ucr,lights_phong_pars_fragment:Gcr,lights_physical_fragment:qcr,lights_physical_pars_fragment:zcr,lights_fragment_begin:jcr,lights_fragment_maps:Wcr,lights_fragment_end:Ycr,logdepthbuf_fragment:Kcr,logdepthbuf_pars_fragment:Zcr,logdepthbuf_pars_vertex:Xcr,logdepthbuf_vertex:Jcr,map_fragment:e3r,map_pars_fragment:t3r,map_particle_fragment:n3r,map_particle_pars_fragment:r3r,metalnessmap_fragment:i3r,metalnessmap_pars_fragment:o3r,morphcolor_vertex:s3r,morphnormal_vertex:a3r,morphtarget_pars_vertex:l3r,morphtarget_vertex:c3r,normal_fragment_begin:u3r,normal_fragment_maps:d3r,normal_pars_fragment:f3r,normal_pars_vertex:p3r,normal_vertex:h3r,normalmap_pars_fragment:T3r,clearcoat_normal_fragment_begin:m3r,clearcoat_normal_fragment_maps:g3r,clearcoat_pars_fragment:_3r,iridescence_pars_fragment:Q3r,opaque_fragment:v3r,packing:y3r,premultiplied_alpha_fragment:b3r,project_vertex:E3r,dithering_fragment:x3r,dithering_pars_fragment:S3r,roughnessmap_fragment:L3r,roughnessmap_pars_fragment:C3r,shadowmap_pars_fragment:A3r,shadowmap_pars_vertex:w3r,shadowmap_vertex:M3r,shadowmask_pars_fragment:O3r,skinbase_vertex:R3r,skinning_pars_vertex:N3r,skinning_vertex:D3r,skinnormal_vertex:I3r,specularmap_fragment:k3r,specularmap_pars_fragment:P3r,tonemapping_fragment:H3r,tonemapping_pars_fragment:V3r,transmission_fragment:B3r,transmission_pars_fragment:F3r,uv_pars_fragment:$3r,uv_pars_vertex:U3r,uv_vertex:G3r,worldpos_vertex:q3r,background_vert:z3r,background_frag:j3r,backgroundCube_vert:W3r,backgroundCube_frag:Y3r,cube_vert:K3r,cube_frag:Z3r,depth_vert:X3r,depth_frag:J3r,distanceRGBA_vert:e4r,distanceRGBA_frag:t4r,equirect_vert:n4r,equirect_frag:r4r,linedashed_vert:i4r,linedashed_frag:o4r,meshbasic_vert:s4r,meshbasic_frag:a4r,meshlambert_vert:l4r,meshlambert_frag:c4r,meshmatcap_vert:u4r,meshmatcap_frag:d4r,meshnormal_vert:f4r,meshnormal_frag:p4r,meshphong_vert:h4r,meshphong_frag:T4r,meshphysical_vert:m4r,meshphysical_frag:g4r,meshtoon_vert:_4r,meshtoon_frag:Q4r,points_vert:v4r,points_frag:y4r,shadow_vert:b4r,shadow_frag:E4r,sprite_vert:x4r,sprite_frag:S4r},rt={common:{diffuse:{value:new Nt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new qt},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new qt}},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 qt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new qt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new qt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new qt},normalScale:{value:new Yt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new qt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new qt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new qt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new qt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Nt(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 Nt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0},uvTransform:{value:new qt}},sprite:{diffuse:{value:new Nt(16777215)},opacity:{value:1},center:{value:new Yt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new qt},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0}}},Io={basic:{uniforms:qr([rt.common,rt.specularmap,rt.envmap,rt.aomap,rt.lightmap,rt.fog]),vertexShader:Ut.meshbasic_vert,fragmentShader:Ut.meshbasic_frag},lambert:{uniforms:qr([rt.common,rt.specularmap,rt.envmap,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)}}]),vertexShader:Ut.meshlambert_vert,fragmentShader:Ut.meshlambert_frag},phong:{uniforms:qr([rt.common,rt.specularmap,rt.envmap,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)},specular:{value:new Nt(1118481)},shininess:{value:30}}]),vertexShader:Ut.meshphong_vert,fragmentShader:Ut.meshphong_frag},standard:{uniforms:qr([rt.common,rt.envmap,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.roughnessmap,rt.metalnessmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ut.meshphysical_vert,fragmentShader:Ut.meshphysical_frag},toon:{uniforms:qr([rt.common,rt.aomap,rt.lightmap,rt.emissivemap,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.gradientmap,rt.fog,rt.lights,{emissive:{value:new Nt(0)}}]),vertexShader:Ut.meshtoon_vert,fragmentShader:Ut.meshtoon_frag},matcap:{uniforms:qr([rt.common,rt.bumpmap,rt.normalmap,rt.displacementmap,rt.fog,{matcap:{value:null}}]),vertexShader:Ut.meshmatcap_vert,fragmentShader:Ut.meshmatcap_frag},points:{uniforms:qr([rt.points,rt.fog]),vertexShader:Ut.points_vert,fragmentShader:Ut.points_frag},dashed:{uniforms:qr([rt.common,rt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ut.linedashed_vert,fragmentShader:Ut.linedashed_frag},depth:{uniforms:qr([rt.common,rt.displacementmap]),vertexShader:Ut.depth_vert,fragmentShader:Ut.depth_frag},normal:{uniforms:qr([rt.common,rt.bumpmap,rt.normalmap,rt.displacementmap,{opacity:{value:1}}]),vertexShader:Ut.meshnormal_vert,fragmentShader:Ut.meshnormal_frag},sprite:{uniforms:qr([rt.sprite,rt.fog]),vertexShader:Ut.sprite_vert,fragmentShader:Ut.sprite_frag},background:{uniforms:{uvTransform:{value:new qt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ut.background_vert,fragmentShader:Ut.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Ut.backgroundCube_vert,fragmentShader:Ut.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ut.cube_vert,fragmentShader:Ut.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ut.equirect_vert,fragmentShader:Ut.equirect_frag},distanceRGBA:{uniforms:qr([rt.common,rt.displacementmap,{referencePosition:{value:new Ee},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ut.distanceRGBA_vert,fragmentShader:Ut.distanceRGBA_frag},shadow:{uniforms:qr([rt.lights,rt.fog,{color:{value:new Nt(0)},opacity:{value:1}}]),vertexShader:Ut.shadow_vert,fragmentShader:Ut.shadow_frag}};Io.physical={uniforms:qr([Io.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new qt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new qt},clearcoatNormalScale:{value:new Yt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new qt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new qt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new qt},sheen:{value:0},sheenColor:{value:new Nt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new qt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new qt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new qt},transmissionSamplerSize:{value:new Yt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new qt},attenuationDistance:{value:0},attenuationColor:{value:new Nt(0)},specularColor:{value:new Nt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new qt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new qt},anisotropyVector:{value:new Yt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new qt}}]),vertexShader:Ut.meshphysical_vert,fragmentShader:Ut.meshphysical_frag};const O5={r:0,b:0,g:0};function L4r(t,e,n,r,i,o,s){const a=new Nt(0);let l=o===!0?0:1,c,u,d=null,h=0,f=null;function m(Q,_){let v=!1,y=_.isScene===!0?_.background:null;y&&y.isTexture&&(y=(_.backgroundBlurriness>0?n:e).get(y)),y===null?T(a,l):y&&y.isColor&&(T(y,1),v=!0);const b=t.xr.getEnvironmentBlendMode();b==="additive"?r.buffers.color.setClear(0,0,0,1,s):b==="alpha-blend"&&r.buffers.color.setClear(0,0,0,0,s),(t.autoClear||v)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),y&&(y.isCubeTexture||y.mapping===E9)?(u===void 0&&(u=new Yr(new Va(1,1,1),new _2({name:"BackgroundCubeMaterial",uniforms:Tc(Io.backgroundCube.uniforms),vertexShader:Io.backgroundCube.vertexShader,fragmentShader:Io.backgroundCube.fragmentShader,side:ui,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(E,x,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),u.material.uniforms.envMap.value=y,u.material.uniforms.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=_.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,u.material.toneMapped=Tn.getTransfer(y.colorSpace)!==kn,(d!==y||h!==y.version||f!==t.toneMapping)&&(u.material.needsUpdate=!0,d=y,h=y.version,f=t.toneMapping),u.layers.enableAll(),Q.unshift(u,u.geometry,u.material,0,0,null)):y&&y.isTexture&&(c===void 0&&(c=new Yr(new tE(2,2),new _2({name:"BackgroundMaterial",uniforms:Tc(Io.background.uniforms),vertexShader:Io.background.vertexShader,fragmentShader:Io.background.fragmentShader,side:Us,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=y,c.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,c.material.toneMapped=Tn.getTransfer(y.colorSpace)!==kn,y.matrixAutoUpdate===!0&&y.updateMatrix(),c.material.uniforms.uvTransform.value.copy(y.matrix),(d!==y||h!==y.version||f!==t.toneMapping)&&(c.material.needsUpdate=!0,d=y,h=y.version,f=t.toneMapping),c.layers.enableAll(),Q.unshift(c,c.geometry,c.material,0,0,null))}function T(Q,_){Q.getRGB(O5,UU(t)),r.buffers.color.setClear(O5.r,O5.g,O5.b,_,s)}return{getClearColor:function(){return a},setClearColor:function(Q,_=1){a.set(Q),l=_,T(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(Q){l=Q,T(a,l)},render:m}}function C4r(t,e,n,r){const i=t.getParameter(t.MAX_VERTEX_ATTRIBS),o=r.isWebGL2?null:e.get("OES_vertex_array_object"),s=r.isWebGL2||o!==null,a={},l=Q(null);let c=l,u=!1;function d(O,F,V,U,G){let K=!1;if(s){const W=T(U,V,F);c!==W&&(c=W,f(c.object)),K=_(O,U,V,G),K&&v(O,U,V,G)}else{const W=F.wireframe===!0;(c.geometry!==U.id||c.program!==V.id||c.wireframe!==W)&&(c.geometry=U.id,c.program=V.id,c.wireframe=W,K=!0)}G!==null&&n.update(G,t.ELEMENT_ARRAY_BUFFER),(K||u)&&(u=!1,M(O,F,V,U),G!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get(G).buffer))}function h(){return r.isWebGL2?t.createVertexArray():o.createVertexArrayOES()}function f(O){return r.isWebGL2?t.bindVertexArray(O):o.bindVertexArrayOES(O)}function m(O){return r.isWebGL2?t.deleteVertexArray(O):o.deleteVertexArrayOES(O)}function T(O,F,V){const U=V.wireframe===!0;let G=a[O.id];G===void 0&&(G={},a[O.id]=G);let K=G[F.id];K===void 0&&(K={},G[F.id]=K);let W=K[U];return W===void 0&&(W=Q(h()),K[U]=W),W}function Q(O){const F=[],V=[],U=[];for(let G=0;G=0){const $=G[de];let ce=K[de];if(ce===void 0&&(de==="instanceMatrix"&&O.instanceMatrix&&(ce=O.instanceMatrix),de==="instanceColor"&&O.instanceColor&&(ce=O.instanceColor)),$===void 0||$.attribute!==ce||ce&&$.data!==ce.data)return!0;W++}return c.attributesNum!==W||c.index!==U}function v(O,F,V,U){const G={},K=F.attributes;let W=0;const te=V.getAttributes();for(const de in te)if(te[de].location>=0){let $=K[de];$===void 0&&(de==="instanceMatrix"&&O.instanceMatrix&&($=O.instanceMatrix),de==="instanceColor"&&O.instanceColor&&($=O.instanceColor));const ce={};ce.attribute=$,$&&$.data&&(ce.data=$.data),G[de]=ce,W++}c.attributes=G,c.attributesNum=W,c.index=U}function y(){const O=c.newAttributes;for(let F=0,V=O.length;F=0){let X=G[te];if(X===void 0&&(te==="instanceMatrix"&&O.instanceMatrix&&(X=O.instanceMatrix),te==="instanceColor"&&O.instanceColor&&(X=O.instanceColor)),X!==void 0){const $=X.normalized,ce=X.itemSize,ye=n.get(X);if(ye===void 0)continue;const z=ye.buffer,ne=ye.type,fe=ye.bytesPerElement,be=r.isWebGL2===!0&&(ne===t.INT||ne===t.UNSIGNED_INT||X.gpuType===SU);if(X.isInterleavedBufferAttribute){const Le=X.data,se=Le.stride,Y=X.offset;if(Le.isInstancedInterleavedBuffer){for(let j=0;j0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";L="mediump"}return L==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let a=n.precision!==void 0?n.precision:"highp";const l=o(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const c=s||e.has("WEBGL_draw_buffers"),u=n.logarithmicDepthBuffer===!0,d=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),f=t.getParameter(t.MAX_TEXTURE_SIZE),m=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),T=t.getParameter(t.MAX_VERTEX_ATTRIBS),Q=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),_=t.getParameter(t.MAX_VARYING_VECTORS),v=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),y=h>0,b=s||e.has("OES_texture_float"),E=y&&b,x=s?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:s,drawBuffers:c,getMaxAnisotropy:i,getMaxPrecision:o,precision:a,logarithmicDepthBuffer:u,maxTextures:d,maxVertexTextures:h,maxTextureSize:f,maxCubemapSize:m,maxAttributes:T,maxVertexUniforms:Q,maxVaryings:_,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:b,floatVertexTextures:E,maxSamples:x}}function M4r(t){const e=this;let n=null,r=0,i=!1,o=!1;const s=new k1,a=new qt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,h){const f=d.length!==0||h||r!==0||i;return i=h,r=d.length,f},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(d,h){n=u(d,h,0)},this.setState=function(d,h,f){const m=d.clippingPlanes,T=d.clipIntersection,Q=d.clipShadows,_=t.get(d);if(!i||m===null||m.length===0||o&&!Q)o?u(null):c();else{const v=o?0:r,y=v*4;let b=_.clippingState||null;l.value=b,b=u(m,h,y,f);for(let E=0;E!==y;++E)b[E]=n[E];_.clippingState=b,this.numIntersection=T?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(d,h,f,m){const T=d!==null?d.length:0;let Q=null;if(T!==0){if(Q=l.value,m!==!0||Q===null){const _=f+T*4,v=h.matrixWorldInverse;a.getNormalMatrix(v),(Q===null||Q.length<_)&&(Q=new Float32Array(_));for(let y=0,b=f;y!==T;++y,b+=4)s.copy(d[y]).applyMatrix4(v,a),s.normal.toArray(Q,b),Q[b+3]=s.constant}l.value=Q,l.needsUpdate=!0}return e.numPlanes=T,e.numIntersection=0,Q}}function O4r(t){let e=new WeakMap;function n(s,a){return a===FQ?s.mapping=cc:a===$Q&&(s.mapping=uc),s}function r(s){if(s&&s.isTexture){const a=s.mapping;if(a===FQ||a===$Q)if(e.has(s)){const l=e.get(s).texture;return n(l,s.mapping)}else{const l=s.image;if(l&&l.height>0){const c=new Ulr(l.height/2);return c.fromEquirectangularTexture(t,s),e.set(s,c),s.addEventListener("dispose",i),n(c.texture,s.mapping)}else return null}}return s}function i(s){const a=s.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function o(){e=new WeakMap}return{get:r,dispose:o}}class nE extends GU{constructor(e=-1,n=1,r=1,i=-1,o=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),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,n,r,i,o,s){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=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=r-e,s=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const Ll=4,TI=[.125,.215,.35,.446,.526,.582],F1=20,i_=new nE,mI=new Nt;let o_=null,s_=0,a_=0;const P1=(1+Math.sqrt(5))/2,ml=1/P1,gI=[new Ee(1,1,1),new Ee(-1,1,1),new Ee(1,1,-1),new Ee(-1,1,-1),new Ee(0,P1,ml),new Ee(0,P1,-ml),new Ee(ml,0,P1),new Ee(-ml,0,P1),new Ee(P1,ml,0),new Ee(-P1,ml,0)];class _I{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,n=0,r=.1,i=100){o_=this._renderer.getRenderTarget(),s_=this._renderer.getActiveCubeFace(),a_=this._renderer.getActiveMipmapLevel(),this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,i,o),n>0&&this._blur(o,0,0,n),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=yI(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=vI(),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?y:0,y,y),u.setRenderTarget(i),T&&u.render(m,a),u.render(e,a)}m.geometry.dispose(),m.material.dispose(),u.toneMapping=h,u.autoClear=d,e.background=Q}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===cc||e.mapping===uc;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=yI()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=vI());const o=i?this._cubemapMaterial:this._equirectMaterial,s=new Yr(this._lodPlanes[0],o),a=o.uniforms;a.envMap.value=e;const l=this._cubeSize;R5(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(s,i_)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;for(let i=1;iF1&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${Q} samples when the maximum is set to ${F1}`);const _=[];let v=0;for(let L=0;Ly-Ll?i-y+Ll:0),x=4*(this._cubeSize-b);R5(n,E,x,3*b,2*b),l.setRenderTarget(n),l.render(d,i_)}}function R4r(t){const e=[],n=[],r=[];let i=t;const o=t-Ll+1+TI.length;for(let s=0;st-Ll?l=TI[s-t+Ll-1]:s===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,d=1+c,h=[u,u,d,u,d,d,u,u,d,d,u,d],f=6,m=6,T=3,Q=2,_=1,v=new Float32Array(T*m*f),y=new Float32Array(Q*m*f),b=new Float32Array(_*m*f);for(let x=0;x2?0:-1,C=[L,M,0,L+2/3,M,0,L+2/3,M+1,0,L,M,0,L+2/3,M+1,0,L,M+1,0];v.set(C,T*m*x),y.set(h,Q*m*x);const A=[x,x,x,x,x,x];b.set(A,_*m*x)}const E=new rs;E.setAttribute("position",new Kr(v,T)),E.setAttribute("uv",new Kr(y,Q)),E.setAttribute("faceIndex",new Kr(b,_)),e.push(E),i>Ll&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function QI(t,e,n){const r=new g2(t,e,n);return r.texture.mapping=E9,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function R5(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function N4r(t,e,n){const r=new Float32Array(F1),i=new Ee(0,1,0);return new _2({name:"SphericalGaussianBlur",defines:{n:F1,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:rE(),fragmentShader:` precision mediump float; precision mediump int; @@ -3996,26 +3996,26 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function C4r(t){let e=new WeakMap,n=null;function r(a){if(a&&a.isTexture){const l=a.mapping,c=l===FQ||l===$Q,u=l===cc||l===uc;if(c||u)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let d=e.get(a);return n===null&&(n=new _I(t)),d=c?n.fromEquirectangular(a,d):n.fromCubemap(a,d),e.set(a,d),d.texture}else{if(e.has(a))return e.get(a).texture;{const d=a.image;if(c&&d&&d.height>0||u&&d&&i(d)){n===null&&(n=new _I(t));const h=c?n.fromEquirectangular(a):n.fromCubemap(a);return e.set(a,h),a.addEventListener("dispose",o),h.texture}else return null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(I=Math.ceil(A/e.maxTextureSize),A=e.maxTextureSize);const N=new Float32Array(A*I*4*T),P=new HU(N,A,I,T);P.type=Ms,P.needsUpdate=!0;const O=C*4;for(let V=0;V0)return t;const i=e*n;let o=bI[i];if(o===void 0&&(o=new Float32Array(i),bI[i]=o),e!==0){r.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=n,t[s].toArray(o,a)}return o}function ur(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n0||u&&d&&i(d)){n===null&&(n=new _I(t));const h=c?n.fromEquirectangular(a):n.fromCubemap(a);return e.set(a,h),a.addEventListener("dispose",o),h.texture}else return null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(I=Math.ceil(A/e.maxTextureSize),A=e.maxTextureSize);const N=new Float32Array(A*I*4*T),P=new HU(N,A,I,T);P.type=Ms,P.needsUpdate=!0;const O=C*4;for(let V=0;V0)return t;const i=e*n;let o=bI[i];if(o===void 0&&(o=new Float32Array(i),bI[i]=o),e!==0){r.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=n,t[s].toArray(o,a)}return o}function ur(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n":" "} ${a}: ${n[s]}`)}return r.join(` -`)}function w0r(t){const e=Tn.getPrimaries(Tn.workingColorSpace),n=Tn.getPrimaries(t);let r;switch(e===n?r="":e===Td&&n===hd?r="LinearDisplayP3ToLinearSRGB":e===hd&&n===Td&&(r="LinearSRGBToLinearDisplayP3"),t){case Sr:case x9:return[r,"LinearTransferOETF"];case jn:case Xb:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[r,"LinearTransferOETF"]}}function wI(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const s=parseInt(o[1]);return n.toUpperCase()+` +`)}function k0r(t){const e=Tn.getPrimaries(Tn.workingColorSpace),n=Tn.getPrimaries(t);let r;switch(e===n?r="":e===Td&&n===hd?r="LinearDisplayP3ToLinearSRGB":e===hd&&n===Td&&(r="LinearSRGBToLinearDisplayP3"),t){case Sr:case x9:return[r,"LinearTransferOETF"];case jn:case Xb:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[r,"LinearTransferOETF"]}}function wI(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const s=parseInt(o[1]);return n.toUpperCase()+` `+i+` -`+A0r(t.getShaderSource(e),s)}else return i}function M0r(t,e){const n=w0r(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function O0r(t,e){let n;switch(e){case C2r:n="Linear";break;case A2r:n="Reinhard";break;case w2r:n="OptimizedCineon";break;case M2r:n="ACESFilmic";break;case O2r:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function R0r(t){return[t.extensionDerivatives||t.envMapCubeUVHeight||t.bumpMap||t.normalMapTangentSpace||t.clearcoatNormalMap||t.flatShading||t.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(m4).join(` -`)}function N0r(t){const e=[];for(const n in t){const r=t[n];r!==!1&&e.push("#define "+n+" "+r)}return e.join(` -`)}function D0r(t,e){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function WQ(t){return t.replace(I0r,P0r)}const k0r=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function P0r(t,e){let n=Ut[e];if(n===void 0){const r=k0r.get(e);if(r!==void 0)n=Ut[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return WQ(n)}const H0r=/#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 RI(t){return t.replace(H0r,V0r)}function V0r(t,e,n,r){let i="";for(let o=parseInt(e);o/gm;function WQ(t){return t.replace($0r,G0r)}const U0r=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function G0r(t,e){let n=Ut[e];if(n===void 0){const r=U0r.get(e);if(r!==void 0)n=Ut[r],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,r);else throw new Error("Can not resolve #include <"+e+">")}return WQ(n)}const q0r=/#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 RI(t){return t.replace(q0r,z0r)}function z0r(t,e,n,r){let i="";for(let o=parseInt(e);o0&&(Q+=` `),_=[f,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m].filter(m4).join(` `),_.length>0&&(_+=` `)):(Q=[NI(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m,n.batching?"#define USE_BATCHING":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.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(m4).join(` -`),_=[f,NI(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Pa?"#define TONE_MAPPING":"",n.toneMapping!==Pa?Ut.tonemapping_pars_fragment:"",n.toneMapping!==Pa?O0r("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Ut.colorspace_pars_fragment,M0r("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` +`),_=[f,NI(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,m,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Pa?"#define TONE_MAPPING":"",n.toneMapping!==Pa?Ut.tonemapping_pars_fragment:"",n.toneMapping!==Pa?H0r("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Ut.colorspace_pars_fragment,P0r("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` `].filter(m4).join(` `)),s=WQ(s),s=MI(s,n),s=OI(s,n),a=WQ(a),a=MI(a,n),a=OI(a,n),s=RI(s),a=RI(a),n.isWebGL2&&n.isRawShaderMaterial!==!0&&(v=`#version 300 es `,Q=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` @@ -4026,9 +4026,9 @@ precision `+t.precision+" int;";return t.precision==="highp"?e+=` Program Info Log: `+N+` `+U+` -`+G)}else N!==""?console.warn("THREE.WebGLProgram: Program Info Log:",N):(P===""||O==="")&&(V=!1);V&&(I.diagnostics={runnable:F,programLog:N,vertexShader:{log:P,prefix:Q},fragmentShader:{log:O,prefix:_}})}i.deleteShader(E),i.deleteShader(x),M=new nu(i,T),C=D0r(i,T)}let M;this.getUniforms=function(){return M===void 0&&L(this),M};let C;this.getAttributes=function(){return C===void 0&&L(this),C};let A=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return A===!1&&(A=i.getProgramParameter(T,L0r)),A},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(T),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=C0r++,this.cacheKey=e,this.usedTimes=1,this.program=T,this.vertexShader=E,this.fragmentShader=x,this}let z0r=0;class j0r{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),o=this._getShaderStage(r),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1&&(s.add(i),i.usedTimes++),s.has(o)===!1&&(s.add(o),o.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.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 n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new W0r(e),n.set(e,r)),r}}class W0r{constructor(e){this.id=z0r++,this.code=e,this.usedTimes=0}}function Y0r(t,e,n,r,i,o,s){const a=new VU,l=new j0r,c=[],u=i.isWebGL2,d=i.logarithmicDepthBuffer,h=i.vertexTextures;let f=i.precision;const m={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 T(C){return C===0?"uv":`uv${C}`}function Q(C,A,I,N,P){const O=N.fog,F=P.geometry,V=C.isMeshStandardMaterial?N.environment:null,U=(C.isMeshStandardMaterial?n:e).get(C.envMap||V),G=U&&U.mapping===E9?U.image.height:null,K=m[C.type];C.precision!==null&&(f=i.getMaxPrecision(C.precision),f!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",f,"instead."));const W=F.morphAttributes.position||F.morphAttributes.normal||F.morphAttributes.color,te=W!==void 0?W.length:0;let de=0;F.morphAttributes.position!==void 0&&(de=1),F.morphAttributes.normal!==void 0&&(de=2),F.morphAttributes.color!==void 0&&(de=3);let X,$,ce,ye;if(K){const zn=Io[K];X=zn.vertexShader,$=zn.fragmentShader}else X=C.vertexShader,$=C.fragmentShader,l.update(C),ce=l.getVertexShaderID(C),ye=l.getFragmentShaderID(C);const z=t.getRenderTarget(),ne=P.isInstancedMesh===!0,fe=P.isBatchedMesh===!0,be=!!C.map,Le=!!C.matcap,se=!!U,Y=!!C.aoMap,j=!!C.lightMap,ie=!!C.bumpMap,Te=!!C.normalMap,ve=!!C.displacementMap,ae=!!C.emissiveMap,Oe=!!C.metalnessMap,Se=!!C.roughnessMap,Me=C.anisotropy>0,ke=C.clearcoat>0,Z=C.iridescence>0,q=C.sheen>0,pe=C.transmission>0,ue=Me&&!!C.anisotropyMap,_e=ke&&!!C.clearcoatMap,Ae=ke&&!!C.clearcoatNormalMap,Ie=ke&&!!C.clearcoatRoughnessMap,Ve=Z&&!!C.iridescenceMap,$e=Z&&!!C.iridescenceThicknessMap,lt=q&&!!C.sheenColorMap,at=q&&!!C.sheenRoughnessMap,Be=!!C.specularMap,It=!!C.specularColorMap,Tt=!!C.specularIntensityMap,mt=pe&&!!C.transmissionMap,dt=pe&&!!C.thicknessMap,st=!!C.gradientMap,ct=!!C.alphaMap,me=C.alphaTest>0,Ye=!!C.alphaHash,Ge=!!C.extensions,Pe=!!F.attributes.uv1,Xe=!!F.attributes.uv2,vt=!!F.attributes.uv3;let Ot=Pa;return C.toneMapped&&(z===null||z.isXRRenderTarget===!0)&&(Ot=t.toneMapping),{isWebGL2:u,shaderID:K,shaderType:C.type,shaderName:C.name,vertexShader:X,fragmentShader:$,defines:C.defines,customVertexShaderID:ce,customFragmentShaderID:ye,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:f,batching:fe,instancing:ne,instancingColor:ne&&P.instanceColor!==null,supportsVertexTextures:h,outputColorSpace:z===null?t.outputColorSpace:z.isXRRenderTarget===!0?z.texture.colorSpace:Sr,map:be,matcap:Le,envMap:se,envMapMode:se&&U.mapping,envMapCubeUVHeight:G,aoMap:Y,lightMap:j,bumpMap:ie,normalMap:Te,displacementMap:h&&ve,emissiveMap:ae,normalMapObjectSpace:Te&&C.normalMapType===q2r,normalMapTangentSpace:Te&&C.normalMapType===Zb,metalnessMap:Oe,roughnessMap:Se,anisotropy:Me,anisotropyMap:ue,clearcoat:ke,clearcoatMap:_e,clearcoatNormalMap:Ae,clearcoatRoughnessMap:Ie,iridescence:Z,iridescenceMap:Ve,iridescenceThicknessMap:$e,sheen:q,sheenColorMap:lt,sheenRoughnessMap:at,specularMap:Be,specularColorMap:It,specularIntensityMap:Tt,transmission:pe,transmissionMap:mt,thicknessMap:dt,gradientMap:st,opaque:C.transparent===!1&&C.blending===Pl,alphaMap:ct,alphaTest:me,alphaHash:Ye,combine:C.combine,mapUv:be&&T(C.map.channel),aoMapUv:Y&&T(C.aoMap.channel),lightMapUv:j&&T(C.lightMap.channel),bumpMapUv:ie&&T(C.bumpMap.channel),normalMapUv:Te&&T(C.normalMap.channel),displacementMapUv:ve&&T(C.displacementMap.channel),emissiveMapUv:ae&&T(C.emissiveMap.channel),metalnessMapUv:Oe&&T(C.metalnessMap.channel),roughnessMapUv:Se&&T(C.roughnessMap.channel),anisotropyMapUv:ue&&T(C.anisotropyMap.channel),clearcoatMapUv:_e&&T(C.clearcoatMap.channel),clearcoatNormalMapUv:Ae&&T(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ie&&T(C.clearcoatRoughnessMap.channel),iridescenceMapUv:Ve&&T(C.iridescenceMap.channel),iridescenceThicknessMapUv:$e&&T(C.iridescenceThicknessMap.channel),sheenColorMapUv:lt&&T(C.sheenColorMap.channel),sheenRoughnessMapUv:at&&T(C.sheenRoughnessMap.channel),specularMapUv:Be&&T(C.specularMap.channel),specularColorMapUv:It&&T(C.specularColorMap.channel),specularIntensityMapUv:Tt&&T(C.specularIntensityMap.channel),transmissionMapUv:mt&&T(C.transmissionMap.channel),thicknessMapUv:dt&&T(C.thicknessMap.channel),alphaMapUv:ct&&T(C.alphaMap.channel),vertexTangents:!!F.attributes.tangent&&(Te||Me),vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!F.attributes.color&&F.attributes.color.itemSize===4,vertexUv1s:Pe,vertexUv2s:Xe,vertexUv3s:vt,pointsUvs:P.isPoints===!0&&!!F.attributes.uv&&(be||ct),fog:!!O,useFog:C.fog===!0,fogExp2:O&&O.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:P.isSkinnedMesh===!0,morphTargets:F.morphAttributes.position!==void 0,morphNormals:F.morphAttributes.normal!==void 0,morphColors:F.morphAttributes.color!==void 0,morphTargetsCount:te,morphTextureStride:de,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:C.dithering,shadowMapEnabled:t.shadowMap.enabled&&I.length>0,shadowMapType:t.shadowMap.type,toneMapping:Ot,useLegacyLights:t._useLegacyLights,decodeVideoTexture:be&&C.map.isVideoTexture===!0&&Tn.getTransfer(C.map.colorSpace)===kn,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===ko,flipSided:C.side===ui,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionDerivatives:Ge&&C.extensions.derivatives===!0,extensionFragDepth:Ge&&C.extensions.fragDepth===!0,extensionDrawBuffers:Ge&&C.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ge&&C.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:C.customProgramCacheKey()}}function _(C){const A=[];if(C.shaderID?A.push(C.shaderID):(A.push(C.customVertexShaderID),A.push(C.customFragmentShaderID)),C.defines!==void 0)for(const I in C.defines)A.push(I),A.push(C.defines[I]);return C.isRawShaderMaterial===!1&&(v(A,C),y(A,C),A.push(t.outputColorSpace)),A.push(C.customProgramCacheKey),A.join()}function v(C,A){C.push(A.precision),C.push(A.outputColorSpace),C.push(A.envMapMode),C.push(A.envMapCubeUVHeight),C.push(A.mapUv),C.push(A.alphaMapUv),C.push(A.lightMapUv),C.push(A.aoMapUv),C.push(A.bumpMapUv),C.push(A.normalMapUv),C.push(A.displacementMapUv),C.push(A.emissiveMapUv),C.push(A.metalnessMapUv),C.push(A.roughnessMapUv),C.push(A.anisotropyMapUv),C.push(A.clearcoatMapUv),C.push(A.clearcoatNormalMapUv),C.push(A.clearcoatRoughnessMapUv),C.push(A.iridescenceMapUv),C.push(A.iridescenceThicknessMapUv),C.push(A.sheenColorMapUv),C.push(A.sheenRoughnessMapUv),C.push(A.specularMapUv),C.push(A.specularColorMapUv),C.push(A.specularIntensityMapUv),C.push(A.transmissionMapUv),C.push(A.thicknessMapUv),C.push(A.combine),C.push(A.fogExp2),C.push(A.sizeAttenuation),C.push(A.morphTargetsCount),C.push(A.morphAttributeCount),C.push(A.numDirLights),C.push(A.numPointLights),C.push(A.numSpotLights),C.push(A.numSpotLightMaps),C.push(A.numHemiLights),C.push(A.numRectAreaLights),C.push(A.numDirLightShadows),C.push(A.numPointLightShadows),C.push(A.numSpotLightShadows),C.push(A.numSpotLightShadowsWithMaps),C.push(A.numLightProbes),C.push(A.shadowMapType),C.push(A.toneMapping),C.push(A.numClippingPlanes),C.push(A.numClipIntersection),C.push(A.depthPacking)}function y(C,A){a.disableAll(),A.isWebGL2&&a.enable(0),A.supportsVertexTextures&&a.enable(1),A.instancing&&a.enable(2),A.instancingColor&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),C.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.useLegacyLights&&a.enable(10),A.doubleSided&&a.enable(11),A.flipSided&&a.enable(12),A.useDepthPacking&&a.enable(13),A.dithering&&a.enable(14),A.transmission&&a.enable(15),A.sheen&&a.enable(16),A.opaque&&a.enable(17),A.pointsUvs&&a.enable(18),A.decodeVideoTexture&&a.enable(19),C.push(a.mask)}function b(C){const A=m[C.type];let I;if(A){const N=Io[A];I=Rlr.clone(N.uniforms)}else I=C.uniforms;return I}function E(C,A){let I;for(let N=0,P=c.length;N0?r.push(_):f.transparent===!0?i.push(_):n.push(_)}function l(d,h,f,m,T,Q){const _=s(d,h,f,m,T,Q);f.transmission>0?r.unshift(_):f.transparent===!0?i.unshift(_):n.unshift(_)}function c(d,h){n.length>1&&n.sort(d||Z0r),r.length>1&&r.sort(h||DI),i.length>1&&i.sort(h||DI)}function u(){for(let d=e,h=t.length;d=o.length?(s=new II,o.push(s)):s=o[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function J0r(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new Ee,color:new Nt};break;case"SpotLight":n={position:new Ee,direction:new Ee,color:new Nt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Ee,color:new Nt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Ee,skyColor:new Nt,groundColor:new Nt};break;case"RectAreaLight":n={color:new Nt,position:new Ee,halfWidth:new Ee,halfHeight:new Ee};break}return t[e.id]=n,n}}}function e6r(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yt};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yt};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yt,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let t6r=0;function n6r(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function r6r(t,e){const n=new J0r,r=e6r(),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 Ee);const o=new Ee,s=new zt,a=new zt;function l(u,d){let h=0,f=0,m=0;for(let N=0;N<9;N++)i.probe[N].set(0,0,0);let T=0,Q=0,_=0,v=0,y=0,b=0,E=0,x=0,L=0,M=0,C=0;u.sort(n6r);const A=d===!0?Math.PI:1;for(let N=0,P=u.length;N0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=rt.LTC_FLOAT_1,i.rectAreaLTC2=rt.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=rt.LTC_HALF_1,i.rectAreaLTC2=rt.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=h,i.ambient[1]=f,i.ambient[2]=m;const I=i.hash;(I.directionalLength!==T||I.pointLength!==Q||I.spotLength!==_||I.rectAreaLength!==v||I.hemiLength!==y||I.numDirectionalShadows!==b||I.numPointShadows!==E||I.numSpotShadows!==x||I.numSpotMaps!==L||I.numLightProbes!==C)&&(i.directional.length=T,i.spot.length=_,i.rectArea.length=v,i.point.length=Q,i.hemi.length=y,i.directionalShadow.length=b,i.directionalShadowMap.length=b,i.pointShadow.length=E,i.pointShadowMap.length=E,i.spotShadow.length=x,i.spotShadowMap.length=x,i.directionalShadowMatrix.length=b,i.pointShadowMatrix.length=E,i.spotLightMatrix.length=x+L-M,i.spotLightMap.length=L,i.numSpotLightShadowsWithMaps=M,i.numLightProbes=C,I.directionalLength=T,I.pointLength=Q,I.spotLength=_,I.rectAreaLength=v,I.hemiLength=y,I.numDirectionalShadows=b,I.numPointShadows=E,I.numSpotShadows=x,I.numSpotMaps=L,I.numLightProbes=C,i.version=t6r++)}function c(u,d){let h=0,f=0,m=0,T=0,Q=0;const _=d.matrixWorldInverse;for(let v=0,y=u.length;v=a.length?(l=new kI(t,e),a.push(l)):l=a[s],l}function i(){n=new WeakMap}return{get:r,dispose:i}}class o6r extends fo{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=U2r,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 s6r extends fo{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 a6r=`void main() { +`+G)}else N!==""?console.warn("THREE.WebGLProgram: Program Info Log:",N):(P===""||O==="")&&(V=!1);V&&(I.diagnostics={runnable:F,programLog:N,vertexShader:{log:P,prefix:Q},fragmentShader:{log:O,prefix:_}})}i.deleteShader(E),i.deleteShader(x),M=new nu(i,T),C=F0r(i,T)}let M;this.getUniforms=function(){return M===void 0&&L(this),M};let C;this.getAttributes=function(){return C===void 0&&L(this),C};let A=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return A===!1&&(A=i.getProgramParameter(T,N0r)),A},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(T),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=D0r++,this.cacheKey=e,this.usedTimes=1,this.program=T,this.vertexShader=E,this.fragmentShader=x,this}let J0r=0;class e6r{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),o=this._getShaderStage(r),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1&&(s.add(i),i.usedTimes++),s.has(o)===!1&&(s.add(o),o.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.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 n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new t6r(e),n.set(e,r)),r}}class t6r{constructor(e){this.id=J0r++,this.code=e,this.usedTimes=0}}function n6r(t,e,n,r,i,o,s){const a=new VU,l=new e6r,c=[],u=i.isWebGL2,d=i.logarithmicDepthBuffer,h=i.vertexTextures;let f=i.precision;const m={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 T(C){return C===0?"uv":`uv${C}`}function Q(C,A,I,N,P){const O=N.fog,F=P.geometry,V=C.isMeshStandardMaterial?N.environment:null,U=(C.isMeshStandardMaterial?n:e).get(C.envMap||V),G=U&&U.mapping===E9?U.image.height:null,K=m[C.type];C.precision!==null&&(f=i.getMaxPrecision(C.precision),f!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",f,"instead."));const W=F.morphAttributes.position||F.morphAttributes.normal||F.morphAttributes.color,te=W!==void 0?W.length:0;let de=0;F.morphAttributes.position!==void 0&&(de=1),F.morphAttributes.normal!==void 0&&(de=2),F.morphAttributes.color!==void 0&&(de=3);let X,$,ce,ye;if(K){const zn=Io[K];X=zn.vertexShader,$=zn.fragmentShader}else X=C.vertexShader,$=C.fragmentShader,l.update(C),ce=l.getVertexShaderID(C),ye=l.getFragmentShaderID(C);const z=t.getRenderTarget(),ne=P.isInstancedMesh===!0,fe=P.isBatchedMesh===!0,be=!!C.map,Le=!!C.matcap,se=!!U,Y=!!C.aoMap,j=!!C.lightMap,ie=!!C.bumpMap,Te=!!C.normalMap,ve=!!C.displacementMap,ae=!!C.emissiveMap,Oe=!!C.metalnessMap,Se=!!C.roughnessMap,Me=C.anisotropy>0,ke=C.clearcoat>0,Z=C.iridescence>0,q=C.sheen>0,pe=C.transmission>0,ue=Me&&!!C.anisotropyMap,_e=ke&&!!C.clearcoatMap,Ae=ke&&!!C.clearcoatNormalMap,Ie=ke&&!!C.clearcoatRoughnessMap,Ve=Z&&!!C.iridescenceMap,$e=Z&&!!C.iridescenceThicknessMap,lt=q&&!!C.sheenColorMap,at=q&&!!C.sheenRoughnessMap,Be=!!C.specularMap,It=!!C.specularColorMap,Tt=!!C.specularIntensityMap,mt=pe&&!!C.transmissionMap,dt=pe&&!!C.thicknessMap,st=!!C.gradientMap,ct=!!C.alphaMap,me=C.alphaTest>0,Ye=!!C.alphaHash,Ge=!!C.extensions,Pe=!!F.attributes.uv1,Xe=!!F.attributes.uv2,vt=!!F.attributes.uv3;let Ot=Pa;return C.toneMapped&&(z===null||z.isXRRenderTarget===!0)&&(Ot=t.toneMapping),{isWebGL2:u,shaderID:K,shaderType:C.type,shaderName:C.name,vertexShader:X,fragmentShader:$,defines:C.defines,customVertexShaderID:ce,customFragmentShaderID:ye,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:f,batching:fe,instancing:ne,instancingColor:ne&&P.instanceColor!==null,supportsVertexTextures:h,outputColorSpace:z===null?t.outputColorSpace:z.isXRRenderTarget===!0?z.texture.colorSpace:Sr,map:be,matcap:Le,envMap:se,envMapMode:se&&U.mapping,envMapCubeUVHeight:G,aoMap:Y,lightMap:j,bumpMap:ie,normalMap:Te,displacementMap:h&&ve,emissiveMap:ae,normalMapObjectSpace:Te&&C.normalMapType===X2r,normalMapTangentSpace:Te&&C.normalMapType===Zb,metalnessMap:Oe,roughnessMap:Se,anisotropy:Me,anisotropyMap:ue,clearcoat:ke,clearcoatMap:_e,clearcoatNormalMap:Ae,clearcoatRoughnessMap:Ie,iridescence:Z,iridescenceMap:Ve,iridescenceThicknessMap:$e,sheen:q,sheenColorMap:lt,sheenRoughnessMap:at,specularMap:Be,specularColorMap:It,specularIntensityMap:Tt,transmission:pe,transmissionMap:mt,thicknessMap:dt,gradientMap:st,opaque:C.transparent===!1&&C.blending===Pl,alphaMap:ct,alphaTest:me,alphaHash:Ye,combine:C.combine,mapUv:be&&T(C.map.channel),aoMapUv:Y&&T(C.aoMap.channel),lightMapUv:j&&T(C.lightMap.channel),bumpMapUv:ie&&T(C.bumpMap.channel),normalMapUv:Te&&T(C.normalMap.channel),displacementMapUv:ve&&T(C.displacementMap.channel),emissiveMapUv:ae&&T(C.emissiveMap.channel),metalnessMapUv:Oe&&T(C.metalnessMap.channel),roughnessMapUv:Se&&T(C.roughnessMap.channel),anisotropyMapUv:ue&&T(C.anisotropyMap.channel),clearcoatMapUv:_e&&T(C.clearcoatMap.channel),clearcoatNormalMapUv:Ae&&T(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ie&&T(C.clearcoatRoughnessMap.channel),iridescenceMapUv:Ve&&T(C.iridescenceMap.channel),iridescenceThicknessMapUv:$e&&T(C.iridescenceThicknessMap.channel),sheenColorMapUv:lt&&T(C.sheenColorMap.channel),sheenRoughnessMapUv:at&&T(C.sheenRoughnessMap.channel),specularMapUv:Be&&T(C.specularMap.channel),specularColorMapUv:It&&T(C.specularColorMap.channel),specularIntensityMapUv:Tt&&T(C.specularIntensityMap.channel),transmissionMapUv:mt&&T(C.transmissionMap.channel),thicknessMapUv:dt&&T(C.thicknessMap.channel),alphaMapUv:ct&&T(C.alphaMap.channel),vertexTangents:!!F.attributes.tangent&&(Te||Me),vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!F.attributes.color&&F.attributes.color.itemSize===4,vertexUv1s:Pe,vertexUv2s:Xe,vertexUv3s:vt,pointsUvs:P.isPoints===!0&&!!F.attributes.uv&&(be||ct),fog:!!O,useFog:C.fog===!0,fogExp2:O&&O.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:P.isSkinnedMesh===!0,morphTargets:F.morphAttributes.position!==void 0,morphNormals:F.morphAttributes.normal!==void 0,morphColors:F.morphAttributes.color!==void 0,morphTargetsCount:te,morphTextureStride:de,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numLightProbes:A.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:C.dithering,shadowMapEnabled:t.shadowMap.enabled&&I.length>0,shadowMapType:t.shadowMap.type,toneMapping:Ot,useLegacyLights:t._useLegacyLights,decodeVideoTexture:be&&C.map.isVideoTexture===!0&&Tn.getTransfer(C.map.colorSpace)===kn,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===ko,flipSided:C.side===ui,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionDerivatives:Ge&&C.extensions.derivatives===!0,extensionFragDepth:Ge&&C.extensions.fragDepth===!0,extensionDrawBuffers:Ge&&C.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ge&&C.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:C.customProgramCacheKey()}}function _(C){const A=[];if(C.shaderID?A.push(C.shaderID):(A.push(C.customVertexShaderID),A.push(C.customFragmentShaderID)),C.defines!==void 0)for(const I in C.defines)A.push(I),A.push(C.defines[I]);return C.isRawShaderMaterial===!1&&(v(A,C),y(A,C),A.push(t.outputColorSpace)),A.push(C.customProgramCacheKey),A.join()}function v(C,A){C.push(A.precision),C.push(A.outputColorSpace),C.push(A.envMapMode),C.push(A.envMapCubeUVHeight),C.push(A.mapUv),C.push(A.alphaMapUv),C.push(A.lightMapUv),C.push(A.aoMapUv),C.push(A.bumpMapUv),C.push(A.normalMapUv),C.push(A.displacementMapUv),C.push(A.emissiveMapUv),C.push(A.metalnessMapUv),C.push(A.roughnessMapUv),C.push(A.anisotropyMapUv),C.push(A.clearcoatMapUv),C.push(A.clearcoatNormalMapUv),C.push(A.clearcoatRoughnessMapUv),C.push(A.iridescenceMapUv),C.push(A.iridescenceThicknessMapUv),C.push(A.sheenColorMapUv),C.push(A.sheenRoughnessMapUv),C.push(A.specularMapUv),C.push(A.specularColorMapUv),C.push(A.specularIntensityMapUv),C.push(A.transmissionMapUv),C.push(A.thicknessMapUv),C.push(A.combine),C.push(A.fogExp2),C.push(A.sizeAttenuation),C.push(A.morphTargetsCount),C.push(A.morphAttributeCount),C.push(A.numDirLights),C.push(A.numPointLights),C.push(A.numSpotLights),C.push(A.numSpotLightMaps),C.push(A.numHemiLights),C.push(A.numRectAreaLights),C.push(A.numDirLightShadows),C.push(A.numPointLightShadows),C.push(A.numSpotLightShadows),C.push(A.numSpotLightShadowsWithMaps),C.push(A.numLightProbes),C.push(A.shadowMapType),C.push(A.toneMapping),C.push(A.numClippingPlanes),C.push(A.numClipIntersection),C.push(A.depthPacking)}function y(C,A){a.disableAll(),A.isWebGL2&&a.enable(0),A.supportsVertexTextures&&a.enable(1),A.instancing&&a.enable(2),A.instancingColor&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUv1s&&a.enable(13),A.vertexUv2s&&a.enable(14),A.vertexUv3s&&a.enable(15),A.vertexTangents&&a.enable(16),A.anisotropy&&a.enable(17),A.alphaHash&&a.enable(18),A.batching&&a.enable(19),C.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.useLegacyLights&&a.enable(10),A.doubleSided&&a.enable(11),A.flipSided&&a.enable(12),A.useDepthPacking&&a.enable(13),A.dithering&&a.enable(14),A.transmission&&a.enable(15),A.sheen&&a.enable(16),A.opaque&&a.enable(17),A.pointsUvs&&a.enable(18),A.decodeVideoTexture&&a.enable(19),C.push(a.mask)}function b(C){const A=m[C.type];let I;if(A){const N=Io[A];I=Vlr.clone(N.uniforms)}else I=C.uniforms;return I}function E(C,A){let I;for(let N=0,P=c.length;N0?r.push(_):f.transparent===!0?i.push(_):n.push(_)}function l(d,h,f,m,T,Q){const _=s(d,h,f,m,T,Q);f.transmission>0?r.unshift(_):f.transparent===!0?i.unshift(_):n.unshift(_)}function c(d,h){n.length>1&&n.sort(d||i6r),r.length>1&&r.sort(h||DI),i.length>1&&i.sort(h||DI)}function u(){for(let d=e,h=t.length;d=o.length?(s=new II,o.push(s)):s=o[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function s6r(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new Ee,color:new Nt};break;case"SpotLight":n={position:new Ee,direction:new Ee,color:new Nt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Ee,color:new Nt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Ee,skyColor:new Nt,groundColor:new Nt};break;case"RectAreaLight":n={color:new Nt,position:new Ee,halfWidth:new Ee,halfHeight:new Ee};break}return t[e.id]=n,n}}}function a6r(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yt};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yt};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Yt,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let l6r=0;function c6r(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function u6r(t,e){const n=new s6r,r=a6r(),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 Ee);const o=new Ee,s=new zt,a=new zt;function l(u,d){let h=0,f=0,m=0;for(let N=0;N<9;N++)i.probe[N].set(0,0,0);let T=0,Q=0,_=0,v=0,y=0,b=0,E=0,x=0,L=0,M=0,C=0;u.sort(c6r);const A=d===!0?Math.PI:1;for(let N=0,P=u.length;N0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=rt.LTC_FLOAT_1,i.rectAreaLTC2=rt.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=rt.LTC_HALF_1,i.rectAreaLTC2=rt.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=h,i.ambient[1]=f,i.ambient[2]=m;const I=i.hash;(I.directionalLength!==T||I.pointLength!==Q||I.spotLength!==_||I.rectAreaLength!==v||I.hemiLength!==y||I.numDirectionalShadows!==b||I.numPointShadows!==E||I.numSpotShadows!==x||I.numSpotMaps!==L||I.numLightProbes!==C)&&(i.directional.length=T,i.spot.length=_,i.rectArea.length=v,i.point.length=Q,i.hemi.length=y,i.directionalShadow.length=b,i.directionalShadowMap.length=b,i.pointShadow.length=E,i.pointShadowMap.length=E,i.spotShadow.length=x,i.spotShadowMap.length=x,i.directionalShadowMatrix.length=b,i.pointShadowMatrix.length=E,i.spotLightMatrix.length=x+L-M,i.spotLightMap.length=L,i.numSpotLightShadowsWithMaps=M,i.numLightProbes=C,I.directionalLength=T,I.pointLength=Q,I.spotLength=_,I.rectAreaLength=v,I.hemiLength=y,I.numDirectionalShadows=b,I.numPointShadows=E,I.numSpotShadows=x,I.numSpotMaps=L,I.numLightProbes=C,i.version=l6r++)}function c(u,d){let h=0,f=0,m=0,T=0,Q=0;const _=d.matrixWorldInverse;for(let v=0,y=u.length;v=a.length?(l=new kI(t,e),a.push(l)):l=a[s],l}function i(){n=new WeakMap}return{get:r,dispose:i}}class f6r extends fo{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=K2r,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 p6r extends fo{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 h6r=`void main() { gl_Position = vec4( position, 1.0 ); -}`,l6r=`uniform sampler2D shadow_pass; +}`,T6r=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -4054,12 +4054,12 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function c6r(t,e,n){let r=new eE;const i=new Yt,o=new Yt,s=new Mn,a=new o6r({depthPacking:G2r}),l=new s6r,c={},u=n.maxTextureSize,d={[Us]:ui,[ui]:Us,[ko]:ko},h=new _2({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Yt},radius:{value:4}},vertexShader:a6r,fragmentShader:l6r}),f=h.clone();f.defines.HORIZONTAL_PASS=1;const m=new rs;m.setAttribute("position",new Kr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const T=new Yr(m,h),Q=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=bU;let _=this.type;this.render=function(E,x,L){if(Q.enabled===!1||Q.autoUpdate===!1&&Q.needsUpdate===!1||E.length===0)return;const M=t.getRenderTarget(),C=t.getActiveCubeFace(),A=t.getActiveMipmapLevel(),I=t.state;I.setBlending(ka),I.buffers.color.setClear(1,1,1,1),I.buffers.depth.setTest(!0),I.setScissorTest(!1);const N=_!==Es&&this.type===Es,P=_===Es&&this.type!==Es;for(let O=0,F=E.length;Ou||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/G.x),i.x=o.x*G.x,U.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/G.y),i.y=o.y*G.y,U.mapSize.y=o.y)),U.map===null||N===!0||P===!0){const W=this.type!==Es?{minFilter:hr,magFilter:hr}:{};U.map!==null&&U.map.dispose(),U.map=new g2(i.x,i.y,W),U.map.texture.name=V.name+".shadowMap",U.camera.updateProjectionMatrix()}t.setRenderTarget(U.map),t.clear();const K=U.getViewportCount();for(let W=0;W0||x.map&&x.alphaTest>0){const I=C.uuid,N=x.uuid;let P=c[I];P===void 0&&(P={},c[I]=P);let O=P[N];O===void 0&&(O=C.clone(),P[N]=O),C=O}if(C.visible=x.visible,C.wireframe=x.wireframe,M===Es?C.side=x.shadowSide!==null?x.shadowSide:x.side:C.side=x.shadowSide!==null?x.shadowSide:d[x.side],C.alphaMap=x.alphaMap,C.alphaTest=x.alphaTest,C.map=x.map,C.clipShadows=x.clipShadows,C.clippingPlanes=x.clippingPlanes,C.clipIntersection=x.clipIntersection,C.displacementMap=x.displacementMap,C.displacementScale=x.displacementScale,C.displacementBias=x.displacementBias,C.wireframeLinewidth=x.wireframeLinewidth,C.linewidth=x.linewidth,L.isPointLight===!0&&C.isMeshDistanceMaterial===!0){const I=t.properties.get(C);I.light=L}return C}function b(E,x,L,M,C){if(E.visible===!1)return;if(E.layers.test(x.layers)&&(E.isMesh||E.isLine||E.isPoints)&&(E.castShadow||E.receiveShadow&&C===Es)&&(!E.frustumCulled||r.intersectsObject(E))){E.modelViewMatrix.multiplyMatrices(L.matrixWorldInverse,E.matrixWorld);const N=e.update(E),P=E.material;if(Array.isArray(P)){const O=N.groups;for(let F=0,V=O.length;F=1):W.indexOf("OpenGL ES")!==-1&&(K=parseFloat(/^OpenGL ES (\d)/.exec(W)[1]),G=K>=2);let te=null,de={};const X=t.getParameter(t.SCISSOR_BOX),$=t.getParameter(t.VIEWPORT),ce=new Mn().fromArray(X),ye=new Mn().fromArray($);function z(me,Ye,Ge,Pe){const Xe=new Uint8Array(4),vt=t.createTexture();t.bindTexture(me,vt),t.texParameteri(me,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(me,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Ot=0;Ot"u"?!1:/OculusBrowser/g.test(navigator.userAgent),m=new WeakMap;let T;const Q=new WeakMap;let _=!1;try{_=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(Z,q){return _?new OffscreenCanvas(Z,q):a0("canvas")}function y(Z,q,pe,ue){let _e=1;if((Z.width>ue||Z.height>ue)&&(_e=ue/Math.max(Z.width,Z.height)),_e<1||q===!0)if(typeof HTMLImageElement<"u"&&Z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Z instanceof ImageBitmap){const Ae=q?gd:Math.floor,Ie=Ae(_e*Z.width),Ve=Ae(_e*Z.height);T===void 0&&(T=v(Ie,Ve));const $e=pe?v(Ie,Ve):T;return $e.width=Ie,$e.height=Ve,$e.getContext("2d").drawImage(Z,0,0,Ie,Ve),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Z.width+"x"+Z.height+") to ("+Ie+"x"+Ve+")."),$e}else return"data"in Z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Z.width+"x"+Z.height+")."),Z;return Z}function b(Z){return jQ(Z.width)&&jQ(Z.height)}function E(Z){return a?!1:Z.wrapS!==Pi||Z.wrapT!==Pi||Z.minFilter!==hr&&Z.minFilter!==ii}function x(Z,q){return Z.generateMipmaps&&q&&Z.minFilter!==hr&&Z.minFilter!==ii}function L(Z){t.generateMipmap(Z)}function M(Z,q,pe,ue,_e=!1){if(a===!1)return q;if(Z!==null){if(t[Z]!==void 0)return t[Z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Z+"'")}let Ae=q;if(q===t.RED&&(pe===t.FLOAT&&(Ae=t.R32F),pe===t.HALF_FLOAT&&(Ae=t.R16F),pe===t.UNSIGNED_BYTE&&(Ae=t.R8)),q===t.RED_INTEGER&&(pe===t.UNSIGNED_BYTE&&(Ae=t.R8UI),pe===t.UNSIGNED_SHORT&&(Ae=t.R16UI),pe===t.UNSIGNED_INT&&(Ae=t.R32UI),pe===t.BYTE&&(Ae=t.R8I),pe===t.SHORT&&(Ae=t.R16I),pe===t.INT&&(Ae=t.R32I)),q===t.RG&&(pe===t.FLOAT&&(Ae=t.RG32F),pe===t.HALF_FLOAT&&(Ae=t.RG16F),pe===t.UNSIGNED_BYTE&&(Ae=t.RG8)),q===t.RGBA){const Ie=_e?pd:Tn.getTransfer(ue);pe===t.FLOAT&&(Ae=t.RGBA32F),pe===t.HALF_FLOAT&&(Ae=t.RGBA16F),pe===t.UNSIGNED_BYTE&&(Ae=Ie===kn?t.SRGB8_ALPHA8:t.RGBA8),pe===t.UNSIGNED_SHORT_4_4_4_4&&(Ae=t.RGBA4),pe===t.UNSIGNED_SHORT_5_5_5_1&&(Ae=t.RGB5_A1)}return(Ae===t.R16F||Ae===t.R32F||Ae===t.RG16F||Ae===t.RG32F||Ae===t.RGBA16F||Ae===t.RGBA32F)&&e.get("EXT_color_buffer_float"),Ae}function C(Z,q,pe){return x(Z,pe)===!0||Z.isFramebufferTexture&&Z.minFilter!==hr&&Z.minFilter!==ii?Math.log2(Math.max(q.width,q.height))+1:Z.mipmaps!==void 0&&Z.mipmaps.length>0?Z.mipmaps.length:Z.isCompressedTexture&&Array.isArray(Z.image)?q.mipmaps.length:1}function A(Z){return Z===hr||Z===UQ||Z===tu?t.NEAREST:t.LINEAR}function I(Z){const q=Z.target;q.removeEventListener("dispose",I),P(q),q.isVideoTexture&&m.delete(q)}function N(Z){const q=Z.target;q.removeEventListener("dispose",N),F(q)}function P(Z){const q=r.get(Z);if(q.__webglInit===void 0)return;const pe=Z.source,ue=Q.get(pe);if(ue){const _e=ue[q.__cacheKey];_e.usedTimes--,_e.usedTimes===0&&O(Z),Object.keys(ue).length===0&&Q.delete(pe)}r.remove(Z)}function O(Z){const q=r.get(Z);t.deleteTexture(q.__webglTexture);const pe=Z.source,ue=Q.get(pe);delete ue[q.__cacheKey],s.memory.textures--}function F(Z){const q=Z.texture,pe=r.get(Z),ue=r.get(q);if(ue.__webglTexture!==void 0&&(t.deleteTexture(ue.__webglTexture),s.memory.textures--),Z.depthTexture&&Z.depthTexture.dispose(),Z.isWebGLCubeRenderTarget)for(let _e=0;_e<6;_e++){if(Array.isArray(pe.__webglFramebuffer[_e]))for(let Ae=0;Ae=l&&console.warn("THREE.WebGLTextures: Trying to use "+Z+" texture units while this GPU supports only "+l),V+=1,Z}function K(Z){const q=[];return q.push(Z.wrapS),q.push(Z.wrapT),q.push(Z.wrapR||0),q.push(Z.magFilter),q.push(Z.minFilter),q.push(Z.anisotropy),q.push(Z.internalFormat),q.push(Z.format),q.push(Z.type),q.push(Z.generateMipmaps),q.push(Z.premultiplyAlpha),q.push(Z.flipY),q.push(Z.unpackAlignment),q.push(Z.colorSpace),q.join()}function W(Z,q){const pe=r.get(Z);if(Z.isVideoTexture&&Me(Z),Z.isRenderTargetTexture===!1&&Z.version>0&&pe.__version!==Z.version){const ue=Z.image;if(ue===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ue.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{fe(pe,Z,q);return}}n.bindTexture(t.TEXTURE_2D,pe.__webglTexture,t.TEXTURE0+q)}function te(Z,q){const pe=r.get(Z);if(Z.version>0&&pe.__version!==Z.version){fe(pe,Z,q);return}n.bindTexture(t.TEXTURE_2D_ARRAY,pe.__webglTexture,t.TEXTURE0+q)}function de(Z,q){const pe=r.get(Z);if(Z.version>0&&pe.__version!==Z.version){fe(pe,Z,q);return}n.bindTexture(t.TEXTURE_3D,pe.__webglTexture,t.TEXTURE0+q)}function X(Z,q){const pe=r.get(Z);if(Z.version>0&&pe.__version!==Z.version){be(pe,Z,q);return}n.bindTexture(t.TEXTURE_CUBE_MAP,pe.__webglTexture,t.TEXTURE0+q)}const $={[dc]:t.REPEAT,[Pi]:t.CLAMP_TO_EDGE,[fd]:t.MIRRORED_REPEAT},ce={[hr]:t.NEAREST,[UQ]:t.NEAREST_MIPMAP_NEAREST,[tu]:t.NEAREST_MIPMAP_LINEAR,[ii]:t.LINEAR,[xU]:t.LINEAR_MIPMAP_NEAREST,[m2]:t.LINEAR_MIPMAP_LINEAR},ye={[z2r]:t.NEVER,[X2r]:t.ALWAYS,[j2r]:t.LESS,[DU]:t.LEQUAL,[W2r]:t.EQUAL,[Z2r]:t.GEQUAL,[Y2r]:t.GREATER,[K2r]:t.NOTEQUAL};function z(Z,q,pe){if(pe?(t.texParameteri(Z,t.TEXTURE_WRAP_S,$[q.wrapS]),t.texParameteri(Z,t.TEXTURE_WRAP_T,$[q.wrapT]),(Z===t.TEXTURE_3D||Z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(Z,t.TEXTURE_WRAP_R,$[q.wrapR]),t.texParameteri(Z,t.TEXTURE_MAG_FILTER,ce[q.magFilter]),t.texParameteri(Z,t.TEXTURE_MIN_FILTER,ce[q.minFilter])):(t.texParameteri(Z,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(Z,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(Z===t.TEXTURE_3D||Z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(Z,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(q.wrapS!==Pi||q.wrapT!==Pi)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(Z,t.TEXTURE_MAG_FILTER,A(q.magFilter)),t.texParameteri(Z,t.TEXTURE_MIN_FILTER,A(q.minFilter)),q.minFilter!==hr&&q.minFilter!==ii&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),q.compareFunction&&(t.texParameteri(Z,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(Z,t.TEXTURE_COMPARE_FUNC,ye[q.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const ue=e.get("EXT_texture_filter_anisotropic");if(q.magFilter===hr||q.minFilter!==tu&&q.minFilter!==m2||q.type===Ms&&e.has("OES_texture_float_linear")===!1||a===!1&&q.type===o0&&e.has("OES_texture_half_float_linear")===!1)return;(q.anisotropy>1||r.get(q).__currentAnisotropy)&&(t.texParameterf(Z,ue.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(q.anisotropy,i.getMaxAnisotropy())),r.get(q).__currentAnisotropy=q.anisotropy)}}function ne(Z,q){let pe=!1;Z.__webglInit===void 0&&(Z.__webglInit=!0,q.addEventListener("dispose",I));const ue=q.source;let _e=Q.get(ue);_e===void 0&&(_e={},Q.set(ue,_e));const Ae=K(q);if(Ae!==Z.__cacheKey){_e[Ae]===void 0&&(_e[Ae]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,pe=!0),_e[Ae].usedTimes++;const Ie=_e[Z.__cacheKey];Ie!==void 0&&(_e[Z.__cacheKey].usedTimes--,Ie.usedTimes===0&&O(q)),Z.__cacheKey=Ae,Z.__webglTexture=_e[Ae].texture}return pe}function fe(Z,q,pe){let ue=t.TEXTURE_2D;(q.isDataArrayTexture||q.isCompressedArrayTexture)&&(ue=t.TEXTURE_2D_ARRAY),q.isData3DTexture&&(ue=t.TEXTURE_3D);const _e=ne(Z,q),Ae=q.source;n.bindTexture(ue,Z.__webglTexture,t.TEXTURE0+pe);const Ie=r.get(Ae);if(Ae.version!==Ie.__version||_e===!0){n.activeTexture(t.TEXTURE0+pe);const Ve=Tn.getPrimaries(Tn.workingColorSpace),$e=q.colorSpace===Vi?null:Tn.getPrimaries(q.colorSpace),lt=q.colorSpace===Vi||Ve===$e?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,q.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,q.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,lt);const at=E(q)&&b(q.image)===!1;let Be=y(q.image,at,!1,u);Be=ke(q,Be);const It=b(Be)||a,Tt=o.convert(q.format,q.colorSpace);let mt=o.convert(q.type),dt=M(q.internalFormat,Tt,mt,q.colorSpace,q.isVideoTexture);z(ue,q,It);let st;const ct=q.mipmaps,me=a&&q.isVideoTexture!==!0&&dt!==OU,Ye=Ie.__version===void 0||_e===!0,Ge=C(q,Be,It);if(q.isDepthTexture)dt=t.DEPTH_COMPONENT,a?q.type===Ms?dt=t.DEPTH_COMPONENT32F:q.type===Oa?dt=t.DEPTH_COMPONENT24:q.type===Z1?dt=t.DEPTH24_STENCIL8:dt=t.DEPTH_COMPONENT16:q.type===Ms&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),q.format===X1&&dt===t.DEPTH_COMPONENT&&q.type!==Kb&&q.type!==Oa&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),q.type=Oa,mt=o.convert(q.type)),q.format===fc&&dt===t.DEPTH_COMPONENT&&(dt=t.DEPTH_STENCIL,q.type!==Z1&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),q.type=Z1,mt=o.convert(q.type))),Ye&&(me?n.texStorage2D(t.TEXTURE_2D,1,dt,Be.width,Be.height):n.texImage2D(t.TEXTURE_2D,0,dt,Be.width,Be.height,0,Tt,mt,null));else if(q.isDataTexture)if(ct.length>0&&It){me&&Ye&&n.texStorage2D(t.TEXTURE_2D,Ge,dt,ct[0].width,ct[0].height);for(let Pe=0,Xe=ct.length;Pe>=1,Xe>>=1}}else if(ct.length>0&&It){me&&Ye&&n.texStorage2D(t.TEXTURE_2D,Ge,dt,ct[0].width,ct[0].height);for(let Pe=0,Xe=ct.length;Pe0&&Ye++,n.texStorage2D(t.TEXTURE_CUBE_MAP,Ye,st,Be[0].width,Be[0].height));for(let Pe=0;Pe<6;Pe++)if(at){ct?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,0,0,Be[Pe].width,Be[Pe].height,mt,dt,Be[Pe].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,st,Be[Pe].width,Be[Pe].height,0,mt,dt,Be[Pe].data);for(let Xe=0;Xe>Ae),Be=Math.max(1,q.height>>Ae);_e===t.TEXTURE_3D||_e===t.TEXTURE_2D_ARRAY?n.texImage3D(_e,Ae,$e,at,Be,q.depth,0,Ie,Ve,null):n.texImage2D(_e,Ae,$e,at,Be,0,Ie,Ve,null)}n.bindFramebuffer(t.FRAMEBUFFER,Z),Se(q)?h.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,ue,_e,r.get(pe).__webglTexture,0,Oe(q)):(_e===t.TEXTURE_2D||_e>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&_e<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,ue,_e,r.get(pe).__webglTexture,Ae),n.bindFramebuffer(t.FRAMEBUFFER,null)}function se(Z,q,pe){if(t.bindRenderbuffer(t.RENDERBUFFER,Z),q.depthBuffer&&!q.stencilBuffer){let ue=a===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(pe||Se(q)){const _e=q.depthTexture;_e&&_e.isDepthTexture&&(_e.type===Ms?ue=t.DEPTH_COMPONENT32F:_e.type===Oa&&(ue=t.DEPTH_COMPONENT24));const Ae=Oe(q);Se(q)?h.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Ae,ue,q.width,q.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,Ae,ue,q.width,q.height)}else t.renderbufferStorage(t.RENDERBUFFER,ue,q.width,q.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,Z)}else if(q.depthBuffer&&q.stencilBuffer){const ue=Oe(q);pe&&Se(q)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,ue,t.DEPTH24_STENCIL8,q.width,q.height):Se(q)?h.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ue,t.DEPTH24_STENCIL8,q.width,q.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,q.width,q.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,Z)}else{const ue=q.isWebGLMultipleRenderTargets===!0?q.texture:[q.texture];for(let _e=0;_e0){pe.__webglFramebuffer[Ve]=[];for(let $e=0;$e0){pe.__webglFramebuffer=[];for(let Ve=0;Ve0&&Se(Z)===!1){const Ve=Ae?q:[q];pe.__webglMultisampledFramebuffer=t.createFramebuffer(),pe.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,pe.__webglMultisampledFramebuffer);for(let $e=0;$e0)for(let $e=0;$e0)for(let $e=0;$e0&&Se(Z)===!1){const q=Z.isWebGLMultipleRenderTargets?Z.texture:[Z.texture],pe=Z.width,ue=Z.height;let _e=t.COLOR_BUFFER_BIT;const Ae=[],Ie=Z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ve=r.get(Z),$e=Z.isWebGLMultipleRenderTargets===!0;if($e)for(let lt=0;lt0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&q.__useRenderToTexture!==!1}function Me(Z){const q=s.render.frame;m.get(Z)!==q&&(m.set(Z,q),Z.update())}function ke(Z,q){const pe=Z.colorSpace,ue=Z.format,_e=Z.type;return Z.isCompressedTexture===!0||Z.isVideoTexture===!0||Z.format===zQ||pe!==Sr&&pe!==Vi&&(Tn.getTransfer(pe)===kn?a===!1?e.has("EXT_sRGB")===!0&&ue===Hi?(Z.format=zQ,Z.minFilter=ii,Z.generateMipmaps=!1):q=kU.sRGBToLinear(q):(ue!==Hi||_e!==Ha)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",pe)),q}this.allocateTextureUnit=G,this.resetTextureUnits=U,this.setTexture2D=W,this.setTexture2DArray=te,this.setTexture3D=de,this.setTextureCube=X,this.rebindTextures=ie,this.setupRenderTarget=Te,this.updateRenderTargetMipmap=ve,this.updateMultisampleRenderTarget=ae,this.setupDepthRenderbuffer=j,this.setupFrameBufferTexture=Le,this.useMultisampledRTT=Se}function f6r(t,e,n){const r=n.isWebGL2;function i(o,s=Vi){let a;const l=Tn.getTransfer(s);if(o===Ha)return t.UNSIGNED_BYTE;if(o===LU)return t.UNSIGNED_SHORT_4_4_4_4;if(o===CU)return t.UNSIGNED_SHORT_5_5_5_1;if(o===N2r)return t.BYTE;if(o===D2r)return t.SHORT;if(o===Kb)return t.UNSIGNED_SHORT;if(o===SU)return t.INT;if(o===Oa)return t.UNSIGNED_INT;if(o===Ms)return t.FLOAT;if(o===o0)return r?t.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(o===I2r)return t.ALPHA;if(o===Hi)return t.RGBA;if(o===k2r)return t.LUMINANCE;if(o===P2r)return t.LUMINANCE_ALPHA;if(o===X1)return t.DEPTH_COMPONENT;if(o===fc)return t.DEPTH_STENCIL;if(o===zQ)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(o===H2r)return t.RED;if(o===AU)return t.RED_INTEGER;if(o===V2r)return t.RG;if(o===wU)return t.RG_INTEGER;if(o===MU)return t.RGBA_INTEGER;if(o===Ig||o===kg||o===Pg||o===Hg)if(l===kn)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(o===Ig)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===kg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===Pg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===Hg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(o===Ig)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===kg)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===Pg)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===Hg)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===bD||o===ED||o===xD||o===SD)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(o===bD)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===ED)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===xD)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===SD)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===OU)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===LD||o===CD)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(o===LD)return l===kn?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(o===CD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===AD||o===wD||o===MD||o===OD||o===RD||o===ND||o===DD||o===ID||o===kD||o===PD||o===HD||o===VD||o===BD||o===FD)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(o===AD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===wD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===MD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===OD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===RD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===ND)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===DD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===ID)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===kD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===PD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===HD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===VD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===BD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===FD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===Vg||o===$D||o===UD)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(o===Vg)return l===kn?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(o===$D)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(o===UD)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(o===B2r||o===GD||o===qD||o===zD)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(o===Vg)return a.COMPRESSED_RED_RGTC1_EXT;if(o===GD)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(o===qD)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(o===zD)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return o===Z1?r?t.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):t[o]!==void 0?t[o]:null}return{convert:i}}class p6r extends Wr{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class G1 extends $n{constructor(){super(),this.isGroup=!0,this.type="Group"}}const h6r={type:"move"};class c_{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new G1,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 G1,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ee,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ee),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new G1,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ee,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ee),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 n=this._hand;if(n)for(const r of e.hand.values())this._getHandJoint(n,r)}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,n,r){let i=null,o=null,s=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){s=!0;for(const T of e.hand.values()){const Q=n.getJointPose(T,r),_=this._getHandJoint(c,T);Q!==null&&(_.matrix.fromArray(Q.transform.matrix),_.matrix.decompose(_.position,_.rotation,_.scale),_.matrixWorldNeedsUpdate=!0,_.jointRadius=Q.radius),_.visible=Q!==null}const u=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],h=u.position.distanceTo(d.position),f=.02,m=.005;c.inputState.pinching&&h>f+m?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=f-m&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=n.getPose(e.gripSpace,r),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&o!==null&&(i=o),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(h6r)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new G1;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}class T6r extends zc{constructor(e,n){super();const r=this;let i=null,o=1,s=null,a="local-floor",l=1,c=null,u=null,d=null,h=null,f=null,m=null;const T=n.getContextAttributes();let Q=null,_=null;const v=[],y=[],b=new Yt;let E=null;const x=new Wr;x.layers.enable(1),x.viewport=new Mn;const L=new Wr;L.layers.enable(2),L.viewport=new Mn;const M=[x,L],C=new p6r;C.layers.enable(1),C.layers.enable(2);let A=null,I=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(X){let $=v[X];return $===void 0&&($=new c_,v[X]=$),$.getTargetRaySpace()},this.getControllerGrip=function(X){let $=v[X];return $===void 0&&($=new c_,v[X]=$),$.getGripSpace()},this.getHand=function(X){let $=v[X];return $===void 0&&($=new c_,v[X]=$),$.getHandSpace()};function N(X){const $=y.indexOf(X.inputSource);if($===-1)return;const ce=v[$];ce!==void 0&&(ce.update(X.inputSource,X.frame,c||s),ce.dispatchEvent({type:X.type,data:X.inputSource}))}function P(){i.removeEventListener("select",N),i.removeEventListener("selectstart",N),i.removeEventListener("selectend",N),i.removeEventListener("squeeze",N),i.removeEventListener("squeezestart",N),i.removeEventListener("squeezeend",N),i.removeEventListener("end",P),i.removeEventListener("inputsourceschange",O);for(let X=0;X=0&&(y[ye]=null,v[ye].disconnect(ce))}for(let $=0;$=y.length){y.push(ce),ye=ne;break}else if(y[ne]===null){y[ne]=ce,ye=ne;break}if(ye===-1)break}const z=v[ye];z&&z.connect(ce)}}const F=new Ee,V=new Ee;function U(X,$,ce){F.setFromMatrixPosition($.matrixWorld),V.setFromMatrixPosition(ce.matrixWorld);const ye=F.distanceTo(V),z=$.projectionMatrix.elements,ne=ce.projectionMatrix.elements,fe=z[14]/(z[10]-1),be=z[14]/(z[10]+1),Le=(z[9]+1)/z[5],se=(z[9]-1)/z[5],Y=(z[8]-1)/z[0],j=(ne[8]+1)/ne[0],ie=fe*Y,Te=fe*j,ve=ye/(-Y+j),ae=ve*-Y;$.matrixWorld.decompose(X.position,X.quaternion,X.scale),X.translateX(ae),X.translateZ(ve),X.matrixWorld.compose(X.position,X.quaternion,X.scale),X.matrixWorldInverse.copy(X.matrixWorld).invert();const Oe=fe+ve,Se=be+ve,Me=ie-ae,ke=Te+(ye-ae),Z=Le*be/Se*Oe,q=se*be/Se*Oe;X.projectionMatrix.makePerspective(Me,ke,Z,q,Oe,Se),X.projectionMatrixInverse.copy(X.projectionMatrix).invert()}function G(X,$){$===null?X.matrixWorld.copy(X.matrix):X.matrixWorld.multiplyMatrices($.matrixWorld,X.matrix),X.matrixWorldInverse.copy(X.matrixWorld).invert()}this.updateCamera=function(X){if(i===null)return;C.near=L.near=x.near=X.near,C.far=L.far=x.far=X.far,(A!==C.near||I!==C.far)&&(i.updateRenderState({depthNear:C.near,depthFar:C.far}),A=C.near,I=C.far);const $=X.parent,ce=C.cameras;G(C,$);for(let ye=0;ye0&&(Q.alphaTest.value=_.alphaTest);const v=e.get(_).envMap;if(v&&(Q.envMap.value=v,Q.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,Q.reflectivity.value=_.reflectivity,Q.ior.value=_.ior,Q.refractionRatio.value=_.refractionRatio),_.lightMap){Q.lightMap.value=_.lightMap;const y=t._useLegacyLights===!0?Math.PI:1;Q.lightMapIntensity.value=_.lightMapIntensity*y,n(_.lightMap,Q.lightMapTransform)}_.aoMap&&(Q.aoMap.value=_.aoMap,Q.aoMapIntensity.value=_.aoMapIntensity,n(_.aoMap,Q.aoMapTransform))}function s(Q,_){Q.diffuse.value.copy(_.color),Q.opacity.value=_.opacity,_.map&&(Q.map.value=_.map,n(_.map,Q.mapTransform))}function a(Q,_){Q.dashSize.value=_.dashSize,Q.totalSize.value=_.dashSize+_.gapSize,Q.scale.value=_.scale}function l(Q,_,v,y){Q.diffuse.value.copy(_.color),Q.opacity.value=_.opacity,Q.size.value=_.size*v,Q.scale.value=y*.5,_.map&&(Q.map.value=_.map,n(_.map,Q.uvTransform)),_.alphaMap&&(Q.alphaMap.value=_.alphaMap,n(_.alphaMap,Q.alphaMapTransform)),_.alphaTest>0&&(Q.alphaTest.value=_.alphaTest)}function c(Q,_){Q.diffuse.value.copy(_.color),Q.opacity.value=_.opacity,Q.rotation.value=_.rotation,_.map&&(Q.map.value=_.map,n(_.map,Q.mapTransform)),_.alphaMap&&(Q.alphaMap.value=_.alphaMap,n(_.alphaMap,Q.alphaMapTransform)),_.alphaTest>0&&(Q.alphaTest.value=_.alphaTest)}function u(Q,_){Q.specular.value.copy(_.specular),Q.shininess.value=Math.max(_.shininess,1e-4)}function d(Q,_){_.gradientMap&&(Q.gradientMap.value=_.gradientMap)}function h(Q,_){Q.metalness.value=_.metalness,_.metalnessMap&&(Q.metalnessMap.value=_.metalnessMap,n(_.metalnessMap,Q.metalnessMapTransform)),Q.roughness.value=_.roughness,_.roughnessMap&&(Q.roughnessMap.value=_.roughnessMap,n(_.roughnessMap,Q.roughnessMapTransform)),e.get(_).envMap&&(Q.envMapIntensity.value=_.envMapIntensity)}function f(Q,_,v){Q.ior.value=_.ior,_.sheen>0&&(Q.sheenColor.value.copy(_.sheenColor).multiplyScalar(_.sheen),Q.sheenRoughness.value=_.sheenRoughness,_.sheenColorMap&&(Q.sheenColorMap.value=_.sheenColorMap,n(_.sheenColorMap,Q.sheenColorMapTransform)),_.sheenRoughnessMap&&(Q.sheenRoughnessMap.value=_.sheenRoughnessMap,n(_.sheenRoughnessMap,Q.sheenRoughnessMapTransform))),_.clearcoat>0&&(Q.clearcoat.value=_.clearcoat,Q.clearcoatRoughness.value=_.clearcoatRoughness,_.clearcoatMap&&(Q.clearcoatMap.value=_.clearcoatMap,n(_.clearcoatMap,Q.clearcoatMapTransform)),_.clearcoatRoughnessMap&&(Q.clearcoatRoughnessMap.value=_.clearcoatRoughnessMap,n(_.clearcoatRoughnessMap,Q.clearcoatRoughnessMapTransform)),_.clearcoatNormalMap&&(Q.clearcoatNormalMap.value=_.clearcoatNormalMap,n(_.clearcoatNormalMap,Q.clearcoatNormalMapTransform),Q.clearcoatNormalScale.value.copy(_.clearcoatNormalScale),_.side===ui&&Q.clearcoatNormalScale.value.negate())),_.iridescence>0&&(Q.iridescence.value=_.iridescence,Q.iridescenceIOR.value=_.iridescenceIOR,Q.iridescenceThicknessMinimum.value=_.iridescenceThicknessRange[0],Q.iridescenceThicknessMaximum.value=_.iridescenceThicknessRange[1],_.iridescenceMap&&(Q.iridescenceMap.value=_.iridescenceMap,n(_.iridescenceMap,Q.iridescenceMapTransform)),_.iridescenceThicknessMap&&(Q.iridescenceThicknessMap.value=_.iridescenceThicknessMap,n(_.iridescenceThicknessMap,Q.iridescenceThicknessMapTransform))),_.transmission>0&&(Q.transmission.value=_.transmission,Q.transmissionSamplerMap.value=v.texture,Q.transmissionSamplerSize.value.set(v.width,v.height),_.transmissionMap&&(Q.transmissionMap.value=_.transmissionMap,n(_.transmissionMap,Q.transmissionMapTransform)),Q.thickness.value=_.thickness,_.thicknessMap&&(Q.thicknessMap.value=_.thicknessMap,n(_.thicknessMap,Q.thicknessMapTransform)),Q.attenuationDistance.value=_.attenuationDistance,Q.attenuationColor.value.copy(_.attenuationColor)),_.anisotropy>0&&(Q.anisotropyVector.value.set(_.anisotropy*Math.cos(_.anisotropyRotation),_.anisotropy*Math.sin(_.anisotropyRotation)),_.anisotropyMap&&(Q.anisotropyMap.value=_.anisotropyMap,n(_.anisotropyMap,Q.anisotropyMapTransform))),Q.specularIntensity.value=_.specularIntensity,Q.specularColor.value.copy(_.specularColor),_.specularColorMap&&(Q.specularColorMap.value=_.specularColorMap,n(_.specularColorMap,Q.specularColorMapTransform)),_.specularIntensityMap&&(Q.specularIntensityMap.value=_.specularIntensityMap,n(_.specularIntensityMap,Q.specularIntensityMapTransform))}function m(Q,_){_.matcap&&(Q.matcap.value=_.matcap)}function T(Q,_){const v=e.get(_).light;Q.referencePosition.value.setFromMatrixPosition(v.matrixWorld),Q.nearDistance.value=v.shadow.camera.near,Q.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function g6r(t,e,n,r){let i={},o={},s=[];const a=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(v,y){const b=y.program;r.uniformBlockBinding(v,b)}function c(v,y){let b=i[v.id];b===void 0&&(m(v),b=u(v),i[v.id]=b,v.addEventListener("dispose",Q));const E=y.program;r.updateUBOMapping(v,E);const x=e.render.frame;o[v.id]!==x&&(h(v),o[v.id]=x)}function u(v){const y=d();v.__bindingPointIndex=y;const b=t.createBuffer(),E=v.__size,x=v.usage;return t.bindBuffer(t.UNIFORM_BUFFER,b),t.bufferData(t.UNIFORM_BUFFER,E,x),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,y,b),b}function d(){for(let v=0;v0){x=b%E;const N=E-x;x!==0&&N-A.boundary<0&&(b+=E-x,C.__offset=b)}b+=A.storage}return x=b%E,x>0&&(b+=E-x),v.__size=b,v.__cache={},this}function T(v){const y={boundary:0,storage:0};return typeof v=="number"?(y.boundary=4,y.storage=4):v.isVector2?(y.boundary=8,y.storage=8):v.isVector3||v.isColor?(y.boundary=16,y.storage=12):v.isVector4?(y.boundary=16,y.storage=16):v.isMatrix3?(y.boundary=48,y.storage=48):v.isMatrix4?(y.boundary=64,y.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),y}function Q(v){const y=v.target;y.removeEventListener("dispose",Q);const b=s.indexOf(y.__bindingPointIndex);s.splice(b,1),t.deleteBuffer(i[y.id]),delete i[y.id],delete o[y.id]}function _(){for(const v in i)t.deleteBuffer(i[v]);s=[],i={},o={}}return{bind:l,update:c,dispose:_}}class JU{constructor(e={}){const{canvas:n=hlr(),context:r=null,depth:i=!0,stencil:o=!0,alpha:s=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let h;r!==null?h=r.getContextAttributes().alpha:h=s;const f=new Uint32Array(4),m=new Int32Array(4);let T=null,Q=null;const _=[],v=[];this.domElement=n,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=jn,this._useLegacyLights=!1,this.toneMapping=Pa,this.toneMappingExposure=1;const y=this;let b=!1,E=0,x=0,L=null,M=-1,C=null;const A=new Mn,I=new Mn;let N=null;const P=new Nt(0);let O=0,F=n.width,V=n.height,U=1,G=null,K=null;const W=new Mn(0,0,F,V),te=new Mn(0,0,F,V);let de=!1;const X=new eE;let $=!1,ce=!1,ye=null;const z=new zt,ne=new Yt,fe=new Ee,be={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Le(){return L===null?U:1}let se=r;function Y(ee,xe){for(let Ce=0;Ce{function We(){if(Ne.forEach(function(Fe){ae.get(Fe).currentProgram.isReady()&&Ne.delete(Fe)}),Ne.size===0){Re(ee);return}setTimeout(We,10)}j.get("KHR_parallel_shader_compile")!==null?We():setTimeout(We,10)})};let Ot=null;function Hn(ee){Ot&&Ot(ee)}function zn(){Yn.stop()}function an(){Yn.start()}const Yn=new zU;Yn.setAnimationLoop(Hn),typeof self<"u"&&Yn.setContext(self),this.setAnimationLoop=function(ee){Ot=ee,st.setAnimationLoop(ee),ee===null?Yn.stop():Yn.start()},st.addEventListener("sessionstart",zn),st.addEventListener("sessionend",an),this.render=function(ee,xe){if(xe!==void 0&&xe.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(b===!0)return;ee.matrixWorldAutoUpdate===!0&&ee.updateMatrixWorld(),xe.parent===null&&xe.matrixWorldAutoUpdate===!0&&xe.updateMatrixWorld(),st.enabled===!0&&st.isPresenting===!0&&(st.cameraAutoUpdate===!0&&st.updateCamera(xe),xe=st.getCamera()),ee.isScene===!0&&ee.onBeforeRender(y,ee,xe,L),Q=Ae.get(ee,v.length),Q.init(),v.push(Q),z.multiplyMatrices(xe.projectionMatrix,xe.matrixWorldInverse),X.setFromProjectionMatrix(z),ce=this.localClippingEnabled,$=Ie.init(this.clippingPlanes,ce),T=_e.get(ee,_.length),T.init(),_.push(T),Cr(ee,xe,0,y.sortObjects),T.finish(),y.sortObjects===!0&&T.sort(G,K),this.info.render.frame++,$===!0&&Ie.beginShadows();const Ce=Q.state.shadowsArray;if(Ve.render(Ce,ee,xe),$===!0&&Ie.endShadows(),this.info.autoReset===!0&&this.info.reset(),$e.render(T,ee),Q.setupLights(y._useLegacyLights),xe.isArrayCamera){const Ne=xe.cameras;for(let Re=0,We=Ne.length;Re0?Q=v[v.length-1]:Q=null,_.pop(),_.length>0?T=_[_.length-1]:T=null};function Cr(ee,xe,Ce,Ne){if(ee.visible===!1)return;if(ee.layers.test(xe.layers)){if(ee.isGroup)Ce=ee.renderOrder;else if(ee.isLOD)ee.autoUpdate===!0&&ee.update(xe);else if(ee.isLight)Q.pushLight(ee),ee.castShadow&&Q.pushShadow(ee);else if(ee.isSprite){if(!ee.frustumCulled||X.intersectsSprite(ee)){Ne&&fe.setFromMatrixPosition(ee.matrixWorld).applyMatrix4(z);const Fe=q.update(ee),B=ee.material;B.visible&&T.push(ee,Fe,B,Ce,fe.z,null)}}else if((ee.isMesh||ee.isLine||ee.isPoints)&&(!ee.frustumCulled||X.intersectsObject(ee))){const Fe=q.update(ee),B=ee.material;if(Ne&&(ee.boundingSphere!==void 0?(ee.boundingSphere===null&&ee.computeBoundingSphere(),fe.copy(ee.boundingSphere.center)):(Fe.boundingSphere===null&&Fe.computeBoundingSphere(),fe.copy(Fe.boundingSphere.center)),fe.applyMatrix4(ee.matrixWorld).applyMatrix4(z)),Array.isArray(B)){const et=Fe.groups;for(let bt=0,gt=et.length;bt0&&So(Re,We,xe,Ce),Ne&&Te.viewport(A.copy(Ne)),Re.length>0&&Gt(Re,xe,Ce),We.length>0&&Gt(We,xe,Ce),Fe.length>0&&Gt(Fe,xe,Ce),Te.buffers.depth.setTest(!0),Te.buffers.depth.setMask(!0),Te.buffers.color.setMask(!0),Te.setPolygonOffset(!1)}function So(ee,xe,Ce,Ne){if((Ce.isScene===!0?Ce.overrideMaterial:null)!==null)return;const We=ie.isWebGL2;ye===null&&(ye=new g2(1,1,{generateMipmaps:!0,type:j.has("EXT_color_buffer_half_float")?o0:Ha,minFilter:m2,samples:We?4:0})),y.getDrawingBufferSize(ne),We?ye.setSize(ne.x,ne.y):ye.setSize(gd(ne.x),gd(ne.y));const Fe=y.getRenderTarget();y.setRenderTarget(ye),y.getClearColor(P),O=y.getClearAlpha(),O<1&&y.setClearColor(16777215,.5),y.clear();const B=y.toneMapping;y.toneMapping=Pa,Gt(ee,Ce,Ne),Oe.updateMultisampleRenderTarget(ye),Oe.updateRenderTargetMipmap(ye);let et=!1;for(let bt=0,gt=xe.length;bt0),Qt=!!Ce.morphAttributes.position,Ht=!!Ce.morphAttributes.normal,Kt=!!Ce.morphAttributes.color;let un=Pa;Ne.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(un=y.toneMapping);const Ar=Ce.morphAttributes.position||Ce.morphAttributes.normal||Ce.morphAttributes.color,on=Ar!==void 0?Ar.length:0,$t=ae.get(Ne),w2=Q.state.lights;if($===!0&&(ce===!0||ee!==C)){const Vr=ee===C&&Ne.id===M;Ie.setState(Ne,ee,Vr)}let Dn=!1;Ne.version===$t.__version?($t.needsLights&&$t.lightsStateVersion!==w2.state.version||$t.outputColorSpace!==B||Re.isBatchedMesh&&$t.batching===!1||!Re.isBatchedMesh&&$t.batching===!0||Re.isInstancedMesh&&$t.instancing===!1||!Re.isInstancedMesh&&$t.instancing===!0||Re.isSkinnedMesh&&$t.skinning===!1||!Re.isSkinnedMesh&&$t.skinning===!0||Re.isInstancedMesh&&$t.instancingColor===!0&&Re.instanceColor===null||Re.isInstancedMesh&&$t.instancingColor===!1&&Re.instanceColor!==null||$t.envMap!==et||Ne.fog===!0&&$t.fog!==We||$t.numClippingPlanes!==void 0&&($t.numClippingPlanes!==Ie.numPlanes||$t.numIntersection!==Ie.numIntersection)||$t.vertexAlphas!==bt||$t.vertexTangents!==gt||$t.morphTargets!==Qt||$t.morphNormals!==Ht||$t.morphColors!==Kt||$t.toneMapping!==un||ie.isWebGL2===!0&&$t.morphTargetsCount!==on)&&(Dn=!0):(Dn=!0,$t.__version=Ne.version);let Lo=$t.currentProgram;Dn===!0&&(Lo=Xn(Ne,xe,Re));let Xc=!1,os=!1,M2=!1;const mn=Lo.getUniforms(),Ai=$t.uniforms;if(Te.useProgram(Lo.program)&&(Xc=!0,os=!0,M2=!0),Ne.id!==M&&(M=Ne.id,os=!0),Xc||C!==ee){mn.setValue(se,"projectionMatrix",ee.projectionMatrix),mn.setValue(se,"viewMatrix",ee.matrixWorldInverse);const Vr=mn.map.cameraPosition;Vr!==void 0&&Vr.setValue(se,fe.setFromMatrixPosition(ee.matrixWorld)),ie.logarithmicDepthBuffer&&mn.setValue(se,"logDepthBufFC",2/(Math.log(ee.far+1)/Math.LN2)),(Ne.isMeshPhongMaterial||Ne.isMeshToonMaterial||Ne.isMeshLambertMaterial||Ne.isMeshBasicMaterial||Ne.isMeshStandardMaterial||Ne.isShaderMaterial)&&mn.setValue(se,"isOrthographic",ee.isOrthographicCamera===!0),C!==ee&&(C=ee,os=!0,M2=!0)}if(Re.isSkinnedMesh){mn.setOptional(se,Re,"bindMatrix"),mn.setOptional(se,Re,"bindMatrixInverse");const Vr=Re.skeleton;Vr&&(ie.floatVertexTextures?(Vr.boneTexture===null&&Vr.computeBoneTexture(),mn.setValue(se,"boneTexture",Vr.boneTexture,Oe)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Re.isBatchedMesh&&(mn.setOptional(se,Re,"batchingTexture"),mn.setValue(se,"batchingTexture",Re._matricesTexture,Oe));const Jr=Ce.morphAttributes;if((Jr.position!==void 0||Jr.normal!==void 0||Jr.color!==void 0&&ie.isWebGL2===!0)&<.update(Re,Ce,Lo),(os||$t.receiveShadow!==Re.receiveShadow)&&($t.receiveShadow=Re.receiveShadow,mn.setValue(se,"receiveShadow",Re.receiveShadow)),Ne.isMeshGouraudMaterial&&Ne.envMap!==null&&(Ai.envMap.value=et,Ai.flipEnvMap.value=et.isCubeTexture&&et.isRenderTargetTexture===!1?-1:1),os&&(mn.setValue(se,"toneMappingExposure",y.toneMappingExposure),$t.needsLights&&ea(Ai,M2),We&&Ne.fog===!0&&ue.refreshFogUniforms(Ai,We),ue.refreshMaterialUniforms(Ai,Ne,U,V,ye),nu.upload(se,hi($t),Ai,Oe)),Ne.isShaderMaterial&&Ne.uniformsNeedUpdate===!0&&(nu.upload(se,hi($t),Ai,Oe),Ne.uniformsNeedUpdate=!1),Ne.isSpriteMaterial&&mn.setValue(se,"center",Re.center),mn.setValue(se,"modelViewMatrix",Re.modelViewMatrix),mn.setValue(se,"normalMatrix",Re.normalMatrix),mn.setValue(se,"modelMatrix",Re.matrixWorld),Ne.isShaderMaterial||Ne.isRawShaderMaterial){const Vr=Ne.uniformsGroups;for(let O2=0,wi=Vr.length;O20&&Oe.useMultisampledRTT(ee)===!1?Re=ae.get(ee).__webglMultisampledFramebuffer:Array.isArray(gt)?Re=gt[Ce]:Re=gt,A.copy(ee.viewport),I.copy(ee.scissor),N=ee.scissorTest}else A.copy(W).multiplyScalar(U).floor(),I.copy(te).multiplyScalar(U).floor(),N=de;if(Te.bindFramebuffer(se.FRAMEBUFFER,Re)&&ie.drawBuffers&&Ne&&Te.drawBuffers(ee,Re),Te.viewport(A),Te.scissor(I),Te.setScissorTest(N),We){const et=ae.get(ee.texture);se.framebufferTexture2D(se.FRAMEBUFFER,se.COLOR_ATTACHMENT0,se.TEXTURE_CUBE_MAP_POSITIVE_X+xe,et.__webglTexture,Ce)}else if(Fe){const et=ae.get(ee.texture),bt=xe||0;se.framebufferTextureLayer(se.FRAMEBUFFER,se.COLOR_ATTACHMENT0,et.__webglTexture,Ce||0,bt)}M=-1},this.readRenderTargetPixels=function(ee,xe,Ce,Ne,Re,We,Fe){if(!(ee&&ee.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let B=ae.get(ee).__webglFramebuffer;if(ee.isWebGLCubeRenderTarget&&Fe!==void 0&&(B=B[Fe]),B){Te.bindFramebuffer(se.FRAMEBUFFER,B);try{const et=ee.texture,bt=et.format,gt=et.type;if(bt!==Hi&&It.convert(bt)!==se.getParameter(se.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Qt=gt===o0&&(j.has("EXT_color_buffer_half_float")||ie.isWebGL2&&j.has("EXT_color_buffer_float"));if(gt!==Ha&&It.convert(gt)!==se.getParameter(se.IMPLEMENTATION_COLOR_READ_TYPE)&&!(gt===Ms&&(ie.isWebGL2||j.has("OES_texture_float")||j.has("WEBGL_color_buffer_float")))&&!Qt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}xe>=0&&xe<=ee.width-Ne&&Ce>=0&&Ce<=ee.height-Re&&se.readPixels(xe,Ce,Ne,Re,It.convert(bt),It.convert(gt),We)}finally{const et=L!==null?ae.get(L).__webglFramebuffer:null;Te.bindFramebuffer(se.FRAMEBUFFER,et)}}},this.copyFramebufferToTexture=function(ee,xe,Ce=0){const Ne=Math.pow(2,-Ce),Re=Math.floor(xe.image.width*Ne),We=Math.floor(xe.image.height*Ne);Oe.setTexture2D(xe,0),se.copyTexSubImage2D(se.TEXTURE_2D,Ce,0,0,ee.x,ee.y,Re,We),Te.unbindTexture()},this.copyTextureToTexture=function(ee,xe,Ce,Ne=0){const Re=xe.image.width,We=xe.image.height,Fe=It.convert(Ce.format),B=It.convert(Ce.type);Oe.setTexture2D(Ce,0),se.pixelStorei(se.UNPACK_FLIP_Y_WEBGL,Ce.flipY),se.pixelStorei(se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ce.premultiplyAlpha),se.pixelStorei(se.UNPACK_ALIGNMENT,Ce.unpackAlignment),xe.isDataTexture?se.texSubImage2D(se.TEXTURE_2D,Ne,ee.x,ee.y,Re,We,Fe,B,xe.image.data):xe.isCompressedTexture?se.compressedTexSubImage2D(se.TEXTURE_2D,Ne,ee.x,ee.y,xe.mipmaps[0].width,xe.mipmaps[0].height,Fe,xe.mipmaps[0].data):se.texSubImage2D(se.TEXTURE_2D,Ne,ee.x,ee.y,Fe,B,xe.image),Ne===0&&Ce.generateMipmaps&&se.generateMipmap(se.TEXTURE_2D),Te.unbindTexture()},this.copyTextureToTexture3D=function(ee,xe,Ce,Ne,Re=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const We=ee.max.x-ee.min.x+1,Fe=ee.max.y-ee.min.y+1,B=ee.max.z-ee.min.z+1,et=It.convert(Ne.format),bt=It.convert(Ne.type);let gt;if(Ne.isData3DTexture)Oe.setTexture3D(Ne,0),gt=se.TEXTURE_3D;else if(Ne.isDataArrayTexture)Oe.setTexture2DArray(Ne,0),gt=se.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}se.pixelStorei(se.UNPACK_FLIP_Y_WEBGL,Ne.flipY),se.pixelStorei(se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ne.premultiplyAlpha),se.pixelStorei(se.UNPACK_ALIGNMENT,Ne.unpackAlignment);const Qt=se.getParameter(se.UNPACK_ROW_LENGTH),Ht=se.getParameter(se.UNPACK_IMAGE_HEIGHT),Kt=se.getParameter(se.UNPACK_SKIP_PIXELS),un=se.getParameter(se.UNPACK_SKIP_ROWS),Ar=se.getParameter(se.UNPACK_SKIP_IMAGES),on=Ce.isCompressedTexture?Ce.mipmaps[0]:Ce.image;se.pixelStorei(se.UNPACK_ROW_LENGTH,on.width),se.pixelStorei(se.UNPACK_IMAGE_HEIGHT,on.height),se.pixelStorei(se.UNPACK_SKIP_PIXELS,ee.min.x),se.pixelStorei(se.UNPACK_SKIP_ROWS,ee.min.y),se.pixelStorei(se.UNPACK_SKIP_IMAGES,ee.min.z),Ce.isDataTexture||Ce.isData3DTexture?se.texSubImage3D(gt,Re,xe.x,xe.y,xe.z,We,Fe,B,et,bt,on.data):Ce.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),se.compressedTexSubImage3D(gt,Re,xe.x,xe.y,xe.z,We,Fe,B,et,on.data)):se.texSubImage3D(gt,Re,xe.x,xe.y,xe.z,We,Fe,B,et,bt,on),se.pixelStorei(se.UNPACK_ROW_LENGTH,Qt),se.pixelStorei(se.UNPACK_IMAGE_HEIGHT,Ht),se.pixelStorei(se.UNPACK_SKIP_PIXELS,Kt),se.pixelStorei(se.UNPACK_SKIP_ROWS,un),se.pixelStorei(se.UNPACK_SKIP_IMAGES,Ar),Re===0&&Ne.generateMipmaps&&se.generateMipmap(gt),Te.unbindTexture()},this.initTexture=function(ee){ee.isCubeTexture?Oe.setTextureCube(ee,0):ee.isData3DTexture?Oe.setTexture3D(ee,0):ee.isDataArrayTexture||ee.isCompressedArrayTexture?Oe.setTexture2DArray(ee,0):Oe.setTexture2D(ee,0),Te.unbindTexture()},this.resetState=function(){E=0,x=0,L=null,Te.reset(),Tt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Os}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===Xb?"display-p3":"srgb",n.unpackColorSpace=Tn.workingColorSpace===x9?"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===jn?J1:NU}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===J1?jn:Sr}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 _6r extends JU{}_6r.prototype.isWebGL1Renderer=!0;class Q6r extends $n{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,n){return super.copy(e,n),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 n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}class v6r{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=qQ,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=uo()}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,n){this.updateRanges.push({start:e,count:n})}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,n,r){e*=this.stride,r*=n.stride;for(let i=0,o=this.stride;il)continue;h.applyMatrix4(this.matrixWorld);const M=e.ray.origin.distanceTo(h);Me.far||n.push({distance:M,point:d.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else{const _=Math.max(0,s.start),v=Math.min(Q.count,s.start+s.count);for(let y=_,b=v-1;yl)continue;h.applyMatrix4(this.matrixWorld);const x=e.ray.origin.distanceTo(h);xe.far||n.push({distance:x,point:d.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,r=Object.keys(n);if(r.length>0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;oi.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:s})}}class aE extends fo{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Nt(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 Nt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Zb,this.normalScale=new Yt(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 Zs extends aE{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 Yt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Dr(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(n){this.ior=(1+.4*n)/(1-.4*n)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Nt(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 Nt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Nt(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 XI extends fo{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Nt(16777215),this.specular=new Nt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Nt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Zb,this.normalScale=new Yt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Yb,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 H5(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function M6r(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function O6r(t){function e(i,o){return t[i]-t[o]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function JI(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,s=0;s!==r;++o){const a=n[o]*e;for(let l=0;l!==e;++l)i[s++]=t[a+l]}return i}function rG(t,e,n,r){let i=1,o=t[0];for(;o!==void 0&&o[r]===void 0;)o=t[i++];if(o===void 0)return;let s=o[r];if(s!==void 0)if(Array.isArray(s))do s=o[r],s!==void 0&&(e.push(o.time),n.push.apply(n,s)),o=t[i++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[r],s!==void 0&&(e.push(o.time),s.toArray(n,n.length)),o=t[i++];while(o!==void 0);else do s=o[r],s!==void 0&&(e.push(o.time),n.push(s)),o=t[i++];while(o!==void 0)}class n6{constructor(e,n,r,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new n.constructor(r),this.sampleValues=n,this.valueSize=r,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let r=this._cachedIndex,i=n[r],o=n[r-1];e:{t:{let s;n:{r:if(!(e=o)){const a=n[1];e=o)break t}s=r,r=0;break n}break e}for(;r>>1;en;)--s;if(++s,o!==0||s!==i){o>=s&&(s=Math.max(s,1),o=s-1);const a=this.getValueSize();this.times=r.slice(o,s),this.values=this.values.slice(o*a,s*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(i!==void 0&&M6r(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===Bg,o=e.length-1;let s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*r,l=s*r,c=0;c!==r;++c)n[l+c]=n[a+c];++s}return s!==e.length?(this.times=e.slice(0,s),this.values=n.slice(0,s*r)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}is.prototype.TimeBufferType=Float32Array;is.prototype.ValueBufferType=Float32Array;is.prototype.DefaultInterpolation=pc;class Wc extends is{}Wc.prototype.ValueTypeName="bool";Wc.prototype.ValueBufferType=Array;Wc.prototype.DefaultInterpolation=s0;Wc.prototype.InterpolantFactoryMethodLinear=void 0;Wc.prototype.InterpolantFactoryMethodSmooth=void 0;class iG extends is{}iG.prototype.ValueTypeName="color";class mc extends is{}mc.prototype.ValueTypeName="number";class I6r extends n6{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)n1.slerpFlat(o,0,s,c-a,s,c,l);return o}}class Q2 extends is{InterpolantFactoryMethodLinear(e){return new I6r(this.times,this.values,this.getValueSize(),e)}}Q2.prototype.ValueTypeName="quaternion";Q2.prototype.DefaultInterpolation=pc;Q2.prototype.InterpolantFactoryMethodSmooth=void 0;class Yc extends is{}Yc.prototype.ValueTypeName="string";Yc.prototype.ValueBufferType=Array;Yc.prototype.DefaultInterpolation=s0;Yc.prototype.InterpolantFactoryMethodLinear=void 0;Yc.prototype.InterpolantFactoryMethodSmooth=void 0;class gc extends is{}gc.prototype.ValueTypeName="vector";class k6r{constructor(e,n=-1,r,i=F2r){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=uo(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let s=0,a=r.length;s!==a;++s)n.push(H6r(r[s]).scale(i));const o=new this(e.name,e.duration,n,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=r.length;o!==s;++o)n.push(is.toJSON(r[o]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const o=n.length,s=[];for(let a=0;a1){const d=u[1];let h=i[d];h||(i[d]=h=[]),h.push(c)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return s}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(d,h,f,m,T){if(f.length!==0){const Q=[],_=[];rG(f,Q,_,m),Q.length!==0&&T.push(new d(h,Q,_))}},i=[],o=e.name||"default",s=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let d=0;d{n&&n(o),this.manager.itemEnd(e)},0),o;if(ys[e]!==void 0){ys[e].push({onLoad:n,onProgress:r,onError:i});return}ys[e]=[],ys[e].push({onLoad:n,onProgress:r,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(s).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=ys[e],d=c.body.getReader(),h=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),f=h?parseInt(h):0,m=f!==0;let T=0;const Q=new ReadableStream({start(_){v();function v(){d.read().then(({done:y,value:b})=>{if(y)_.close();else{T+=b.byteLength;const E=new ProgressEvent("progress",{lengthComputable:m,loaded:T,total:f});for(let x=0,L=u.length;x{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),h=d&&d[1]?d[1].toLowerCase():void 0,f=new TextDecoder(h);return c.arrayBuffer().then(m=>f.decode(m))}}}).then(c=>{_c.add(e,c);const u=ys[e];delete ys[e];for(let d=0,h=u.length;d{const u=ys[e];if(u===void 0)throw this.manager.itemError(e),c;delete ys[e];for(let d=0,h=u.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class $6r extends Kc{constructor(e){super(e)}load(e,n,r,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=_c.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s;const a=a0("img");function l(){u(),_c.add(e,this),n&&n(this),o.manager.itemEnd(e)}function c(d){u(),i&&i(d),o.manager.itemError(e),o.manager.itemEnd(e)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),o.manager.itemStart(e),a.src=e,a}}class sG extends Kc{constructor(e){super(e)}load(e,n,r,i){const o=new xr,s=new $6r(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(e,function(a){o.image=a,o.needsUpdate=!0,n!==void 0&&n(o)},r,i),o}}class A9 extends $n{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new Nt(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),n}}const p_=new zt,ek=new Ee,tk=new Ee;class lE{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Yt(512,512),this.map=null,this.mapPass=null,this.matrix=new zt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new eE,this._frameExtents=new Yt(1,1),this._viewportCount=1,this._viewports=[new Mn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,r=this.matrix;ek.setFromMatrixPosition(e.matrixWorld),n.position.copy(ek),tk.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(tk),n.updateMatrixWorld(),p_.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(p_),r.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),r.multiply(p_)}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 U6r extends lE{constructor(){super(new Wr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,r=hc*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,o=e.distance||n.far;(r!==n.fov||i!==n.aspect||o!==n.far)&&(n.fov=r,n.aspect=i,n.far=o,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class G6r extends A9{constructor(e,n,r=0,i=Math.PI/3,o=0,s=2){super(e,n),this.isSpotLight=!0,this.type="SpotLight",this.position.copy($n.DEFAULT_UP),this.updateMatrix(),this.target=new $n,this.distance=r,this.angle=i,this.penumbra=o,this.decay=s,this.map=null,this.shadow=new U6r}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),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 nk=new zt,u4=new Ee,h_=new Ee;class q6r extends lE{constructor(){super(new Wr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Yt(4,2),this._viewportCount=6,this._viewports=[new Mn(2,1,1,1),new Mn(0,1,1,1),new Mn(3,1,1,1),new Mn(1,1,1,1),new Mn(3,0,1,1),new Mn(1,0,1,1)],this._cubeDirections=[new Ee(1,0,0),new Ee(-1,0,0),new Ee(0,0,1),new Ee(0,0,-1),new Ee(0,1,0),new Ee(0,-1,0)],this._cubeUps=[new Ee(0,1,0),new Ee(0,1,0),new Ee(0,1,0),new Ee(0,1,0),new Ee(0,0,1),new Ee(0,0,-1)]}updateMatrices(e,n=0){const r=this.camera,i=this.matrix,o=e.distance||r.far;o!==r.far&&(r.far=o,r.updateProjectionMatrix()),u4.setFromMatrixPosition(e.matrixWorld),r.position.copy(u4),h_.copy(r.position),h_.add(this._cubeDirections[n]),r.up.copy(this._cubeUps[n]),r.lookAt(h_),r.updateMatrixWorld(),i.makeTranslation(-u4.x,-u4.y,-u4.z),nk.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(nk)}}class z6r extends A9{constructor(e,n,r=0,i=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=r,this.decay=i,this.shadow=new q6r}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class j6r extends lE{constructor(){super(new nE(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class aG extends A9{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy($n.DEFAULT_UP),this.updateMatrix(),this.target=new $n,this.shadow=new j6r}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class W6r extends A9{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class D4{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r"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,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=_c.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){_c.add(e,l),n&&n(l),o.manager.itemEnd(e)}).catch(function(l){i&&i(l),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}}const cE="\\[\\]\\.:\\/",K6r=new RegExp("["+cE+"]","g"),uE="[^"+cE+"]",Z6r="[^"+cE.replace("\\.","")+"]",X6r=/((?:WC+[\/:])*)/.source.replace("WC",uE),J6r=/(WCOD+)?/.source.replace("WCOD",Z6r),e5r=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",uE),t5r=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",uE),n5r=new RegExp("^"+X6r+J6r+e5r+t5r+"$"),r5r=["material","materials","bones","map"];class i5r{constructor(e,n,r){const i=r||Qn.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=r.length;i!==o;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class Qn{constructor(e,n,r){this.path=n,this.parsedPath=r||Qn.parseTrackName(n),this.node=Qn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new Qn.Composite(e,n,r):new Qn(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(K6r,"")}static parseTrackName(e){const n=n5r.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const o=r.nodeName.substring(i+1);r5r.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(o){for(let s=0;s=2.0 are supported."));return}const c=new P5r(o,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&a[d]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+d+'".')}}c.setExtensions(s),c.setPlugins(a),c.parse(r,i)}parseAsync(e,n){const r=this;return new Promise(function(i,o){r.parse(e,n,i,o)})}}function s5r(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}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 a5r{constructor(e){this.parser=e,this.name=Wt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let r=0,i=n.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,o.source,s)}}class v5r{constructor(e){this.parser=e,this.name=Wt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const s=o.extensions[n],a=i.images[s.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(e,s.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class y5r{constructor(e){this.parser=e,this.name=Wt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const s=o.extensions[n],a=i.images[s.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(e,s.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class b5r{constructor(e){this.name=Wt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,r=n.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const i=r.extensions[this.name],o=this.parser.getDependency("buffer",i.buffer),s=this.parser.options.meshoptDecoder;if(!s||!s.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(a){const l=i.byteOffset||0,c=i.byteLength||0,u=i.count,d=i.byteStride,h=new Uint8Array(a,l,c);return s.decodeGltfBufferAsync?s.decodeGltfBufferAsync(u,d,h,i.mode,i.filter).then(function(f){return f.buffer}):s.ready.then(function(){const f=new ArrayBuffer(u*d);return s.decodeGltfBuffer(new Uint8Array(f),u,d,h,i.mode,i.filter),f})})}else return null}}class E5r{constructor(e){this.name=Wt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,r=n.nodes[e];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const i=n.meshes[r.mesh];for(const c of i.primitives)if(c.mode!==Ii.TRIANGLES&&c.mode!==Ii.TRIANGLE_STRIP&&c.mode!==Ii.TRIANGLE_FAN&&c.mode!==void 0)return null;const s=r.extensions[this.name].attributes,a=[],l={};for(const c in s)a.push(this.parser.getDependency("accessor",s[c]).then(u=>(l[c]=u,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const u=c.pop(),d=u.isGroup?u.children:[u],h=c[0].count,f=[];for(const m of d){const T=new zt,Q=new Ee,_=new n1,v=new Ee(1,1,1),y=new L6r(m.geometry,m.material,h);for(let b=0;b0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const k5r=new zt;class P5r{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new s5r,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 r=!1,i=!1,o=-1;typeof navigator<"u"&&(r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,o=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||r||i&&o<98?this.textureLoader=new sG(this.options.manager):this.textureLoader=new Y6r(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new oG(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,n){const r=this,i=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(s){return s._markDefs&&s._markDefs()}),Promise.all(this._invokeAll(function(s){return s.beforeRoot&&s.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(s){const a={scene:s[0][i.scene||0],scenes:s[0],animations:s[1],cameras:s[2],asset:i.asset,parser:r,userData:{}};return R1(o,a,i),Ca(a,i),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let i=0,o=n.length;i{const l=this.associations.get(s);l!=null&&this.associations.set(a,l);for(const[c,u]of s.children.entries())o(u,a.children[c])};return o(r,i),i.name+="_instance_"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let r=0;r=2&&Q.setY(C,x[L*l+1]),l>=3&&Q.setZ(C,x[L*l+2]),l>=4&&Q.setW(C,x[L*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return Q})}loadTexture(e){const n=this.json,r=this.options,o=n.textures[e].source,s=n.images[o];let a=this.textureLoader;if(s.uri){const l=r.manager.getHandler(s.uri);l!==null&&(a=l)}return this.loadTextureImage(e,o,a)}loadTextureImage(e,n,r){const i=this,o=this.json,s=o.textures[e],a=o.images[n],l=(a.uri||a.bufferView)+":"+s.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(n,r).then(function(u){u.flipY=!1,u.name=s.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(o.samplers||{})[s.sampler]||{};return u.magFilter=ok[h.magFilter]||ii,u.minFilter=ok[h.minFilter]||m2,u.wrapS=sk[h.wrapS]||dc,u.wrapT=sk[h.wrapT]||dc,i.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,n){const r=this,i=this.json,o=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const s=i.images[e],a=self.URL||self.webkitURL;let l=s.uri||"",c=!1;if(s.bufferView!==void 0)l=r.getDependency("bufferView",s.bufferView).then(function(d){c=!0;const h=new Blob([d],{type:s.mimeType});return l=a.createObjectURL(h),l});else if(s.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(l).then(function(d){return new Promise(function(h,f){let m=h;n.isImageBitmapLoader===!0&&(m=function(T){const Q=new xr(T);Q.needsUpdate=!0,h(Q)}),n.load(D4.resolveURL(d,o.path),m,void 0,f)})}).then(function(d){return c===!0&&a.revokeObjectURL(l),d.userData.mimeType=s.mimeType||I5r(s.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=u,u}assignTexture(e,n,r,i){const o=this;return this.getDependency("texture",r.index).then(function(s){if(!s)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(s=s.clone(),s.channel=r.texCoord),o.extensions[Wt.KHR_TEXTURE_TRANSFORM]){const a=r.extensions!==void 0?r.extensions[Wt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=o.associations.get(s);s=o.extensions[Wt.KHR_TEXTURE_TRANSFORM].extendTexture(s,a),o.associations.set(s,l)}}return i!==void 0&&(s.colorSpace=i),e[n]=s,s})}assignFinalMaterial(e){const n=e.geometry;let r=e.material;const i=n.attributes.tangent===void 0,o=n.attributes.color!==void 0,s=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new nG,fo.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(a,l)),r=l}else if(e.isLine){const a="LineBasicMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new tG,fo.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(a,l)),r=l}if(i||o||s){let a="ClonedMaterial:"+r.uuid+":";i&&(a+="derivative-tangents:"),o&&(a+="vertex-colors:"),s&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=r.clone(),o&&(l.vertexColors=!0),s&&(l.flatShading=!0),i&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(r))),r=l}e.material=r}getMaterialType(){return aE}loadMaterial(e){const n=this,r=this.json,i=this.extensions,o=r.materials[e];let s;const a={},l=o.extensions||{},c=[];if(l[Wt.KHR_MATERIALS_UNLIT]){const d=i[Wt.KHR_MATERIALS_UNLIT];s=d.getMaterialType(),c.push(d.extendParams(a,o,n))}else{const d=o.pbrMetallicRoughness||{};if(a.color=new Nt(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const h=d.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],Sr),a.opacity=h[3]}d.baseColorTexture!==void 0&&c.push(n.assignTexture(a,"map",d.baseColorTexture,jn)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(c.push(n.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),c.push(n.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),s=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(e,a)})))}o.doubleSided===!0&&(a.side=ko);const u=o.alphaMode||m_.OPAQUE;if(u===m_.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===m_.MASK&&(a.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&s!==Ra&&(c.push(n.assignTexture(a,"normalMap",o.normalTexture)),a.normalScale=new Yt(1,1),o.normalTexture.scale!==void 0)){const d=o.normalTexture.scale;a.normalScale.set(d,d)}if(o.occlusionTexture!==void 0&&s!==Ra&&(c.push(n.assignTexture(a,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&s!==Ra){const d=o.emissiveFactor;a.emissive=new Nt().setRGB(d[0],d[1],d[2],Sr)}return o.emissiveTexture!==void 0&&s!==Ra&&c.push(n.assignTexture(a,"emissiveMap",o.emissiveTexture,jn)),Promise.all(c).then(function(){const d=new s(a);return o.name&&(d.name=o.name),Ca(d,o),n.associations.set(d,{materials:e}),o.extensions&&R1(i,d,o),d})}createUniqueName(e){const n=Qn.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,r=this.extensions,i=this.primitiveCache;function o(a){return r[Wt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return ak(l,a,n)})}const s=[];for(let a=0,l=e.length;a0&&N5r(_,o),_.name=n.createUniqueName(o.name||"mesh_"+e),Ca(_,o),Q.extensions&&R1(i,_,Q),n.assignFinalMaterial(_),d.push(_)}for(let f=0,m=d.length;f1?u=new G1:c.length===1?u=c[0]:u=new $n,u!==c[0])for(let d=0,h=c.length;d{const d=new Map;for(const[h,f]of i.associations)(h instanceof fo||h instanceof xr)&&d.set(h,f);return u.traverse(h=>{const f=i.associations.get(h);f!=null&&d.set(h,f)}),d};return i.associations=c(o),o})}_createAnimationTracks(e,n,r,i,o){const s=[],a=e.name?e.name:e.uuid,l=[];ma[o.path]===ma.weights?e.traverse(function(h){h.morphTargetInfluences&&l.push(h.name?h.name:h.uuid)}):l.push(a);let c;switch(ma[o.path]){case ma.weights:c=mc;break;case ma.rotation:c=Q2;break;case ma.position:case ma.scale:c=gc;break;default:switch(r.itemSize){case 1:c=mc;break;case 2:case 3:default:c=gc;break}break}const u=i.interpolation!==void 0?M5r[i.interpolation]:pc,d=this._getArrayFromAccessor(r);for(let h=0,f=l.length;h{Ze.replace()})},stopVideoStream(){this.isVideoActive=!1,this.imageData=null,tt.emit("stop_webcam_video_stream"),ze(()=>{Ze.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ze.replace(),tt.on("video_stream_image",t=>{if(this.isVideoActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},B5r=["src"],F5r=["src"],$5r={class:"controls"},U5r={key:2};function G5r(t,e,n,r,i,o){return k(),H("div",{class:"floating-frame bg-white",style:xn({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[5]||(e[5]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},[g("div",{class:"handle",onMousedown:e[0]||(e[0]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[1]||(e[1]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},"Drag Me",32),i.isVideoActive&&i.imageDataUrl!=null?(k(),H("img",{key:0,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},null,8,B5r)):re("",!0),i.isVideoActive&&i.imageDataUrl==null?(k(),H("p",{key:1,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},"Loading. Please wait...",8,F5r)):re("",!0),g("div",$5r,[i.isVideoActive?re("",!0):(k(),H("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]=(...s)=>o.startVideoStream&&o.startVideoStream(...s))},e[6]||(e[6]=[g("i",{"data-feather":"video"},null,-1)]))),i.isVideoActive?(k(),H("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]=(...s)=>o.stopVideoStream&&o.stopVideoStream(...s))},e[7]||(e[7]=[g("i",{"data-feather":"video"},null,-1)]))):re("",!0),i.isVideoActive?(k(),H("span",U5r,"FPS: "+le(i.frameRate),1)):re("",!0)])],36)}const q5r=yt(V5r,[["render",G5r]]),z5r={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(){tt.emit("start_audio_stream",()=>{this.isAudioActive=!0}),ze(()=>{Ze.replace()})},stopAudioStream(){tt.emit("stop_audio_stream",()=>{this.isAudioActive=!1,this.imageDataUrl=null}),ze(()=>{Ze.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ze.replace(),tt.on("update_spectrogram",t=>{if(this.isAudioActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},j5r=["src"],W5r={class:"controls"};function Y5r(t,e,n,r,i,o){return k(),H("div",{class:"floating-frame bg-white",style:xn({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[5]||(e[5]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},[g("div",{class:"handle",onMousedown:e[0]||(e[0]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[1]||(e[1]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},"Drag Me",32),i.isAudioActive&&i.imageDataUrl!=null?(k(),H("img",{key:0,src:i.imageDataUrl,alt:"Spectrogram",width:"300",height:"300"},null,8,j5r)):re("",!0),g("div",W5r,[i.isAudioActive?re("",!0):(k(),H("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]=(...s)=>o.startAudioStream&&o.startAudioStream(...s))},e[6]||(e[6]=[g("i",{"data-feather":"mic"},null,-1)]))),i.isAudioActive?(k(),H("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]=(...s)=>o.stopAudioStream&&o.stopAudioStream(...s))},e[7]||(e[7]=[g("i",{"data-feather":"mic"},null,-1)]))):re("",!0)])],36)}const K5r=yt(z5r,[["render",Y5r]]),Z5r={data(){return{activePersonality:null}},props:{personality:{type:Object,default:()=>({})}},components:{VideoFrame:q5r,AudioFrame:K5r},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(t=>setTimeout(t,100));console.log("Personality:",this.personality),this.initWebGLScene(),this.updatePersonality(),ze(()=>{Ze.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 Q6r,this.camera=new Wr(75,window.innerWidth/window.innerHeight,.1,1e3),this.renderer=new JU,this.renderer.setSize(window.innerWidth,window.innerHeight),this.$refs.webglContainer.appendChild(this.renderer.domElement);const t=new Va,e=new XI({color:65280});this.cube=new Yr(t,e),this.scene.add(this.cube);const n=new W6r(4210752),r=new aG(16777215,.5);r.position.set(0,1,0),this.scene.add(n),this.scene.add(r),this.camera.position.z=5,this.animate()},updatePersonality(){const{mountedPersArr:t,config:e}=this.$store.state;this.activePersonality=t[e.active_personality_id],this.activePersonality.avatar?this.showBoxWithAvatar(this.activePersonality.avatar):this.showDefaultCube(),this.$emit("update:personality",this.activePersonality)},loadScene(t){new o5r().load(t,n=>{this.scene.remove(this.cube),this.cube=n.scene,this.scene.add(this.cube)})},showBoxWithAvatar(t){this.cube&&this.scene.remove(this.cube);const e=new Va,n=new sG().load(t),r=new Ra({map:n});this.cube=new Yr(e,r),this.scene.add(this.cube)},showDefaultCube(){this.scene.remove(this.cube);const t=new Va,e=new XI({color:65280});this.cube=new Yr(t,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)}}},X5r={ref:"webglContainer"},J5r={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"},eur={key:0,class:"text-center"},tur={key:1,class:"text-center"},nur={class:"floating-frame2"},rur=["innerHTML"];function iur(t,e,n,r,i,o){const s=pt("VideoFrame"),a=pt("AudioFrame");return k(),H(Ue,null,[g("div",X5r,null,512),g("div",J5r,[!i.activePersonality||!i.activePersonality.scene_path?(k(),H("div",eur," Personality does not have a 3d avatar. ")):re("",!0),!i.activePersonality||!i.activePersonality.avatar||i.activePersonality.avatar===""?(k(),H("div",tur," Personality does not have an avatar. ")):re("",!0),g("div",nur,[g("div",{innerHTML:t.htmlContent},null,8,rur)])]),oe(s,{ref:"video_frame"},null,512),oe(a,{ref:"audio_frame"},null,512)],64)}const our=yt(Z5r,[["render",iur]]);let V5;const sur=new Uint8Array(16);function aur(){if(!V5&&(V5=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!V5))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return V5(sur)}const vr=[];for(let t=0;t<256;++t)vr.push((t+256).toString(16).slice(1));function lur(t,e=0){return vr[t[e+0]]+vr[t[e+1]]+vr[t[e+2]]+vr[t[e+3]]+"-"+vr[t[e+4]]+vr[t[e+5]]+"-"+vr[t[e+6]]+vr[t[e+7]]+"-"+vr[t[e+8]]+vr[t[e+9]]+"-"+vr[t[e+10]]+vr[t[e+11]]+vr[t[e+12]]+vr[t[e+13]]+vr[t[e+14]]+vr[t[e+15]]}const cur=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),lk={randomUUID:cur};function Bs(t,e,n){if(lk.randomUUID&&!e&&!t)return lk.randomUUID();t=t||{};const r=t.random||(t.rng||aur)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,lur(r)}class e2{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,n){this.listenerMap.has(e)&&(console.warn(`Already subscribed. Unsubscribing for you. +}`;function m6r(t,e,n){let r=new eE;const i=new Yt,o=new Yt,s=new Mn,a=new f6r({depthPacking:Z2r}),l=new p6r,c={},u=n.maxTextureSize,d={[Us]:ui,[ui]:Us,[ko]:ko},h=new _2({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Yt},radius:{value:4}},vertexShader:h6r,fragmentShader:T6r}),f=h.clone();f.defines.HORIZONTAL_PASS=1;const m=new rs;m.setAttribute("position",new Kr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const T=new Yr(m,h),Q=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=bU;let _=this.type;this.render=function(E,x,L){if(Q.enabled===!1||Q.autoUpdate===!1&&Q.needsUpdate===!1||E.length===0)return;const M=t.getRenderTarget(),C=t.getActiveCubeFace(),A=t.getActiveMipmapLevel(),I=t.state;I.setBlending(ka),I.buffers.color.setClear(1,1,1,1),I.buffers.depth.setTest(!0),I.setScissorTest(!1);const N=_!==Es&&this.type===Es,P=_===Es&&this.type!==Es;for(let O=0,F=E.length;Ou||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/G.x),i.x=o.x*G.x,U.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/G.y),i.y=o.y*G.y,U.mapSize.y=o.y)),U.map===null||N===!0||P===!0){const W=this.type!==Es?{minFilter:hr,magFilter:hr}:{};U.map!==null&&U.map.dispose(),U.map=new g2(i.x,i.y,W),U.map.texture.name=V.name+".shadowMap",U.camera.updateProjectionMatrix()}t.setRenderTarget(U.map),t.clear();const K=U.getViewportCount();for(let W=0;W0||x.map&&x.alphaTest>0){const I=C.uuid,N=x.uuid;let P=c[I];P===void 0&&(P={},c[I]=P);let O=P[N];O===void 0&&(O=C.clone(),P[N]=O),C=O}if(C.visible=x.visible,C.wireframe=x.wireframe,M===Es?C.side=x.shadowSide!==null?x.shadowSide:x.side:C.side=x.shadowSide!==null?x.shadowSide:d[x.side],C.alphaMap=x.alphaMap,C.alphaTest=x.alphaTest,C.map=x.map,C.clipShadows=x.clipShadows,C.clippingPlanes=x.clippingPlanes,C.clipIntersection=x.clipIntersection,C.displacementMap=x.displacementMap,C.displacementScale=x.displacementScale,C.displacementBias=x.displacementBias,C.wireframeLinewidth=x.wireframeLinewidth,C.linewidth=x.linewidth,L.isPointLight===!0&&C.isMeshDistanceMaterial===!0){const I=t.properties.get(C);I.light=L}return C}function b(E,x,L,M,C){if(E.visible===!1)return;if(E.layers.test(x.layers)&&(E.isMesh||E.isLine||E.isPoints)&&(E.castShadow||E.receiveShadow&&C===Es)&&(!E.frustumCulled||r.intersectsObject(E))){E.modelViewMatrix.multiplyMatrices(L.matrixWorldInverse,E.matrixWorld);const N=e.update(E),P=E.material;if(Array.isArray(P)){const O=N.groups;for(let F=0,V=O.length;F=1):W.indexOf("OpenGL ES")!==-1&&(K=parseFloat(/^OpenGL ES (\d)/.exec(W)[1]),G=K>=2);let te=null,de={};const X=t.getParameter(t.SCISSOR_BOX),$=t.getParameter(t.VIEWPORT),ce=new Mn().fromArray(X),ye=new Mn().fromArray($);function z(me,Ye,Ge,Pe){const Xe=new Uint8Array(4),vt=t.createTexture();t.bindTexture(me,vt),t.texParameteri(me,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(me,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Ot=0;Ot"u"?!1:/OculusBrowser/g.test(navigator.userAgent),m=new WeakMap;let T;const Q=new WeakMap;let _=!1;try{_=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(Z,q){return _?new OffscreenCanvas(Z,q):a0("canvas")}function y(Z,q,pe,ue){let _e=1;if((Z.width>ue||Z.height>ue)&&(_e=ue/Math.max(Z.width,Z.height)),_e<1||q===!0)if(typeof HTMLImageElement<"u"&&Z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Z instanceof ImageBitmap){const Ae=q?gd:Math.floor,Ie=Ae(_e*Z.width),Ve=Ae(_e*Z.height);T===void 0&&(T=v(Ie,Ve));const $e=pe?v(Ie,Ve):T;return $e.width=Ie,$e.height=Ve,$e.getContext("2d").drawImage(Z,0,0,Ie,Ve),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Z.width+"x"+Z.height+") to ("+Ie+"x"+Ve+")."),$e}else return"data"in Z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Z.width+"x"+Z.height+")."),Z;return Z}function b(Z){return jQ(Z.width)&&jQ(Z.height)}function E(Z){return a?!1:Z.wrapS!==Pi||Z.wrapT!==Pi||Z.minFilter!==hr&&Z.minFilter!==ii}function x(Z,q){return Z.generateMipmaps&&q&&Z.minFilter!==hr&&Z.minFilter!==ii}function L(Z){t.generateMipmap(Z)}function M(Z,q,pe,ue,_e=!1){if(a===!1)return q;if(Z!==null){if(t[Z]!==void 0)return t[Z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Z+"'")}let Ae=q;if(q===t.RED&&(pe===t.FLOAT&&(Ae=t.R32F),pe===t.HALF_FLOAT&&(Ae=t.R16F),pe===t.UNSIGNED_BYTE&&(Ae=t.R8)),q===t.RED_INTEGER&&(pe===t.UNSIGNED_BYTE&&(Ae=t.R8UI),pe===t.UNSIGNED_SHORT&&(Ae=t.R16UI),pe===t.UNSIGNED_INT&&(Ae=t.R32UI),pe===t.BYTE&&(Ae=t.R8I),pe===t.SHORT&&(Ae=t.R16I),pe===t.INT&&(Ae=t.R32I)),q===t.RG&&(pe===t.FLOAT&&(Ae=t.RG32F),pe===t.HALF_FLOAT&&(Ae=t.RG16F),pe===t.UNSIGNED_BYTE&&(Ae=t.RG8)),q===t.RGBA){const Ie=_e?pd:Tn.getTransfer(ue);pe===t.FLOAT&&(Ae=t.RGBA32F),pe===t.HALF_FLOAT&&(Ae=t.RGBA16F),pe===t.UNSIGNED_BYTE&&(Ae=Ie===kn?t.SRGB8_ALPHA8:t.RGBA8),pe===t.UNSIGNED_SHORT_4_4_4_4&&(Ae=t.RGBA4),pe===t.UNSIGNED_SHORT_5_5_5_1&&(Ae=t.RGB5_A1)}return(Ae===t.R16F||Ae===t.R32F||Ae===t.RG16F||Ae===t.RG32F||Ae===t.RGBA16F||Ae===t.RGBA32F)&&e.get("EXT_color_buffer_float"),Ae}function C(Z,q,pe){return x(Z,pe)===!0||Z.isFramebufferTexture&&Z.minFilter!==hr&&Z.minFilter!==ii?Math.log2(Math.max(q.width,q.height))+1:Z.mipmaps!==void 0&&Z.mipmaps.length>0?Z.mipmaps.length:Z.isCompressedTexture&&Array.isArray(Z.image)?q.mipmaps.length:1}function A(Z){return Z===hr||Z===UQ||Z===tu?t.NEAREST:t.LINEAR}function I(Z){const q=Z.target;q.removeEventListener("dispose",I),P(q),q.isVideoTexture&&m.delete(q)}function N(Z){const q=Z.target;q.removeEventListener("dispose",N),F(q)}function P(Z){const q=r.get(Z);if(q.__webglInit===void 0)return;const pe=Z.source,ue=Q.get(pe);if(ue){const _e=ue[q.__cacheKey];_e.usedTimes--,_e.usedTimes===0&&O(Z),Object.keys(ue).length===0&&Q.delete(pe)}r.remove(Z)}function O(Z){const q=r.get(Z);t.deleteTexture(q.__webglTexture);const pe=Z.source,ue=Q.get(pe);delete ue[q.__cacheKey],s.memory.textures--}function F(Z){const q=Z.texture,pe=r.get(Z),ue=r.get(q);if(ue.__webglTexture!==void 0&&(t.deleteTexture(ue.__webglTexture),s.memory.textures--),Z.depthTexture&&Z.depthTexture.dispose(),Z.isWebGLCubeRenderTarget)for(let _e=0;_e<6;_e++){if(Array.isArray(pe.__webglFramebuffer[_e]))for(let Ae=0;Ae=l&&console.warn("THREE.WebGLTextures: Trying to use "+Z+" texture units while this GPU supports only "+l),V+=1,Z}function K(Z){const q=[];return q.push(Z.wrapS),q.push(Z.wrapT),q.push(Z.wrapR||0),q.push(Z.magFilter),q.push(Z.minFilter),q.push(Z.anisotropy),q.push(Z.internalFormat),q.push(Z.format),q.push(Z.type),q.push(Z.generateMipmaps),q.push(Z.premultiplyAlpha),q.push(Z.flipY),q.push(Z.unpackAlignment),q.push(Z.colorSpace),q.join()}function W(Z,q){const pe=r.get(Z);if(Z.isVideoTexture&&Me(Z),Z.isRenderTargetTexture===!1&&Z.version>0&&pe.__version!==Z.version){const ue=Z.image;if(ue===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ue.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{fe(pe,Z,q);return}}n.bindTexture(t.TEXTURE_2D,pe.__webglTexture,t.TEXTURE0+q)}function te(Z,q){const pe=r.get(Z);if(Z.version>0&&pe.__version!==Z.version){fe(pe,Z,q);return}n.bindTexture(t.TEXTURE_2D_ARRAY,pe.__webglTexture,t.TEXTURE0+q)}function de(Z,q){const pe=r.get(Z);if(Z.version>0&&pe.__version!==Z.version){fe(pe,Z,q);return}n.bindTexture(t.TEXTURE_3D,pe.__webglTexture,t.TEXTURE0+q)}function X(Z,q){const pe=r.get(Z);if(Z.version>0&&pe.__version!==Z.version){be(pe,Z,q);return}n.bindTexture(t.TEXTURE_CUBE_MAP,pe.__webglTexture,t.TEXTURE0+q)}const $={[dc]:t.REPEAT,[Pi]:t.CLAMP_TO_EDGE,[fd]:t.MIRRORED_REPEAT},ce={[hr]:t.NEAREST,[UQ]:t.NEAREST_MIPMAP_NEAREST,[tu]:t.NEAREST_MIPMAP_LINEAR,[ii]:t.LINEAR,[xU]:t.LINEAR_MIPMAP_NEAREST,[m2]:t.LINEAR_MIPMAP_LINEAR},ye={[J2r]:t.NEVER,[olr]:t.ALWAYS,[elr]:t.LESS,[DU]:t.LEQUAL,[tlr]:t.EQUAL,[ilr]:t.GEQUAL,[nlr]:t.GREATER,[rlr]:t.NOTEQUAL};function z(Z,q,pe){if(pe?(t.texParameteri(Z,t.TEXTURE_WRAP_S,$[q.wrapS]),t.texParameteri(Z,t.TEXTURE_WRAP_T,$[q.wrapT]),(Z===t.TEXTURE_3D||Z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(Z,t.TEXTURE_WRAP_R,$[q.wrapR]),t.texParameteri(Z,t.TEXTURE_MAG_FILTER,ce[q.magFilter]),t.texParameteri(Z,t.TEXTURE_MIN_FILTER,ce[q.minFilter])):(t.texParameteri(Z,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(Z,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(Z===t.TEXTURE_3D||Z===t.TEXTURE_2D_ARRAY)&&t.texParameteri(Z,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(q.wrapS!==Pi||q.wrapT!==Pi)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(Z,t.TEXTURE_MAG_FILTER,A(q.magFilter)),t.texParameteri(Z,t.TEXTURE_MIN_FILTER,A(q.minFilter)),q.minFilter!==hr&&q.minFilter!==ii&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),q.compareFunction&&(t.texParameteri(Z,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(Z,t.TEXTURE_COMPARE_FUNC,ye[q.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const ue=e.get("EXT_texture_filter_anisotropic");if(q.magFilter===hr||q.minFilter!==tu&&q.minFilter!==m2||q.type===Ms&&e.has("OES_texture_float_linear")===!1||a===!1&&q.type===o0&&e.has("OES_texture_half_float_linear")===!1)return;(q.anisotropy>1||r.get(q).__currentAnisotropy)&&(t.texParameterf(Z,ue.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(q.anisotropy,i.getMaxAnisotropy())),r.get(q).__currentAnisotropy=q.anisotropy)}}function ne(Z,q){let pe=!1;Z.__webglInit===void 0&&(Z.__webglInit=!0,q.addEventListener("dispose",I));const ue=q.source;let _e=Q.get(ue);_e===void 0&&(_e={},Q.set(ue,_e));const Ae=K(q);if(Ae!==Z.__cacheKey){_e[Ae]===void 0&&(_e[Ae]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,pe=!0),_e[Ae].usedTimes++;const Ie=_e[Z.__cacheKey];Ie!==void 0&&(_e[Z.__cacheKey].usedTimes--,Ie.usedTimes===0&&O(q)),Z.__cacheKey=Ae,Z.__webglTexture=_e[Ae].texture}return pe}function fe(Z,q,pe){let ue=t.TEXTURE_2D;(q.isDataArrayTexture||q.isCompressedArrayTexture)&&(ue=t.TEXTURE_2D_ARRAY),q.isData3DTexture&&(ue=t.TEXTURE_3D);const _e=ne(Z,q),Ae=q.source;n.bindTexture(ue,Z.__webglTexture,t.TEXTURE0+pe);const Ie=r.get(Ae);if(Ae.version!==Ie.__version||_e===!0){n.activeTexture(t.TEXTURE0+pe);const Ve=Tn.getPrimaries(Tn.workingColorSpace),$e=q.colorSpace===Vi?null:Tn.getPrimaries(q.colorSpace),lt=q.colorSpace===Vi||Ve===$e?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,q.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,q.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,lt);const at=E(q)&&b(q.image)===!1;let Be=y(q.image,at,!1,u);Be=ke(q,Be);const It=b(Be)||a,Tt=o.convert(q.format,q.colorSpace);let mt=o.convert(q.type),dt=M(q.internalFormat,Tt,mt,q.colorSpace,q.isVideoTexture);z(ue,q,It);let st;const ct=q.mipmaps,me=a&&q.isVideoTexture!==!0&&dt!==OU,Ye=Ie.__version===void 0||_e===!0,Ge=C(q,Be,It);if(q.isDepthTexture)dt=t.DEPTH_COMPONENT,a?q.type===Ms?dt=t.DEPTH_COMPONENT32F:q.type===Oa?dt=t.DEPTH_COMPONENT24:q.type===Z1?dt=t.DEPTH24_STENCIL8:dt=t.DEPTH_COMPONENT16:q.type===Ms&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),q.format===X1&&dt===t.DEPTH_COMPONENT&&q.type!==Kb&&q.type!==Oa&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),q.type=Oa,mt=o.convert(q.type)),q.format===fc&&dt===t.DEPTH_COMPONENT&&(dt=t.DEPTH_STENCIL,q.type!==Z1&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),q.type=Z1,mt=o.convert(q.type))),Ye&&(me?n.texStorage2D(t.TEXTURE_2D,1,dt,Be.width,Be.height):n.texImage2D(t.TEXTURE_2D,0,dt,Be.width,Be.height,0,Tt,mt,null));else if(q.isDataTexture)if(ct.length>0&&It){me&&Ye&&n.texStorage2D(t.TEXTURE_2D,Ge,dt,ct[0].width,ct[0].height);for(let Pe=0,Xe=ct.length;Pe>=1,Xe>>=1}}else if(ct.length>0&&It){me&&Ye&&n.texStorage2D(t.TEXTURE_2D,Ge,dt,ct[0].width,ct[0].height);for(let Pe=0,Xe=ct.length;Pe0&&Ye++,n.texStorage2D(t.TEXTURE_CUBE_MAP,Ye,st,Be[0].width,Be[0].height));for(let Pe=0;Pe<6;Pe++)if(at){ct?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,0,0,Be[Pe].width,Be[Pe].height,mt,dt,Be[Pe].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0,st,Be[Pe].width,Be[Pe].height,0,mt,dt,Be[Pe].data);for(let Xe=0;Xe>Ae),Be=Math.max(1,q.height>>Ae);_e===t.TEXTURE_3D||_e===t.TEXTURE_2D_ARRAY?n.texImage3D(_e,Ae,$e,at,Be,q.depth,0,Ie,Ve,null):n.texImage2D(_e,Ae,$e,at,Be,0,Ie,Ve,null)}n.bindFramebuffer(t.FRAMEBUFFER,Z),Se(q)?h.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,ue,_e,r.get(pe).__webglTexture,0,Oe(q)):(_e===t.TEXTURE_2D||_e>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&_e<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,ue,_e,r.get(pe).__webglTexture,Ae),n.bindFramebuffer(t.FRAMEBUFFER,null)}function se(Z,q,pe){if(t.bindRenderbuffer(t.RENDERBUFFER,Z),q.depthBuffer&&!q.stencilBuffer){let ue=a===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(pe||Se(q)){const _e=q.depthTexture;_e&&_e.isDepthTexture&&(_e.type===Ms?ue=t.DEPTH_COMPONENT32F:_e.type===Oa&&(ue=t.DEPTH_COMPONENT24));const Ae=Oe(q);Se(q)?h.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Ae,ue,q.width,q.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,Ae,ue,q.width,q.height)}else t.renderbufferStorage(t.RENDERBUFFER,ue,q.width,q.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,Z)}else if(q.depthBuffer&&q.stencilBuffer){const ue=Oe(q);pe&&Se(q)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,ue,t.DEPTH24_STENCIL8,q.width,q.height):Se(q)?h.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ue,t.DEPTH24_STENCIL8,q.width,q.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,q.width,q.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,Z)}else{const ue=q.isWebGLMultipleRenderTargets===!0?q.texture:[q.texture];for(let _e=0;_e0){pe.__webglFramebuffer[Ve]=[];for(let $e=0;$e0){pe.__webglFramebuffer=[];for(let Ve=0;Ve0&&Se(Z)===!1){const Ve=Ae?q:[q];pe.__webglMultisampledFramebuffer=t.createFramebuffer(),pe.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,pe.__webglMultisampledFramebuffer);for(let $e=0;$e0)for(let $e=0;$e0)for(let $e=0;$e0&&Se(Z)===!1){const q=Z.isWebGLMultipleRenderTargets?Z.texture:[Z.texture],pe=Z.width,ue=Z.height;let _e=t.COLOR_BUFFER_BIT;const Ae=[],Ie=Z.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ve=r.get(Z),$e=Z.isWebGLMultipleRenderTargets===!0;if($e)for(let lt=0;lt0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&q.__useRenderToTexture!==!1}function Me(Z){const q=s.render.frame;m.get(Z)!==q&&(m.set(Z,q),Z.update())}function ke(Z,q){const pe=Z.colorSpace,ue=Z.format,_e=Z.type;return Z.isCompressedTexture===!0||Z.isVideoTexture===!0||Z.format===zQ||pe!==Sr&&pe!==Vi&&(Tn.getTransfer(pe)===kn?a===!1?e.has("EXT_sRGB")===!0&&ue===Hi?(Z.format=zQ,Z.minFilter=ii,Z.generateMipmaps=!1):q=kU.sRGBToLinear(q):(ue!==Hi||_e!==Ha)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",pe)),q}this.allocateTextureUnit=G,this.resetTextureUnits=U,this.setTexture2D=W,this.setTexture2DArray=te,this.setTexture3D=de,this.setTextureCube=X,this.rebindTextures=ie,this.setupRenderTarget=Te,this.updateRenderTargetMipmap=ve,this.updateMultisampleRenderTarget=ae,this.setupDepthRenderbuffer=j,this.setupFrameBufferTexture=Le,this.useMultisampledRTT=Se}function Q6r(t,e,n){const r=n.isWebGL2;function i(o,s=Vi){let a;const l=Tn.getTransfer(s);if(o===Ha)return t.UNSIGNED_BYTE;if(o===LU)return t.UNSIGNED_SHORT_4_4_4_4;if(o===CU)return t.UNSIGNED_SHORT_5_5_5_1;if(o===B2r)return t.BYTE;if(o===F2r)return t.SHORT;if(o===Kb)return t.UNSIGNED_SHORT;if(o===SU)return t.INT;if(o===Oa)return t.UNSIGNED_INT;if(o===Ms)return t.FLOAT;if(o===o0)return r?t.HALF_FLOAT:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(o===$2r)return t.ALPHA;if(o===Hi)return t.RGBA;if(o===U2r)return t.LUMINANCE;if(o===G2r)return t.LUMINANCE_ALPHA;if(o===X1)return t.DEPTH_COMPONENT;if(o===fc)return t.DEPTH_STENCIL;if(o===zQ)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(o===q2r)return t.RED;if(o===AU)return t.RED_INTEGER;if(o===z2r)return t.RG;if(o===wU)return t.RG_INTEGER;if(o===MU)return t.RGBA_INTEGER;if(o===Ig||o===kg||o===Pg||o===Hg)if(l===kn)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(o===Ig)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===kg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===Pg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===Hg)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(o===Ig)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===kg)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===Pg)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===Hg)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===bD||o===ED||o===xD||o===SD)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(o===bD)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===ED)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===xD)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===SD)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===OU)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===LD||o===CD)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(o===LD)return l===kn?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(o===CD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===AD||o===wD||o===MD||o===OD||o===RD||o===ND||o===DD||o===ID||o===kD||o===PD||o===HD||o===VD||o===BD||o===FD)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(o===AD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===wD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===MD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===OD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===RD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===ND)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===DD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===ID)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===kD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===PD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===HD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===VD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===BD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===FD)return l===kn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===Vg||o===$D||o===UD)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(o===Vg)return l===kn?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(o===$D)return a.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(o===UD)return a.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(o===j2r||o===GD||o===qD||o===zD)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(o===Vg)return a.COMPRESSED_RED_RGTC1_EXT;if(o===GD)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(o===qD)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(o===zD)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return o===Z1?r?t.UNSIGNED_INT_24_8:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):t[o]!==void 0?t[o]:null}return{convert:i}}class v6r extends Wr{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class G1 extends $n{constructor(){super(),this.isGroup=!0,this.type="Group"}}const y6r={type:"move"};class c_{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new G1,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 G1,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Ee,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Ee),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new G1,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Ee,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Ee),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 n=this._hand;if(n)for(const r of e.hand.values())this._getHandJoint(n,r)}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,n,r){let i=null,o=null,s=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){s=!0;for(const T of e.hand.values()){const Q=n.getJointPose(T,r),_=this._getHandJoint(c,T);Q!==null&&(_.matrix.fromArray(Q.transform.matrix),_.matrix.decompose(_.position,_.rotation,_.scale),_.matrixWorldNeedsUpdate=!0,_.jointRadius=Q.radius),_.visible=Q!==null}const u=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],h=u.position.distanceTo(d.position),f=.02,m=.005;c.inputState.pinching&&h>f+m?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=f-m&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=n.getPose(e.gripSpace,r),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&o!==null&&(i=o),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(y6r)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new G1;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}class b6r extends zc{constructor(e,n){super();const r=this;let i=null,o=1,s=null,a="local-floor",l=1,c=null,u=null,d=null,h=null,f=null,m=null;const T=n.getContextAttributes();let Q=null,_=null;const v=[],y=[],b=new Yt;let E=null;const x=new Wr;x.layers.enable(1),x.viewport=new Mn;const L=new Wr;L.layers.enable(2),L.viewport=new Mn;const M=[x,L],C=new v6r;C.layers.enable(1),C.layers.enable(2);let A=null,I=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(X){let $=v[X];return $===void 0&&($=new c_,v[X]=$),$.getTargetRaySpace()},this.getControllerGrip=function(X){let $=v[X];return $===void 0&&($=new c_,v[X]=$),$.getGripSpace()},this.getHand=function(X){let $=v[X];return $===void 0&&($=new c_,v[X]=$),$.getHandSpace()};function N(X){const $=y.indexOf(X.inputSource);if($===-1)return;const ce=v[$];ce!==void 0&&(ce.update(X.inputSource,X.frame,c||s),ce.dispatchEvent({type:X.type,data:X.inputSource}))}function P(){i.removeEventListener("select",N),i.removeEventListener("selectstart",N),i.removeEventListener("selectend",N),i.removeEventListener("squeeze",N),i.removeEventListener("squeezestart",N),i.removeEventListener("squeezeend",N),i.removeEventListener("end",P),i.removeEventListener("inputsourceschange",O);for(let X=0;X=0&&(y[ye]=null,v[ye].disconnect(ce))}for(let $=0;$=y.length){y.push(ce),ye=ne;break}else if(y[ne]===null){y[ne]=ce,ye=ne;break}if(ye===-1)break}const z=v[ye];z&&z.connect(ce)}}const F=new Ee,V=new Ee;function U(X,$,ce){F.setFromMatrixPosition($.matrixWorld),V.setFromMatrixPosition(ce.matrixWorld);const ye=F.distanceTo(V),z=$.projectionMatrix.elements,ne=ce.projectionMatrix.elements,fe=z[14]/(z[10]-1),be=z[14]/(z[10]+1),Le=(z[9]+1)/z[5],se=(z[9]-1)/z[5],Y=(z[8]-1)/z[0],j=(ne[8]+1)/ne[0],ie=fe*Y,Te=fe*j,ve=ye/(-Y+j),ae=ve*-Y;$.matrixWorld.decompose(X.position,X.quaternion,X.scale),X.translateX(ae),X.translateZ(ve),X.matrixWorld.compose(X.position,X.quaternion,X.scale),X.matrixWorldInverse.copy(X.matrixWorld).invert();const Oe=fe+ve,Se=be+ve,Me=ie-ae,ke=Te+(ye-ae),Z=Le*be/Se*Oe,q=se*be/Se*Oe;X.projectionMatrix.makePerspective(Me,ke,Z,q,Oe,Se),X.projectionMatrixInverse.copy(X.projectionMatrix).invert()}function G(X,$){$===null?X.matrixWorld.copy(X.matrix):X.matrixWorld.multiplyMatrices($.matrixWorld,X.matrix),X.matrixWorldInverse.copy(X.matrixWorld).invert()}this.updateCamera=function(X){if(i===null)return;C.near=L.near=x.near=X.near,C.far=L.far=x.far=X.far,(A!==C.near||I!==C.far)&&(i.updateRenderState({depthNear:C.near,depthFar:C.far}),A=C.near,I=C.far);const $=X.parent,ce=C.cameras;G(C,$);for(let ye=0;ye0&&(Q.alphaTest.value=_.alphaTest);const v=e.get(_).envMap;if(v&&(Q.envMap.value=v,Q.flipEnvMap.value=v.isCubeTexture&&v.isRenderTargetTexture===!1?-1:1,Q.reflectivity.value=_.reflectivity,Q.ior.value=_.ior,Q.refractionRatio.value=_.refractionRatio),_.lightMap){Q.lightMap.value=_.lightMap;const y=t._useLegacyLights===!0?Math.PI:1;Q.lightMapIntensity.value=_.lightMapIntensity*y,n(_.lightMap,Q.lightMapTransform)}_.aoMap&&(Q.aoMap.value=_.aoMap,Q.aoMapIntensity.value=_.aoMapIntensity,n(_.aoMap,Q.aoMapTransform))}function s(Q,_){Q.diffuse.value.copy(_.color),Q.opacity.value=_.opacity,_.map&&(Q.map.value=_.map,n(_.map,Q.mapTransform))}function a(Q,_){Q.dashSize.value=_.dashSize,Q.totalSize.value=_.dashSize+_.gapSize,Q.scale.value=_.scale}function l(Q,_,v,y){Q.diffuse.value.copy(_.color),Q.opacity.value=_.opacity,Q.size.value=_.size*v,Q.scale.value=y*.5,_.map&&(Q.map.value=_.map,n(_.map,Q.uvTransform)),_.alphaMap&&(Q.alphaMap.value=_.alphaMap,n(_.alphaMap,Q.alphaMapTransform)),_.alphaTest>0&&(Q.alphaTest.value=_.alphaTest)}function c(Q,_){Q.diffuse.value.copy(_.color),Q.opacity.value=_.opacity,Q.rotation.value=_.rotation,_.map&&(Q.map.value=_.map,n(_.map,Q.mapTransform)),_.alphaMap&&(Q.alphaMap.value=_.alphaMap,n(_.alphaMap,Q.alphaMapTransform)),_.alphaTest>0&&(Q.alphaTest.value=_.alphaTest)}function u(Q,_){Q.specular.value.copy(_.specular),Q.shininess.value=Math.max(_.shininess,1e-4)}function d(Q,_){_.gradientMap&&(Q.gradientMap.value=_.gradientMap)}function h(Q,_){Q.metalness.value=_.metalness,_.metalnessMap&&(Q.metalnessMap.value=_.metalnessMap,n(_.metalnessMap,Q.metalnessMapTransform)),Q.roughness.value=_.roughness,_.roughnessMap&&(Q.roughnessMap.value=_.roughnessMap,n(_.roughnessMap,Q.roughnessMapTransform)),e.get(_).envMap&&(Q.envMapIntensity.value=_.envMapIntensity)}function f(Q,_,v){Q.ior.value=_.ior,_.sheen>0&&(Q.sheenColor.value.copy(_.sheenColor).multiplyScalar(_.sheen),Q.sheenRoughness.value=_.sheenRoughness,_.sheenColorMap&&(Q.sheenColorMap.value=_.sheenColorMap,n(_.sheenColorMap,Q.sheenColorMapTransform)),_.sheenRoughnessMap&&(Q.sheenRoughnessMap.value=_.sheenRoughnessMap,n(_.sheenRoughnessMap,Q.sheenRoughnessMapTransform))),_.clearcoat>0&&(Q.clearcoat.value=_.clearcoat,Q.clearcoatRoughness.value=_.clearcoatRoughness,_.clearcoatMap&&(Q.clearcoatMap.value=_.clearcoatMap,n(_.clearcoatMap,Q.clearcoatMapTransform)),_.clearcoatRoughnessMap&&(Q.clearcoatRoughnessMap.value=_.clearcoatRoughnessMap,n(_.clearcoatRoughnessMap,Q.clearcoatRoughnessMapTransform)),_.clearcoatNormalMap&&(Q.clearcoatNormalMap.value=_.clearcoatNormalMap,n(_.clearcoatNormalMap,Q.clearcoatNormalMapTransform),Q.clearcoatNormalScale.value.copy(_.clearcoatNormalScale),_.side===ui&&Q.clearcoatNormalScale.value.negate())),_.iridescence>0&&(Q.iridescence.value=_.iridescence,Q.iridescenceIOR.value=_.iridescenceIOR,Q.iridescenceThicknessMinimum.value=_.iridescenceThicknessRange[0],Q.iridescenceThicknessMaximum.value=_.iridescenceThicknessRange[1],_.iridescenceMap&&(Q.iridescenceMap.value=_.iridescenceMap,n(_.iridescenceMap,Q.iridescenceMapTransform)),_.iridescenceThicknessMap&&(Q.iridescenceThicknessMap.value=_.iridescenceThicknessMap,n(_.iridescenceThicknessMap,Q.iridescenceThicknessMapTransform))),_.transmission>0&&(Q.transmission.value=_.transmission,Q.transmissionSamplerMap.value=v.texture,Q.transmissionSamplerSize.value.set(v.width,v.height),_.transmissionMap&&(Q.transmissionMap.value=_.transmissionMap,n(_.transmissionMap,Q.transmissionMapTransform)),Q.thickness.value=_.thickness,_.thicknessMap&&(Q.thicknessMap.value=_.thicknessMap,n(_.thicknessMap,Q.thicknessMapTransform)),Q.attenuationDistance.value=_.attenuationDistance,Q.attenuationColor.value.copy(_.attenuationColor)),_.anisotropy>0&&(Q.anisotropyVector.value.set(_.anisotropy*Math.cos(_.anisotropyRotation),_.anisotropy*Math.sin(_.anisotropyRotation)),_.anisotropyMap&&(Q.anisotropyMap.value=_.anisotropyMap,n(_.anisotropyMap,Q.anisotropyMapTransform))),Q.specularIntensity.value=_.specularIntensity,Q.specularColor.value.copy(_.specularColor),_.specularColorMap&&(Q.specularColorMap.value=_.specularColorMap,n(_.specularColorMap,Q.specularColorMapTransform)),_.specularIntensityMap&&(Q.specularIntensityMap.value=_.specularIntensityMap,n(_.specularIntensityMap,Q.specularIntensityMapTransform))}function m(Q,_){_.matcap&&(Q.matcap.value=_.matcap)}function T(Q,_){const v=e.get(_).light;Q.referencePosition.value.setFromMatrixPosition(v.matrixWorld),Q.nearDistance.value=v.shadow.camera.near,Q.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function x6r(t,e,n,r){let i={},o={},s=[];const a=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(v,y){const b=y.program;r.uniformBlockBinding(v,b)}function c(v,y){let b=i[v.id];b===void 0&&(m(v),b=u(v),i[v.id]=b,v.addEventListener("dispose",Q));const E=y.program;r.updateUBOMapping(v,E);const x=e.render.frame;o[v.id]!==x&&(h(v),o[v.id]=x)}function u(v){const y=d();v.__bindingPointIndex=y;const b=t.createBuffer(),E=v.__size,x=v.usage;return t.bindBuffer(t.UNIFORM_BUFFER,b),t.bufferData(t.UNIFORM_BUFFER,E,x),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,y,b),b}function d(){for(let v=0;v0){x=b%E;const N=E-x;x!==0&&N-A.boundary<0&&(b+=E-x,C.__offset=b)}b+=A.storage}return x=b%E,x>0&&(b+=E-x),v.__size=b,v.__cache={},this}function T(v){const y={boundary:0,storage:0};return typeof v=="number"?(y.boundary=4,y.storage=4):v.isVector2?(y.boundary=8,y.storage=8):v.isVector3||v.isColor?(y.boundary=16,y.storage=12):v.isVector4?(y.boundary=16,y.storage=16):v.isMatrix3?(y.boundary=48,y.storage=48):v.isMatrix4?(y.boundary=64,y.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),y}function Q(v){const y=v.target;y.removeEventListener("dispose",Q);const b=s.indexOf(y.__bindingPointIndex);s.splice(b,1),t.deleteBuffer(i[y.id]),delete i[y.id],delete o[y.id]}function _(){for(const v in i)t.deleteBuffer(i[v]);s=[],i={},o={}}return{bind:l,update:c,dispose:_}}class JU{constructor(e={}){const{canvas:n=ylr(),context:r=null,depth:i=!0,stencil:o=!0,alpha:s=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let h;r!==null?h=r.getContextAttributes().alpha:h=s;const f=new Uint32Array(4),m=new Int32Array(4);let T=null,Q=null;const _=[],v=[];this.domElement=n,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=jn,this._useLegacyLights=!1,this.toneMapping=Pa,this.toneMappingExposure=1;const y=this;let b=!1,E=0,x=0,L=null,M=-1,C=null;const A=new Mn,I=new Mn;let N=null;const P=new Nt(0);let O=0,F=n.width,V=n.height,U=1,G=null,K=null;const W=new Mn(0,0,F,V),te=new Mn(0,0,F,V);let de=!1;const X=new eE;let $=!1,ce=!1,ye=null;const z=new zt,ne=new Yt,fe=new Ee,be={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Le(){return L===null?U:1}let se=r;function Y(ee,xe){for(let Ce=0;Ce{function We(){if(Ne.forEach(function(Fe){ae.get(Fe).currentProgram.isReady()&&Ne.delete(Fe)}),Ne.size===0){Re(ee);return}setTimeout(We,10)}j.get("KHR_parallel_shader_compile")!==null?We():setTimeout(We,10)})};let Ot=null;function Hn(ee){Ot&&Ot(ee)}function zn(){Yn.stop()}function an(){Yn.start()}const Yn=new zU;Yn.setAnimationLoop(Hn),typeof self<"u"&&Yn.setContext(self),this.setAnimationLoop=function(ee){Ot=ee,st.setAnimationLoop(ee),ee===null?Yn.stop():Yn.start()},st.addEventListener("sessionstart",zn),st.addEventListener("sessionend",an),this.render=function(ee,xe){if(xe!==void 0&&xe.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(b===!0)return;ee.matrixWorldAutoUpdate===!0&&ee.updateMatrixWorld(),xe.parent===null&&xe.matrixWorldAutoUpdate===!0&&xe.updateMatrixWorld(),st.enabled===!0&&st.isPresenting===!0&&(st.cameraAutoUpdate===!0&&st.updateCamera(xe),xe=st.getCamera()),ee.isScene===!0&&ee.onBeforeRender(y,ee,xe,L),Q=Ae.get(ee,v.length),Q.init(),v.push(Q),z.multiplyMatrices(xe.projectionMatrix,xe.matrixWorldInverse),X.setFromProjectionMatrix(z),ce=this.localClippingEnabled,$=Ie.init(this.clippingPlanes,ce),T=_e.get(ee,_.length),T.init(),_.push(T),Cr(ee,xe,0,y.sortObjects),T.finish(),y.sortObjects===!0&&T.sort(G,K),this.info.render.frame++,$===!0&&Ie.beginShadows();const Ce=Q.state.shadowsArray;if(Ve.render(Ce,ee,xe),$===!0&&Ie.endShadows(),this.info.autoReset===!0&&this.info.reset(),$e.render(T,ee),Q.setupLights(y._useLegacyLights),xe.isArrayCamera){const Ne=xe.cameras;for(let Re=0,We=Ne.length;Re0?Q=v[v.length-1]:Q=null,_.pop(),_.length>0?T=_[_.length-1]:T=null};function Cr(ee,xe,Ce,Ne){if(ee.visible===!1)return;if(ee.layers.test(xe.layers)){if(ee.isGroup)Ce=ee.renderOrder;else if(ee.isLOD)ee.autoUpdate===!0&&ee.update(xe);else if(ee.isLight)Q.pushLight(ee),ee.castShadow&&Q.pushShadow(ee);else if(ee.isSprite){if(!ee.frustumCulled||X.intersectsSprite(ee)){Ne&&fe.setFromMatrixPosition(ee.matrixWorld).applyMatrix4(z);const Fe=q.update(ee),B=ee.material;B.visible&&T.push(ee,Fe,B,Ce,fe.z,null)}}else if((ee.isMesh||ee.isLine||ee.isPoints)&&(!ee.frustumCulled||X.intersectsObject(ee))){const Fe=q.update(ee),B=ee.material;if(Ne&&(ee.boundingSphere!==void 0?(ee.boundingSphere===null&&ee.computeBoundingSphere(),fe.copy(ee.boundingSphere.center)):(Fe.boundingSphere===null&&Fe.computeBoundingSphere(),fe.copy(Fe.boundingSphere.center)),fe.applyMatrix4(ee.matrixWorld).applyMatrix4(z)),Array.isArray(B)){const tt=Fe.groups;for(let bt=0,gt=tt.length;bt0&&So(Re,We,xe,Ce),Ne&&Te.viewport(A.copy(Ne)),Re.length>0&&Gt(Re,xe,Ce),We.length>0&&Gt(We,xe,Ce),Fe.length>0&&Gt(Fe,xe,Ce),Te.buffers.depth.setTest(!0),Te.buffers.depth.setMask(!0),Te.buffers.color.setMask(!0),Te.setPolygonOffset(!1)}function So(ee,xe,Ce,Ne){if((Ce.isScene===!0?Ce.overrideMaterial:null)!==null)return;const We=ie.isWebGL2;ye===null&&(ye=new g2(1,1,{generateMipmaps:!0,type:j.has("EXT_color_buffer_half_float")?o0:Ha,minFilter:m2,samples:We?4:0})),y.getDrawingBufferSize(ne),We?ye.setSize(ne.x,ne.y):ye.setSize(gd(ne.x),gd(ne.y));const Fe=y.getRenderTarget();y.setRenderTarget(ye),y.getClearColor(P),O=y.getClearAlpha(),O<1&&y.setClearColor(16777215,.5),y.clear();const B=y.toneMapping;y.toneMapping=Pa,Gt(ee,Ce,Ne),Oe.updateMultisampleRenderTarget(ye),Oe.updateRenderTargetMipmap(ye);let tt=!1;for(let bt=0,gt=xe.length;bt0),Qt=!!Ce.morphAttributes.position,Ht=!!Ce.morphAttributes.normal,Kt=!!Ce.morphAttributes.color;let un=Pa;Ne.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(un=y.toneMapping);const Ar=Ce.morphAttributes.position||Ce.morphAttributes.normal||Ce.morphAttributes.color,on=Ar!==void 0?Ar.length:0,$t=ae.get(Ne),w2=Q.state.lights;if($===!0&&(ce===!0||ee!==C)){const Vr=ee===C&&Ne.id===M;Ie.setState(Ne,ee,Vr)}let Dn=!1;Ne.version===$t.__version?($t.needsLights&&$t.lightsStateVersion!==w2.state.version||$t.outputColorSpace!==B||Re.isBatchedMesh&&$t.batching===!1||!Re.isBatchedMesh&&$t.batching===!0||Re.isInstancedMesh&&$t.instancing===!1||!Re.isInstancedMesh&&$t.instancing===!0||Re.isSkinnedMesh&&$t.skinning===!1||!Re.isSkinnedMesh&&$t.skinning===!0||Re.isInstancedMesh&&$t.instancingColor===!0&&Re.instanceColor===null||Re.isInstancedMesh&&$t.instancingColor===!1&&Re.instanceColor!==null||$t.envMap!==tt||Ne.fog===!0&&$t.fog!==We||$t.numClippingPlanes!==void 0&&($t.numClippingPlanes!==Ie.numPlanes||$t.numIntersection!==Ie.numIntersection)||$t.vertexAlphas!==bt||$t.vertexTangents!==gt||$t.morphTargets!==Qt||$t.morphNormals!==Ht||$t.morphColors!==Kt||$t.toneMapping!==un||ie.isWebGL2===!0&&$t.morphTargetsCount!==on)&&(Dn=!0):(Dn=!0,$t.__version=Ne.version);let Lo=$t.currentProgram;Dn===!0&&(Lo=Xn(Ne,xe,Re));let Xc=!1,os=!1,M2=!1;const mn=Lo.getUniforms(),Ai=$t.uniforms;if(Te.useProgram(Lo.program)&&(Xc=!0,os=!0,M2=!0),Ne.id!==M&&(M=Ne.id,os=!0),Xc||C!==ee){mn.setValue(se,"projectionMatrix",ee.projectionMatrix),mn.setValue(se,"viewMatrix",ee.matrixWorldInverse);const Vr=mn.map.cameraPosition;Vr!==void 0&&Vr.setValue(se,fe.setFromMatrixPosition(ee.matrixWorld)),ie.logarithmicDepthBuffer&&mn.setValue(se,"logDepthBufFC",2/(Math.log(ee.far+1)/Math.LN2)),(Ne.isMeshPhongMaterial||Ne.isMeshToonMaterial||Ne.isMeshLambertMaterial||Ne.isMeshBasicMaterial||Ne.isMeshStandardMaterial||Ne.isShaderMaterial)&&mn.setValue(se,"isOrthographic",ee.isOrthographicCamera===!0),C!==ee&&(C=ee,os=!0,M2=!0)}if(Re.isSkinnedMesh){mn.setOptional(se,Re,"bindMatrix"),mn.setOptional(se,Re,"bindMatrixInverse");const Vr=Re.skeleton;Vr&&(ie.floatVertexTextures?(Vr.boneTexture===null&&Vr.computeBoneTexture(),mn.setValue(se,"boneTexture",Vr.boneTexture,Oe)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Re.isBatchedMesh&&(mn.setOptional(se,Re,"batchingTexture"),mn.setValue(se,"batchingTexture",Re._matricesTexture,Oe));const Jr=Ce.morphAttributes;if((Jr.position!==void 0||Jr.normal!==void 0||Jr.color!==void 0&&ie.isWebGL2===!0)&<.update(Re,Ce,Lo),(os||$t.receiveShadow!==Re.receiveShadow)&&($t.receiveShadow=Re.receiveShadow,mn.setValue(se,"receiveShadow",Re.receiveShadow)),Ne.isMeshGouraudMaterial&&Ne.envMap!==null&&(Ai.envMap.value=tt,Ai.flipEnvMap.value=tt.isCubeTexture&&tt.isRenderTargetTexture===!1?-1:1),os&&(mn.setValue(se,"toneMappingExposure",y.toneMappingExposure),$t.needsLights&&ea(Ai,M2),We&&Ne.fog===!0&&ue.refreshFogUniforms(Ai,We),ue.refreshMaterialUniforms(Ai,Ne,U,V,ye),nu.upload(se,hi($t),Ai,Oe)),Ne.isShaderMaterial&&Ne.uniformsNeedUpdate===!0&&(nu.upload(se,hi($t),Ai,Oe),Ne.uniformsNeedUpdate=!1),Ne.isSpriteMaterial&&mn.setValue(se,"center",Re.center),mn.setValue(se,"modelViewMatrix",Re.modelViewMatrix),mn.setValue(se,"normalMatrix",Re.normalMatrix),mn.setValue(se,"modelMatrix",Re.matrixWorld),Ne.isShaderMaterial||Ne.isRawShaderMaterial){const Vr=Ne.uniformsGroups;for(let O2=0,wi=Vr.length;O20&&Oe.useMultisampledRTT(ee)===!1?Re=ae.get(ee).__webglMultisampledFramebuffer:Array.isArray(gt)?Re=gt[Ce]:Re=gt,A.copy(ee.viewport),I.copy(ee.scissor),N=ee.scissorTest}else A.copy(W).multiplyScalar(U).floor(),I.copy(te).multiplyScalar(U).floor(),N=de;if(Te.bindFramebuffer(se.FRAMEBUFFER,Re)&&ie.drawBuffers&&Ne&&Te.drawBuffers(ee,Re),Te.viewport(A),Te.scissor(I),Te.setScissorTest(N),We){const tt=ae.get(ee.texture);se.framebufferTexture2D(se.FRAMEBUFFER,se.COLOR_ATTACHMENT0,se.TEXTURE_CUBE_MAP_POSITIVE_X+xe,tt.__webglTexture,Ce)}else if(Fe){const tt=ae.get(ee.texture),bt=xe||0;se.framebufferTextureLayer(se.FRAMEBUFFER,se.COLOR_ATTACHMENT0,tt.__webglTexture,Ce||0,bt)}M=-1},this.readRenderTargetPixels=function(ee,xe,Ce,Ne,Re,We,Fe){if(!(ee&&ee.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let B=ae.get(ee).__webglFramebuffer;if(ee.isWebGLCubeRenderTarget&&Fe!==void 0&&(B=B[Fe]),B){Te.bindFramebuffer(se.FRAMEBUFFER,B);try{const tt=ee.texture,bt=tt.format,gt=tt.type;if(bt!==Hi&&It.convert(bt)!==se.getParameter(se.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Qt=gt===o0&&(j.has("EXT_color_buffer_half_float")||ie.isWebGL2&&j.has("EXT_color_buffer_float"));if(gt!==Ha&&It.convert(gt)!==se.getParameter(se.IMPLEMENTATION_COLOR_READ_TYPE)&&!(gt===Ms&&(ie.isWebGL2||j.has("OES_texture_float")||j.has("WEBGL_color_buffer_float")))&&!Qt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}xe>=0&&xe<=ee.width-Ne&&Ce>=0&&Ce<=ee.height-Re&&se.readPixels(xe,Ce,Ne,Re,It.convert(bt),It.convert(gt),We)}finally{const tt=L!==null?ae.get(L).__webglFramebuffer:null;Te.bindFramebuffer(se.FRAMEBUFFER,tt)}}},this.copyFramebufferToTexture=function(ee,xe,Ce=0){const Ne=Math.pow(2,-Ce),Re=Math.floor(xe.image.width*Ne),We=Math.floor(xe.image.height*Ne);Oe.setTexture2D(xe,0),se.copyTexSubImage2D(se.TEXTURE_2D,Ce,0,0,ee.x,ee.y,Re,We),Te.unbindTexture()},this.copyTextureToTexture=function(ee,xe,Ce,Ne=0){const Re=xe.image.width,We=xe.image.height,Fe=It.convert(Ce.format),B=It.convert(Ce.type);Oe.setTexture2D(Ce,0),se.pixelStorei(se.UNPACK_FLIP_Y_WEBGL,Ce.flipY),se.pixelStorei(se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ce.premultiplyAlpha),se.pixelStorei(se.UNPACK_ALIGNMENT,Ce.unpackAlignment),xe.isDataTexture?se.texSubImage2D(se.TEXTURE_2D,Ne,ee.x,ee.y,Re,We,Fe,B,xe.image.data):xe.isCompressedTexture?se.compressedTexSubImage2D(se.TEXTURE_2D,Ne,ee.x,ee.y,xe.mipmaps[0].width,xe.mipmaps[0].height,Fe,xe.mipmaps[0].data):se.texSubImage2D(se.TEXTURE_2D,Ne,ee.x,ee.y,Fe,B,xe.image),Ne===0&&Ce.generateMipmaps&&se.generateMipmap(se.TEXTURE_2D),Te.unbindTexture()},this.copyTextureToTexture3D=function(ee,xe,Ce,Ne,Re=0){if(y.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const We=ee.max.x-ee.min.x+1,Fe=ee.max.y-ee.min.y+1,B=ee.max.z-ee.min.z+1,tt=It.convert(Ne.format),bt=It.convert(Ne.type);let gt;if(Ne.isData3DTexture)Oe.setTexture3D(Ne,0),gt=se.TEXTURE_3D;else if(Ne.isDataArrayTexture)Oe.setTexture2DArray(Ne,0),gt=se.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}se.pixelStorei(se.UNPACK_FLIP_Y_WEBGL,Ne.flipY),se.pixelStorei(se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ne.premultiplyAlpha),se.pixelStorei(se.UNPACK_ALIGNMENT,Ne.unpackAlignment);const Qt=se.getParameter(se.UNPACK_ROW_LENGTH),Ht=se.getParameter(se.UNPACK_IMAGE_HEIGHT),Kt=se.getParameter(se.UNPACK_SKIP_PIXELS),un=se.getParameter(se.UNPACK_SKIP_ROWS),Ar=se.getParameter(se.UNPACK_SKIP_IMAGES),on=Ce.isCompressedTexture?Ce.mipmaps[0]:Ce.image;se.pixelStorei(se.UNPACK_ROW_LENGTH,on.width),se.pixelStorei(se.UNPACK_IMAGE_HEIGHT,on.height),se.pixelStorei(se.UNPACK_SKIP_PIXELS,ee.min.x),se.pixelStorei(se.UNPACK_SKIP_ROWS,ee.min.y),se.pixelStorei(se.UNPACK_SKIP_IMAGES,ee.min.z),Ce.isDataTexture||Ce.isData3DTexture?se.texSubImage3D(gt,Re,xe.x,xe.y,xe.z,We,Fe,B,tt,bt,on.data):Ce.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),se.compressedTexSubImage3D(gt,Re,xe.x,xe.y,xe.z,We,Fe,B,tt,on.data)):se.texSubImage3D(gt,Re,xe.x,xe.y,xe.z,We,Fe,B,tt,bt,on),se.pixelStorei(se.UNPACK_ROW_LENGTH,Qt),se.pixelStorei(se.UNPACK_IMAGE_HEIGHT,Ht),se.pixelStorei(se.UNPACK_SKIP_PIXELS,Kt),se.pixelStorei(se.UNPACK_SKIP_ROWS,un),se.pixelStorei(se.UNPACK_SKIP_IMAGES,Ar),Re===0&&Ne.generateMipmaps&&se.generateMipmap(gt),Te.unbindTexture()},this.initTexture=function(ee){ee.isCubeTexture?Oe.setTextureCube(ee,0):ee.isData3DTexture?Oe.setTexture3D(ee,0):ee.isDataArrayTexture||ee.isCompressedArrayTexture?Oe.setTexture2DArray(ee,0):Oe.setTexture2D(ee,0),Te.unbindTexture()},this.resetState=function(){E=0,x=0,L=null,Te.reset(),Tt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Os}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===Xb?"display-p3":"srgb",n.unpackColorSpace=Tn.workingColorSpace===x9?"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===jn?J1:NU}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===J1?jn:Sr}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 S6r extends JU{}S6r.prototype.isWebGL1Renderer=!0;class L6r extends $n{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,n){return super.copy(e,n),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 n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}class C6r{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=qQ,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=uo()}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,n){this.updateRanges.push({start:e,count:n})}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,n,r){e*=this.stride,r*=n.stride;for(let i=0,o=this.stride;il)continue;h.applyMatrix4(this.matrixWorld);const M=e.ray.origin.distanceTo(h);Me.far||n.push({distance:M,point:d.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}else{const _=Math.max(0,s.start),v=Math.min(Q.count,s.start+s.count);for(let y=_,b=v-1;yl)continue;h.applyMatrix4(this.matrixWorld);const x=e.ray.origin.distanceTo(h);xe.far||n.push({distance:x,point:d.clone().applyMatrix4(this.matrixWorld),index:y,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,r=Object.keys(n);if(r.length>0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;oi.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:s})}}class aE extends fo{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Nt(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 Nt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Zb,this.normalScale=new Yt(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 Zs extends aE{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 Yt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Dr(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(n){this.ior=(1+.4*n)/(1-.4*n)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Nt(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 Nt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Nt(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 XI extends fo{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Nt(16777215),this.specular=new Nt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Nt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Zb,this.normalScale=new Yt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Yb,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 H5(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function P6r(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function H6r(t){function e(i,o){return t[i]-t[o]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function JI(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,s=0;s!==r;++o){const a=n[o]*e;for(let l=0;l!==e;++l)i[s++]=t[a+l]}return i}function rG(t,e,n,r){let i=1,o=t[0];for(;o!==void 0&&o[r]===void 0;)o=t[i++];if(o===void 0)return;let s=o[r];if(s!==void 0)if(Array.isArray(s))do s=o[r],s!==void 0&&(e.push(o.time),n.push.apply(n,s)),o=t[i++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[r],s!==void 0&&(e.push(o.time),s.toArray(n,n.length)),o=t[i++];while(o!==void 0);else do s=o[r],s!==void 0&&(e.push(o.time),n.push(s)),o=t[i++];while(o!==void 0)}class n6{constructor(e,n,r,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new n.constructor(r),this.sampleValues=n,this.valueSize=r,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let r=this._cachedIndex,i=n[r],o=n[r-1];e:{t:{let s;n:{r:if(!(e=o)){const a=n[1];e=o)break t}s=r,r=0;break n}break e}for(;r>>1;en;)--s;if(++s,o!==0||s!==i){o>=s&&(s=Math.max(s,1),o=s-1);const a=this.getValueSize();this.times=r.slice(o,s),this.values=this.values.slice(o*a,s*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(i!==void 0&&P6r(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),r=this.getValueSize(),i=this.getInterpolation()===Bg,o=e.length-1;let s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*r,l=s*r,c=0;c!==r;++c)n[l+c]=n[a+c];++s}return s!==e.length?(this.times=e.slice(0,s),this.values=n.slice(0,s*r)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}is.prototype.TimeBufferType=Float32Array;is.prototype.ValueBufferType=Float32Array;is.prototype.DefaultInterpolation=pc;class Wc extends is{}Wc.prototype.ValueTypeName="bool";Wc.prototype.ValueBufferType=Array;Wc.prototype.DefaultInterpolation=s0;Wc.prototype.InterpolantFactoryMethodLinear=void 0;Wc.prototype.InterpolantFactoryMethodSmooth=void 0;class iG extends is{}iG.prototype.ValueTypeName="color";class mc extends is{}mc.prototype.ValueTypeName="number";class $6r extends n6{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)n1.slerpFlat(o,0,s,c-a,s,c,l);return o}}class Q2 extends is{InterpolantFactoryMethodLinear(e){return new $6r(this.times,this.values,this.getValueSize(),e)}}Q2.prototype.ValueTypeName="quaternion";Q2.prototype.DefaultInterpolation=pc;Q2.prototype.InterpolantFactoryMethodSmooth=void 0;class Yc extends is{}Yc.prototype.ValueTypeName="string";Yc.prototype.ValueBufferType=Array;Yc.prototype.DefaultInterpolation=s0;Yc.prototype.InterpolantFactoryMethodLinear=void 0;Yc.prototype.InterpolantFactoryMethodSmooth=void 0;class gc extends is{}gc.prototype.ValueTypeName="vector";class U6r{constructor(e,n=-1,r,i=W2r){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=uo(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let s=0,a=r.length;s!==a;++s)n.push(q6r(r[s]).scale(i));const o=new this(e.name,e.duration,n,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=r.length;o!==s;++o)n.push(is.toJSON(r[o]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const o=n.length,s=[];for(let a=0;a1){const d=u[1];let h=i[d];h||(i[d]=h=[]),h.push(c)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return s}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(d,h,f,m,T){if(f.length!==0){const Q=[],_=[];rG(f,Q,_,m),Q.length!==0&&T.push(new d(h,Q,_))}},i=[],o=e.name||"default",s=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let d=0;d{n&&n(o),this.manager.itemEnd(e)},0),o;if(ys[e]!==void 0){ys[e].push({onLoad:n,onProgress:r,onError:i});return}ys[e]=[],ys[e].push({onLoad:n,onProgress:r,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(s).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=ys[e],d=c.body.getReader(),h=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),f=h?parseInt(h):0,m=f!==0;let T=0;const Q=new ReadableStream({start(_){v();function v(){d.read().then(({done:y,value:b})=>{if(y)_.close();else{T+=b.byteLength;const E=new ProgressEvent("progress",{lengthComputable:m,loaded:T,total:f});for(let x=0,L=u.length;x{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),h=d&&d[1]?d[1].toLowerCase():void 0,f=new TextDecoder(h);return c.arrayBuffer().then(m=>f.decode(m))}}}).then(c=>{_c.add(e,c);const u=ys[e];delete ys[e];for(let d=0,h=u.length;d{const u=ys[e];if(u===void 0)throw this.manager.itemError(e),c;delete ys[e];for(let d=0,h=u.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Y6r extends Kc{constructor(e){super(e)}load(e,n,r,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=_c.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s;const a=a0("img");function l(){u(),_c.add(e,this),n&&n(this),o.manager.itemEnd(e)}function c(d){u(),i&&i(d),o.manager.itemError(e),o.manager.itemEnd(e)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),o.manager.itemStart(e),a.src=e,a}}class sG extends Kc{constructor(e){super(e)}load(e,n,r,i){const o=new xr,s=new Y6r(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(e,function(a){o.image=a,o.needsUpdate=!0,n!==void 0&&n(o)},r,i),o}}class A9 extends $n{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new Nt(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),n}}const p_=new zt,ek=new Ee,tk=new Ee;class lE{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Yt(512,512),this.map=null,this.mapPass=null,this.matrix=new zt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new eE,this._frameExtents=new Yt(1,1),this._viewportCount=1,this._viewports=[new Mn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,r=this.matrix;ek.setFromMatrixPosition(e.matrixWorld),n.position.copy(ek),tk.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(tk),n.updateMatrixWorld(),p_.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(p_),r.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),r.multiply(p_)}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 K6r extends lE{constructor(){super(new Wr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,r=hc*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,o=e.distance||n.far;(r!==n.fov||i!==n.aspect||o!==n.far)&&(n.fov=r,n.aspect=i,n.far=o,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class Z6r extends A9{constructor(e,n,r=0,i=Math.PI/3,o=0,s=2){super(e,n),this.isSpotLight=!0,this.type="SpotLight",this.position.copy($n.DEFAULT_UP),this.updateMatrix(),this.target=new $n,this.distance=r,this.angle=i,this.penumbra=o,this.decay=s,this.map=null,this.shadow=new K6r}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),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 nk=new zt,u4=new Ee,h_=new Ee;class X6r extends lE{constructor(){super(new Wr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Yt(4,2),this._viewportCount=6,this._viewports=[new Mn(2,1,1,1),new Mn(0,1,1,1),new Mn(3,1,1,1),new Mn(1,1,1,1),new Mn(3,0,1,1),new Mn(1,0,1,1)],this._cubeDirections=[new Ee(1,0,0),new Ee(-1,0,0),new Ee(0,0,1),new Ee(0,0,-1),new Ee(0,1,0),new Ee(0,-1,0)],this._cubeUps=[new Ee(0,1,0),new Ee(0,1,0),new Ee(0,1,0),new Ee(0,1,0),new Ee(0,0,1),new Ee(0,0,-1)]}updateMatrices(e,n=0){const r=this.camera,i=this.matrix,o=e.distance||r.far;o!==r.far&&(r.far=o,r.updateProjectionMatrix()),u4.setFromMatrixPosition(e.matrixWorld),r.position.copy(u4),h_.copy(r.position),h_.add(this._cubeDirections[n]),r.up.copy(this._cubeUps[n]),r.lookAt(h_),r.updateMatrixWorld(),i.makeTranslation(-u4.x,-u4.y,-u4.z),nk.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(nk)}}class J6r extends A9{constructor(e,n,r=0,i=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=r,this.decay=i,this.shadow=new X6r}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class e5r extends lE{constructor(){super(new nE(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class aG extends A9{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy($n.DEFAULT_UP),this.updateMatrix(),this.target=new $n,this.shadow=new e5r}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class t5r extends A9{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class D4{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r"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,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=_c.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){_c.add(e,l),n&&n(l),o.manager.itemEnd(e)}).catch(function(l){i&&i(l),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}}const cE="\\[\\]\\.:\\/",r5r=new RegExp("["+cE+"]","g"),uE="[^"+cE+"]",i5r="[^"+cE.replace("\\.","")+"]",o5r=/((?:WC+[\/:])*)/.source.replace("WC",uE),s5r=/(WCOD+)?/.source.replace("WCOD",i5r),a5r=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",uE),l5r=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",uE),c5r=new RegExp("^"+o5r+s5r+a5r+l5r+"$"),u5r=["material","materials","bones","map"];class d5r{constructor(e,n,r){const i=r||Qn.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=r.length;i!==o;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class Qn{constructor(e,n,r){this.path=n,this.parsedPath=r||Qn.parseTrackName(n),this.node=Qn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new Qn.Composite(e,n,r):new Qn(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(r5r,"")}static parseTrackName(e){const n=c5r.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const o=r.nodeName.substring(i+1);u5r.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(o){for(let s=0;s=2.0 are supported."));return}const c=new G5r(o,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&a[d]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+d+'".')}}c.setExtensions(s),c.setPlugins(a),c.parse(r,i)}parseAsync(e,n){const r=this;return new Promise(function(i,o){r.parse(e,n,i,o)})}}function p5r(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}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 h5r{constructor(e){this.parser=e,this.name=Wt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let r=0,i=n.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,o.source,s)}}class C5r{constructor(e){this.parser=e,this.name=Wt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const s=o.extensions[n],a=i.images[s.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(e,s.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class A5r{constructor(e){this.parser=e,this.name=Wt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const s=o.extensions[n],a=i.images[s.source];let l=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(e,s.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class w5r{constructor(e){this.name=Wt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,r=n.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const i=r.extensions[this.name],o=this.parser.getDependency("buffer",i.buffer),s=this.parser.options.meshoptDecoder;if(!s||!s.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(a){const l=i.byteOffset||0,c=i.byteLength||0,u=i.count,d=i.byteStride,h=new Uint8Array(a,l,c);return s.decodeGltfBufferAsync?s.decodeGltfBufferAsync(u,d,h,i.mode,i.filter).then(function(f){return f.buffer}):s.ready.then(function(){const f=new ArrayBuffer(u*d);return s.decodeGltfBuffer(new Uint8Array(f),u,d,h,i.mode,i.filter),f})})}else return null}}class M5r{constructor(e){this.name=Wt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,r=n.nodes[e];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const i=n.meshes[r.mesh];for(const c of i.primitives)if(c.mode!==Ii.TRIANGLES&&c.mode!==Ii.TRIANGLE_STRIP&&c.mode!==Ii.TRIANGLE_FAN&&c.mode!==void 0)return null;const s=r.extensions[this.name].attributes,a=[],l={};for(const c in s)a.push(this.parser.getDependency("accessor",s[c]).then(u=>(l[c]=u,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const u=c.pop(),d=u.isGroup?u.children:[u],h=c[0].count,f=[];for(const m of d){const T=new zt,Q=new Ee,_=new n1,v=new Ee(1,1,1),y=new N6r(m.geometry,m.material,h);for(let b=0;b0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const U5r=new zt;class G5r{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new p5r,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 r=!1,i=!1,o=-1;typeof navigator<"u"&&(r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,o=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||r||i&&o<98?this.textureLoader=new sG(this.options.manager):this.textureLoader=new n5r(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new oG(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,n){const r=this,i=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(s){return s._markDefs&&s._markDefs()}),Promise.all(this._invokeAll(function(s){return s.beforeRoot&&s.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(s){const a={scene:s[0][i.scene||0],scenes:s[0],animations:s[1],cameras:s[2],asset:i.asset,parser:r,userData:{}};return R1(o,a,i),Ca(a,i),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let i=0,o=n.length;i{const l=this.associations.get(s);l!=null&&this.associations.set(a,l);for(const[c,u]of s.children.entries())o(u,a.children[c])};return o(r,i),i.name+="_instance_"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let r=0;r=2&&Q.setY(C,x[L*l+1]),l>=3&&Q.setZ(C,x[L*l+2]),l>=4&&Q.setW(C,x[L*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return Q})}loadTexture(e){const n=this.json,r=this.options,o=n.textures[e].source,s=n.images[o];let a=this.textureLoader;if(s.uri){const l=r.manager.getHandler(s.uri);l!==null&&(a=l)}return this.loadTextureImage(e,o,a)}loadTextureImage(e,n,r){const i=this,o=this.json,s=o.textures[e],a=o.images[n],l=(a.uri||a.bufferView)+":"+s.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(n,r).then(function(u){u.flipY=!1,u.name=s.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(o.samplers||{})[s.sampler]||{};return u.magFilter=ok[h.magFilter]||ii,u.minFilter=ok[h.minFilter]||m2,u.wrapS=sk[h.wrapS]||dc,u.wrapT=sk[h.wrapT]||dc,i.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,n){const r=this,i=this.json,o=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const s=i.images[e],a=self.URL||self.webkitURL;let l=s.uri||"",c=!1;if(s.bufferView!==void 0)l=r.getDependency("bufferView",s.bufferView).then(function(d){c=!0;const h=new Blob([d],{type:s.mimeType});return l=a.createObjectURL(h),l});else if(s.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(l).then(function(d){return new Promise(function(h,f){let m=h;n.isImageBitmapLoader===!0&&(m=function(T){const Q=new xr(T);Q.needsUpdate=!0,h(Q)}),n.load(D4.resolveURL(d,o.path),m,void 0,f)})}).then(function(d){return c===!0&&a.revokeObjectURL(l),d.userData.mimeType=s.mimeType||$5r(s.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=u,u}assignTexture(e,n,r,i){const o=this;return this.getDependency("texture",r.index).then(function(s){if(!s)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(s=s.clone(),s.channel=r.texCoord),o.extensions[Wt.KHR_TEXTURE_TRANSFORM]){const a=r.extensions!==void 0?r.extensions[Wt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=o.associations.get(s);s=o.extensions[Wt.KHR_TEXTURE_TRANSFORM].extendTexture(s,a),o.associations.set(s,l)}}return i!==void 0&&(s.colorSpace=i),e[n]=s,s})}assignFinalMaterial(e){const n=e.geometry;let r=e.material;const i=n.attributes.tangent===void 0,o=n.attributes.color!==void 0,s=n.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new nG,fo.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(a,l)),r=l}else if(e.isLine){const a="LineBasicMaterial:"+r.uuid;let l=this.cache.get(a);l||(l=new tG,fo.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(a,l)),r=l}if(i||o||s){let a="ClonedMaterial:"+r.uuid+":";i&&(a+="derivative-tangents:"),o&&(a+="vertex-colors:"),s&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=r.clone(),o&&(l.vertexColors=!0),s&&(l.flatShading=!0),i&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(r))),r=l}e.material=r}getMaterialType(){return aE}loadMaterial(e){const n=this,r=this.json,i=this.extensions,o=r.materials[e];let s;const a={},l=o.extensions||{},c=[];if(l[Wt.KHR_MATERIALS_UNLIT]){const d=i[Wt.KHR_MATERIALS_UNLIT];s=d.getMaterialType(),c.push(d.extendParams(a,o,n))}else{const d=o.pbrMetallicRoughness||{};if(a.color=new Nt(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const h=d.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],Sr),a.opacity=h[3]}d.baseColorTexture!==void 0&&c.push(n.assignTexture(a,"map",d.baseColorTexture,jn)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(c.push(n.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),c.push(n.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),s=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(e,a)})))}o.doubleSided===!0&&(a.side=ko);const u=o.alphaMode||m_.OPAQUE;if(u===m_.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===m_.MASK&&(a.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&s!==Ra&&(c.push(n.assignTexture(a,"normalMap",o.normalTexture)),a.normalScale=new Yt(1,1),o.normalTexture.scale!==void 0)){const d=o.normalTexture.scale;a.normalScale.set(d,d)}if(o.occlusionTexture!==void 0&&s!==Ra&&(c.push(n.assignTexture(a,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&s!==Ra){const d=o.emissiveFactor;a.emissive=new Nt().setRGB(d[0],d[1],d[2],Sr)}return o.emissiveTexture!==void 0&&s!==Ra&&c.push(n.assignTexture(a,"emissiveMap",o.emissiveTexture,jn)),Promise.all(c).then(function(){const d=new s(a);return o.name&&(d.name=o.name),Ca(d,o),n.associations.set(d,{materials:e}),o.extensions&&R1(i,d,o),d})}createUniqueName(e){const n=Qn.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,r=this.extensions,i=this.primitiveCache;function o(a){return r[Wt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,n).then(function(l){return ak(l,a,n)})}const s=[];for(let a=0,l=e.length;a0&&B5r(_,o),_.name=n.createUniqueName(o.name||"mesh_"+e),Ca(_,o),Q.extensions&&R1(i,_,Q),n.assignFinalMaterial(_),d.push(_)}for(let f=0,m=d.length;f1?u=new G1:c.length===1?u=c[0]:u=new $n,u!==c[0])for(let d=0,h=c.length;d{const d=new Map;for(const[h,f]of i.associations)(h instanceof fo||h instanceof xr)&&d.set(h,f);return u.traverse(h=>{const f=i.associations.get(h);f!=null&&d.set(h,f)}),d};return i.associations=c(o),o})}_createAnimationTracks(e,n,r,i,o){const s=[],a=e.name?e.name:e.uuid,l=[];ma[o.path]===ma.weights?e.traverse(function(h){h.morphTargetInfluences&&l.push(h.name?h.name:h.uuid)}):l.push(a);let c;switch(ma[o.path]){case ma.weights:c=mc;break;case ma.rotation:c=Q2;break;case ma.position:case ma.scale:c=gc;break;default:switch(r.itemSize){case 1:c=mc;break;case 2:case 3:default:c=gc;break}break}const u=i.interpolation!==void 0?P5r[i.interpolation]:pc,d=this._getArrayFromAccessor(r);for(let h=0,f=l.length;h{Ze.replace()})},stopVideoStream(){this.isVideoActive=!1,this.imageData=null,Je.emit("stop_webcam_video_stream"),ze(()=>{Ze.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ze.replace(),Je.on("video_stream_image",t=>{if(this.isVideoActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},j5r=["src"],W5r=["src"],Y5r={class:"controls"},K5r={key:2};function Z5r(t,e,n,r,i,o){return k(),H("div",{class:"floating-frame bg-white",style:xn({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[5]||(e[5]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},[g("div",{class:"handle",onMousedown:e[0]||(e[0]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[1]||(e[1]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},"Drag Me",32),i.isVideoActive&&i.imageDataUrl!=null?(k(),H("img",{key:0,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},null,8,j5r)):re("",!0),i.isVideoActive&&i.imageDataUrl==null?(k(),H("p",{key:1,src:i.imageDataUrl,alt:"Webcam Frame",width:"300",height:"300"},"Loading. Please wait...",8,W5r)):re("",!0),g("div",Y5r,[i.isVideoActive?re("",!0):(k(),H("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]=(...s)=>o.startVideoStream&&o.startVideoStream(...s))},e[6]||(e[6]=[g("i",{"data-feather":"video"},null,-1)]))),i.isVideoActive?(k(),H("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]=(...s)=>o.stopVideoStream&&o.stopVideoStream(...s))},e[7]||(e[7]=[g("i",{"data-feather":"video"},null,-1)]))):re("",!0),i.isVideoActive?(k(),H("span",K5r,"FPS: "+le(i.frameRate),1)):re("",!0)])],36)}const X5r=yt(z5r,[["render",Z5r]]),J5r={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(){Je.emit("start_audio_stream",()=>{this.isAudioActive=!0}),ze(()=>{Ze.replace()})},stopAudioStream(){Je.emit("stop_audio_stream",()=>{this.isAudioActive=!1,this.imageDataUrl=null}),ze(()=>{Ze.replace()})},startDrag(t){this.isDragging=!0,this.zIndex=5001,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.stopDrag)},drag(t){if(this.isDragging){const e=t.clientX-this.dragStart.x,n=t.clientY-this.dragStart.y;this.position.bottom-=n,this.position.right-=e,this.dragStart.x=t.clientX,this.dragStart.y=t.clientY}},stopDrag(){this.isDragging=!1,this.zIndex=0,document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.stopDrag)}},mounted(){Ze.replace(),Je.on("update_spectrogram",t=>{if(this.isAudioActive){this.imageDataUrl="data:image/jpeg;base64,"+t,this.frameCount++;const e=Date.now();e-this.lastFrameTime>=1e3&&(this.frameRate=this.frameCount,this.frameCount=0,this.lastFrameTime=e)}})}},eur=["src"],tur={class:"controls"};function nur(t,e,n,r,i,o){return k(),H("div",{class:"floating-frame bg-white",style:xn({bottom:i.position.bottom+"px",right:i.position.right+"px","z-index":i.zIndex}),onMousedown:e[4]||(e[4]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[5]||(e[5]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},[g("div",{class:"handle",onMousedown:e[0]||(e[0]=he((...s)=>o.startDrag&&o.startDrag(...s),["stop"])),onMouseup:e[1]||(e[1]=he((...s)=>o.stopDrag&&o.stopDrag(...s),["stop"]))},"Drag Me",32),i.isAudioActive&&i.imageDataUrl!=null?(k(),H("img",{key:0,src:i.imageDataUrl,alt:"Spectrogram",width:"300",height:"300"},null,8,eur)):re("",!0),g("div",tur,[i.isAudioActive?re("",!0):(k(),H("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]=(...s)=>o.startAudioStream&&o.startAudioStream(...s))},e[6]||(e[6]=[g("i",{"data-feather":"mic"},null,-1)]))),i.isAudioActive?(k(),H("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]=(...s)=>o.stopAudioStream&&o.stopAudioStream(...s))},e[7]||(e[7]=[g("i",{"data-feather":"mic"},null,-1)]))):re("",!0)])],36)}const rur=yt(J5r,[["render",nur]]),iur={data(){return{activePersonality:null}},props:{personality:{type:Object,default:()=>({})}},components:{VideoFrame:X5r,AudioFrame:rur},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(t=>setTimeout(t,100));console.log("Personality:",this.personality),this.initWebGLScene(),this.updatePersonality(),ze(()=>{Ze.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 L6r,this.camera=new Wr(75,window.innerWidth/window.innerHeight,.1,1e3),this.renderer=new JU,this.renderer.setSize(window.innerWidth,window.innerHeight),this.$refs.webglContainer.appendChild(this.renderer.domElement);const t=new Va,e=new XI({color:65280});this.cube=new Yr(t,e),this.scene.add(this.cube);const n=new t5r(4210752),r=new aG(16777215,.5);r.position.set(0,1,0),this.scene.add(n),this.scene.add(r),this.camera.position.z=5,this.animate()},updatePersonality(){const{mountedPersArr:t,config:e}=this.$store.state;this.activePersonality=t[e.active_personality_id],this.activePersonality.avatar?this.showBoxWithAvatar(this.activePersonality.avatar):this.showDefaultCube(),this.$emit("update:personality",this.activePersonality)},loadScene(t){new f5r().load(t,n=>{this.scene.remove(this.cube),this.cube=n.scene,this.scene.add(this.cube)})},showBoxWithAvatar(t){this.cube&&this.scene.remove(this.cube);const e=new Va,n=new sG().load(t),r=new Ra({map:n});this.cube=new Yr(e,r),this.scene.add(this.cube)},showDefaultCube(){this.scene.remove(this.cube);const t=new Va,e=new XI({color:65280});this.cube=new Yr(t,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)}}},our={ref:"webglContainer"},sur={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"},aur={key:0,class:"text-center"},lur={key:1,class:"text-center"},cur={class:"floating-frame2"},uur=["innerHTML"];function dur(t,e,n,r,i,o){const s=pt("VideoFrame"),a=pt("AudioFrame");return k(),H(Ue,null,[g("div",our,null,512),g("div",sur,[!i.activePersonality||!i.activePersonality.scene_path?(k(),H("div",aur," Personality does not have a 3d avatar. ")):re("",!0),!i.activePersonality||!i.activePersonality.avatar||i.activePersonality.avatar===""?(k(),H("div",lur," Personality does not have an avatar. ")):re("",!0),g("div",cur,[g("div",{innerHTML:t.htmlContent},null,8,uur)])]),oe(s,{ref:"video_frame"},null,512),oe(a,{ref:"audio_frame"},null,512)],64)}const fur=yt(iur,[["render",dur]]);let V5;const pur=new Uint8Array(16);function hur(){if(!V5&&(V5=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!V5))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return V5(pur)}const vr=[];for(let t=0;t<256;++t)vr.push((t+256).toString(16).slice(1));function Tur(t,e=0){return vr[t[e+0]]+vr[t[e+1]]+vr[t[e+2]]+vr[t[e+3]]+"-"+vr[t[e+4]]+vr[t[e+5]]+"-"+vr[t[e+6]]+vr[t[e+7]]+"-"+vr[t[e+8]]+vr[t[e+9]]+"-"+vr[t[e+10]]+vr[t[e+11]]+vr[t[e+12]]+vr[t[e+13]]+vr[t[e+14]]+vr[t[e+15]]}const mur=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),lk={randomUUID:mur};function Bs(t,e,n){if(lk.randomUUID&&!e&&!t)return lk.randomUUID();t=t||{};const r=t.random||(t.rng||hur)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Tur(r)}class e2{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,n){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,n),this._listeners.push(n)}unsubscribe(e){if(this.listenerMap.has(e)){const n=this.listenerMap.get(e);this.listenerMap.delete(e);const r=this._listeners.indexOf(n);r>=0&&this._listeners.splice(r,1)}}registerProxy(e,n){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,n),this.proxies.push(n)}unregisterProxy(e){if(!this.proxyMap.has(e))return;const n=this.proxyMap.get(e);this.proxyMap.delete(e);const r=this.proxies.indexOf(n);r>=0&&this.proxies.splice(r,1)}}class En extends e2{constructor(e){super(),this.entity=e}emit(e){this.listeners.forEach(n=>n(e,this.entity))}}class kr extends e2{constructor(e){super(),this.entity=e}emit(e){let n=!1;const r=()=>[n=!0];for(const i of Array.from(this.listeners.values()))if(i(e,r,this.entity),n)return{prevented:!0};return{prevented:!1}}}class uG extends e2{execute(e,n){let r=e;for(const i of this.listeners)r=i(r,n);return r}}class Li extends uG{constructor(e){super(),this.entity=e}execute(e){return super.execute(e,this.entity)}}class uur extends e2{constructor(e){super(),this.entity=e}execute(e){const n=[];for(const r of this.listeners)n.push(r(e,this.entity));return n}}function No(){const t=Symbol(),e=new Map,n=new Set,r=(l,c)=>{c instanceof e2&&c.registerProxy(t,()=>{var u,d;return(d=(u=e.get(l))===null||u===void 0?void 0:u.listeners)!==null&&d!==void 0?d:[]})},i=l=>{const c=new e2;e.set(l,c),n.forEach(u=>r(l,u[l]))},o=l=>{n.add(l);for(const c of e.keys())r(c,l[c])},s=l=>{for(const c of e.keys())l[c]instanceof e2&&l[c].unregisterProxy(t);n.delete(l)},a=()=>{n.forEach(l=>s(l)),e.clear()};return new Proxy({},{get(l,c){return c==="addTarget"?o:c==="removeTarget"?s:c==="destroy"?a:typeof c!="string"||c.startsWith("_")?l[c]:(e.has(c)||i(c),e.get(c))}})}class ck{constructor(e,n){if(this.destructed=!1,this.events={destruct:new En(this)},!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Bs(),this.from=e,this.to=n,this.from.connectionCount++,this.to.connectionCount++}destruct(){this.events.destruct.emit(),this.from.connectionCount--,this.to.connectionCount--,this.destructed=!0}}class dG{constructor(e,n){if(!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Bs(),this.from=e,this.to=n}}function JQ(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[n,e(r)]))}class fG{constructor(){this._title="",this.id=Bs(),this.events={loaded:new En(this),beforeAddInput:new kr(this),addInput:new En(this),beforeRemoveInput:new kr(this),removeInput:new En(this),beforeAddOutput:new kr(this),addOutput:new En(this),beforeRemoveOutput:new kr(this),removeOutput:new En(this),beforeTitleChanged:new kr(this),titleChanged:new En(this),update:new En(this)},this.hooks={beforeLoad:new Li(this),afterSave:new Li(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,n){return this.addInterface("input",e,n)}addOutput(e,n){return this.addInterface("output",e,n)}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(([n,r])=>{this.inputs[n]&&(this.inputs[n].load(r),this.inputs[n].nodeId=this.id)}),Object.entries(e.outputs).forEach(([n,r])=>{this.outputs[n]&&(this.outputs[n].load(r),this.outputs[n].nodeId=this.id)}),this.events.loaded.emit(this)}save(){const e=JQ(this.inputs,i=>i.save()),n=JQ(this.outputs,i=>i.save()),r={type:this.type,id:this.id,title:this.title,inputs:e,outputs:n};return this.hooks.afterSave.execute(r)}onPlaced(){}onDestroy(){}initializeIo(){Object.entries(this.inputs).forEach(([e,n])=>this.initializeIntf("input",e,n)),Object.entries(this.outputs).forEach(([e,n])=>this.initializeIntf("output",e,n))}initializeIntf(e,n,r){r.isInput=e==="input",r.nodeId=this.id,r.events.setValue.subscribe(this,()=>this.events.update.emit({type:e,name:n,intf:r}))}addInterface(e,n,r){const i=e==="input"?this.events.beforeAddInput:this.events.beforeAddOutput,o=e==="input"?this.events.addInput:this.events.addOutput,s=e==="input"?this.inputs:this.outputs;return i.emit(r).prevented?!1:(s[n]=r,this.initializeIntf(e,n,r),o.emit(r),!0)}removeInterface(e,n){const r=e==="input"?this.events.beforeRemoveInput:this.events.beforeRemoveOutput,i=e==="input"?this.events.removeInput:this.events.removeOutput,o=e==="input"?this.inputs[n]:this.outputs[n];if(!o||r.emit(o).prevented)return!1;if(o.connectionCount>0)if(this.graphInstance)this.graphInstance.connections.filter(a=>a.from===o||a.to===o).forEach(a=>{this.graphInstance.removeConnection(a)});else throw new Error("Interface is connected, but no graph instance is specified. Unable to delete interface");return o.events.setValue.unsubscribe(this),e==="input"?delete this.inputs[n]:delete this.outputs[n],i.emit(o),!0}}let pG=class extends fG{load(e){super.load(e)}save(){return super.save()}};function Zc(t){return class extends pG{constructor(){var e,n;super(),this.type=t.type,this.inputs={},this.outputs={},this.calculate=t.calculate?(r,i)=>t.calculate.call(this,r,i):void 0,this._title=(e=t.title)!==null&&e!==void 0?e:t.type,this.executeFactory("input",t.inputs),this.executeFactory("output",t.outputs),(n=t.onCreate)===null||n===void 0||n.call(this)}onPlaced(){var e;(e=t.onPlaced)===null||e===void 0||e.call(this)}onDestroy(){var e;(e=t.onDestroy)===null||e===void 0||e.call(this)}executeFactory(e,n){Object.keys(n||{}).forEach(r=>{const i=n[r]();e==="input"?this.addInput(r,i):this.addOutput(r,i)})}}}class Un{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,n){this.id=Bs(),this.nodeId="",this.port=!0,this.hidden=!1,this.events={setConnectionCount:new En(this),beforeSetValue:new kr(this),setValue:new En(this),updated:new En(this)},this.hooks={load:new Li(this),save:new Li(this)},this._connectionCount=0,this.name=e,this._value=n}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,...n){return e(this,...n),this}}const Qc="__baklava_SubgraphInputNode",vc="__baklava_SubgraphOutputNode";class hG extends pG{constructor(){super(),this.graphInterfaceId=Bs()}onPlaced(){super.onPlaced(),this.initializeIo()}save(){return{...super.save(),graphInterfaceId:this.graphInterfaceId}}load(e){super.load(e),this.graphInterfaceId=e.graphInterfaceId}}class dE extends hG{constructor(){super(...arguments),this.type=Qc,this.inputs={name:new Un("Name","Input")},this.outputs={placeholder:new Un("Value",void 0)}}static isGraphInputNode(e){return e.type===Qc}}class fE extends hG{constructor(){super(...arguments),this.type=vc,this.inputs={name:new Un("Name","Output"),placeholder:new Un("Value",void 0)},this.outputs={output:new Un("Output",void 0).setHidden(!0)},this.calculate=({placeholder:e})=>({output:e})}static isGraphOutputNode(e){return e.type===vc}}class r6{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(n=>n.type===Qc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===vc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Bs(),this.activeTransactions=0,this._nodes=[],this._connections=[],this._loading=!1,this._destroying=!1,this.events={beforeAddNode:new kr(this),addNode:new En(this),beforeRemoveNode:new kr(this),removeNode:new En(this),beforeAddConnection:new kr(this),addConnection:new En(this),checkConnection:new kr(this),beforeRemoveConnection:new kr(this),removeConnection:new En(this)},this.hooks={save:new Li(this),load:new Li(this),checkConnection:new uur(this)},this.nodeEvents=No(),this.nodeHooks=No(),this.connectionEvents=No(),this.editor=e,this.template=n,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(n=>n.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 n=[...Object.values(e.inputs),...Object.values(e.outputs)];this.connections.filter(r=>n.includes(r.from)||n.includes(r.to)).forEach(r=>this.removeConnection(r)),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,n){const r=this.checkConnection(e,n);if(!r.connectionAllowed||this.events.beforeAddConnection.emit({from:e,to:n}).prevented)return;for(const o of r.connectionsInDanger){const s=this.connections.find(a=>a.id===o.id);s&&this.removeConnection(s)}const i=new ck(r.dummyConnection.from,r.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,n){if(!e||!n)return{connectionAllowed:!1};const r=this.findNodeById(e.nodeId),i=this.findNodeById(n.nodeId);if(r&&i&&r===i)return{connectionAllowed:!1};if(e.isInput&&!n.isInput){const a=e;e=n,n=a}if(e.isInput||!n.isInput)return{connectionAllowed:!1};if(this.connections.some(a=>a.from===e&&a.to===n))return{connectionAllowed:!1};if(this.events.checkConnection.emit({from:e,to:n}).prevented)return{connectionAllowed:!1};const o=this.hooks.checkConnection.execute({from:e,to:n});if(o.some(a=>!a.connectionAllowed))return{connectionAllowed:!1};const s=Array.from(new Set(o.flatMap(a=>a.connectionsInDanger)));return{connectionAllowed:!0,dummyConnection:new dG(e,n),connectionsInDanger:s}}findNodeInterface(e){for(const n of this.nodes){for(const r in n.inputs){const i=n.inputs[r];if(i.id===e)return i}for(const r in n.outputs){const i=n.outputs[r];if(i.id===e)return i}}}findNodeById(e){return this.nodes.find(n=>n.id===e)}load(e){try{this._loading=!0;const n=[];for(let r=this.connections.length-1;r>=0;r--)this.removeConnection(this.connections[r]);for(let r=this.nodes.length-1;r>=0;r--)this.removeNode(this.nodes[r]);this.id=e.id;for(const r of e.nodes){const i=this.editor.nodeTypes.get(r.type);if(!i){n.push(`Node type ${r.type} is not registered`);continue}const o=new i.type;this.addNode(o),o.load(r)}for(const r of e.connections){const i=this.findNodeInterface(r.from),o=this.findNodeInterface(r.to);if(i)if(o){const s=new ck(i,o);s.id=r.id,this.internalAddConnection(s)}else{n.push(`Could not find interface with id ${r.to}`);continue}else{n.push(`Could not find interface with id ${r.from}`);continue}}return this.hooks.load.execute(e),n}finally{this._loading=!1}}save(){const e={id:this.id,nodes:this.nodes.map(n=>n.save()),connections:this.connections.map(n=>({id:n.id,from:n.from.id,to:n.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 l0="__baklava_GraphNode-";function yc(t){return l0+t.id}const dur=["component","connectionCount","events","hidden","hooks","id","isInput","name","nodeId","port","templateId","value"];function fur(t){return class extends fG{constructor(){super(...arguments),this.type=yc(t),this.inputs={},this.outputs={},this.template=t,this.calculate=async(n,r)=>{var i;if(!this.subgraph)throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);if(!r.engine||typeof r.engine!="object")throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);const o=r.engine.getInputValues(this.subgraph);for(const l of this.subgraph.inputs)o.set(l.nodeInterfaceId,n[l.id]);const s=await r.engine.runGraph(this.subgraph,o,r.globalValues),a={};for(const l of this.subgraph.outputs)a[l.id]=(i=s.get(l.nodeId))===null||i===void 0?void 0:i.get("output");return a._calculationResults=s,a}}get title(){return this._title}set title(n){this.template.name=n}load(n){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(n.graphState),super.load(n)}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,n=>{this._title=n}),this.initialize()}onDestroy(){var n;this.template.events.updated.unsubscribe(this),this.template.events.nameChanged.unsubscribe(this),(n=this.subgraph)===null||n===void 0||n.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 n of this.subgraph.inputs)n.id in this.inputs?this.inputs[n.id].name=n.name:this.addInput(n.id,this.createProxyInterface(n,!0));for(const n of Object.keys(this.inputs))this.subgraph.inputs.some(r=>r.id===n)||this.removeInput(n);for(const n of this.subgraph.outputs)n.id in this.outputs?this.outputs[n.id].name=n.name:this.addOutput(n.id,this.createProxyInterface(n,!1));for(const n of Object.keys(this.outputs))this.subgraph.outputs.some(r=>r.id===n)||this.removeOutput(n);this.addOutput("_calculationResults",new Un("_calculationResults",void 0).setHidden(!0))}createProxyInterface(n,r){const i=new Un(n.name,void 0);return new Proxy(i,{get:(o,s)=>{var a,l,c;if(dur.includes(s)||s in o||typeof s=="string"&&s.startsWith("__v_"))return Reflect.get(o,s);let u;if(r){const f=(a=this.subgraph)===null||a===void 0?void 0:a.nodes.find(m=>dE.isGraphInputNode(m)&&m.graphInterfaceId===n.id);u=f==null?void 0:f.outputs.placeholder.id}else{const f=(l=this.subgraph)===null||l===void 0?void 0:l.nodes.find(m=>fE.isGraphOutputNode(m)&&m.graphInterfaceId===n.id);u=f==null?void 0:f.inputs.placeholder.id}const d=(c=this.subgraph)===null||c===void 0?void 0:c.connections.find(f=>{var m;return u===((m=r?f.from:f.to)===null||m===void 0?void 0:m.id)}),h=r?d==null?void 0:d.to:d==null?void 0:d.from;if(h)return Reflect.get(h,s)}})}}}class w9{static fromGraph(e,n){return new w9(e.save(),n)}get name(){return this._name}set name(e){this._name=e,this.events.nameChanged.emit(e);const n=this.editor.nodeTypes.get(yc(this));n&&(n.title=e)}get inputs(){return this.nodes.filter(n=>n.type===Qc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===vc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Bs(),this._name="Subgraph",this.events={nameChanged:new En(this),updated:new En(this)},this.hooks={beforeLoad:new Li(this),afterSave:new Li(this)},this.editor=n,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 n=new Map,r=h=>{const f=Bs();return n.set(h,f),f},i=h=>{const f=n.get(h);if(!f)throw new Error(`Unable to create graph from template: Could not map old id ${h} to new id`);return f},o=h=>JQ(h,f=>({id:r(f.id),templateId:f.id,value:f.value})),s=this.nodes.map(h=>({...h,id:r(h.id),inputs:o(h.inputs),outputs:o(h.outputs)})),a=this.connections.map(h=>({id:r(h.id),from:i(h.from),to:i(h.to)})),l=this.inputs.map(h=>({id:h.id,name:h.name,nodeId:i(h.nodeId),nodeInterfaceId:i(h.nodeInterfaceId)})),c=this.outputs.map(h=>({id:h.id,name:h.name,nodeId:i(h.nodeId),nodeInterfaceId:i(h.nodeInterfaceId)})),u={id:Bs(),nodes:s,connections:a,inputs:l,outputs:c};return e||(e=new r6(this.editor)),e.load(u).forEach(h=>console.warn(h)),e.template=this,e}}class pur{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 En(this),beforeRegisterNodeType:new kr(this),registerNodeType:new En(this),beforeUnregisterNodeType:new kr(this),unregisterNodeType:new En(this),beforeAddGraphTemplate:new kr(this),addGraphTemplate:new En(this),beforeRemoveGraphTemplate:new kr(this),removeGraphTemplate:new En(this),registerGraph:new En(this),unregisterGraph:new En(this)},this.hooks={save:new Li(this),load:new Li(this)},this.graphTemplateEvents=No(),this.graphTemplateHooks=No(),this.graphEvents=No(),this.graphHooks=No(),this.nodeEvents=No(),this.nodeHooks=No(),this.connectionEvents=No(),this._graphs=new Set,this._nodeTypes=new Map,this._graph=new r6(this),this._graphTemplates=[],this._loading=!1,this.registerNodeType(dE),this.registerNodeType(fE)}registerNodeType(e,n){var r,i;if(this.events.beforeRegisterNodeType.emit({type:e,options:n}).prevented)return;const o=new e;this._nodeTypes.set(o.type,{type:e,category:(r=n==null?void 0:n.category)!==null&&r!==void 0?r:"default",title:(i=n==null?void 0:n.title)!==null&&i!==void 0?i:o.title}),this.events.registerNodeType.emit({type:e,options:n})}unregisterNodeType(e){const n=typeof e=="string"?e:new e().type;if(this.nodeTypes.has(n)){if(this.events.beforeUnregisterNodeType.emit(n).prevented)return;this._nodeTypes.delete(n),this.events.unregisterNodeType.emit(n)}}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 n=fur(e);this.registerNodeType(n,{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 n=yc(e);for(const r of[this.graph,...this.graphs.values()]){const i=r.nodes.filter(o=>o.type===n);for(const o of i)r.removeNode(o)}this.unregisterNodeType(n),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(r=>{const i=new w9(r,this);this.addGraphTemplate(i)});const n=this._graph.load(e.graph);return this.events.loaded.emit(),n.forEach(r=>console.warn(r)),n}finally{this._loading=!1}}save(){const e={graph:this.graph.save(),graphTemplates:this.graphTemplates.map(n=>n.save())};return this.hooks.save.execute(e)}}function hur(t,e){const n=new Map;e.graphs.forEach(r=>{r.nodes.forEach(i=>n.set(i.id,i))}),t.forEach((r,i)=>{const o=n.get(i);o&&r.forEach((s,a)=>{const l=o.outputs[a];l&&(l.value=s)})})}class TG extends Error{constructor(){super("Cycle detected")}}function Tur(t){return typeof t=="string"}function mG(t,e){const n=new Map,r=new Map,i=new Map;let o,s;if(t instanceof r6)o=t.nodes,s=t.connections;else{if(!e)throw new Error("Invalid argument value: expected array of connections");o=t,s=e}o.forEach(c=>{Object.values(c.inputs).forEach(u=>n.set(u.id,c.id)),Object.values(c.outputs).forEach(u=>n.set(u.id,c.id))}),o.forEach(c=>{const u=s.filter(h=>h.from&&n.get(h.from.id)===c.id),d=new Set(u.map(h=>n.get(h.to.id)).filter(Tur));r.set(c.id,d),i.set(c,u)});const a=o.slice();s.forEach(c=>{const u=a.findIndex(d=>n.get(c.to.id)===d.id);u>=0&&a.splice(u,1)});const l=[];for(;a.length>0;){const c=a.pop();l.push(c);const u=r.get(c.id);for(;u.size>0;){const d=u.values().next().value;if(u.delete(d),Array.from(r.values()).every(h=>!h.has(d))){const h=o.find(f=>f.id===d);a.push(h)}}}if(Array.from(r.values()).some(c=>c.size>0))throw new TG;return{calculationOrder:l,connectionsFromNode:i,interfaceIdToNodeId:n}}function mur(t,e){try{return mG(t,e),!1}catch(n){if(n instanceof TG)return!0;throw n}}var ni;(function(t){t.Running="Running",t.Idle="Idle",t.Paused="Paused",t.Stopped="Stopped"})(ni||(ni={}));class gur{get status(){return this.isRunning?ni.Running:this.internalStatus}constructor(e){this.editor=e,this.events={beforeRun:new kr(this),afterRun:new En(this),statusChange:new En(this),beforeNodeCalculation:new En(this),afterNodeCalculation:new En(this)},this.hooks={gatherCalculationData:new Li(this),transferData:new uG},this.recalculateOrder=!0,this.internalStatus=ni.Stopped,this.isRunning=!1,this.editor.nodeEvents.update.subscribe(this,(n,r)=>{r.graph&&!r.graph.loading&&r.graph.activeTransactions===0&&this.internalOnChange(r,n??void 0)}),this.editor.graphEvents.addNode.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeNode.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.addConnection.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeConnection.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphHooks.checkConnection.subscribe(this,n=>this.checkConnection(n.from,n.to))}start(){this.internalStatus===ni.Stopped&&(this.internalStatus=ni.Idle,this.events.statusChange.emit(this.status))}pause(){this.internalStatus===ni.Idle&&(this.internalStatus=ni.Paused,this.events.statusChange.emit(this.status))}resume(){this.internalStatus===ni.Paused&&(this.internalStatus=ni.Idle,this.events.statusChange.emit(this.status))}stop(){(this.internalStatus===ni.Idle||this.internalStatus===ni.Paused)&&(this.internalStatus=ni.Stopped,this.events.statusChange.emit(this.status))}async runOnce(e,...n){if(this.events.beforeRun.emit(e).prevented)return null;try{this.isRunning=!0,this.events.statusChange.emit(this.status),this.recalculateOrder&&this.calculateOrder();const r=await this.execute(e,...n);return this.events.afterRun.emit(r),r}finally{this.isRunning=!1,this.events.statusChange.emit(this.status)}}checkConnection(e,n){if(e.templateId){const o=this.findInterfaceByTemplateId(this.editor.graph.nodes,e.templateId);if(!o)return{connectionAllowed:!0,connectionsInDanger:[]};e=o}if(n.templateId){const o=this.findInterfaceByTemplateId(this.editor.graph.nodes,n.templateId);if(!o)return{connectionAllowed:!0,connectionsInDanger:[]};n=o}const r=new dG(e,n);let i=this.editor.graph.connections.slice();return n.allowMultipleConnections||(i=i.filter(o=>o.to!==n)),i.push(r),mur(this.editor.graph.nodes,i)?{connectionAllowed:!1,connectionsInDanger:[]}:{connectionAllowed:!0,connectionsInDanger:n.allowMultipleConnections?[]:this.editor.graph.connections.filter(o=>o.to===n)}}calculateOrder(){this.recalculateOrder=!0}async calculateWithoutData(...e){const n=this.hooks.gatherCalculationData.execute(void 0);return await this.runOnce(n,...e)}validateNodeCalculationOutput(e,n){if(typeof n!="object")throw new Error(`Invalid calculation return value from node ${e.id} (type ${e.type})`);Object.keys(e.outputs).forEach(r=>{if(!(r in n))throw new Error(`Calculation return value from node ${e.id} (type ${e.type}) is missing key "${r}"`)})}internalOnChange(e,n){this.internalStatus===ni.Idle&&this.onChange(this.recalculateOrder,e,n)}findInterfaceByTemplateId(e,n){for(const r of e)for(const i of[...Object.values(r.inputs),...Object.values(r.outputs)])if(i.templateId===n)return i;return null}}class _ur extends gur{constructor(e){super(e),this.order=new Map}start(){super.start(),this.recalculateOrder=!0,this.calculateWithoutData()}async runGraph(e,n,r){this.order.has(e.id)||this.order.set(e.id,mG(e));const{calculationOrder:i,connectionsFromNode:o}=this.order.get(e.id),s=new Map;for(const a of i){const l={};Object.entries(a.inputs).forEach(([u,d])=>{l[u]=this.getInterfaceValue(n,d.id)}),this.events.beforeNodeCalculation.emit({inputValues:l,node:a});let c;if(a.calculate)c=await a.calculate(l,{globalValues:r,engine:this});else{c={};for(const[u,d]of Object.entries(a.outputs))c[u]=this.getInterfaceValue(n,d.id)}this.validateNodeCalculationOutput(a,c),this.events.afterNodeCalculation.emit({outputValues:c,node:a}),s.set(a.id,new Map(Object.entries(c))),o.has(a)&&o.get(a).forEach(u=>{var d;const h=(d=Object.entries(a.outputs).find(([,m])=>m.id===u.from.id))===null||d===void 0?void 0:d[0];if(!h)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,n),this.proxies.push(n)}unregisterProxy(e){if(!this.proxyMap.has(e))return;const n=this.proxyMap.get(e);this.proxyMap.delete(e);const r=this.proxies.indexOf(n);r>=0&&this.proxies.splice(r,1)}}class En extends e2{constructor(e){super(),this.entity=e}emit(e){this.listeners.forEach(n=>n(e,this.entity))}}class kr extends e2{constructor(e){super(),this.entity=e}emit(e){let n=!1;const r=()=>[n=!0];for(const i of Array.from(this.listeners.values()))if(i(e,r,this.entity),n)return{prevented:!0};return{prevented:!1}}}class uG extends e2{execute(e,n){let r=e;for(const i of this.listeners)r=i(r,n);return r}}class Li extends uG{constructor(e){super(),this.entity=e}execute(e){return super.execute(e,this.entity)}}class gur extends e2{constructor(e){super(),this.entity=e}execute(e){const n=[];for(const r of this.listeners)n.push(r(e,this.entity));return n}}function No(){const t=Symbol(),e=new Map,n=new Set,r=(l,c)=>{c instanceof e2&&c.registerProxy(t,()=>{var u,d;return(d=(u=e.get(l))===null||u===void 0?void 0:u.listeners)!==null&&d!==void 0?d:[]})},i=l=>{const c=new e2;e.set(l,c),n.forEach(u=>r(l,u[l]))},o=l=>{n.add(l);for(const c of e.keys())r(c,l[c])},s=l=>{for(const c of e.keys())l[c]instanceof e2&&l[c].unregisterProxy(t);n.delete(l)},a=()=>{n.forEach(l=>s(l)),e.clear()};return new Proxy({},{get(l,c){return c==="addTarget"?o:c==="removeTarget"?s:c==="destroy"?a:typeof c!="string"||c.startsWith("_")?l[c]:(e.has(c)||i(c),e.get(c))}})}class ck{constructor(e,n){if(this.destructed=!1,this.events={destruct:new En(this)},!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Bs(),this.from=e,this.to=n,this.from.connectionCount++,this.to.connectionCount++}destruct(){this.events.destruct.emit(),this.from.connectionCount--,this.to.connectionCount--,this.destructed=!0}}class dG{constructor(e,n){if(!e||!n)throw new Error("Cannot initialize connection with null/undefined for 'from' or 'to' values");this.id=Bs(),this.from=e,this.to=n}}function JQ(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[n,e(r)]))}class fG{constructor(){this._title="",this.id=Bs(),this.events={loaded:new En(this),beforeAddInput:new kr(this),addInput:new En(this),beforeRemoveInput:new kr(this),removeInput:new En(this),beforeAddOutput:new kr(this),addOutput:new En(this),beforeRemoveOutput:new kr(this),removeOutput:new En(this),beforeTitleChanged:new kr(this),titleChanged:new En(this),update:new En(this)},this.hooks={beforeLoad:new Li(this),afterSave:new Li(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,n){return this.addInterface("input",e,n)}addOutput(e,n){return this.addInterface("output",e,n)}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(([n,r])=>{this.inputs[n]&&(this.inputs[n].load(r),this.inputs[n].nodeId=this.id)}),Object.entries(e.outputs).forEach(([n,r])=>{this.outputs[n]&&(this.outputs[n].load(r),this.outputs[n].nodeId=this.id)}),this.events.loaded.emit(this)}save(){const e=JQ(this.inputs,i=>i.save()),n=JQ(this.outputs,i=>i.save()),r={type:this.type,id:this.id,title:this.title,inputs:e,outputs:n};return this.hooks.afterSave.execute(r)}onPlaced(){}onDestroy(){}initializeIo(){Object.entries(this.inputs).forEach(([e,n])=>this.initializeIntf("input",e,n)),Object.entries(this.outputs).forEach(([e,n])=>this.initializeIntf("output",e,n))}initializeIntf(e,n,r){r.isInput=e==="input",r.nodeId=this.id,r.events.setValue.subscribe(this,()=>this.events.update.emit({type:e,name:n,intf:r}))}addInterface(e,n,r){const i=e==="input"?this.events.beforeAddInput:this.events.beforeAddOutput,o=e==="input"?this.events.addInput:this.events.addOutput,s=e==="input"?this.inputs:this.outputs;return i.emit(r).prevented?!1:(s[n]=r,this.initializeIntf(e,n,r),o.emit(r),!0)}removeInterface(e,n){const r=e==="input"?this.events.beforeRemoveInput:this.events.beforeRemoveOutput,i=e==="input"?this.events.removeInput:this.events.removeOutput,o=e==="input"?this.inputs[n]:this.outputs[n];if(!o||r.emit(o).prevented)return!1;if(o.connectionCount>0)if(this.graphInstance)this.graphInstance.connections.filter(a=>a.from===o||a.to===o).forEach(a=>{this.graphInstance.removeConnection(a)});else throw new Error("Interface is connected, but no graph instance is specified. Unable to delete interface");return o.events.setValue.unsubscribe(this),e==="input"?delete this.inputs[n]:delete this.outputs[n],i.emit(o),!0}}let pG=class extends fG{load(e){super.load(e)}save(){return super.save()}};function Zc(t){return class extends pG{constructor(){var e,n;super(),this.type=t.type,this.inputs={},this.outputs={},this.calculate=t.calculate?(r,i)=>t.calculate.call(this,r,i):void 0,this._title=(e=t.title)!==null&&e!==void 0?e:t.type,this.executeFactory("input",t.inputs),this.executeFactory("output",t.outputs),(n=t.onCreate)===null||n===void 0||n.call(this)}onPlaced(){var e;(e=t.onPlaced)===null||e===void 0||e.call(this)}onDestroy(){var e;(e=t.onDestroy)===null||e===void 0||e.call(this)}executeFactory(e,n){Object.keys(n||{}).forEach(r=>{const i=n[r]();e==="input"?this.addInput(r,i):this.addOutput(r,i)})}}}class Un{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,n){this.id=Bs(),this.nodeId="",this.port=!0,this.hidden=!1,this.events={setConnectionCount:new En(this),beforeSetValue:new kr(this),setValue:new En(this),updated:new En(this)},this.hooks={load:new Li(this),save:new Li(this)},this._connectionCount=0,this.name=e,this._value=n}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,...n){return e(this,...n),this}}const Qc="__baklava_SubgraphInputNode",vc="__baklava_SubgraphOutputNode";class hG extends pG{constructor(){super(),this.graphInterfaceId=Bs()}onPlaced(){super.onPlaced(),this.initializeIo()}save(){return{...super.save(),graphInterfaceId:this.graphInterfaceId}}load(e){super.load(e),this.graphInterfaceId=e.graphInterfaceId}}class dE extends hG{constructor(){super(...arguments),this.type=Qc,this.inputs={name:new Un("Name","Input")},this.outputs={placeholder:new Un("Value",void 0)}}static isGraphInputNode(e){return e.type===Qc}}class fE extends hG{constructor(){super(...arguments),this.type=vc,this.inputs={name:new Un("Name","Output"),placeholder:new Un("Value",void 0)},this.outputs={output:new Un("Output",void 0).setHidden(!0)},this.calculate=({placeholder:e})=>({output:e})}static isGraphOutputNode(e){return e.type===vc}}class r6{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(n=>n.type===Qc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===vc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Bs(),this.activeTransactions=0,this._nodes=[],this._connections=[],this._loading=!1,this._destroying=!1,this.events={beforeAddNode:new kr(this),addNode:new En(this),beforeRemoveNode:new kr(this),removeNode:new En(this),beforeAddConnection:new kr(this),addConnection:new En(this),checkConnection:new kr(this),beforeRemoveConnection:new kr(this),removeConnection:new En(this)},this.hooks={save:new Li(this),load:new Li(this),checkConnection:new gur(this)},this.nodeEvents=No(),this.nodeHooks=No(),this.connectionEvents=No(),this.editor=e,this.template=n,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(n=>n.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 n=[...Object.values(e.inputs),...Object.values(e.outputs)];this.connections.filter(r=>n.includes(r.from)||n.includes(r.to)).forEach(r=>this.removeConnection(r)),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,n){const r=this.checkConnection(e,n);if(!r.connectionAllowed||this.events.beforeAddConnection.emit({from:e,to:n}).prevented)return;for(const o of r.connectionsInDanger){const s=this.connections.find(a=>a.id===o.id);s&&this.removeConnection(s)}const i=new ck(r.dummyConnection.from,r.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,n){if(!e||!n)return{connectionAllowed:!1};const r=this.findNodeById(e.nodeId),i=this.findNodeById(n.nodeId);if(r&&i&&r===i)return{connectionAllowed:!1};if(e.isInput&&!n.isInput){const a=e;e=n,n=a}if(e.isInput||!n.isInput)return{connectionAllowed:!1};if(this.connections.some(a=>a.from===e&&a.to===n))return{connectionAllowed:!1};if(this.events.checkConnection.emit({from:e,to:n}).prevented)return{connectionAllowed:!1};const o=this.hooks.checkConnection.execute({from:e,to:n});if(o.some(a=>!a.connectionAllowed))return{connectionAllowed:!1};const s=Array.from(new Set(o.flatMap(a=>a.connectionsInDanger)));return{connectionAllowed:!0,dummyConnection:new dG(e,n),connectionsInDanger:s}}findNodeInterface(e){for(const n of this.nodes){for(const r in n.inputs){const i=n.inputs[r];if(i.id===e)return i}for(const r in n.outputs){const i=n.outputs[r];if(i.id===e)return i}}}findNodeById(e){return this.nodes.find(n=>n.id===e)}load(e){try{this._loading=!0;const n=[];for(let r=this.connections.length-1;r>=0;r--)this.removeConnection(this.connections[r]);for(let r=this.nodes.length-1;r>=0;r--)this.removeNode(this.nodes[r]);this.id=e.id;for(const r of e.nodes){const i=this.editor.nodeTypes.get(r.type);if(!i){n.push(`Node type ${r.type} is not registered`);continue}const o=new i.type;this.addNode(o),o.load(r)}for(const r of e.connections){const i=this.findNodeInterface(r.from),o=this.findNodeInterface(r.to);if(i)if(o){const s=new ck(i,o);s.id=r.id,this.internalAddConnection(s)}else{n.push(`Could not find interface with id ${r.to}`);continue}else{n.push(`Could not find interface with id ${r.from}`);continue}}return this.hooks.load.execute(e),n}finally{this._loading=!1}}save(){const e={id:this.id,nodes:this.nodes.map(n=>n.save()),connections:this.connections.map(n=>({id:n.id,from:n.from.id,to:n.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 l0="__baklava_GraphNode-";function yc(t){return l0+t.id}const _ur=["component","connectionCount","events","hidden","hooks","id","isInput","name","nodeId","port","templateId","value"];function Qur(t){return class extends fG{constructor(){super(...arguments),this.type=yc(t),this.inputs={},this.outputs={},this.template=t,this.calculate=async(n,r)=>{var i;if(!this.subgraph)throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);if(!r.engine||typeof r.engine!="object")throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);const o=r.engine.getInputValues(this.subgraph);for(const l of this.subgraph.inputs)o.set(l.nodeInterfaceId,n[l.id]);const s=await r.engine.runGraph(this.subgraph,o,r.globalValues),a={};for(const l of this.subgraph.outputs)a[l.id]=(i=s.get(l.nodeId))===null||i===void 0?void 0:i.get("output");return a._calculationResults=s,a}}get title(){return this._title}set title(n){this.template.name=n}load(n){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(n.graphState),super.load(n)}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,n=>{this._title=n}),this.initialize()}onDestroy(){var n;this.template.events.updated.unsubscribe(this),this.template.events.nameChanged.unsubscribe(this),(n=this.subgraph)===null||n===void 0||n.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 n of this.subgraph.inputs)n.id in this.inputs?this.inputs[n.id].name=n.name:this.addInput(n.id,this.createProxyInterface(n,!0));for(const n of Object.keys(this.inputs))this.subgraph.inputs.some(r=>r.id===n)||this.removeInput(n);for(const n of this.subgraph.outputs)n.id in this.outputs?this.outputs[n.id].name=n.name:this.addOutput(n.id,this.createProxyInterface(n,!1));for(const n of Object.keys(this.outputs))this.subgraph.outputs.some(r=>r.id===n)||this.removeOutput(n);this.addOutput("_calculationResults",new Un("_calculationResults",void 0).setHidden(!0))}createProxyInterface(n,r){const i=new Un(n.name,void 0);return new Proxy(i,{get:(o,s)=>{var a,l,c;if(_ur.includes(s)||s in o||typeof s=="string"&&s.startsWith("__v_"))return Reflect.get(o,s);let u;if(r){const f=(a=this.subgraph)===null||a===void 0?void 0:a.nodes.find(m=>dE.isGraphInputNode(m)&&m.graphInterfaceId===n.id);u=f==null?void 0:f.outputs.placeholder.id}else{const f=(l=this.subgraph)===null||l===void 0?void 0:l.nodes.find(m=>fE.isGraphOutputNode(m)&&m.graphInterfaceId===n.id);u=f==null?void 0:f.inputs.placeholder.id}const d=(c=this.subgraph)===null||c===void 0?void 0:c.connections.find(f=>{var m;return u===((m=r?f.from:f.to)===null||m===void 0?void 0:m.id)}),h=r?d==null?void 0:d.to:d==null?void 0:d.from;if(h)return Reflect.get(h,s)}})}}}class w9{static fromGraph(e,n){return new w9(e.save(),n)}get name(){return this._name}set name(e){this._name=e,this.events.nameChanged.emit(e);const n=this.editor.nodeTypes.get(yc(this));n&&(n.title=e)}get inputs(){return this.nodes.filter(n=>n.type===Qc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.placeholder.id}))}get outputs(){return this.nodes.filter(n=>n.type===vc).map(n=>({id:n.graphInterfaceId,name:n.inputs.name.value,nodeId:n.id,nodeInterfaceId:n.outputs.output.id}))}constructor(e,n){this.id=Bs(),this._name="Subgraph",this.events={nameChanged:new En(this),updated:new En(this)},this.hooks={beforeLoad:new Li(this),afterSave:new Li(this)},this.editor=n,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 n=new Map,r=h=>{const f=Bs();return n.set(h,f),f},i=h=>{const f=n.get(h);if(!f)throw new Error(`Unable to create graph from template: Could not map old id ${h} to new id`);return f},o=h=>JQ(h,f=>({id:r(f.id),templateId:f.id,value:f.value})),s=this.nodes.map(h=>({...h,id:r(h.id),inputs:o(h.inputs),outputs:o(h.outputs)})),a=this.connections.map(h=>({id:r(h.id),from:i(h.from),to:i(h.to)})),l=this.inputs.map(h=>({id:h.id,name:h.name,nodeId:i(h.nodeId),nodeInterfaceId:i(h.nodeInterfaceId)})),c=this.outputs.map(h=>({id:h.id,name:h.name,nodeId:i(h.nodeId),nodeInterfaceId:i(h.nodeInterfaceId)})),u={id:Bs(),nodes:s,connections:a,inputs:l,outputs:c};return e||(e=new r6(this.editor)),e.load(u).forEach(h=>console.warn(h)),e.template=this,e}}class vur{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 En(this),beforeRegisterNodeType:new kr(this),registerNodeType:new En(this),beforeUnregisterNodeType:new kr(this),unregisterNodeType:new En(this),beforeAddGraphTemplate:new kr(this),addGraphTemplate:new En(this),beforeRemoveGraphTemplate:new kr(this),removeGraphTemplate:new En(this),registerGraph:new En(this),unregisterGraph:new En(this)},this.hooks={save:new Li(this),load:new Li(this)},this.graphTemplateEvents=No(),this.graphTemplateHooks=No(),this.graphEvents=No(),this.graphHooks=No(),this.nodeEvents=No(),this.nodeHooks=No(),this.connectionEvents=No(),this._graphs=new Set,this._nodeTypes=new Map,this._graph=new r6(this),this._graphTemplates=[],this._loading=!1,this.registerNodeType(dE),this.registerNodeType(fE)}registerNodeType(e,n){var r,i;if(this.events.beforeRegisterNodeType.emit({type:e,options:n}).prevented)return;const o=new e;this._nodeTypes.set(o.type,{type:e,category:(r=n==null?void 0:n.category)!==null&&r!==void 0?r:"default",title:(i=n==null?void 0:n.title)!==null&&i!==void 0?i:o.title}),this.events.registerNodeType.emit({type:e,options:n})}unregisterNodeType(e){const n=typeof e=="string"?e:new e().type;if(this.nodeTypes.has(n)){if(this.events.beforeUnregisterNodeType.emit(n).prevented)return;this._nodeTypes.delete(n),this.events.unregisterNodeType.emit(n)}}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 n=Qur(e);this.registerNodeType(n,{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 n=yc(e);for(const r of[this.graph,...this.graphs.values()]){const i=r.nodes.filter(o=>o.type===n);for(const o of i)r.removeNode(o)}this.unregisterNodeType(n),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(r=>{const i=new w9(r,this);this.addGraphTemplate(i)});const n=this._graph.load(e.graph);return this.events.loaded.emit(),n.forEach(r=>console.warn(r)),n}finally{this._loading=!1}}save(){const e={graph:this.graph.save(),graphTemplates:this.graphTemplates.map(n=>n.save())};return this.hooks.save.execute(e)}}function yur(t,e){const n=new Map;e.graphs.forEach(r=>{r.nodes.forEach(i=>n.set(i.id,i))}),t.forEach((r,i)=>{const o=n.get(i);o&&r.forEach((s,a)=>{const l=o.outputs[a];l&&(l.value=s)})})}class TG extends Error{constructor(){super("Cycle detected")}}function bur(t){return typeof t=="string"}function mG(t,e){const n=new Map,r=new Map,i=new Map;let o,s;if(t instanceof r6)o=t.nodes,s=t.connections;else{if(!e)throw new Error("Invalid argument value: expected array of connections");o=t,s=e}o.forEach(c=>{Object.values(c.inputs).forEach(u=>n.set(u.id,c.id)),Object.values(c.outputs).forEach(u=>n.set(u.id,c.id))}),o.forEach(c=>{const u=s.filter(h=>h.from&&n.get(h.from.id)===c.id),d=new Set(u.map(h=>n.get(h.to.id)).filter(bur));r.set(c.id,d),i.set(c,u)});const a=o.slice();s.forEach(c=>{const u=a.findIndex(d=>n.get(c.to.id)===d.id);u>=0&&a.splice(u,1)});const l=[];for(;a.length>0;){const c=a.pop();l.push(c);const u=r.get(c.id);for(;u.size>0;){const d=u.values().next().value;if(u.delete(d),Array.from(r.values()).every(h=>!h.has(d))){const h=o.find(f=>f.id===d);a.push(h)}}}if(Array.from(r.values()).some(c=>c.size>0))throw new TG;return{calculationOrder:l,connectionsFromNode:i,interfaceIdToNodeId:n}}function Eur(t,e){try{return mG(t,e),!1}catch(n){if(n instanceof TG)return!0;throw n}}var ni;(function(t){t.Running="Running",t.Idle="Idle",t.Paused="Paused",t.Stopped="Stopped"})(ni||(ni={}));class xur{get status(){return this.isRunning?ni.Running:this.internalStatus}constructor(e){this.editor=e,this.events={beforeRun:new kr(this),afterRun:new En(this),statusChange:new En(this),beforeNodeCalculation:new En(this),afterNodeCalculation:new En(this)},this.hooks={gatherCalculationData:new Li(this),transferData:new uG},this.recalculateOrder=!0,this.internalStatus=ni.Stopped,this.isRunning=!1,this.editor.nodeEvents.update.subscribe(this,(n,r)=>{r.graph&&!r.graph.loading&&r.graph.activeTransactions===0&&this.internalOnChange(r,n??void 0)}),this.editor.graphEvents.addNode.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeNode.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.addConnection.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphEvents.removeConnection.subscribe(this,(n,r)=>{this.recalculateOrder=!0,!r.loading&&r.activeTransactions===0&&this.internalOnChange()}),this.editor.graphHooks.checkConnection.subscribe(this,n=>this.checkConnection(n.from,n.to))}start(){this.internalStatus===ni.Stopped&&(this.internalStatus=ni.Idle,this.events.statusChange.emit(this.status))}pause(){this.internalStatus===ni.Idle&&(this.internalStatus=ni.Paused,this.events.statusChange.emit(this.status))}resume(){this.internalStatus===ni.Paused&&(this.internalStatus=ni.Idle,this.events.statusChange.emit(this.status))}stop(){(this.internalStatus===ni.Idle||this.internalStatus===ni.Paused)&&(this.internalStatus=ni.Stopped,this.events.statusChange.emit(this.status))}async runOnce(e,...n){if(this.events.beforeRun.emit(e).prevented)return null;try{this.isRunning=!0,this.events.statusChange.emit(this.status),this.recalculateOrder&&this.calculateOrder();const r=await this.execute(e,...n);return this.events.afterRun.emit(r),r}finally{this.isRunning=!1,this.events.statusChange.emit(this.status)}}checkConnection(e,n){if(e.templateId){const o=this.findInterfaceByTemplateId(this.editor.graph.nodes,e.templateId);if(!o)return{connectionAllowed:!0,connectionsInDanger:[]};e=o}if(n.templateId){const o=this.findInterfaceByTemplateId(this.editor.graph.nodes,n.templateId);if(!o)return{connectionAllowed:!0,connectionsInDanger:[]};n=o}const r=new dG(e,n);let i=this.editor.graph.connections.slice();return n.allowMultipleConnections||(i=i.filter(o=>o.to!==n)),i.push(r),Eur(this.editor.graph.nodes,i)?{connectionAllowed:!1,connectionsInDanger:[]}:{connectionAllowed:!0,connectionsInDanger:n.allowMultipleConnections?[]:this.editor.graph.connections.filter(o=>o.to===n)}}calculateOrder(){this.recalculateOrder=!0}async calculateWithoutData(...e){const n=this.hooks.gatherCalculationData.execute(void 0);return await this.runOnce(n,...e)}validateNodeCalculationOutput(e,n){if(typeof n!="object")throw new Error(`Invalid calculation return value from node ${e.id} (type ${e.type})`);Object.keys(e.outputs).forEach(r=>{if(!(r in n))throw new Error(`Calculation return value from node ${e.id} (type ${e.type}) is missing key "${r}"`)})}internalOnChange(e,n){this.internalStatus===ni.Idle&&this.onChange(this.recalculateOrder,e,n)}findInterfaceByTemplateId(e,n){for(const r of e)for(const i of[...Object.values(r.inputs),...Object.values(r.outputs)])if(i.templateId===n)return i;return null}}class Sur extends xur{constructor(e){super(e),this.order=new Map}start(){super.start(),this.recalculateOrder=!0,this.calculateWithoutData()}async runGraph(e,n,r){this.order.has(e.id)||this.order.set(e.id,mG(e));const{calculationOrder:i,connectionsFromNode:o}=this.order.get(e.id),s=new Map;for(const a of i){const l={};Object.entries(a.inputs).forEach(([u,d])=>{l[u]=this.getInterfaceValue(n,d.id)}),this.events.beforeNodeCalculation.emit({inputValues:l,node:a});let c;if(a.calculate)c=await a.calculate(l,{globalValues:r,engine:this});else{c={};for(const[u,d]of Object.entries(a.outputs))c[u]=this.getInterfaceValue(n,d.id)}this.validateNodeCalculationOutput(a,c),this.events.afterNodeCalculation.emit({outputValues:c,node:a}),s.set(a.id,new Map(Object.entries(c))),o.has(a)&&o.get(a).forEach(u=>{var d;const h=(d=Object.entries(a.outputs).find(([,m])=>m.id===u.from.id))===null||d===void 0?void 0:d[0];if(!h)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 f=this.hooks.transferData.execute(c[h],u);u.to.allowMultipleConnections?n.has(u.to.id)?n.get(u.to.id).push(f):n.set(u.to.id,[f]):n.set(u.to.id,f)})}return s}async execute(e){this.recalculateOrder&&(this.order.clear(),this.recalculateOrder=!1);const n=this.getInputValues(this.editor.graph);return await this.runGraph(this.editor.graph,n,e)}getInputValues(e){const n=new Map;for(const r of e.nodes)Object.values(r.inputs).forEach(i=>{i.connectionCount===0&&n.set(i.id,i.value)}),r.calculate||Object.values(r.outputs).forEach(i=>{n.set(i.id,i.value)});return n}onChange(e){this.recalculateOrder=e||this.recalculateOrder,this.calculateWithoutData()}getInterfaceValue(e,n){if(!e.has(n))throw new Error(`Could not find value for interface ${n} -This is likely a Baklava internal issue. Please report it on GitHub.`);return e.get(n)}}const Qur=["INPUT","TEXTAREA","SELECT"];function gG(t){return Qur.includes(t.tagName)}let ev=null;function vur(t){ev=t}function Ci(){if(!ev)throw new Error("providePlugin() must be called before usePlugin()");return{viewModel:ev}}function Ji(){const{viewModel:t}=Ci();return{graph:au(t.value,"displayedGraph"),switchGraph:t.value.switchGraph}}function _G(t){const{graph:e}=Ji(),n=Ct(null),r=Ct(null);return{dragging:_t(()=>!!n.value),onPointerDown:l=>{n.value={x:l.pageX,y:l.pageY},r.value={x:t.value.x,y:t.value.y}},onPointerMove:l=>{if(n.value){const c=l.pageX-n.value.x,u=l.pageY-n.value.y;t.value.x=r.value.x+c/e.value.scaling,t.value.y=r.value.y+u/e.value.scaling}},onPointerUp:()=>{n.value=null,r.value=null}}}function QG(t,e,n){if(!e.template)return!1;if(yc(e.template)===n)return!0;const r=t.graphTemplates.find(o=>yc(o)===n);return r?r.nodes.filter(o=>o.type.startsWith(l0)).some(o=>QG(t,e,o.type)):!1}function vG(t){return _t(()=>{const e=Array.from(t.value.editor.nodeTypes.entries()),n=new Set(e.map(([,i])=>i.category)),r=[];for(const i of n.values()){let o=e.filter(([,s])=>s.category===i);t.value.displayedGraph.template?o=o.filter(([s])=>!QG(t.value.editor,t.value.displayedGraph,s)):o=o.filter(([s])=>![Qc,vc].includes(s)),o.length>0&&r.push({name:i,nodeTypes:Object.fromEntries(o)})}return r.sort((i,o)=>i.name==="default"?-1:o.name==="default"||i.name>o.name?1:-1),r})}function yG(){const{graph:t}=Ji();return{transform:(n,r)=>{const i=n/t.value.scaling-t.value.panning.x,o=r/t.value.scaling-t.value.panning.y;return[i,o]}}}function yur(){const{graph:t}=Ji();let e=[],n=-1,r={x:0,y:0};const i=_t(()=>t.value.panning),o=_G(i),s=_t(()=>({"transform-origin":"0 0",transform:`scale(${t.value.scaling}) translate(${t.value.panning.x}px, ${t.value.panning.y}px)`})),a=(f,m,T)=>{const Q=[f/t.value.scaling-t.value.panning.x,m/t.value.scaling-t.value.panning.y],_=[f/T-t.value.panning.x,m/T-t.value.panning.y],v=[_[0]-Q[0],_[1]-Q[1]];t.value.panning.x+=v[0],t.value.panning.y+=v[1],t.value.scaling=T},l=f=>{f.preventDefault();let m=f.deltaY;f.deltaMode===1&&(m*=32);const T=t.value.scaling*(1-m/3e3);a(f.offsetX,f.offsetY,T)},c=()=>({ax:e[0].clientX,ay:e[0].clientY,bx:e[1].clientX,by:e[1].clientY});return{styles:s,...o,onPointerDown:f=>{if(e.push(f),o.onPointerDown(f),e.length===2){const{ax:m,ay:T,bx:Q,by:_}=c();r={x:m+(Q-m)/2,y:T+(_-T)/2}}},onPointerMove:f=>{for(let m=0;m0){const E=t.value.scaling*(1+(b-n)/500);a(r.x,r.y,E)}n=b}else o.onPointerMove(f)},onPointerUp:f=>{e=e.filter(m=>m.pointerId!==f.pointerId),n=-1,o.onPointerUp()},onMouseWheel:l}}var Bi=(t=>(t[t.NONE=0]="NONE",t[t.ALLOWED=1]="ALLOWED",t[t.FORBIDDEN=2]="FORBIDDEN",t))(Bi||{});const bG=Symbol();function bur(){const{graph:t}=Ji(),e=Ct(null),n=Ct(null),r=a=>{e.value&&(e.value.mx=a.offsetX/t.value.scaling-t.value.panning.x,e.value.my=a.offsetY/t.value.scaling-t.value.panning.y)},i=()=>{if(n.value){if(e.value)return;const a=t.value.connections.find(l=>l.to===n.value);n.value.isInput&&a?(e.value={status:Bi.NONE,from:a.from},t.value.removeConnection(a)):e.value={status:Bi.NONE,from:n.value},e.value.mx=void 0,e.value.my=void 0}},o=()=>{if(e.value&&n.value){if(e.value.from===n.value)return;t.value.addConnection(e.value.from,e.value.to)}e.value=null},s=a=>{if(n.value=a??null,a&&e.value){e.value.to=a;const l=t.value.checkConnection(e.value.from,e.value.to);if(e.value.status=l.connectionAllowed?Bi.ALLOWED:Bi.FORBIDDEN,l.connectionAllowed){const c=l.connectionsInDanger.map(u=>u.id);t.value.connections.forEach(u=>{c.includes(u.id)&&(u.isInDanger=!0)})}}else!a&&e.value&&(e.value.to=void 0,e.value.status=Bi.NONE,t.value.connections.forEach(l=>{l.isInDanger=!1}))};return Nl(bG,{temporaryConnection:e,hoveredOver:s}),{temporaryConnection:e,onMouseMove:r,onMouseDown:i,onMouseUp:o,hoveredOver:s}}function Eur(t){const e=Ct(!1),n=Ct(0),r=Ct(0),i=vG(t),{transform:o}=yG(),s=_t(()=>{let u=[];const d={};for(const f of i.value){const m=Object.entries(f.nodeTypes).map(([T,Q])=>({label:Q.title,value:"addNode:"+T}));f.name==="default"?u=m:d[f.name]=m}const h=[...Object.entries(d).map(([f,m])=>({label:f,submenu:m}))];return h.length>0&&u.length>0&&h.push({isDivider:!0}),h.push(...u),h}),a=_t(()=>t.value.settings.contextMenu.additionalItems.length===0?s.value:[{label:"Add node",submenu:s.value},...t.value.settings.contextMenu.additionalItems.map(u=>"isDivider"in u||"submenu"in u?u:{label:u.label,value:"command:"+u.command,disabled:!t.value.commandHandler.canExecuteCommand(u.command)})]);function l(u){const d=u.target;if(!(d instanceof Element)||gG(d))return;u.preventDefault(),e.value=!0;const h=d.getBoundingClientRect(),m=d.closest(".baklava-editor").getBoundingClientRect();n.value=h.x+u.offsetX-m.x,r.value=h.y+u.offsetY-m.y}function c(u){if(u.startsWith("addNode:")){const d=u.substring(8),h=t.value.editor.nodeTypes.get(d);if(!h)return;const f=Zr(new h.type);t.value.displayedGraph.addNode(f);const[m,T]=o(n.value,r.value);f.position.x=m,f.position.y=T}else if(u.startsWith("command:")){const d=u.substring(8);t.value.commandHandler.canExecuteCommand(d)&&t.value.commandHandler.executeCommand(d)}}return{show:e,x:n,y:r,items:a,open:l,onClick:c}}const ru="START_SELECTION_BOX";function xur(t){const{viewModel:e}=Ci(),{graph:n}=Ji(),r=_t(()=>n.value.nodes),i=Ct(!1),o=Ct(!1),s=Ct([0,0]),a=Ct([0,0]);Er(e,()=>{e.value.commandHandler.hasCommand(ru)||(e.value.commandHandler.registerCommand(ru,{canExecute:()=>!0,execute(){i.value=!0}}),e.value.commandHandler.registerHotkey(["b"],ru))},{immediate:!0});function l(_){return[_.clientX-t.value.getBoundingClientRect().left,_.clientY-t.value.getBoundingClientRect().top]}function c(_){return i.value?(o.value=!0,i.value=!1,s.value=l(_),a.value=l(_),document.addEventListener("pointermove",u),document.addEventListener("pointerup",d),!0):!1}function u(_){s.value=l(_)}function d(_){document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",d),s.value=l(_),o.value=!1;const v=h();for(const y of v)e.value.displayedGraph.selectedNodes.push(y)}function h(){const _=f(),y=document.querySelector(".baklava-editor").getBoundingClientRect();return r.value.filter(b=>{const E=m(b,y);return T(_,E)})}function f(){return{left:Math.min(s.value[0],a.value[0]),top:Math.min(s.value[1],a.value[1]),right:Math.max(s.value[0],a.value[0]),bottom:Math.max(s.value[1],a.value[1])}}function m(_,v){const y=document.getElementById(_.id),b=y?y.getBoundingClientRect():{x:0,y:0,width:0,height:0},E=b.x-v.left,x=b.y-v.top;return{left:E,top:x,right:E+b.width,bottom:x+b.height}}function T(_,v){return _.leftv.left&&_.topv.top}function Q(){return{width:Math.abs(a.value[0]-s.value[0])+"px",height:Math.abs(a.value[1]-s.value[1])+"px",left:(a.value[0]>s.value[0]?s.value[0]:a.value[0])+"px",top:(a.value[1]>s.value[1]?s.value[1]:a.value[1])+"px"}}return Zr({startSelection:i,isSelecting:o,start:s,end:a,onPointerDown:c,getStyles:Q})}const Sur=ir({setup(){const{viewModel:t}=Ci(),{graph:e}=Ji();return{styles:_t(()=>{const r=t.value.settings.background,i=e.value.panning.x*e.value.scaling,o=e.value.panning.y*e.value.scaling,s=e.value.scaling*r.gridSize,a=s/r.gridDivision,l=`${s}px ${s}px, ${s}px ${s}px`,c=e.value.scaling>r.subGridVisibleThreshold?`, ${a}px ${a}px, ${a}px ${a}px`:"";return{backgroundPosition:`left ${i}px top ${o}px`,backgroundSize:`${l} ${c}`}})}}}),Wn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};function Lur(t,e,n,r,i,o){return k(),H("div",{class:"background",style:xn(t.styles)},null,4)}const Cur=Wn(Sur,[["render",Lur]]);function Aur(t){return wk()?(gq(t),!0):!1}function pE(t){return typeof t=="function"?t():Bt(t)}const EG=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const wur=Object.prototype.toString,Mur=t=>wur.call(t)==="[object Object]",iu=()=>{},Our=Rur();function Rur(){var t,e;return EG&&((t=window==null?void 0:window.navigator)==null?void 0:t.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 Nur(t,e,n=!1){return e.reduce((r,i)=>(i in t&&(!n||t[i]!==void 0)&&(r[i]=t[i]),r),{})}function Dur(t,e={}){if(!lr(t))return zq(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const r in t.value)n[r]=qq(()=>({get(){return t.value[r]},set(i){var o;if((o=pE(e.replaceRef))!=null?o:!0)if(Array.isArray(t.value)){const a=[...t.value];a[r]=i,t.value=a}else{const a={...t.value,[r]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(t.value)),t.value=a}else t.value[r]=i}}));return n}function g4(t){var e;const n=pE(t);return(e=n==null?void 0:n.$el)!=null?e:n}const hE=EG?window:void 0;function I4(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=hE):[e,n,r,i]=t,!e)return iu;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(u=>u()),o.length=0},a=(u,d,h,f)=>(u.addEventListener(d,h,f),()=>u.removeEventListener(d,h,f)),l=Er(()=>[g4(e),pE(i)],([u,d])=>{if(s(),!u)return;const h=Mur(d)?{...d}:d;o.push(...n.flatMap(f=>r.map(m=>a(u,f,m,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),s()};return Aur(c),c}let uk=!1;function xG(t,e,n={}){const{window:r=hE,ignore:i=[],capture:o=!0,detectIframe:s=!1}=n;if(!r)return iu;Our&&!uk&&(uk=!0,Array.from(r.document.body.children).forEach(h=>h.addEventListener("click",iu)),r.document.documentElement.addEventListener("click",iu));let a=!0;const l=h=>i.some(f=>{if(typeof f=="string")return Array.from(r.document.querySelectorAll(f)).some(m=>m===h.target||h.composedPath().includes(m));{const m=g4(f);return m&&(h.target===m||h.composedPath().includes(m))}}),u=[I4(r,"click",h=>{const f=g4(t);if(!(!f||f===h.target||h.composedPath().includes(f))){if(h.detail===0&&(a=!l(h)),!a){a=!0;return}e(h)}},{passive:!0,capture:o}),I4(r,"pointerdown",h=>{const f=g4(t);a=!l(h)&&!!(f&&!h.composedPath().includes(f))},{passive:!0}),s&&I4(r,"blur",h=>{setTimeout(()=>{var f;const m=g4(t);((f=r.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!(m!=null&&m.contains(r.document.activeElement))&&e(h)},0)})].filter(Boolean);return()=>u.forEach(h=>h())}const SG={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},Iur=Object.keys(SG);function kur(t={}){const{target:e=hE}=t,n=Ct(!1),r=Ct(t.initialValue||{});Object.assign(r.value,SG,r.value);const i=o=>{n.value=!0,!(t.pointerTypes&&!t.pointerTypes.includes(o.pointerType))&&(r.value=Nur(o,Iur,!1))};if(e){const o={passive:!0};I4(e,["pointerdown","pointermove","pointerup"],i,o),I4(e,"pointerleave",()=>n.value=!1,o)}return{...Dur(r),isInside:n}}const Pur=["onMouseenter","onMouseleave","onClick"],Hur={class:"flex-fill"},Vur={key:0,class:"__submenu-icon",style:{"line-height":"1em"}},Bur=g("svg",{width:"13",height:"13",viewBox:"-60 120 250 250"},[g("path",{d:"M160.875 279.5625 L70.875 369.5625 L70.875 189.5625 L160.875 279.5625 Z",stroke:"none",fill:"white"})],-1),Fur=[Bur],TE=ir({__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(t,{emit:e}){const n=t,r=e;let i=null;const o=Ct(null),s=Ct(-1),a=Ct(0),l=Ct({x:!1,y:!1}),c=_t(()=>n.flippable&&(l.value.x||n.isFlipped.x)),u=_t(()=>n.flippable&&(l.value.y||n.isFlipped.y)),d=_t(()=>{const v={};return n.isNested||(v.top=(u.value?n.y-a.value:n.y)+"px",v.left=n.x+"px"),v}),h=_t(()=>({"--flipped-x":c.value,"--flipped-y":u.value,"--nested":n.isNested})),f=_t(()=>n.items.map(v=>({...v,hover:!1})));Er([()=>n.y,()=>n.items],()=>{var v,y,b,E;a.value=n.items.length*30;const x=((y=(v=o.value)==null?void 0:v.parentElement)==null?void 0:y.offsetWidth)??0,L=((E=(b=o.value)==null?void 0:b.parentElement)==null?void 0:E.offsetHeight)??0;l.value.x=!n.isNested&&n.x>x*.75,l.value.y=!n.isNested&&n.y+a.value>L-20}),xG(o,()=>{n.modelValue&&r("update:modelValue",!1)});const m=v=>{!v.submenu&&v.value&&(r("click",v.value),r("update:modelValue",!1))},T=v=>{r("click",v),s.value=-1,n.isNested||r("update:modelValue",!1)},Q=(v,y)=>{n.items[y].submenu&&(s.value=y,i!==null&&(clearTimeout(i),i=null))},_=(v,y)=>{n.items[y].submenu&&(i=window.setTimeout(()=>{s.value=-1,i=null},200))};return(v,y)=>{const b=pt("ContextMenu",!0);return k(),wt(qi,{name:"slide-fade"},{default:He(()=>[J(g("div",{ref_key:"el",ref:o,class:je(["baklava-context-menu",h.value]),style:xn(d.value)},[(k(!0),H(Ue,null,ot(f.value,(E,x)=>(k(),H(Ue,null,[E.isDivider?(k(),H("div",{key:`d-${x}`,class:"divider"})):(k(),H("div",{key:`i-${x}`,class:je(["item",{submenu:!!E.submenu,"--disabled":!!E.disabled}]),onMouseenter:L=>Q(L,x),onMouseleave:L=>_(L,x),onClick:he(L=>m(E),["stop","prevent"])},[g("div",Hur,le(E.label),1),E.submenu?(k(),H("div",Vur,Fur)):re("",!0),E.submenu?(k(),wt(b,{key:1,"model-value":s.value===x,items:E.submenu,"is-nested":!0,"is-flipped":{x:c.value,y:u.value},flippable:v.flippable,onClick:T},null,8,["model-value","items","is-flipped","flippable"])):re("",!0)],42,Pur))],64))),256))],6),[[Pt,v.modelValue]])]),_:1})}}}),$ur={},Uur={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"},Gur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),qur=g("circle",{cx:"12",cy:"12",r:"1"},null,-1),zur=g("circle",{cx:"12",cy:"19",r:"1"},null,-1),jur=g("circle",{cx:"12",cy:"5",r:"1"},null,-1),Wur=[Gur,qur,zur,jur];function Yur(t,e){return k(),H("svg",Uur,Wur)}const LG=Wn($ur,[["render",Yur]]),Kur=["id"],Zur={key:0,class:"__tooltip"},Xur={key:2,class:"align-middle"},dk=ir({__name:"NodeInterface",props:{node:{},intf:{}},setup(t){const e=(Q,_=100)=>{const v=typeof(Q==null?void 0:Q.toString)=="function"?String(Q):"";return v.length>_?v.slice(0,_)+"...":v},n=t,{viewModel:r}=Ci(),{hoveredOver:i,temporaryConnection:o}=Gi(bG),s=Ct(null),a=_t(()=>n.intf.connectionCount>0),l=Ct(!1),c=_t(()=>r.value.settings.displayValueOnHover&&l.value),u=_t(()=>({"--input":n.intf.isInput,"--output":!n.intf.isInput,"--connected":a.value})),d=_t(()=>n.intf.component&&(!n.intf.isInput||!n.intf.port||n.intf.connectionCount===0)),h=()=>{l.value=!0,i(n.intf)},f=()=>{l.value=!1,i(void 0)},m=()=>{s.value&&r.value.hooks.renderInterface.execute({intf:n.intf,el:s.value})},T=()=>{const Q=r.value.displayedGraph.sidebar;Q.nodeId=n.node.id,Q.optionName=n.intf.name,Q.visible=!0};return Zo(m),d0(m),(Q,_)=>{var v;return k(),H("div",{id:Q.intf.id,ref_key:"el",ref:s,class:je(["baklava-node-interface",u.value])},[Q.intf.port?(k(),H("div",{key:0,class:je(["__port",{"--selected":((v=Bt(o))==null?void 0:v.from)===Q.intf}]),onPointerover:h,onPointerout:f},[er(Q.$slots,"portTooltip",{showTooltip:c.value},()=>[c.value===!0?(k(),H("span",Zur,le(e(Q.intf.value)),1)):re("",!0)])],34)):re("",!0),d.value?(k(),wt(Rd(Q.intf.component),{key:1,modelValue:Q.intf.value,"onUpdate:modelValue":_[0]||(_[0]=y=>Q.intf.value=y),node:Q.node,intf:Q.intf,onOpenSidebar:T},null,40,["modelValue","node","intf"])):(k(),H("span",Xur,le(Q.intf.name),1))],10,Kur)}}}),Jur=["id","data-node-type"],edr={class:"__title-label"},tdr={class:"__menu"},ndr={class:"__outputs"},rdr={class:"__inputs"},idr=ir({__name:"Node",props:{node:{},selected:{type:Boolean,default:!1},dragging:{type:Boolean}},emits:["select","start-drag"],setup(t,{emit:e}){const n=t,r=e,{viewModel:i}=Ci(),{graph:o,switchGraph:s}=Ji(),a=Ct(null),l=Ct(!1),c=Ct(""),u=Ct(null),d=Ct(!1),h=Ct(!1),f=_t(()=>{const N=[{value:"rename",label:"Rename"},{value:"delete",label:"Delete"}];return n.node.type.startsWith(l0)&&N.push({value:"editSubgraph",label:"Edit Subgraph"}),N}),m=_t(()=>({"--selected":n.selected,"--dragging":n.dragging,"--two-column":!!n.node.twoColumn})),T=_t(()=>({"--reverse-y":n.node.reverseY??i.value.settings.nodes.reverseY})),Q=_t(()=>{var N,P;return{top:`${((N=n.node.position)==null?void 0:N.y)??0}px`,left:`${((P=n.node.position)==null?void 0:P.x)??0}px`,"--width":`${n.node.width??i.value.settings.nodes.defaultWidth}px`}}),_=_t(()=>Object.values(n.node.inputs).filter(N=>!N.hidden)),v=_t(()=>Object.values(n.node.outputs).filter(N=>!N.hidden)),y=()=>{r("select")},b=N=>{n.selected||y(),r("start-drag",N)},E=()=>{h.value=!0},x=async N=>{var P;switch(N){case"delete":o.value.removeNode(n.node);break;case"rename":c.value=n.node.title,l.value=!0,await ze(),(P=u.value)==null||P.focus();break;case"editSubgraph":s(n.node.template);break}},L=()=>{n.node.title=c.value,l.value=!1},M=()=>{a.value&&i.value.hooks.renderNode.execute({node:n.node,el:a.value})},C=N=>{d.value=!0,N.preventDefault()},A=N=>{if(!d.value)return;const P=n.node.width+N.movementX/o.value.scaling,O=i.value.settings.nodes.minWidth,F=i.value.settings.nodes.maxWidth;n.node.width=Math.max(O,Math.min(F,P))},I=()=>{d.value=!1};return Zo(()=>{M(),window.addEventListener("mousemove",A),window.addEventListener("mouseup",I)}),d0(M),Sc(()=>{window.removeEventListener("mousemove",A),window.removeEventListener("mouseup",I)}),(N,P)=>(k(),H("div",{id:N.node.id,ref_key:"el",ref:a,class:je(["baklava-node",m.value]),style:xn(Q.value),"data-node-type":N.node.type,onPointerdown:y},[Bt(i).settings.nodes.resizable?(k(),H("div",{key:0,class:"__resize-handle",onMousedown:C},null,32)):re("",!0),er(N.$slots,"title",{},()=>[g("div",{class:"__title",onPointerdown:he(b,["self","stop"])},[l.value?J((k(),H("input",{key:1,ref_key:"renameInputEl",ref:u,"onUpdate:modelValue":P[1]||(P[1]=O=>c.value=O),type:"text",class:"baklava-input",placeholder:"Node Name",onBlur:L,onKeydown:Xr(L,["enter"])},null,544)),[[we,c.value]]):(k(),H(Ue,{key:0},[g("div",edr,le(N.node.title),1),g("div",tdr,[oe(LG,{class:"--clickable",onClick:E}),oe(Bt(TE),{modelValue:h.value,"onUpdate:modelValue":P[0]||(P[0]=O=>h.value=O),x:0,y:0,items:f.value,onClick:x},null,8,["modelValue","items"])])],64))],32)]),er(N.$slots,"content",{},()=>[g("div",{class:je(["__content",T.value]),onKeydown:P[2]||(P[2]=Xr(he(()=>{},["stop"]),["delete"]))},[g("div",ndr,[(k(!0),H(Ue,null,ot(v.value,O=>er(N.$slots,"nodeInterface",{key:O.id,type:"output",node:N.node,intf:O},()=>[oe(dk,{node:N.node,intf:O},null,8,["node","intf"])])),128))]),g("div",rdr,[(k(!0),H(Ue,null,ot(_.value,O=>er(N.$slots,"nodeInterface",{key:O.id,type:"input",node:N.node,intf:O},()=>[oe(dk,{node:N.node,intf:O},null,8,["node","intf"])])),128))])],34)])],46,Jur))}}),odr=ir({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:Bi.NONE},isTemporary:{type:Boolean,default:!1}},setup(t){const{viewModel:e}=Ci(),{graph:n}=Ji(),r=(s,a)=>{const l=(s+n.value.panning.x)*n.value.scaling,c=(a+n.value.panning.y)*n.value.scaling;return[l,c]},i=_t(()=>{const[s,a]=r(t.x1,t.y1),[l,c]=r(t.x2,t.y2);if(e.value.settings.useStraightConnections)return`M ${s} ${a} L ${l} ${c}`;{const u=.3*Math.abs(s-l);return`M ${s} ${a} C ${s+u} ${a}, ${l-u} ${c}, ${l} ${c}`}}),o=_t(()=>({"--temporary":t.isTemporary,"--allowed":t.state===Bi.ALLOWED,"--forbidden":t.state===Bi.FORBIDDEN}));return{d:i,classes:o}}}),sdr=["d"];function adr(t,e,n,r,i,o){return k(),H("path",{class:je(["baklava-connection",t.classes]),d:t.d},null,10,sdr)}const CG=Wn(odr,[["render",adr]]);function ldr(t){return document.getElementById(t.id)}function bc(t){const e=document.getElementById(t.id),n=e==null?void 0:e.getElementsByClassName("__port");return{node:(e==null?void 0:e.closest(".baklava-node"))??null,interface:e,port:n&&n.length>0?n[0]:null}}const cdr=ir({components:{"connection-view":CG},props:{connection:{type:Object,required:!0}},setup(t){const{graph:e}=Ji();let n;const r=Ct({x1:0,y1:0,x2:0,y2:0}),i=_t(()=>t.connection.isInDanger?Bi.FORBIDDEN:Bi.NONE),o=_t(()=>{var c;return(c=e.value.findNodeById(t.connection.from.nodeId))==null?void 0:c.position}),s=_t(()=>{var c;return(c=e.value.findNodeById(t.connection.to.nodeId))==null?void 0:c.position}),a=c=>c.node&&c.interface&&c.port?[c.node.offsetLeft+c.interface.offsetLeft+c.port.offsetLeft+c.port.clientWidth/2,c.node.offsetTop+c.interface.offsetTop+c.port.offsetTop+c.port.clientHeight/2]:[0,0],l=()=>{const c=bc(t.connection.from),u=bc(t.connection.to);c.node&&u.node&&(n||(n=new ResizeObserver(()=>{l()}),n.observe(c.node),n.observe(u.node)));const[d,h]=a(c),[f,m]=a(u);r.value={x1:d,y1:h,x2:f,y2:m}};return Zo(async()=>{await ze(),l()}),Sc(()=>{n&&n.disconnect()}),Er([o,s],()=>l(),{deep:!0}),{d:r,state:i}}});function udr(t,e,n,r,i,o){const s=pt("connection-view");return k(),wt(s,{x1:t.d.x1,y1:t.d.y1,x2:t.d.x2,y2:t.d.y2,state:t.state},null,8,["x1","y1","x2","y2","state"])}const ddr=Wn(cdr,[["render",udr]]);function _d(t){return t.node&&t.interface&&t.port?[t.node.offsetLeft+t.interface.offsetLeft+t.port.offsetLeft+t.port.clientWidth/2,t.node.offsetTop+t.interface.offsetTop+t.port.offsetTop+t.port.clientHeight/2]:[0,0]}const fdr=ir({components:{"connection-view":CG},props:{connection:{type:Object,required:!0}},setup(t){const e=_t(()=>t.connection?t.connection.status:Bi.NONE);return{d:_t(()=>{if(!t.connection)return{input:[0,0],output:[0,0]};const r=_d(bc(t.connection.from)),i=t.connection.to?_d(bc(t.connection.to)):[t.connection.mx||r[0],t.connection.my||r[1]];return t.connection.from.isInput?{input:i,output:r}:{input:r,output:i}}),status:e}}});function pdr(t,e,n,r,i,o){const s=pt("connection-view");return k(),wt(s,{x1:t.d.input[0],y1:t.d.input[1],x2:t.d.output[0],y2:t.d.output[1],state:t.status,"is-temporary":""},null,8,["x1","y1","x2","y2","state"])}const hdr=Wn(fdr,[["render",pdr]]),Tdr=ir({setup(){const{viewModel:t}=Ci(),{graph:e}=Ji(),n=Ct(null),r=au(t.value.settings.sidebar,"width"),i=_t(()=>t.value.settings.sidebar.resizable),o=_t(()=>{const d=e.value.sidebar.nodeId;return e.value.nodes.find(h=>h.id===d)}),s=_t(()=>({width:`${r.value}px`})),a=_t(()=>o.value?[...Object.values(o.value.inputs),...Object.values(o.value.outputs)].filter(h=>h.displayInSidebar&&h.component):[]),l=()=>{e.value.sidebar.visible=!1},c=()=>{window.addEventListener("mousemove",u),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",u)},{once:!0})},u=d=>{var h,f;const m=((f=(h=n.value)==null?void 0:h.parentElement)==null?void 0:f.getBoundingClientRect().width)??500;let T=r.value-d.movementX;T<300?T=300:T>.9*m&&(T=.9*m),r.value=T};return{el:n,graph:e,resizable:i,node:o,styles:s,displayedInterfaces:a,startResize:c,close:l}}}),mdr={class:"__header"},gdr={class:"__node-name"};function _dr(t,e,n,r,i,o){return k(),H("div",{ref:"el",class:je(["baklava-sidebar",{"--open":t.graph.sidebar.visible}]),style:xn(t.styles)},[t.resizable?(k(),H("div",{key:0,class:"__resizer",onMousedown:e[0]||(e[0]=(...s)=>t.startResize&&t.startResize(...s))},null,32)):re("",!0),g("div",mdr,[g("button",{tabindex:"-1",class:"__close",onClick:e[1]||(e[1]=(...s)=>t.close&&t.close(...s))},"×"),g("div",gdr,[g("b",null,le(t.node?t.node.title:""),1)])]),(k(!0),H(Ue,null,ot(t.displayedInterfaces,s=>(k(),H("div",{key:s.id,class:"__interface"},[(k(),wt(Rd(s.component),{modelValue:s.value,"onUpdate:modelValue":a=>s.value=a,node:t.node,intf:s},null,8,["modelValue","onUpdate:modelValue","node","intf"]))]))),128))],6)}const Qdr=Wn(Tdr,[["render",_dr]]),vdr=ir({__name:"Minimap",setup(t){const{viewModel:e}=Ci(),{graph:n}=Ji(),r=Ct(null),i=Ct(!1);let o,s=!1,a={x1:0,y1:0,x2:0,y2:0},l;const c=()=>{var x,L;if(!o)return;o.canvas.width=r.value.offsetWidth,o.canvas.height=r.value.offsetHeight;const M=new Map,C=new Map;for(const O of n.value.nodes){const F=ldr(O),V=(F==null?void 0:F.offsetWidth)??0,U=(F==null?void 0:F.offsetHeight)??0,G=((x=O.position)==null?void 0:x.x)??0,K=((L=O.position)==null?void 0:L.y)??0;M.set(O,{x1:G,y1:K,x2:G+V,y2:K+U}),C.set(O,F)}const A={x1:Number.MAX_SAFE_INTEGER,y1:Number.MAX_SAFE_INTEGER,x2:Number.MIN_SAFE_INTEGER,y2:Number.MIN_SAFE_INTEGER};for(const O of M.values())O.x1A.x2&&(A.x2=O.x2),O.y2>A.y2&&(A.y2=O.y2);const I=50;A.x1-=I,A.y1-=I,A.x2+=I,A.y2+=I,a=A;const N=o.canvas.width/o.canvas.height,P=(a.x2-a.x1)/(a.y2-a.y1);if(N>P){const O=(N-P)*(a.y2-a.y1)*.5;a.x1-=O,a.x2+=O}else{const O=a.x2-a.x1,F=a.y2-a.y1,V=(O-N*F)/N*.5;a.y1-=V,a.y2+=V}o.clearRect(0,0,o.canvas.width,o.canvas.height),o.strokeStyle="white";for(const O of n.value.connections){const[F,V]=_d(bc(O.from)),[U,G]=_d(bc(O.to)),[K,W]=u(F,V),[te,de]=u(U,G);if(o.beginPath(),o.moveTo(K,W),e.value.settings.useStraightConnections)o.lineTo(te,de);else{const X=.3*Math.abs(K-te);o.bezierCurveTo(K+X,W,te-X,de,te,de)}o.stroke()}o.strokeStyle="lightgray";for(const[O,F]of M.entries()){const[V,U]=u(F.x1,F.y1),[G,K]=u(F.x2,F.y2);o.fillStyle=h(C.get(O)),o.beginPath(),o.rect(V,U,G-V,K-U),o.fill(),o.stroke()}if(i.value){const O=m(),[F,V]=u(O.x1,O.y1),[U,G]=u(O.x2,O.y2);o.fillStyle="rgba(255, 255, 255, 0.2)",o.fillRect(F,V,U-F,G-V)}},u=(x,L)=>[(x-a.x1)/(a.x2-a.x1)*o.canvas.width,(L-a.y1)/(a.y2-a.y1)*o.canvas.height],d=(x,L)=>[x*(a.x2-a.x1)/o.canvas.width+a.x1,L*(a.y2-a.y1)/o.canvas.height+a.y1],h=x=>{if(x){const L=x.querySelector(".__content");if(L){const C=f(L);if(C)return C}const M=f(x);if(M)return M}return"gray"},f=x=>{const L=getComputedStyle(x).backgroundColor;if(L&&L!=="rgba(0, 0, 0, 0)")return L},m=()=>{const x=r.value.parentElement.offsetWidth,L=r.value.parentElement.offsetHeight,M=x/n.value.scaling-n.value.panning.x,C=L/n.value.scaling-n.value.panning.y;return{x1:-n.value.panning.x,y1:-n.value.panning.y,x2:M,y2:C}},T=x=>{x.button===0&&(s=!0,Q(x))},Q=x=>{if(s){const[L,M]=d(x.offsetX,x.offsetY),C=m(),A=(C.x2-C.x1)/2,I=(C.y2-C.y1)/2;n.value.panning.x=-(L-A),n.value.panning.y=-(M-I)}},_=()=>{s=!1},v=()=>{i.value=!0},y=()=>{i.value=!1,_()};Er([i,n.value.panning,()=>n.value.scaling,()=>n.value.connections.length],()=>{c()});const b=_t(()=>n.value.nodes.map(x=>x.position)),E=_t(()=>n.value.nodes.map(x=>x.width));return Er([b,E],()=>{c()},{deep:!0}),Zo(()=>{o=r.value.getContext("2d"),o.imageSmoothingQuality="high",c(),l=setInterval(c,500)}),Sc(()=>{clearInterval(l)}),(x,L)=>(k(),H("canvas",{ref_key:"canvas",ref:r,class:"baklava-minimap",onMouseenter:v,onMouseleave:y,onMousedown:he(T,["self"]),onMousemove:he(Q,["self"]),onMouseup:_,onContextmenu:L[0]||(L[0]=he(()=>{},["stop","prevent"]))},null,544))}}),ydr=ir({components:{ContextMenu:TE,VerticalDots:LG},props:{type:{type:String,required:!0},title:{type:String,required:!0}},setup(t){const{viewModel:e}=Ci(),{switchGraph:n}=Ji(),r=Ct(!1),i=_t(()=>t.type.startsWith(l0));return{showContextMenu:r,hasContextMenu:i,contextMenuItems:[{label:"Edit Subgraph",value:"editSubgraph"},{label:"Delete Subgraph",value:"deleteSubgraph"}],openContextMenu:()=>{r.value=!0},onContextMenuClick:l=>{const c=t.type.substring(l0.length),u=e.value.editor.graphTemplates.find(d=>d.id===c);if(u)switch(l){case"editSubgraph":n(u);break;case"deleteSubgraph":e.value.editor.removeGraphTemplate(u);break}}}}}),bdr=["data-node-type"],Edr={class:"__title"},xdr={class:"__title-label"},Sdr={key:0,class:"__menu"};function Ldr(t,e,n,r,i,o){const s=pt("vertical-dots"),a=pt("context-menu");return k(),H("div",{class:"baklava-node --palette","data-node-type":t.type},[g("div",Edr,[g("div",xdr,le(t.title),1),t.hasContextMenu?(k(),H("div",Sdr,[oe(s,{class:"--clickable",onPointerdown:e[0]||(e[0]=he(()=>{},["stop","prevent"])),onClick:he(t.openContextMenu,["stop","prevent"])},null,8,["onClick"]),oe(a,{modelValue:t.showContextMenu,"onUpdate:modelValue":e[1]||(e[1]=l=>t.showContextMenu=l),x:-100,y:0,items:t.contextMenuItems,onClick:t.onContextMenuClick,onPointerdown:e[2]||(e[2]=he(()=>{},["stop","prevent"]))},null,8,["modelValue","items","onClick"])])):re("",!0)])],8,bdr)}const fk=Wn(ydr,[["render",Ldr]]),Cdr={key:0},Adr=ir({__name:"NodePalette",setup(t){const{viewModel:e}=Ci(),{x:n,y:r}=kur(),{transform:i}=yG(),o=vG(e),s=Gi("editorEl"),a=Ct(null),l=_t(()=>{if(!a.value||!(s!=null&&s.value))return{};const{left:u,top:d}=s.value.getBoundingClientRect();return{top:`${r.value-d}px`,left:`${n.value-u}px`}}),c=(u,d)=>{a.value={type:u,nodeInformation:d};const h=()=>{const f=Zr(new d.type);e.value.displayedGraph.addNode(f);const m=s.value.getBoundingClientRect(),[T,Q]=i(n.value-m.left,r.value-m.top);f.position.x=T,f.position.y=Q,a.value=null,document.removeEventListener("pointerup",h)};document.addEventListener("pointerup",h)};return(u,d)=>(k(),H(Ue,null,[g("div",{class:"baklava-node-palette",onContextmenu:d[0]||(d[0]=he(()=>{},["stop","prevent"]))},[(k(!0),H(Ue,null,ot(Bt(o),h=>(k(),H("section",{key:h.name},[h.name!=="default"?(k(),H("h1",Cdr,le(h.name),1)):re("",!0),(k(!0),H(Ue,null,ot(h.nodeTypes,(f,m)=>(k(),wt(fk,{key:m,type:m,title:f.title,onPointerdown:T=>c(m,f)},null,8,["type","title","onPointerdown"]))),128))]))),128))],32),oe(qi,{name:"fade"},{default:He(()=>[a.value?(k(),H("div",{key:0,class:"baklava-dragged-node",style:xn(l.value)},[oe(fk,{type:a.value.type,title:a.value.nodeInformation.title},null,8,["type","title"])],4)):re("",!0)]),_:1})],64))}});let B5;const wdr=new Uint8Array(16);function Mdr(){if(!B5&&(B5=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!B5))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return B5(wdr)}const yr=[];for(let t=0;t<256;++t)yr.push((t+256).toString(16).slice(1));function Odr(t,e=0){return yr[t[e+0]]+yr[t[e+1]]+yr[t[e+2]]+yr[t[e+3]]+"-"+yr[t[e+4]]+yr[t[e+5]]+"-"+yr[t[e+6]]+yr[t[e+7]]+"-"+yr[t[e+8]]+yr[t[e+9]]+"-"+yr[t[e+10]]+yr[t[e+11]]+yr[t[e+12]]+yr[t[e+13]]+yr[t[e+14]]+yr[t[e+15]]}const Rdr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),pk={randomUUID:Rdr};function Qd(t,e,n){if(pk.randomUUID&&!e&&!t)return pk.randomUUID();t=t||{};const r=t.random||(t.rng||Mdr)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Odr(r)}const c0="SAVE_SUBGRAPH";function Ndr(t,e){const n=()=>{const r=t.value;if(!r.template)throw new Error("Graph template property not set");r.template.update(r.save()),r.template.panning=r.panning,r.template.scaling=r.scaling};e.registerCommand(c0,{canExecute:()=>{var r;return t.value!==((r=t.value.editor)==null?void 0:r.graph)},execute:n})}const Ddr={},Idr={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"},kdr=g("polyline",{points:"6 9 12 15 18 9"},null,-1),Pdr=[kdr];function Hdr(t,e){return k(),H("svg",Idr,Pdr)}const Vdr=Wn(Ddr,[["render",Hdr]]),Bdr=ir({components:{"i-arrow":Vdr},props:{intf:{type:Object,required:!0}},setup(t){const e=Ct(null),n=Ct(!1),r=_t(()=>t.intf.items.find(s=>typeof s=="string"?s===t.intf.value:s.value===t.intf.value)),i=_t(()=>r.value?typeof r.value=="string"?r.value:r.value.text:""),o=s=>{t.intf.value=typeof s=="string"?s:s.value};return xG(e,()=>{n.value=!1}),{el:e,open:n,selectedItem:r,selectedText:i,setSelected:o}}}),Fdr=["title"],$dr={class:"__selected"},Udr={class:"__text"},Gdr={class:"__icon"},qdr={class:"__dropdown"},zdr={class:"item --header"},jdr=["onClick"];function Wdr(t,e,n,r,i,o){const s=pt("i-arrow");return k(),H("div",{ref:"el",class:je(["baklava-select",{"--open":t.open}]),title:t.intf.name,onClick:e[0]||(e[0]=a=>t.open=!t.open)},[g("div",$dr,[g("div",Udr,le(t.selectedText),1),g("div",Gdr,[oe(s)])]),oe(qi,{name:"slide-fade"},{default:He(()=>[J(g("div",qdr,[g("div",zdr,le(t.intf.name),1),(k(!0),H(Ue,null,ot(t.intf.items,(a,l)=>(k(),H("div",{key:l,class:je(["item",{"--active":a===t.selectedItem}]),onClick:c=>t.setSelected(a)},le(typeof a=="string"?a:a.text),11,jdr))),128))],512),[[Pt,t.open]])]),_:1})],10,Fdr)}const Ydr=Wn(Bdr,[["render",Wdr]]);class Kdr extends Un{constructor(e,n,r){super(e,n),this.component=Ad(Ydr),this.items=r}}const Zdr=ir({props:{intf:{type:Object,required:!0}}});function Xdr(t,e,n,r,i,o){return k(),H("div",null,le(t.intf.value),1)}const Jdr=Wn(Zdr,[["render",Xdr]]);class e7r extends Un{constructor(e,n){super(e,n),this.component=Ad(Jdr),this.setPort(!1)}}const t7r=ir({props:{intf:{type:Object,required:!0},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:e}){return{v:_t({get:()=>t.modelValue,set:r=>{e("update:modelValue",r)}})}}}),n7r=["placeholder","title"];function r7r(t,e,n,r,i,o){return k(),H("div",null,[J(g("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>t.v=s),type:"text",class:"baklava-input",placeholder:t.intf.name,title:t.intf.name},null,8,n7r),[[we,t.v]])])}const i7r=Wn(t7r,[["render",r7r]]);class i6 extends Un{constructor(){super(...arguments),this.component=Ad(i7r)}}class AG extends dE{constructor(){super(...arguments),this._title="Subgraph Input",this.inputs={name:new i6("Name","Input").setPort(!1)},this.outputs={placeholder:new Un("Connection",void 0)}}}class wG extends fE{constructor(){super(...arguments),this._title="Subgraph Output",this.inputs={name:new i6("Name","Output").setPort(!1),placeholder:new Un("Connection",void 0)},this.outputs={output:new Un("Output",void 0).setHidden(!0)}}}const MG="CREATE_SUBGRAPH",hk=[Qc,vc];function o7r(t,e,n){const r=()=>t.value.selectedNodes.filter(o=>!hk.includes(o.type)).length>0,i=()=>{const{viewModel:o}=Ci(),s=t.value,a=t.value.editor;if(s.selectedNodes.length===0)return;const l=s.selectedNodes.filter(C=>!hk.includes(C.type)),c=l.flatMap(C=>Object.values(C.inputs)),u=l.flatMap(C=>Object.values(C.outputs)),d=s.connections.filter(C=>!u.includes(C.from)&&c.includes(C.to)),h=s.connections.filter(C=>u.includes(C.from)&&!c.includes(C.to)),f=s.connections.filter(C=>u.includes(C.from)&&c.includes(C.to)),m=l.map(C=>C.save()),T=f.map(C=>({id:C.id,from:C.from.id,to:C.to.id})),Q=new Map,{xLeft:_,xRight:v,yTop:y}=s7r(l);for(const[C,A]of d.entries()){const I=new AG;I.inputs.name.value=A.to.name,m.push({...I.save(),position:{x:v-o.value.settings.nodes.defaultWidth-100,y:y+C*200}}),T.push({id:Qd(),from:I.outputs.placeholder.id,to:A.to.id}),Q.set(A.to.id,I.graphInterfaceId)}for(const[C,A]of h.entries()){const I=new wG;I.inputs.name.value=A.from.name,m.push({...I.save(),position:{x:_+100,y:y+C*200}}),T.push({id:Qd(),from:A.from.id,to:I.inputs.placeholder.id}),Q.set(A.from.id,I.graphInterfaceId)}const b=Zr(new w9({connections:T,nodes:m,inputs:[],outputs:[]},a));a.addGraphTemplate(b);const E=a.nodeTypes.get(yc(b));if(!E)throw new Error("Unable to create subgraph: Could not find corresponding graph node type");s.activeTransactions++;const x=Zr(new E.type);s.addNode(x);const L=Math.round(l.map(C=>C.position.x).reduce((C,A)=>C+A,0)/l.length),M=Math.round(l.map(C=>C.position.y).reduce((C,A)=>C+A,0)/l.length);x.position.x=L,x.position.y=M,d.forEach(C=>{s.removeConnection(C),s.addConnection(C.from,x.inputs[Q.get(C.to.id)])}),h.forEach(C=>{s.removeConnection(C),s.addConnection(x.outputs[Q.get(C.from.id)],C.to)}),l.forEach(C=>s.removeNode(C)),s.activeTransactions--,e.canExecuteCommand(c0)&&e.executeCommand(c0),n(b),t.value.panning={...s.panning},t.value.scaling=s.scaling};e.registerCommand(MG,{canExecute:r,execute:i})}function s7r(t){const e=t.reduce((i,o)=>{const s=o.position.x;return s{const s=o.position.y;return s{const s=o.position.x+o.width;return s>i?s:i},-1/0),xRight:e,yTop:n}}class Tk{constructor(e,n){this.type=e,e==="addNode"?this.nodeId=n:this.nodeState=n}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 n=e.editor.nodeTypes.get(this.nodeState.type);if(!n)return;const r=new n.type;e.addNode(r),r.load(this.nodeState),this.nodeId=r.id}removeNode(e){const n=e.nodes.find(r=>r.id===this.nodeId);n&&(this.nodeState=n.save(),e.removeNode(n))}}class mk{constructor(e,n){if(this.type=e,e==="addConnection")this.connectionId=n;else{const r=n;this.connectionState={id:r.id,from:r.from.id,to:r.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 n=e.findNodeInterface(this.connectionState.from),r=e.findNodeInterface(this.connectionState.to);if(!n||!r)return;const i=e.addConnection(n,r);i&&(i.id=this.connectionState.id),this.connectionId=i==null?void 0:i.id}removeConnection(e){const n=e.connections.find(r=>r.id===this.connectionId);n&&(this.connectionState={id:n.id,from:n.from.id,to:n.to.id},e.removeConnection(n))}}class a7r{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 n=this.steps.length-1;n>=0;n--)this.steps[n].undo(e)}redo(e){for(let n=0;n{if(!o.value)if(a.value)l.value.push(Q);else for(s.value!==i.value.length-1&&(i.value=i.value.slice(0,s.value+1)),i.value.push(Q),s.value++;i.value.length>r.value;)i.value.shift()},u=()=>{a.value=!0},d=()=>{a.value=!1,l.value.length>0&&(c(new a7r(l.value)),l.value=[])},h=()=>i.value.length!==0&&s.value!==-1,f=()=>{h()&&(o.value=!0,i.value[s.value--].undo(t.value),o.value=!1)},m=()=>i.value.length!==0&&s.value{m()&&(o.value=!0,i.value[++s.value].redo(t.value),o.value=!1)};return Er(t,(Q,_)=>{_&&(_.events.addNode.unsubscribe(n),_.events.removeNode.unsubscribe(n),_.events.addConnection.unsubscribe(n),_.events.removeConnection.unsubscribe(n)),Q&&(Q.events.addNode.subscribe(n,v=>{c(new Tk("addNode",v.id))}),Q.events.removeNode.subscribe(n,v=>{c(new Tk("removeNode",v.save()))}),Q.events.addConnection.subscribe(n,v=>{c(new mk("addConnection",v.id))}),Q.events.removeConnection.subscribe(n,v=>{c(new mk("removeConnection",v))}))},{immediate:!0}),e.registerCommand(tv,{canExecute:h,execute:f}),e.registerCommand(nv,{canExecute:m,execute:T}),e.registerCommand(mE,{canExecute:()=>!a.value,execute:u}),e.registerCommand(gE,{canExecute:()=>a.value,execute:d}),e.registerHotkey(["Control","z"],tv),e.registerHotkey(["Control","y"],nv),Zr({maxSteps:r})}const rv="DELETE_NODES";function c7r(t,e){e.registerCommand(rv,{canExecute:()=>t.value.selectedNodes.length>0,execute(){e.executeCommand(mE);for(let n=t.value.selectedNodes.length-1;n>=0;n--){const r=t.value.selectedNodes[n];t.value.removeNode(r)}e.executeCommand(gE)}}),e.registerHotkey(["Delete"],rv)}const OG="SWITCH_TO_MAIN_GRAPH";function u7r(t,e,n){e.registerCommand(OG,{canExecute:()=>t.value!==t.value.editor.graph,execute:()=>{e.executeCommand(c0),n(t.value.editor.graph)}})}function d7r(t,e,n){c7r(t,e),o7r(t,e,n),Ndr(t,e),u7r(t,e,n)}const iv="COPY",ov="PASTE",f7r="CLEAR_CLIPBOARD";function p7r(t,e,n){const r=Symbol("ClipboardToken"),i=Ct(""),o=Ct(""),s=_t(()=>!i.value),a=()=>{i.value="",o.value=""},l=()=>{const d=t.value.selectedNodes.flatMap(f=>[...Object.values(f.inputs),...Object.values(f.outputs)]),h=t.value.connections.filter(f=>d.includes(f.from)||d.includes(f.to)).map(f=>({from:f.from.id,to:f.to.id}));o.value=JSON.stringify(h),i.value=JSON.stringify(t.value.selectedNodes.map(f=>f.save()))},c=(d,h,f)=>{for(const m of d){let T;if((!f||f==="input")&&(T=Object.values(m.inputs).find(Q=>Q.id===h)),!T&&(!f||f==="output")&&(T=Object.values(m.outputs).find(Q=>Q.id===h)),T)return T}},u=()=>{if(s.value)return;const d=new Map,h=JSON.parse(i.value),f=JSON.parse(o.value),m=[],T=[],Q=t.value;n.executeCommand(mE);for(const _ of h){const v=e.value.nodeTypes.get(_.type);if(!v){console.warn(`Node type ${_.type} not registered`);return}const y=new v.type,b=y.id;m.push(y),y.hooks.beforeLoad.subscribe(r,E=>{const x=E;return x.position&&(x.position.x+=100,x.position.y+=100),y.hooks.beforeLoad.unsubscribe(r),x}),Q.addNode(y),y.load({..._,id:b}),y.id=b,d.set(_.id,b);for(const E of Object.values(y.inputs)){const x=Qd();d.set(E.id,x),E.id=x}for(const E of Object.values(y.outputs)){const x=Qd();d.set(E.id,x),E.id=x}}for(const _ of f){const v=c(m,d.get(_.from),"output"),y=c(m,d.get(_.to),"input");if(!v||!y)continue;const b=Q.addConnection(v,y);b&&T.push(b)}return t.value.selectedNodes=m,n.executeCommand(gE),{newNodes:m,newConnections:T}};return n.registerCommand(iv,{canExecute:()=>t.value.selectedNodes.length>0,execute:l}),n.registerHotkey(["Control","c"],iv),n.registerCommand(ov,{canExecute:()=>!s.value,execute:u}),n.registerHotkey(["Control","v"],ov),n.registerCommand(f7r,{canExecute:()=>!0,execute:a}),Zr({isEmpty:s})}const h7r="OPEN_SIDEBAR";function T7r(t,e){e.registerCommand(h7r,{execute:n=>{t.value.sidebar.nodeId=n,t.value.sidebar.visible=!0},canExecute:()=>!0})}function m7r(t,e){T7r(t,e)}const g7r={},_7r={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"},Q7r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),v7r=g("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"},null,-1),y7r=[Q7r,v7r];function b7r(t,e){return k(),H("svg",_7r,y7r)}const E7r=Wn(g7r,[["render",b7r]]),x7r={},S7r={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"},L7r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),C7r=g("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"},null,-1),A7r=[L7r,C7r];function w7r(t,e){return k(),H("svg",S7r,A7r)}const M7r=Wn(x7r,[["render",w7r]]),O7r={},R7r={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"},N7r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),D7r=g("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),I7r=g("line",{x1:"5",y1:"12",x2:"11",y2:"18"},null,-1),k7r=g("line",{x1:"5",y1:"12",x2:"11",y2:"6"},null,-1),P7r=[N7r,D7r,I7r,k7r];function H7r(t,e){return k(),H("svg",R7r,P7r)}const V7r=Wn(O7r,[["render",H7r]]),B7r={},F7r={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"},$7r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),U7r=g("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),G7r=g("rect",{x:"9",y:"3",width:"6",height:"4",rx:"2"},null,-1),q7r=[$7r,U7r,G7r];function z7r(t,e){return k(),H("svg",F7r,q7r)}const j7r=Wn(B7r,[["render",z7r]]),W7r={},Y7r={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"},K7r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Z7r=g("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1),X7r=g("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),J7r=[K7r,Z7r,X7r];function e8r(t,e){return k(),H("svg",Y7r,J7r)}const t8r=Wn(W7r,[["render",e8r]]),n8r={},r8r={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"},i8r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o8r=g("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),s8r=g("circle",{cx:"12",cy:"14",r:"2"},null,-1),a8r=g("polyline",{points:"14 4 14 8 8 8 8 4"},null,-1),l8r=[i8r,o8r,s8r,a8r];function c8r(t,e){return k(),H("svg",r8r,l8r)}const u8r=Wn(n8r,[["render",c8r]]),d8r={},f8r={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"},p8r=Fl('',6),h8r=[p8r];function T8r(t,e){return k(),H("svg",f8r,h8r)}const m8r=Wn(d8r,[["render",T8r]]),g8r={},_8r={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"},Q8r=Fl('',18),v8r=[Q8r];function y8r(t,e){return k(),H("svg",_8r,v8r)}const b8r=Wn(g8r,[["render",y8r]]),E8r={},x8r={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"},S8r=Fl('',6),L8r=[S8r];function C8r(t,e){return k(),H("svg",x8r,L8r)}const A8r=Wn(E8r,[["render",C8r]]),w8r=ir({props:{command:{type:String,required:!0},title:{type:String,required:!0},icon:{type:Object,required:!1,default:void 0}},setup(){const{viewModel:t}=Ci();return{viewModel:t}}}),M8r=["disabled","title"];function O8r(t,e,n,r,i,o){return k(),H("button",{class:"baklava-toolbar-entry baklava-toolbar-button",disabled:!t.viewModel.commandHandler.canExecuteCommand(t.command),title:t.title,onClick:e[0]||(e[0]=s=>t.viewModel.commandHandler.executeCommand(t.command))},[t.icon?(k(),wt(Rd(t.icon),{key:0})):(k(),H(Ue,{key:1},[nt(le(t.title),1)],64))],8,M8r)}const R8r=Wn(w8r,[["render",O8r]]),N8r=ir({components:{ToolbarButton:R8r},setup(){const{viewModel:t}=Ci();return{isSubgraph:_t(()=>t.value.displayedGraph!==t.value.editor.graph),commands:[{command:iv,title:"Copy",icon:t8r},{command:ov,title:"Paste",icon:j7r},{command:rv,title:"Delete selected nodes",icon:A8r},{command:tv,title:"Undo",icon:E7r},{command:nv,title:"Redo",icon:M7r},{command:ru,title:"Box Select",icon:b8r},{command:MG,title:"Create Subgraph",icon:m8r}],subgraphCommands:[{command:c0,title:"Save Subgraph",icon:u8r},{command:OG,title:"Back to Main Graph",icon:V7r}]}}});function D8r(t,e,n,r,i,o){const s=pt("toolbar-button");return k(),H("div",{class:"baklava-toolbar",onContextmenu:e[0]||(e[0]=he(()=>{},["stop","prevent"]))},[(k(!0),H(Ue,null,ot(t.commands,a=>(k(),wt(s,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)),t.isSubgraph?(k(!0),H(Ue,{key:0},ot(t.subgraphCommands,a=>(k(),wt(s,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)):re("",!0)],32)}const I8r=Wn(N8r,[["render",D8r]]),k8r={class:"connections-container"},P8r=ir({__name:"Editor",props:{viewModel:{}},setup(t){const e=t,n=Symbol("EditorToken"),r=au(e,"viewModel");vur(r);const i=Ct(null);Nl("editorEl",i);const o=_t(()=>e.viewModel.displayedGraph.nodes),s=_t(()=>e.viewModel.displayedGraph.nodes.map(M=>_G(au(M,"position")))),a=_t(()=>e.viewModel.displayedGraph.connections),l=_t(()=>e.viewModel.displayedGraph.selectedNodes),c=yur(),u=bur(),d=Eur(r),h=xur(i),f=_t(()=>({...c.styles.value})),m=Ct(0);e.viewModel.editor.hooks.load.subscribe(n,M=>(m.value++,M));const T=M=>{c.onPointerMove(M),u.onMouseMove(M)},Q=M=>{if(M.button===0){if(h.onPointerDown(M))return;M.target===i.value&&(E(),c.onPointerDown(M)),u.onMouseDown()}},_=M=>{c.onPointerUp(M),u.onMouseUp()},v=M=>{M.key==="Tab"&&M.preventDefault(),e.viewModel.commandHandler.handleKeyDown(M)},y=M=>{e.viewModel.commandHandler.handleKeyUp(M)},b=M=>{["Control","Shift"].some(C=>e.viewModel.commandHandler.pressedKeys.includes(C))||E(),e.viewModel.displayedGraph.selectedNodes.push(M)},E=()=>{e.viewModel.displayedGraph.selectedNodes=[]},x=M=>{for(const C of e.viewModel.displayedGraph.selectedNodes){const A=o.value.indexOf(C),I=s.value[A];I.onPointerDown(M),document.addEventListener("pointermove",I.onPointerMove)}document.addEventListener("pointerup",L)},L=()=>{for(const M of e.viewModel.displayedGraph.selectedNodes){const C=o.value.indexOf(M),A=s.value[C];A.onPointerUp(),document.removeEventListener("pointermove",A.onPointerMove)}document.removeEventListener("pointerup",L)};return(M,C)=>(k(),H("div",{ref_key:"el",ref:i,tabindex:"-1",class:je(["baklava-editor",{"baklava-ignore-mouse":!!Bt(u).temporaryConnection.value||Bt(c).dragging.value,"--temporary-connection":!!Bt(u).temporaryConnection.value,"--start-selection-box":Bt(h).startSelection}]),onPointermove:he(T,["self"]),onPointerdown:Q,onPointerup:_,onWheel:C[1]||(C[1]=he((...A)=>Bt(c).onMouseWheel&&Bt(c).onMouseWheel(...A),["self"])),onKeydown:v,onKeyup:y,onContextmenu:C[2]||(C[2]=(...A)=>Bt(d).open&&Bt(d).open(...A))},[er(M.$slots,"background",{},()=>[oe(Cur)]),er(M.$slots,"toolbar",{},()=>[M.viewModel.settings.toolbar.enabled?(k(),wt(I8r,{key:0})):re("",!0)]),er(M.$slots,"palette",{},()=>[M.viewModel.settings.palette.enabled?(k(),wt(Adr,{key:0})):re("",!0)]),(k(),H("svg",k8r,[(k(!0),H(Ue,null,ot(a.value,A=>(k(),H("g",{key:A.id+m.value.toString()},[er(M.$slots,"connection",{connection:A},()=>[oe(ddr,{connection:A},null,8,["connection"])])]))),128)),er(M.$slots,"temporaryConnection",{temporaryConnection:Bt(u).temporaryConnection.value},()=>[Bt(u).temporaryConnection.value?(k(),wt(hdr,{key:0,connection:Bt(u).temporaryConnection.value},null,8,["connection"])):re("",!0)])])),g("div",{class:"node-container",style:xn(f.value)},[oe(Ns,{name:"fade"},{default:He(()=>[(k(!0),H(Ue,null,ot(o.value,(A,I)=>er(M.$slots,"node",{key:A.id+m.value.toString(),node:A,selected:l.value.includes(A),dragging:s.value[I].dragging.value,onSelect:N=>b(A),onStartDrag:x},()=>[oe(idr,{node:A,selected:l.value.includes(A),dragging:s.value[I].dragging.value,onSelect:N=>b(A),onStartDrag:x},null,8,["node","selected","dragging","onSelect"])])),128))]),_:3})],4),er(M.$slots,"sidebar",{},()=>[M.viewModel.settings.sidebar.enabled?(k(),wt(Qdr,{key:0})):re("",!0)]),er(M.$slots,"minimap",{},()=>[M.viewModel.settings.enableMinimap?(k(),wt(vdr,{key:0})):re("",!0)]),er(M.$slots,"contextMenu",{contextMenu:Bt(d)},()=>[M.viewModel.settings.contextMenu.enabled?(k(),wt(TE,{key:0,modelValue:Bt(d).show.value,"onUpdate:modelValue":C[0]||(C[0]=A=>Bt(d).show.value=A),items:Bt(d).items.value,x:Bt(d).x.value,y:Bt(d).y.value,onClick:Bt(d).onClick},null,8,["modelValue","items","x","y","onClick"])):re("",!0)]),Bt(h).isSelecting?(k(),H("div",{key:0,class:"selection-box",style:xn(Bt(h).getStyles())},null,4)):re("",!0)],34))}});function H8r(t){const e=Ct([]),n=Ct([]);return{pressedKeys:e,handleKeyDown:s=>{e.value.includes(s.key)||e.value.push(s.key),!(document.activeElement&&gG(document.activeElement))&&n.value.forEach(a=>{var l,c;a.keys.every(u=>e.value.includes(u))&&((l=a.options)!=null&&l.preventDefault&&s.preventDefault(),(c=a.options)!=null&&c.stopPropagation&&s.stopPropagation(),t(a.commandName))})},handleKeyUp:s=>{const a=e.value.indexOf(s.key);a>=0&&e.value.splice(a,1)},registerHotkey:(s,a,l)=>{n.value.push({keys:s,commandName:a,options:l})}}}const V8r=()=>{const t=Ct(new Map),e=s=>t.value.has(s),n=(s,a)=>{if(t.value.has(s))throw new Error(`Command "${s}" already exists`);t.value.set(s,a)},r=(s,a=!1,...l)=>{if(!t.value.has(s)){if(a)throw new Error(`[CommandHandler] Command ${s} not registered`);return}return t.value.get(s).execute(...l)},i=(s,a=!1,...l)=>{if(!t.value.has(s)){if(a)throw new Error(`[CommandHandler] Command ${s} not registered`);return!1}return t.value.get(s).canExecute(l)},o=H8r(r);return Zr({hasCommand:e,registerCommand:n,executeCommand:r,canExecuteCommand:i,...o})},B8r=t=>!(t instanceof r6);function F8r(t,e){return{switchGraph:r=>{let i;if(B8r(r))i=new r6(t.value),r.createGraph(i);else{if(r!==t.value.graph)throw new Error("Can only switch using 'Graph' instance when it is the root graph. Otherwise a 'GraphTemplate' must be used.");i=r}e.value&&e.value!==t.value.graph&&e.value.destroy(),i.panning=i.panning??r.panning??{x:0,y:0},i.scaling=i.scaling??r.scaling??1,i.selectedNodes=i.selectedNodes??[],i.sidebar=i.sidebar??{visible:!1,nodeId:"",optionName:""},e.value=i}}}function $8r(t,e){t.position=t.position??{x:0,y:0},t.disablePointerEvents=!1,t.twoColumn=t.twoColumn??!1,t.width=t.width??e.defaultWidth}const U8r=()=>({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 G8r(t){const e=Ct(new pur),n=Symbol("ViewModelToken"),r=Ct(null),i=Bq(r),{switchGraph:o}=F8r(e,r),s=_t(()=>i.value&&i.value!==e.value.graph),a=Zr(U8r()),l=V8r(),c=l7r(i,l),u=p7r(i,e,l),d={renderNode:new Li(null),renderInterface:new Li(null)};return d7r(i,l,o),m7r(i,l),Er(e,(h,f)=>{f&&(f.events.registerGraph.unsubscribe(n),f.graphEvents.beforeAddNode.unsubscribe(n),h.nodeHooks.beforeLoad.unsubscribe(n),h.nodeHooks.afterSave.unsubscribe(n),h.graphTemplateHooks.beforeLoad.unsubscribe(n),h.graphTemplateHooks.afterSave.unsubscribe(n),h.graph.hooks.load.unsubscribe(n),h.graph.hooks.save.unsubscribe(n)),h&&(h.nodeHooks.beforeLoad.subscribe(n,(m,T)=>(T.position=m.position??{x:0,y:0},T.width=m.width??a.nodes.defaultWidth,T.twoColumn=m.twoColumn??!1,m)),h.nodeHooks.afterSave.subscribe(n,(m,T)=>(m.position=T.position,m.width=T.width,m.twoColumn=T.twoColumn,m)),h.graphTemplateHooks.beforeLoad.subscribe(n,(m,T)=>(T.panning=m.panning,T.scaling=m.scaling,m)),h.graphTemplateHooks.afterSave.subscribe(n,(m,T)=>(m.panning=T.panning,m.scaling=T.scaling,m)),h.graph.hooks.load.subscribe(n,(m,T)=>(T.panning=m.panning,T.scaling=m.scaling,m)),h.graph.hooks.save.subscribe(n,(m,T)=>(m.panning=T.panning,m.scaling=T.scaling,m)),h.graphEvents.beforeAddNode.subscribe(n,m=>$8r(m,{defaultWidth:a.nodes.defaultWidth})),e.value.registerNodeType(AG,{category:"Subgraphs"}),e.value.registerNodeType(wG,{category:"Subgraphs"}),o(h.graph))},{immediate:!0}),Zr({editor:e,displayedGraph:i,isSubgraph:s,settings:a,commandHandler:l,history:c,clipboard:u,hooks:d,switchGraph:o})}const q8r=Zc({type:"PersonalityNode",title:"Personality",inputs:{request:()=>new Un("Request",""),agent_name:()=>new Kdr("Personality","",so.state.config.personalities).setPort(!1)},outputs:{response:()=>new Un("Response","")},async calculate({request:t}){console.log(so.state.config.personalities);let e="";try{e=(await Qe.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),z8r=Zc({type:"RAGNode",title:"RAG",inputs:{request:()=>new Un("Prompt",""),document_path:()=>new i6("Document path","").setPort(!1)},outputs:{prompt:()=>new Un("Prompt with Data","")},async calculate({request:t,document_path:e}){let n="";try{n=(await Qe.get("/rag",{params:{text:t,doc_path:e}})).data}catch(r){console.error(r)}return{response:n}}}),gk=Zc({type:"Task",title:"Task",inputs:{description:()=>new i6("Task description","").setPort(!1)},outputs:{prompt:()=>new Un("Prompt")},calculate({description:t}){return{prompt:t}}}),_k=Zc({type:"TextDisplayNode",title:"TextDisplay",inputs:{text2display:()=>new Un("Input","")},outputs:{response:()=>new e7r("Text","")},async calculate({request:t}){}}),Qk=Zc({type:"LLMNode",title:"LLM",inputs:{request:()=>new Un("Request","")},outputs:{response:()=>new Un("Response","")},async calculate({request:t}){console.log(so.state.config.personalities);let e="";try{e=(await Qe.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),j8r=Zc({type:"MultichoiceNode",title:"Multichoice",inputs:{question:()=>new Un("Question",""),outputs:()=>new i6("choices, one per line","","").setPort(!1)},outputs:{response:()=>new Un("Response","")}}),W8r=ir({components:{"baklava-editor":P8r},setup(){const t=G8r(),e=new _ur(t.editor);t.editor.registerNodeType(q8r),t.editor.registerNodeType(gk),t.editor.registerNodeType(z8r),t.editor.registerNodeType(_k),t.editor.registerNodeType(Qk),t.editor.registerNodeType(j8r);const n=Symbol();e.events.afterRun.subscribe(n,a=>{e.pause(),hur(a,t.editor),e.resume()}),e.start();function r(a,l,c){const u=new a;return t.displayedGraph.addNode(u),u.position.x=l,u.position.y=c,u}const i=r(gk,300,140),o=r(Qk,550,140),s=r(_k,850,140);return t.displayedGraph.addConnection(i.outputs.prompt,o.inputs.request),t.displayedGraph.addConnection(o.outputs.response,s.inputs.text2display),{baklava:t,saveGraph:()=>{const a=e.export();localStorage.setItem("myGraph",JSON.stringify(a))},loadGraph:()=>{const a=JSON.parse(localStorage.getItem("myGraph"));e.import(a)}}}}),Y8r={style:{width:"100vw",height:"100vh"}};function K8r(t,e,n,r,i,o){const s=pt("baklava-editor");return k(),H("div",Y8r,[oe(s,{"view-model":t.baklava},null,8,["view-model"]),g("button",{onClick:e[0]||(e[0]=(...a)=>t.saveGraph&&t.saveGraph(...a))},"Save Graph"),g("button",{onClick:e[1]||(e[1]=(...a)=>t.loadGraph&&t.loadGraph(...a))},"Load Graph")])}const Z8r=yt(W8r,[["render",K8r]]),X8r={},J8r={style:{width:"100vw",height:"100vh"}},e9r=["src"];function t9r(t,e,n,r,i,o){return k(),H("div",J8r,[g("iframe",{src:t.$store.state.config.comfyui_base_url,class:"m-0 p-0 w-full h-full"},null,8,e9r)])}const n9r=yt(X8r,[["render",t9r]]),r9r={},i9r={style:{width:"100vw",height:"100vh"}},o9r=["src"];function s9r(t,e,n,r,i,o){return k(),H("div",i9r,[g("iframe",{src:t.$store.state.config.sd_base_url,class:"m-0 p-0 w-full h-full"},null,8,o9r)])}const a9r=yt(r9r,[["render",s9r]]),l9r={name:"AppCard",props:{app:{type:Object,required:!0},isFavorite:{type:Boolean,default:!1}},methods:{formatDate(t){const e={year:"numeric",month:"short",day:"numeric"};return new Date(t).toLocaleDateString(void 0,e)}}},c9r={class:"app-card flex flex-col h-full"},u9r={class:"flex-grow"},d9r={class:"flex items-center mb-4"},f9r=["src"],p9r={class:"font-bold text-xl text-gray-800"},h9r={class:"text-sm text-gray-600"},T9r={class:"text-sm text-gray-600"},m9r={class:"text-sm text-gray-600"},g9r={class:"text-sm text-gray-600"},_9r={class:"text-sm text-gray-600"},Q9r={class:"mb-4"},v9r={class:"text-sm text-gray-600 h-20 overflow-y-auto"},y9r={class:"text-sm text-gray-600 mb-2"},b9r={key:0,class:"mb-4"},E9r={class:"text-xs text-gray-500 italic h-16 overflow-y-auto"},x9r={class:"mt-auto pt-4 border-t"},S9r={class:"flex justify-between items-center flex-wrap"},L9r=["title"],C9r=["fill"];function A9r(t,e,n,r,i,o){return k(),H("div",c9r,[g("div",u9r,[g("div",d9r,[g("img",{src:n.app.icon,alt:"App Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4"},null,8,f9r),g("div",null,[g("h3",p9r,le(n.app.name),1),g("p",h9r,"Author: "+le(n.app.author),1),g("p",T9r,"Version: "+le(n.app.version),1),g("p",m9r,"Category: "+le(n.app.category),1),g("p",g9r,"Creation date: "+le(o.formatDate(n.app.creation_date)),1),g("p",_9r,"Last update: "+le(o.formatDate(n.app.last_update_date)),1),g("p",{class:je(["text-sm",n.app.is_public?"text-green-600":"text-orange-600"])},le(n.app.is_public?"Public App":"Local App"),3)])]),g("div",Q9r,[e[10]||(e[10]=g("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),g("p",v9r,le(n.app.description),1)]),g("p",y9r,"AI Model: "+le(n.app.model_name),1),n.app.disclaimer&&n.app.disclaimer.trim()!==""?(k(),H("div",b9r,[e[11]||(e[11]=g("h4",{class:"font-semibold mb-1 text-gray-700"},"Disclaimer:",-1)),g("p",E9r,le(n.app.disclaimer),1)])):re("",!0)]),g("div",x9r,[g("div",S9r,[g("button",{onClick:e[0]||(e[0]=he(s=>t.$emit("toggle-favorite",n.app.name),["stop"])),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:n.isFavorite?"Remove from favorites":"Add to favorites"},[(k(),H("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:n.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[12]||(e[12]=[g("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,C9r))],8,L9r),n.app.installed?(k(),H("button",{key:0,onClick:e[1]||(e[1]=he(s=>t.$emit("uninstall",n.app.folder_name),["stop"])),class:"text-red-500 hover:text-red-600 transition duration-300 ease-in-out",title:"Uninstall"},e[13]||(e[13]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)]))):n.app.existsInFolder?(k(),H("button",{key:1,onClick:e[2]||(e[2]=he(s=>t.$emit("delete",n.app.name),["stop"])),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:"Delete"},e[14]||(e[14]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)]))):(k(),H("button",{key:2,onClick:e[3]||(e[3]=he(s=>t.$emit("install",n.app.folder_name),["stop"])),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Install"},e[15]||(e[15]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)]))),n.app.installed?(k(),H("button",{key:3,onClick:e[4]||(e[4]=he(s=>t.$emit("edit",n.app),["stop"])),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Edit"},e[16]||(e[16]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)]))):re("",!0),g("button",{onClick:e[5]||(e[5]=he(s=>t.$emit("download",n.app.folder_name),["stop"])),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Download"},e[17]||(e[17]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)])),n.app.has_readme?(k(),H("button",{key:4,onClick:e[6]||(e[6]=he(s=>t.$emit("help",n.app),["stop"])),class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out",title:"Help"},e[18]||(e[18]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)]))):re("",!0),n.app.installed?(k(),H("button",{key:5,onClick:e[7]||(e[7]=he(s=>t.$emit("open",n.app),["stop"])),class:"text-indigo-500 hover:text-indigo-600 transition duration-300 ease-in-out",title:"Open"},e[19]||(e[19]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)]))):re("",!0),n.app.has_server&&n.app.installed?(k(),H("button",{key:6,onClick:e[8]||(e[8]=he(s=>t.$emit("start-server",n.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]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M12 5l7 7-7 7"})],-1)]))):re("",!0),n.app.has_update?(k(),H("button",{key:7,onClick:e[9]||(e[9]=he(s=>t.$emit("install",n.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]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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),g("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)]))):re("",!0)])])])}const w9r=yt(l9r,[["render",A9r],["__scopeId","data-v-ae134649"]]),M9r={components:{AppCard:w9r},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 t=new Map(this.apps.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{t.has(e.name)||t.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(t.values())},categories(){return[...new Set(this.combinedApps.map(t=>t.category))]},filteredApps(){return this.combinedApps.filter(t=>{const e=t.name.toLowerCase().includes(this.searchQuery.toLowerCase())||t.description.toLowerCase().includes(this.searchQuery.toLowerCase())||t.author.toLowerCase().includes(this.searchQuery.toLowerCase()),n=this.selectedCategory==="all"||t.category===this.selectedCategory,r=this.showOnlyInstalled&&t.installed||this.showOnlyUnInstalled&&!t.installed||!this.showOnlyInstalled&&!this.showOnlyUnInstalled;return e&&n&&r})},sortedAndFilteredApps(){return[...this.filteredApps].sort((t,e)=>{let n=0;switch(this.sortBy){case"name":n=t.name.localeCompare(e.name);break;case"author":n=t.author.localeCompare(e.author);break;case"date":n=this.getDateValue(t.creation_date)-this.getDateValue(e.creation_date);break;case"update":n=this.getDateValue(t.last_update_date)-this.getDateValue(e.last_update_date);break}return this.sortOrder==="asc"?n:-n})},favoriteApps(){return this.combinedApps.filter(t=>this.favorites.includes(t.appName))}},methods:{getDateValue(t){if(!t)return 0;const e=new Date(t);return isNaN(e.getTime())?0:e.getTime()},toggleSortOrder(){this.sortOrder=this.sortOrder==="asc"?"desc":"asc"},toggleFavorite(t){console.log("Toggling favorite"),console.log(t);const e=this.favorites.indexOf(t);e===-1?this.favorites.push(t):this.favorites.splice(e,1),this.saveFavoritesToLocalStorage()},saveFavoritesToLocalStorage(){localStorage.setItem("appZooFavorites",JSON.stringify(this.favorites))},loadFavoritesFromLocalStorage(){const t=localStorage.getItem("appZooFavorites");console.log("savedFavorites",t),t&&(this.favorites=JSON.parse(t))},startServer(t){const e={client_id:this.$store.state.client_id,app_name:t};this.$store.state.messageBox.showBlockingMessage(`Loading server. -This may take some time the first time as some libraries need to be installed.`),Qe.post("/apps/start_server",e).then(n=>{this.$store.state.messageBox.hideMessage(),console.log("Server start initiated:",n.data.message),this.$notify({type:"success",title:"Server Starting",text:n.data.message})}).catch(n=>{var r,i;this.$store.state.messageBox.hideMessage(),console.error("Error starting server:",n),this.$notify({type:"error",title:"Server Start Failed",text:((i=(r=n.response)==null?void 0:r.data)==null?void 0:i.detail)||"An error occurred while starting the server"})})},triggerFileInput(){this.$refs.fileInput.click()},onFileSelected(t){this.selectedFile=t.target.files[0],this.message="",this.error="",this.uploadApp()},async uploadApp(){var e,n;if(!this.selectedFile){this.error="Please select a file to upload.";return}this.isUploading=!0,this.message="",this.error="";const t=new FormData;t.append("file",this.selectedFile),t.append("client_id",this.$store.state.client_id);try{const r=await Qe.post("/upload_app",t,{headers:{"Content-Type":"multipart/form-data"}});this.message=r.data.message,this.$refs.fileInput.value="",this.selectedFile=null}catch(r){console.error("Error uploading app:",r),this.error=((n=(e=r.response)==null?void 0:e.data)==null?void 0:n.detail)||"Failed to upload the app. Please try again."}finally{this.isUploading=!1}},async fetchApps(){this.loading=!0;try{const t=await Qe.get("/apps");this.apps=t.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 t=await Qe.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 t=await Qe.get("/github/apps");this.githubApps=t.data.apps,await this.fetchApps()}catch{this.showMessage("Failed to refresh GitHub apps.",!1)}finally{this.loading=!1}},async handleAppClick(t){if(t.installed){this.selectedApp=t;const e=await Qe.get(`/apps/${t.folder_name}/README.md`);this.appCode=dn(e.data)}else this.showMessage(`Please install ${t.folder_name} to view its code.`,!1)},backToZoo(){this.selectedApp=null,this.appCode=""},async installApp(t){this.loading=!0,this.$store.state.messageBox.showBlockingMessage(`Installing app ${t}`);try{await Qe.post(`/install/${t}`,{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(t){this.loading=!0;try{await Qe.post(`/uninstall/${t}`,{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(t){this.loading=!0;try{await Qe.post(`/delete/${t}`,{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(t){this.loading=!0;try{const e=await Qe.post("/open_app_in_vscode",{client_id:this.$store.state.client_id,app_name:t.folder_name});this.showMessage(e.data.message,!0)}catch{this.showMessage("Failed to open folder in VSCode.",!1)}finally{this.loading=!1}},async downloadApp(t){this.isLoading=!0,this.error=null;try{const e=await Qe.post("/download_app",{client_id:this.$store.state.client_id,app_name:t},{responseType:"arraybuffer"}),n=e.headers["content-disposition"],r=n&&n.match(/filename="?(.+)"?/i),i=r?r[1]:"app.zip",o=new Blob([e.data],{type:"application/zip"}),s=window.URL.createObjectURL(o),a=document.createElement("a");a.style.display="none",a.href=s,a.download=i,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(s),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(t){t.installed?window.open(`/apps/${t.folder_name}/index.html?client_id=${this.$store.state.client_id}`,"_blank"):this.showMessage(`Please install ${t.name} before opening.`,!1)},showMessage(t,e){this.message=t,this.successMessage=e,setTimeout(()=>{this.message=""},3e3)}},mounted(){this.fetchGithubApps(),this.loadFavoritesFromLocalStorage()}},O9r={class:"app-zoo background-color w-full p-6 pt-12 min-h-screen overflow-y-auto"},R9r={class:"panels-color shadow-lg rounded-lg p-4 max-w-4xl mx-auto mb-8"},N9r={class:"flex flex-wrap items-center justify-between gap-4"},D9r={class:"flex items-center space-x-4"},I9r=["disabled"],k9r={key:0},P9r={key:1,class:"error"},H9r={class:"relative flex-grow max-w-md"},V9r={class:"flex items-center space-x-4"},B9r=["value"],F9r={class:"flex items-center space-x-4"},$9r={for:"installed-only",class:"font-semibold"},U9r={for:"installed-only",class:"font-semibold"},G9r={class:"flex items-center space-x-4"},q9r={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},z9r={key:1,class:"pb-20"},j9r={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-8"},W9r={class:"text-2xl font-bold mb-4"},Y9r={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"},K9r={key:2,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},Z9r={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},X9r={class:"flex justify-between items-center mb-4"},J9r={class:"text-2xl font-bold"},efr=["srcdoc"],tfr={key:1,class:"text-center text-red-500"};function nfr(t,e,n,r,i,o){const s=pt("app-card");return k(),H("div",O9r,[g("nav",R9r,[g("div",N9r,[g("div",D9r,[g("button",{onClick:e[0]||(e[0]=(...a)=>o.fetchGithubApps&&o.fetchGithubApps(...a)),class:"btn btn-primary","aria-label":"Refresh apps from GitHub"},e[11]||(e[11]=[g("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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),nt(" Refresh ")])),g("button",{onClick:e[1]||(e[1]=(...a)=>o.openAppsFolder&&o.openAppsFolder(...a)),class:"btn btn-secondary","aria-label":"Open apps folder"},e[12]||(e[12]=[g("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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),nt(" Open Folder ")])),g("input",{type:"file",onChange:e[2]||(e[2]=(...a)=>o.onFileSelected&&o.onFileSelected(...a)),accept:".zip",ref:"fileInput",style:{display:"none"}},null,544),g("button",{onClick:e[3]||(e[3]=(...a)=>o.triggerFileInput&&o.triggerFileInput(...a)),disabled:i.isUploading,class:"btn-secondary text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Upload App"},le(i.isUploading?"Uploading...":"Upload App"),9,I9r)]),i.message?(k(),H("p",k9r,le(i.message),1)):re("",!0),i.error?(k(),H("p",P9r,le(i.error),1)):re("",!0),g("div",H9r,[J(g("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),[[we,i.searchQuery]]),e[13]||(e[13]=g("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"},[g("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))]),g("div",V9r,[e[15]||(e[15]=g("label",{for:"category-select",class:"font-semibold"},"Category:",-1)),J(g("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]=g("option",{value:"all"},"All Categories",-1)),(k(!0),H(Ue,null,ot(o.categories,a=>(k(),H("option",{key:a,value:a},le(a),9,B9r))),128))],512),[[pn,i.selectedCategory]])]),g("div",F9r,[g("label",$9r,[J(g("input",{id:"installed-only",type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=a=>i.showOnlyInstalled=a),class:"mr-2"},null,512),[[ut,i.showOnlyInstalled]]),e[16]||(e[16]=nt(" Show only installed apps "))]),g("label",U9r,[J(g("input",{id:"uninstalled-only",type:"checkbox","onUpdate:modelValue":e[7]||(e[7]=a=>i.showOnlyUnInstalled=a),class:"mr-2"},null,512),[[ut,i.showOnlyUnInstalled]]),e[17]||(e[17]=nt(" Show only non installed apps "))])]),g("div",G9r,[e[19]||(e[19]=g("label",{for:"sort-select",class:"font-semibold"},"Sort by:",-1)),J(g("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]=[g("option",{value:"name"},"Name",-1),g("option",{value:"author"},"Author",-1),g("option",{value:"date"},"Creation Date",-1),g("option",{value:"update"},"Last Update",-1)]),512),[[pn,i.sortBy]]),g("button",{onClick:e[9]||(e[9]=(...a)=>o.toggleSortOrder&&o.toggleSortOrder(...a)),class:"btn btn-secondary"},le(i.sortOrder==="asc"?"↑":"↓"),1)])])]),i.loading?(k(),H("div",q9r,e[20]||(e[20]=[g("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1),g("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)]))):(k(),H("div",z9r,[e[21]||(e[21]=g("h2",{class:"text-2xl font-bold mb-4"},"Favorite Apps",-1)),g("div",j9r,[(k(!0),H(Ue,null,ot(o.favoriteApps,a=>(k(),wt(s,{key:a.appName,app:a,onToggleFavorite:o.toggleFavorite,onInstall:o.installApp,onUninstall:o.uninstallApp,onDelete:o.deleteApp,onEdit:o.editApp,onDownload:o.downloadApp,onHelp:o.handleAppClick,onOpen:o.openApp,onStartServer:o.startServer},null,8,["app","onToggleFavorite","onInstall","onUninstall","onDelete","onEdit","onDownload","onHelp","onOpen","onStartServer"]))),128))]),g("h2",W9r,le(o.currentCategoryName)+" ("+le(o.sortedAndFilteredApps.length)+")",1),g("div",Y9r,[(k(!0),H(Ue,null,ot(o.sortedAndFilteredApps,a=>(k(),wt(s,{key:a.name,app:a,onToggleFavorite:o.toggleFavorite,onInstall:o.installApp,onUninstall:o.uninstallApp,onDelete:o.deleteApp,onEdit:o.editApp,onDownload:o.downloadApp,onHelp:o.handleAppClick,onOpen:o.openApp,onStartServer:o.startServer},null,8,["app","onToggleFavorite","onInstall","onUninstall","onDelete","onEdit","onDownload","onHelp","onOpen","onStartServer"]))),128))])])),i.selectedApp?(k(),H("div",K9r,[g("div",Z9r,[g("div",X9r,[g("h2",J9r,le(i.selectedApp.name),1),g("button",{onClick:e[10]||(e[10]=(...a)=>o.backToZoo&&o.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?(k(),H("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,efr)):(k(),H("p",tfr,"Please install this app to view its code."))])])):re("",!0),i.message?(k(),H("div",{key:3,class:je(["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}])},le(i.message),3)):re("",!0)])}const rfr=yt(M9r,[["render",nfr]]),ifr={components:{PersonalityEntry:tU},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(t){this.$store.commit("setConfig",t)}},combinedApps(){this.personalities.map(e=>e.name);const t=new Map(this.personalities.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{t.has(e.name)||t.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(t.values())},categories(){return[...new Set(this.combinedApps.map(t=>t.category))].sort((t,e)=>t.localeCompare(e))},filteredApps(){return this.combinedApps.filter(t=>{const e=t.name.toLowerCase().includes(this.searchQuery.toLowerCase())||t.author.toLowerCase().includes(this.searchQuery.toLowerCase())||t.description.toLowerCase().includes(this.searchQuery.toLowerCase()),n=this.selectedCategory==="all"||t.category===this.selectedCategory;return e&&n})},sortedAndFilteredPersonalities(){return[...this.filteredApps].sort((t,e)=>{let n=0;switch(this.sortBy){case"name":n=t.name.localeCompare(e.name);break;case"author":n=t.author.localeCompare(e.author);break;case"date":n=this.getDateValue(t.creation_date)-this.getDateValue(e.creation_date);break;case"update":n=this.getDateValue(t.last_update_date)-this.getDateValue(e.last_update_date);break}return this.sortOrder==="asc"?n:-n})},favoriteApps(){return this.combinedApps.filter(t=>this.favorites.includes(t.uid))}},methods:{getDateValue(t){if(!t)return 0;const e=new Date(t);return isNaN(e.getTime())?0:e.getTime()},async onPersonalitySelected(t){if(console.log("on pers",t),this.isLoading&&this.$store.state.toast.showToast("Loading... please wait",4,!1),this.isLoading=!0,console.log("selecting ",t),t){if(t.selected){this.$store.state.toast.showToast("Personality already selected",4,!0),this.isLoading=!1;return}let e=t.language==null?t.full_path:t.full_path+":"+t.language;if(console.log("pth",e),t.isMounted&&this.configFile.personalities.includes(e)){const n=await this.select_personality(t);console.log("pers is mounted",n),n&&n.status&&n.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(n)}}const Lur=["INPUT","TEXTAREA","SELECT"];function gG(t){return Lur.includes(t.tagName)}let ev=null;function Cur(t){ev=t}function Ci(){if(!ev)throw new Error("providePlugin() must be called before usePlugin()");return{viewModel:ev}}function Ji(){const{viewModel:t}=Ci();return{graph:au(t.value,"displayedGraph"),switchGraph:t.value.switchGraph}}function _G(t){const{graph:e}=Ji(),n=Ct(null),r=Ct(null);return{dragging:_t(()=>!!n.value),onPointerDown:l=>{n.value={x:l.pageX,y:l.pageY},r.value={x:t.value.x,y:t.value.y}},onPointerMove:l=>{if(n.value){const c=l.pageX-n.value.x,u=l.pageY-n.value.y;t.value.x=r.value.x+c/e.value.scaling,t.value.y=r.value.y+u/e.value.scaling}},onPointerUp:()=>{n.value=null,r.value=null}}}function QG(t,e,n){if(!e.template)return!1;if(yc(e.template)===n)return!0;const r=t.graphTemplates.find(o=>yc(o)===n);return r?r.nodes.filter(o=>o.type.startsWith(l0)).some(o=>QG(t,e,o.type)):!1}function vG(t){return _t(()=>{const e=Array.from(t.value.editor.nodeTypes.entries()),n=new Set(e.map(([,i])=>i.category)),r=[];for(const i of n.values()){let o=e.filter(([,s])=>s.category===i);t.value.displayedGraph.template?o=o.filter(([s])=>!QG(t.value.editor,t.value.displayedGraph,s)):o=o.filter(([s])=>![Qc,vc].includes(s)),o.length>0&&r.push({name:i,nodeTypes:Object.fromEntries(o)})}return r.sort((i,o)=>i.name==="default"?-1:o.name==="default"||i.name>o.name?1:-1),r})}function yG(){const{graph:t}=Ji();return{transform:(n,r)=>{const i=n/t.value.scaling-t.value.panning.x,o=r/t.value.scaling-t.value.panning.y;return[i,o]}}}function Aur(){const{graph:t}=Ji();let e=[],n=-1,r={x:0,y:0};const i=_t(()=>t.value.panning),o=_G(i),s=_t(()=>({"transform-origin":"0 0",transform:`scale(${t.value.scaling}) translate(${t.value.panning.x}px, ${t.value.panning.y}px)`})),a=(f,m,T)=>{const Q=[f/t.value.scaling-t.value.panning.x,m/t.value.scaling-t.value.panning.y],_=[f/T-t.value.panning.x,m/T-t.value.panning.y],v=[_[0]-Q[0],_[1]-Q[1]];t.value.panning.x+=v[0],t.value.panning.y+=v[1],t.value.scaling=T},l=f=>{f.preventDefault();let m=f.deltaY;f.deltaMode===1&&(m*=32);const T=t.value.scaling*(1-m/3e3);a(f.offsetX,f.offsetY,T)},c=()=>({ax:e[0].clientX,ay:e[0].clientY,bx:e[1].clientX,by:e[1].clientY});return{styles:s,...o,onPointerDown:f=>{if(e.push(f),o.onPointerDown(f),e.length===2){const{ax:m,ay:T,bx:Q,by:_}=c();r={x:m+(Q-m)/2,y:T+(_-T)/2}}},onPointerMove:f=>{for(let m=0;m0){const E=t.value.scaling*(1+(b-n)/500);a(r.x,r.y,E)}n=b}else o.onPointerMove(f)},onPointerUp:f=>{e=e.filter(m=>m.pointerId!==f.pointerId),n=-1,o.onPointerUp()},onMouseWheel:l}}var Bi=(t=>(t[t.NONE=0]="NONE",t[t.ALLOWED=1]="ALLOWED",t[t.FORBIDDEN=2]="FORBIDDEN",t))(Bi||{});const bG=Symbol();function wur(){const{graph:t}=Ji(),e=Ct(null),n=Ct(null),r=a=>{e.value&&(e.value.mx=a.offsetX/t.value.scaling-t.value.panning.x,e.value.my=a.offsetY/t.value.scaling-t.value.panning.y)},i=()=>{if(n.value){if(e.value)return;const a=t.value.connections.find(l=>l.to===n.value);n.value.isInput&&a?(e.value={status:Bi.NONE,from:a.from},t.value.removeConnection(a)):e.value={status:Bi.NONE,from:n.value},e.value.mx=void 0,e.value.my=void 0}},o=()=>{if(e.value&&n.value){if(e.value.from===n.value)return;t.value.addConnection(e.value.from,e.value.to)}e.value=null},s=a=>{if(n.value=a??null,a&&e.value){e.value.to=a;const l=t.value.checkConnection(e.value.from,e.value.to);if(e.value.status=l.connectionAllowed?Bi.ALLOWED:Bi.FORBIDDEN,l.connectionAllowed){const c=l.connectionsInDanger.map(u=>u.id);t.value.connections.forEach(u=>{c.includes(u.id)&&(u.isInDanger=!0)})}}else!a&&e.value&&(e.value.to=void 0,e.value.status=Bi.NONE,t.value.connections.forEach(l=>{l.isInDanger=!1}))};return Nl(bG,{temporaryConnection:e,hoveredOver:s}),{temporaryConnection:e,onMouseMove:r,onMouseDown:i,onMouseUp:o,hoveredOver:s}}function Mur(t){const e=Ct(!1),n=Ct(0),r=Ct(0),i=vG(t),{transform:o}=yG(),s=_t(()=>{let u=[];const d={};for(const f of i.value){const m=Object.entries(f.nodeTypes).map(([T,Q])=>({label:Q.title,value:"addNode:"+T}));f.name==="default"?u=m:d[f.name]=m}const h=[...Object.entries(d).map(([f,m])=>({label:f,submenu:m}))];return h.length>0&&u.length>0&&h.push({isDivider:!0}),h.push(...u),h}),a=_t(()=>t.value.settings.contextMenu.additionalItems.length===0?s.value:[{label:"Add node",submenu:s.value},...t.value.settings.contextMenu.additionalItems.map(u=>"isDivider"in u||"submenu"in u?u:{label:u.label,value:"command:"+u.command,disabled:!t.value.commandHandler.canExecuteCommand(u.command)})]);function l(u){const d=u.target;if(!(d instanceof Element)||gG(d))return;u.preventDefault(),e.value=!0;const h=d.getBoundingClientRect(),m=d.closest(".baklava-editor").getBoundingClientRect();n.value=h.x+u.offsetX-m.x,r.value=h.y+u.offsetY-m.y}function c(u){if(u.startsWith("addNode:")){const d=u.substring(8),h=t.value.editor.nodeTypes.get(d);if(!h)return;const f=Zr(new h.type);t.value.displayedGraph.addNode(f);const[m,T]=o(n.value,r.value);f.position.x=m,f.position.y=T}else if(u.startsWith("command:")){const d=u.substring(8);t.value.commandHandler.canExecuteCommand(d)&&t.value.commandHandler.executeCommand(d)}}return{show:e,x:n,y:r,items:a,open:l,onClick:c}}const ru="START_SELECTION_BOX";function Our(t){const{viewModel:e}=Ci(),{graph:n}=Ji(),r=_t(()=>n.value.nodes),i=Ct(!1),o=Ct(!1),s=Ct([0,0]),a=Ct([0,0]);Er(e,()=>{e.value.commandHandler.hasCommand(ru)||(e.value.commandHandler.registerCommand(ru,{canExecute:()=>!0,execute(){i.value=!0}}),e.value.commandHandler.registerHotkey(["b"],ru))},{immediate:!0});function l(_){return[_.clientX-t.value.getBoundingClientRect().left,_.clientY-t.value.getBoundingClientRect().top]}function c(_){return i.value?(o.value=!0,i.value=!1,s.value=l(_),a.value=l(_),document.addEventListener("pointermove",u),document.addEventListener("pointerup",d),!0):!1}function u(_){s.value=l(_)}function d(_){document.removeEventListener("pointermove",u),document.removeEventListener("pointerup",d),s.value=l(_),o.value=!1;const v=h();for(const y of v)e.value.displayedGraph.selectedNodes.push(y)}function h(){const _=f(),y=document.querySelector(".baklava-editor").getBoundingClientRect();return r.value.filter(b=>{const E=m(b,y);return T(_,E)})}function f(){return{left:Math.min(s.value[0],a.value[0]),top:Math.min(s.value[1],a.value[1]),right:Math.max(s.value[0],a.value[0]),bottom:Math.max(s.value[1],a.value[1])}}function m(_,v){const y=document.getElementById(_.id),b=y?y.getBoundingClientRect():{x:0,y:0,width:0,height:0},E=b.x-v.left,x=b.y-v.top;return{left:E,top:x,right:E+b.width,bottom:x+b.height}}function T(_,v){return _.leftv.left&&_.topv.top}function Q(){return{width:Math.abs(a.value[0]-s.value[0])+"px",height:Math.abs(a.value[1]-s.value[1])+"px",left:(a.value[0]>s.value[0]?s.value[0]:a.value[0])+"px",top:(a.value[1]>s.value[1]?s.value[1]:a.value[1])+"px"}}return Zr({startSelection:i,isSelecting:o,start:s,end:a,onPointerDown:c,getStyles:Q})}const Rur=ir({setup(){const{viewModel:t}=Ci(),{graph:e}=Ji();return{styles:_t(()=>{const r=t.value.settings.background,i=e.value.panning.x*e.value.scaling,o=e.value.panning.y*e.value.scaling,s=e.value.scaling*r.gridSize,a=s/r.gridDivision,l=`${s}px ${s}px, ${s}px ${s}px`,c=e.value.scaling>r.subGridVisibleThreshold?`, ${a}px ${a}px, ${a}px ${a}px`:"";return{backgroundPosition:`left ${i}px top ${o}px`,backgroundSize:`${l} ${c}`}})}}}),Wn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};function Nur(t,e,n,r,i,o){return k(),H("div",{class:"background",style:xn(t.styles)},null,4)}const Dur=Wn(Rur,[["render",Nur]]);function Iur(t){return wk()?(gq(t),!0):!1}function pE(t){return typeof t=="function"?t():Bt(t)}const EG=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const kur=Object.prototype.toString,Pur=t=>kur.call(t)==="[object Object]",iu=()=>{},Hur=Vur();function Vur(){var t,e;return EG&&((t=window==null?void 0:window.navigator)==null?void 0:t.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 Bur(t,e,n=!1){return e.reduce((r,i)=>(i in t&&(!n||t[i]!==void 0)&&(r[i]=t[i]),r),{})}function Fur(t,e={}){if(!lr(t))return zq(t);const n=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const r in t.value)n[r]=qq(()=>({get(){return t.value[r]},set(i){var o;if((o=pE(e.replaceRef))!=null?o:!0)if(Array.isArray(t.value)){const a=[...t.value];a[r]=i,t.value=a}else{const a={...t.value,[r]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(t.value)),t.value=a}else t.value[r]=i}}));return n}function g4(t){var e;const n=pE(t);return(e=n==null?void 0:n.$el)!=null?e:n}const hE=EG?window:void 0;function I4(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=hE):[e,n,r,i]=t,!e)return iu;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(u=>u()),o.length=0},a=(u,d,h,f)=>(u.addEventListener(d,h,f),()=>u.removeEventListener(d,h,f)),l=Er(()=>[g4(e),pE(i)],([u,d])=>{if(s(),!u)return;const h=Pur(d)?{...d}:d;o.push(...n.flatMap(f=>r.map(m=>a(u,f,m,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),s()};return Iur(c),c}let uk=!1;function xG(t,e,n={}){const{window:r=hE,ignore:i=[],capture:o=!0,detectIframe:s=!1}=n;if(!r)return iu;Hur&&!uk&&(uk=!0,Array.from(r.document.body.children).forEach(h=>h.addEventListener("click",iu)),r.document.documentElement.addEventListener("click",iu));let a=!0;const l=h=>i.some(f=>{if(typeof f=="string")return Array.from(r.document.querySelectorAll(f)).some(m=>m===h.target||h.composedPath().includes(m));{const m=g4(f);return m&&(h.target===m||h.composedPath().includes(m))}}),u=[I4(r,"click",h=>{const f=g4(t);if(!(!f||f===h.target||h.composedPath().includes(f))){if(h.detail===0&&(a=!l(h)),!a){a=!0;return}e(h)}},{passive:!0,capture:o}),I4(r,"pointerdown",h=>{const f=g4(t);a=!l(h)&&!!(f&&!h.composedPath().includes(f))},{passive:!0}),s&&I4(r,"blur",h=>{setTimeout(()=>{var f;const m=g4(t);((f=r.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!(m!=null&&m.contains(r.document.activeElement))&&e(h)},0)})].filter(Boolean);return()=>u.forEach(h=>h())}const SG={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},$ur=Object.keys(SG);function Uur(t={}){const{target:e=hE}=t,n=Ct(!1),r=Ct(t.initialValue||{});Object.assign(r.value,SG,r.value);const i=o=>{n.value=!0,!(t.pointerTypes&&!t.pointerTypes.includes(o.pointerType))&&(r.value=Bur(o,$ur,!1))};if(e){const o={passive:!0};I4(e,["pointerdown","pointermove","pointerup"],i,o),I4(e,"pointerleave",()=>n.value=!1,o)}return{...Fur(r),isInside:n}}const Gur=["onMouseenter","onMouseleave","onClick"],qur={class:"flex-fill"},zur={key:0,class:"__submenu-icon",style:{"line-height":"1em"}},jur=g("svg",{width:"13",height:"13",viewBox:"-60 120 250 250"},[g("path",{d:"M160.875 279.5625 L70.875 369.5625 L70.875 189.5625 L160.875 279.5625 Z",stroke:"none",fill:"white"})],-1),Wur=[jur],TE=ir({__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(t,{emit:e}){const n=t,r=e;let i=null;const o=Ct(null),s=Ct(-1),a=Ct(0),l=Ct({x:!1,y:!1}),c=_t(()=>n.flippable&&(l.value.x||n.isFlipped.x)),u=_t(()=>n.flippable&&(l.value.y||n.isFlipped.y)),d=_t(()=>{const v={};return n.isNested||(v.top=(u.value?n.y-a.value:n.y)+"px",v.left=n.x+"px"),v}),h=_t(()=>({"--flipped-x":c.value,"--flipped-y":u.value,"--nested":n.isNested})),f=_t(()=>n.items.map(v=>({...v,hover:!1})));Er([()=>n.y,()=>n.items],()=>{var v,y,b,E;a.value=n.items.length*30;const x=((y=(v=o.value)==null?void 0:v.parentElement)==null?void 0:y.offsetWidth)??0,L=((E=(b=o.value)==null?void 0:b.parentElement)==null?void 0:E.offsetHeight)??0;l.value.x=!n.isNested&&n.x>x*.75,l.value.y=!n.isNested&&n.y+a.value>L-20}),xG(o,()=>{n.modelValue&&r("update:modelValue",!1)});const m=v=>{!v.submenu&&v.value&&(r("click",v.value),r("update:modelValue",!1))},T=v=>{r("click",v),s.value=-1,n.isNested||r("update:modelValue",!1)},Q=(v,y)=>{n.items[y].submenu&&(s.value=y,i!==null&&(clearTimeout(i),i=null))},_=(v,y)=>{n.items[y].submenu&&(i=window.setTimeout(()=>{s.value=-1,i=null},200))};return(v,y)=>{const b=pt("ContextMenu",!0);return k(),wt(qi,{name:"slide-fade"},{default:He(()=>[J(g("div",{ref_key:"el",ref:o,class:je(["baklava-context-menu",h.value]),style:xn(d.value)},[(k(!0),H(Ue,null,ot(f.value,(E,x)=>(k(),H(Ue,null,[E.isDivider?(k(),H("div",{key:`d-${x}`,class:"divider"})):(k(),H("div",{key:`i-${x}`,class:je(["item",{submenu:!!E.submenu,"--disabled":!!E.disabled}]),onMouseenter:L=>Q(L,x),onMouseleave:L=>_(L,x),onClick:he(L=>m(E),["stop","prevent"])},[g("div",qur,le(E.label),1),E.submenu?(k(),H("div",zur,Wur)):re("",!0),E.submenu?(k(),wt(b,{key:1,"model-value":s.value===x,items:E.submenu,"is-nested":!0,"is-flipped":{x:c.value,y:u.value},flippable:v.flippable,onClick:T},null,8,["model-value","items","is-flipped","flippable"])):re("",!0)],42,Gur))],64))),256))],6),[[Pt,v.modelValue]])]),_:1})}}}),Yur={},Kur={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"},Zur=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),Xur=g("circle",{cx:"12",cy:"12",r:"1"},null,-1),Jur=g("circle",{cx:"12",cy:"19",r:"1"},null,-1),edr=g("circle",{cx:"12",cy:"5",r:"1"},null,-1),tdr=[Zur,Xur,Jur,edr];function ndr(t,e){return k(),H("svg",Kur,tdr)}const LG=Wn(Yur,[["render",ndr]]),rdr=["id"],idr={key:0,class:"__tooltip"},odr={key:2,class:"align-middle"},dk=ir({__name:"NodeInterface",props:{node:{},intf:{}},setup(t){const e=(Q,_=100)=>{const v=typeof(Q==null?void 0:Q.toString)=="function"?String(Q):"";return v.length>_?v.slice(0,_)+"...":v},n=t,{viewModel:r}=Ci(),{hoveredOver:i,temporaryConnection:o}=Gi(bG),s=Ct(null),a=_t(()=>n.intf.connectionCount>0),l=Ct(!1),c=_t(()=>r.value.settings.displayValueOnHover&&l.value),u=_t(()=>({"--input":n.intf.isInput,"--output":!n.intf.isInput,"--connected":a.value})),d=_t(()=>n.intf.component&&(!n.intf.isInput||!n.intf.port||n.intf.connectionCount===0)),h=()=>{l.value=!0,i(n.intf)},f=()=>{l.value=!1,i(void 0)},m=()=>{s.value&&r.value.hooks.renderInterface.execute({intf:n.intf,el:s.value})},T=()=>{const Q=r.value.displayedGraph.sidebar;Q.nodeId=n.node.id,Q.optionName=n.intf.name,Q.visible=!0};return Zo(m),d0(m),(Q,_)=>{var v;return k(),H("div",{id:Q.intf.id,ref_key:"el",ref:s,class:je(["baklava-node-interface",u.value])},[Q.intf.port?(k(),H("div",{key:0,class:je(["__port",{"--selected":((v=Bt(o))==null?void 0:v.from)===Q.intf}]),onPointerover:h,onPointerout:f},[er(Q.$slots,"portTooltip",{showTooltip:c.value},()=>[c.value===!0?(k(),H("span",idr,le(e(Q.intf.value)),1)):re("",!0)])],34)):re("",!0),d.value?(k(),wt(Rd(Q.intf.component),{key:1,modelValue:Q.intf.value,"onUpdate:modelValue":_[0]||(_[0]=y=>Q.intf.value=y),node:Q.node,intf:Q.intf,onOpenSidebar:T},null,40,["modelValue","node","intf"])):(k(),H("span",odr,le(Q.intf.name),1))],10,rdr)}}}),sdr=["id","data-node-type"],adr={class:"__title-label"},ldr={class:"__menu"},cdr={class:"__outputs"},udr={class:"__inputs"},ddr=ir({__name:"Node",props:{node:{},selected:{type:Boolean,default:!1},dragging:{type:Boolean}},emits:["select","start-drag"],setup(t,{emit:e}){const n=t,r=e,{viewModel:i}=Ci(),{graph:o,switchGraph:s}=Ji(),a=Ct(null),l=Ct(!1),c=Ct(""),u=Ct(null),d=Ct(!1),h=Ct(!1),f=_t(()=>{const N=[{value:"rename",label:"Rename"},{value:"delete",label:"Delete"}];return n.node.type.startsWith(l0)&&N.push({value:"editSubgraph",label:"Edit Subgraph"}),N}),m=_t(()=>({"--selected":n.selected,"--dragging":n.dragging,"--two-column":!!n.node.twoColumn})),T=_t(()=>({"--reverse-y":n.node.reverseY??i.value.settings.nodes.reverseY})),Q=_t(()=>{var N,P;return{top:`${((N=n.node.position)==null?void 0:N.y)??0}px`,left:`${((P=n.node.position)==null?void 0:P.x)??0}px`,"--width":`${n.node.width??i.value.settings.nodes.defaultWidth}px`}}),_=_t(()=>Object.values(n.node.inputs).filter(N=>!N.hidden)),v=_t(()=>Object.values(n.node.outputs).filter(N=>!N.hidden)),y=()=>{r("select")},b=N=>{n.selected||y(),r("start-drag",N)},E=()=>{h.value=!0},x=async N=>{var P;switch(N){case"delete":o.value.removeNode(n.node);break;case"rename":c.value=n.node.title,l.value=!0,await ze(),(P=u.value)==null||P.focus();break;case"editSubgraph":s(n.node.template);break}},L=()=>{n.node.title=c.value,l.value=!1},M=()=>{a.value&&i.value.hooks.renderNode.execute({node:n.node,el:a.value})},C=N=>{d.value=!0,N.preventDefault()},A=N=>{if(!d.value)return;const P=n.node.width+N.movementX/o.value.scaling,O=i.value.settings.nodes.minWidth,F=i.value.settings.nodes.maxWidth;n.node.width=Math.max(O,Math.min(F,P))},I=()=>{d.value=!1};return Zo(()=>{M(),window.addEventListener("mousemove",A),window.addEventListener("mouseup",I)}),d0(M),Sc(()=>{window.removeEventListener("mousemove",A),window.removeEventListener("mouseup",I)}),(N,P)=>(k(),H("div",{id:N.node.id,ref_key:"el",ref:a,class:je(["baklava-node",m.value]),style:xn(Q.value),"data-node-type":N.node.type,onPointerdown:y},[Bt(i).settings.nodes.resizable?(k(),H("div",{key:0,class:"__resize-handle",onMousedown:C},null,32)):re("",!0),er(N.$slots,"title",{},()=>[g("div",{class:"__title",onPointerdown:he(b,["self","stop"])},[l.value?J((k(),H("input",{key:1,ref_key:"renameInputEl",ref:u,"onUpdate:modelValue":P[1]||(P[1]=O=>c.value=O),type:"text",class:"baklava-input",placeholder:"Node Name",onBlur:L,onKeydown:Xr(L,["enter"])},null,544)),[[we,c.value]]):(k(),H(Ue,{key:0},[g("div",adr,le(N.node.title),1),g("div",ldr,[oe(LG,{class:"--clickable",onClick:E}),oe(Bt(TE),{modelValue:h.value,"onUpdate:modelValue":P[0]||(P[0]=O=>h.value=O),x:0,y:0,items:f.value,onClick:x},null,8,["modelValue","items"])])],64))],32)]),er(N.$slots,"content",{},()=>[g("div",{class:je(["__content",T.value]),onKeydown:P[2]||(P[2]=Xr(he(()=>{},["stop"]),["delete"]))},[g("div",cdr,[(k(!0),H(Ue,null,ot(v.value,O=>er(N.$slots,"nodeInterface",{key:O.id,type:"output",node:N.node,intf:O},()=>[oe(dk,{node:N.node,intf:O},null,8,["node","intf"])])),128))]),g("div",udr,[(k(!0),H(Ue,null,ot(_.value,O=>er(N.$slots,"nodeInterface",{key:O.id,type:"input",node:N.node,intf:O},()=>[oe(dk,{node:N.node,intf:O},null,8,["node","intf"])])),128))])],34)])],46,sdr))}}),fdr=ir({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:Bi.NONE},isTemporary:{type:Boolean,default:!1}},setup(t){const{viewModel:e}=Ci(),{graph:n}=Ji(),r=(s,a)=>{const l=(s+n.value.panning.x)*n.value.scaling,c=(a+n.value.panning.y)*n.value.scaling;return[l,c]},i=_t(()=>{const[s,a]=r(t.x1,t.y1),[l,c]=r(t.x2,t.y2);if(e.value.settings.useStraightConnections)return`M ${s} ${a} L ${l} ${c}`;{const u=.3*Math.abs(s-l);return`M ${s} ${a} C ${s+u} ${a}, ${l-u} ${c}, ${l} ${c}`}}),o=_t(()=>({"--temporary":t.isTemporary,"--allowed":t.state===Bi.ALLOWED,"--forbidden":t.state===Bi.FORBIDDEN}));return{d:i,classes:o}}}),pdr=["d"];function hdr(t,e,n,r,i,o){return k(),H("path",{class:je(["baklava-connection",t.classes]),d:t.d},null,10,pdr)}const CG=Wn(fdr,[["render",hdr]]);function Tdr(t){return document.getElementById(t.id)}function bc(t){const e=document.getElementById(t.id),n=e==null?void 0:e.getElementsByClassName("__port");return{node:(e==null?void 0:e.closest(".baklava-node"))??null,interface:e,port:n&&n.length>0?n[0]:null}}const mdr=ir({components:{"connection-view":CG},props:{connection:{type:Object,required:!0}},setup(t){const{graph:e}=Ji();let n;const r=Ct({x1:0,y1:0,x2:0,y2:0}),i=_t(()=>t.connection.isInDanger?Bi.FORBIDDEN:Bi.NONE),o=_t(()=>{var c;return(c=e.value.findNodeById(t.connection.from.nodeId))==null?void 0:c.position}),s=_t(()=>{var c;return(c=e.value.findNodeById(t.connection.to.nodeId))==null?void 0:c.position}),a=c=>c.node&&c.interface&&c.port?[c.node.offsetLeft+c.interface.offsetLeft+c.port.offsetLeft+c.port.clientWidth/2,c.node.offsetTop+c.interface.offsetTop+c.port.offsetTop+c.port.clientHeight/2]:[0,0],l=()=>{const c=bc(t.connection.from),u=bc(t.connection.to);c.node&&u.node&&(n||(n=new ResizeObserver(()=>{l()}),n.observe(c.node),n.observe(u.node)));const[d,h]=a(c),[f,m]=a(u);r.value={x1:d,y1:h,x2:f,y2:m}};return Zo(async()=>{await ze(),l()}),Sc(()=>{n&&n.disconnect()}),Er([o,s],()=>l(),{deep:!0}),{d:r,state:i}}});function gdr(t,e,n,r,i,o){const s=pt("connection-view");return k(),wt(s,{x1:t.d.x1,y1:t.d.y1,x2:t.d.x2,y2:t.d.y2,state:t.state},null,8,["x1","y1","x2","y2","state"])}const _dr=Wn(mdr,[["render",gdr]]);function _d(t){return t.node&&t.interface&&t.port?[t.node.offsetLeft+t.interface.offsetLeft+t.port.offsetLeft+t.port.clientWidth/2,t.node.offsetTop+t.interface.offsetTop+t.port.offsetTop+t.port.clientHeight/2]:[0,0]}const Qdr=ir({components:{"connection-view":CG},props:{connection:{type:Object,required:!0}},setup(t){const e=_t(()=>t.connection?t.connection.status:Bi.NONE);return{d:_t(()=>{if(!t.connection)return{input:[0,0],output:[0,0]};const r=_d(bc(t.connection.from)),i=t.connection.to?_d(bc(t.connection.to)):[t.connection.mx||r[0],t.connection.my||r[1]];return t.connection.from.isInput?{input:i,output:r}:{input:r,output:i}}),status:e}}});function vdr(t,e,n,r,i,o){const s=pt("connection-view");return k(),wt(s,{x1:t.d.input[0],y1:t.d.input[1],x2:t.d.output[0],y2:t.d.output[1],state:t.status,"is-temporary":""},null,8,["x1","y1","x2","y2","state"])}const ydr=Wn(Qdr,[["render",vdr]]),bdr=ir({setup(){const{viewModel:t}=Ci(),{graph:e}=Ji(),n=Ct(null),r=au(t.value.settings.sidebar,"width"),i=_t(()=>t.value.settings.sidebar.resizable),o=_t(()=>{const d=e.value.sidebar.nodeId;return e.value.nodes.find(h=>h.id===d)}),s=_t(()=>({width:`${r.value}px`})),a=_t(()=>o.value?[...Object.values(o.value.inputs),...Object.values(o.value.outputs)].filter(h=>h.displayInSidebar&&h.component):[]),l=()=>{e.value.sidebar.visible=!1},c=()=>{window.addEventListener("mousemove",u),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",u)},{once:!0})},u=d=>{var h,f;const m=((f=(h=n.value)==null?void 0:h.parentElement)==null?void 0:f.getBoundingClientRect().width)??500;let T=r.value-d.movementX;T<300?T=300:T>.9*m&&(T=.9*m),r.value=T};return{el:n,graph:e,resizable:i,node:o,styles:s,displayedInterfaces:a,startResize:c,close:l}}}),Edr={class:"__header"},xdr={class:"__node-name"};function Sdr(t,e,n,r,i,o){return k(),H("div",{ref:"el",class:je(["baklava-sidebar",{"--open":t.graph.sidebar.visible}]),style:xn(t.styles)},[t.resizable?(k(),H("div",{key:0,class:"__resizer",onMousedown:e[0]||(e[0]=(...s)=>t.startResize&&t.startResize(...s))},null,32)):re("",!0),g("div",Edr,[g("button",{tabindex:"-1",class:"__close",onClick:e[1]||(e[1]=(...s)=>t.close&&t.close(...s))},"×"),g("div",xdr,[g("b",null,le(t.node?t.node.title:""),1)])]),(k(!0),H(Ue,null,ot(t.displayedInterfaces,s=>(k(),H("div",{key:s.id,class:"__interface"},[(k(),wt(Rd(s.component),{modelValue:s.value,"onUpdate:modelValue":a=>s.value=a,node:t.node,intf:s},null,8,["modelValue","onUpdate:modelValue","node","intf"]))]))),128))],6)}const Ldr=Wn(bdr,[["render",Sdr]]),Cdr=ir({__name:"Minimap",setup(t){const{viewModel:e}=Ci(),{graph:n}=Ji(),r=Ct(null),i=Ct(!1);let o,s=!1,a={x1:0,y1:0,x2:0,y2:0},l;const c=()=>{var x,L;if(!o)return;o.canvas.width=r.value.offsetWidth,o.canvas.height=r.value.offsetHeight;const M=new Map,C=new Map;for(const O of n.value.nodes){const F=Tdr(O),V=(F==null?void 0:F.offsetWidth)??0,U=(F==null?void 0:F.offsetHeight)??0,G=((x=O.position)==null?void 0:x.x)??0,K=((L=O.position)==null?void 0:L.y)??0;M.set(O,{x1:G,y1:K,x2:G+V,y2:K+U}),C.set(O,F)}const A={x1:Number.MAX_SAFE_INTEGER,y1:Number.MAX_SAFE_INTEGER,x2:Number.MIN_SAFE_INTEGER,y2:Number.MIN_SAFE_INTEGER};for(const O of M.values())O.x1A.x2&&(A.x2=O.x2),O.y2>A.y2&&(A.y2=O.y2);const I=50;A.x1-=I,A.y1-=I,A.x2+=I,A.y2+=I,a=A;const N=o.canvas.width/o.canvas.height,P=(a.x2-a.x1)/(a.y2-a.y1);if(N>P){const O=(N-P)*(a.y2-a.y1)*.5;a.x1-=O,a.x2+=O}else{const O=a.x2-a.x1,F=a.y2-a.y1,V=(O-N*F)/N*.5;a.y1-=V,a.y2+=V}o.clearRect(0,0,o.canvas.width,o.canvas.height),o.strokeStyle="white";for(const O of n.value.connections){const[F,V]=_d(bc(O.from)),[U,G]=_d(bc(O.to)),[K,W]=u(F,V),[te,de]=u(U,G);if(o.beginPath(),o.moveTo(K,W),e.value.settings.useStraightConnections)o.lineTo(te,de);else{const X=.3*Math.abs(K-te);o.bezierCurveTo(K+X,W,te-X,de,te,de)}o.stroke()}o.strokeStyle="lightgray";for(const[O,F]of M.entries()){const[V,U]=u(F.x1,F.y1),[G,K]=u(F.x2,F.y2);o.fillStyle=h(C.get(O)),o.beginPath(),o.rect(V,U,G-V,K-U),o.fill(),o.stroke()}if(i.value){const O=m(),[F,V]=u(O.x1,O.y1),[U,G]=u(O.x2,O.y2);o.fillStyle="rgba(255, 255, 255, 0.2)",o.fillRect(F,V,U-F,G-V)}},u=(x,L)=>[(x-a.x1)/(a.x2-a.x1)*o.canvas.width,(L-a.y1)/(a.y2-a.y1)*o.canvas.height],d=(x,L)=>[x*(a.x2-a.x1)/o.canvas.width+a.x1,L*(a.y2-a.y1)/o.canvas.height+a.y1],h=x=>{if(x){const L=x.querySelector(".__content");if(L){const C=f(L);if(C)return C}const M=f(x);if(M)return M}return"gray"},f=x=>{const L=getComputedStyle(x).backgroundColor;if(L&&L!=="rgba(0, 0, 0, 0)")return L},m=()=>{const x=r.value.parentElement.offsetWidth,L=r.value.parentElement.offsetHeight,M=x/n.value.scaling-n.value.panning.x,C=L/n.value.scaling-n.value.panning.y;return{x1:-n.value.panning.x,y1:-n.value.panning.y,x2:M,y2:C}},T=x=>{x.button===0&&(s=!0,Q(x))},Q=x=>{if(s){const[L,M]=d(x.offsetX,x.offsetY),C=m(),A=(C.x2-C.x1)/2,I=(C.y2-C.y1)/2;n.value.panning.x=-(L-A),n.value.panning.y=-(M-I)}},_=()=>{s=!1},v=()=>{i.value=!0},y=()=>{i.value=!1,_()};Er([i,n.value.panning,()=>n.value.scaling,()=>n.value.connections.length],()=>{c()});const b=_t(()=>n.value.nodes.map(x=>x.position)),E=_t(()=>n.value.nodes.map(x=>x.width));return Er([b,E],()=>{c()},{deep:!0}),Zo(()=>{o=r.value.getContext("2d"),o.imageSmoothingQuality="high",c(),l=setInterval(c,500)}),Sc(()=>{clearInterval(l)}),(x,L)=>(k(),H("canvas",{ref_key:"canvas",ref:r,class:"baklava-minimap",onMouseenter:v,onMouseleave:y,onMousedown:he(T,["self"]),onMousemove:he(Q,["self"]),onMouseup:_,onContextmenu:L[0]||(L[0]=he(()=>{},["stop","prevent"]))},null,544))}}),Adr=ir({components:{ContextMenu:TE,VerticalDots:LG},props:{type:{type:String,required:!0},title:{type:String,required:!0}},setup(t){const{viewModel:e}=Ci(),{switchGraph:n}=Ji(),r=Ct(!1),i=_t(()=>t.type.startsWith(l0));return{showContextMenu:r,hasContextMenu:i,contextMenuItems:[{label:"Edit Subgraph",value:"editSubgraph"},{label:"Delete Subgraph",value:"deleteSubgraph"}],openContextMenu:()=>{r.value=!0},onContextMenuClick:l=>{const c=t.type.substring(l0.length),u=e.value.editor.graphTemplates.find(d=>d.id===c);if(u)switch(l){case"editSubgraph":n(u);break;case"deleteSubgraph":e.value.editor.removeGraphTemplate(u);break}}}}}),wdr=["data-node-type"],Mdr={class:"__title"},Odr={class:"__title-label"},Rdr={key:0,class:"__menu"};function Ndr(t,e,n,r,i,o){const s=pt("vertical-dots"),a=pt("context-menu");return k(),H("div",{class:"baklava-node --palette","data-node-type":t.type},[g("div",Mdr,[g("div",Odr,le(t.title),1),t.hasContextMenu?(k(),H("div",Rdr,[oe(s,{class:"--clickable",onPointerdown:e[0]||(e[0]=he(()=>{},["stop","prevent"])),onClick:he(t.openContextMenu,["stop","prevent"])},null,8,["onClick"]),oe(a,{modelValue:t.showContextMenu,"onUpdate:modelValue":e[1]||(e[1]=l=>t.showContextMenu=l),x:-100,y:0,items:t.contextMenuItems,onClick:t.onContextMenuClick,onPointerdown:e[2]||(e[2]=he(()=>{},["stop","prevent"]))},null,8,["modelValue","items","onClick"])])):re("",!0)])],8,wdr)}const fk=Wn(Adr,[["render",Ndr]]),Ddr={key:0},Idr=ir({__name:"NodePalette",setup(t){const{viewModel:e}=Ci(),{x:n,y:r}=Uur(),{transform:i}=yG(),o=vG(e),s=Gi("editorEl"),a=Ct(null),l=_t(()=>{if(!a.value||!(s!=null&&s.value))return{};const{left:u,top:d}=s.value.getBoundingClientRect();return{top:`${r.value-d}px`,left:`${n.value-u}px`}}),c=(u,d)=>{a.value={type:u,nodeInformation:d};const h=()=>{const f=Zr(new d.type);e.value.displayedGraph.addNode(f);const m=s.value.getBoundingClientRect(),[T,Q]=i(n.value-m.left,r.value-m.top);f.position.x=T,f.position.y=Q,a.value=null,document.removeEventListener("pointerup",h)};document.addEventListener("pointerup",h)};return(u,d)=>(k(),H(Ue,null,[g("div",{class:"baklava-node-palette",onContextmenu:d[0]||(d[0]=he(()=>{},["stop","prevent"]))},[(k(!0),H(Ue,null,ot(Bt(o),h=>(k(),H("section",{key:h.name},[h.name!=="default"?(k(),H("h1",Ddr,le(h.name),1)):re("",!0),(k(!0),H(Ue,null,ot(h.nodeTypes,(f,m)=>(k(),wt(fk,{key:m,type:m,title:f.title,onPointerdown:T=>c(m,f)},null,8,["type","title","onPointerdown"]))),128))]))),128))],32),oe(qi,{name:"fade"},{default:He(()=>[a.value?(k(),H("div",{key:0,class:"baklava-dragged-node",style:xn(l.value)},[oe(fk,{type:a.value.type,title:a.value.nodeInformation.title},null,8,["type","title"])],4)):re("",!0)]),_:1})],64))}});let B5;const kdr=new Uint8Array(16);function Pdr(){if(!B5&&(B5=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!B5))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return B5(kdr)}const yr=[];for(let t=0;t<256;++t)yr.push((t+256).toString(16).slice(1));function Hdr(t,e=0){return yr[t[e+0]]+yr[t[e+1]]+yr[t[e+2]]+yr[t[e+3]]+"-"+yr[t[e+4]]+yr[t[e+5]]+"-"+yr[t[e+6]]+yr[t[e+7]]+"-"+yr[t[e+8]]+yr[t[e+9]]+"-"+yr[t[e+10]]+yr[t[e+11]]+yr[t[e+12]]+yr[t[e+13]]+yr[t[e+14]]+yr[t[e+15]]}const Vdr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),pk={randomUUID:Vdr};function Qd(t,e,n){if(pk.randomUUID&&!e&&!t)return pk.randomUUID();t=t||{};const r=t.random||(t.rng||Pdr)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Hdr(r)}const c0="SAVE_SUBGRAPH";function Bdr(t,e){const n=()=>{const r=t.value;if(!r.template)throw new Error("Graph template property not set");r.template.update(r.save()),r.template.panning=r.panning,r.template.scaling=r.scaling};e.registerCommand(c0,{canExecute:()=>{var r;return t.value!==((r=t.value.editor)==null?void 0:r.graph)},execute:n})}const Fdr={},$dr={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"},Udr=g("polyline",{points:"6 9 12 15 18 9"},null,-1),Gdr=[Udr];function qdr(t,e){return k(),H("svg",$dr,Gdr)}const zdr=Wn(Fdr,[["render",qdr]]),jdr=ir({components:{"i-arrow":zdr},props:{intf:{type:Object,required:!0}},setup(t){const e=Ct(null),n=Ct(!1),r=_t(()=>t.intf.items.find(s=>typeof s=="string"?s===t.intf.value:s.value===t.intf.value)),i=_t(()=>r.value?typeof r.value=="string"?r.value:r.value.text:""),o=s=>{t.intf.value=typeof s=="string"?s:s.value};return xG(e,()=>{n.value=!1}),{el:e,open:n,selectedItem:r,selectedText:i,setSelected:o}}}),Wdr=["title"],Ydr={class:"__selected"},Kdr={class:"__text"},Zdr={class:"__icon"},Xdr={class:"__dropdown"},Jdr={class:"item --header"},e7r=["onClick"];function t7r(t,e,n,r,i,o){const s=pt("i-arrow");return k(),H("div",{ref:"el",class:je(["baklava-select",{"--open":t.open}]),title:t.intf.name,onClick:e[0]||(e[0]=a=>t.open=!t.open)},[g("div",Ydr,[g("div",Kdr,le(t.selectedText),1),g("div",Zdr,[oe(s)])]),oe(qi,{name:"slide-fade"},{default:He(()=>[J(g("div",Xdr,[g("div",Jdr,le(t.intf.name),1),(k(!0),H(Ue,null,ot(t.intf.items,(a,l)=>(k(),H("div",{key:l,class:je(["item",{"--active":a===t.selectedItem}]),onClick:c=>t.setSelected(a)},le(typeof a=="string"?a:a.text),11,e7r))),128))],512),[[Pt,t.open]])]),_:1})],10,Wdr)}const n7r=Wn(jdr,[["render",t7r]]);class r7r extends Un{constructor(e,n,r){super(e,n),this.component=Ad(n7r),this.items=r}}const i7r=ir({props:{intf:{type:Object,required:!0}}});function o7r(t,e,n,r,i,o){return k(),H("div",null,le(t.intf.value),1)}const s7r=Wn(i7r,[["render",o7r]]);class a7r extends Un{constructor(e,n){super(e,n),this.component=Ad(s7r),this.setPort(!1)}}const l7r=ir({props:{intf:{type:Object,required:!0},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:e}){return{v:_t({get:()=>t.modelValue,set:r=>{e("update:modelValue",r)}})}}}),c7r=["placeholder","title"];function u7r(t,e,n,r,i,o){return k(),H("div",null,[J(g("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>t.v=s),type:"text",class:"baklava-input",placeholder:t.intf.name,title:t.intf.name},null,8,c7r),[[we,t.v]])])}const d7r=Wn(l7r,[["render",u7r]]);class i6 extends Un{constructor(){super(...arguments),this.component=Ad(d7r)}}class AG extends dE{constructor(){super(...arguments),this._title="Subgraph Input",this.inputs={name:new i6("Name","Input").setPort(!1)},this.outputs={placeholder:new Un("Connection",void 0)}}}class wG extends fE{constructor(){super(...arguments),this._title="Subgraph Output",this.inputs={name:new i6("Name","Output").setPort(!1),placeholder:new Un("Connection",void 0)},this.outputs={output:new Un("Output",void 0).setHidden(!0)}}}const MG="CREATE_SUBGRAPH",hk=[Qc,vc];function f7r(t,e,n){const r=()=>t.value.selectedNodes.filter(o=>!hk.includes(o.type)).length>0,i=()=>{const{viewModel:o}=Ci(),s=t.value,a=t.value.editor;if(s.selectedNodes.length===0)return;const l=s.selectedNodes.filter(C=>!hk.includes(C.type)),c=l.flatMap(C=>Object.values(C.inputs)),u=l.flatMap(C=>Object.values(C.outputs)),d=s.connections.filter(C=>!u.includes(C.from)&&c.includes(C.to)),h=s.connections.filter(C=>u.includes(C.from)&&!c.includes(C.to)),f=s.connections.filter(C=>u.includes(C.from)&&c.includes(C.to)),m=l.map(C=>C.save()),T=f.map(C=>({id:C.id,from:C.from.id,to:C.to.id})),Q=new Map,{xLeft:_,xRight:v,yTop:y}=p7r(l);for(const[C,A]of d.entries()){const I=new AG;I.inputs.name.value=A.to.name,m.push({...I.save(),position:{x:v-o.value.settings.nodes.defaultWidth-100,y:y+C*200}}),T.push({id:Qd(),from:I.outputs.placeholder.id,to:A.to.id}),Q.set(A.to.id,I.graphInterfaceId)}for(const[C,A]of h.entries()){const I=new wG;I.inputs.name.value=A.from.name,m.push({...I.save(),position:{x:_+100,y:y+C*200}}),T.push({id:Qd(),from:A.from.id,to:I.inputs.placeholder.id}),Q.set(A.from.id,I.graphInterfaceId)}const b=Zr(new w9({connections:T,nodes:m,inputs:[],outputs:[]},a));a.addGraphTemplate(b);const E=a.nodeTypes.get(yc(b));if(!E)throw new Error("Unable to create subgraph: Could not find corresponding graph node type");s.activeTransactions++;const x=Zr(new E.type);s.addNode(x);const L=Math.round(l.map(C=>C.position.x).reduce((C,A)=>C+A,0)/l.length),M=Math.round(l.map(C=>C.position.y).reduce((C,A)=>C+A,0)/l.length);x.position.x=L,x.position.y=M,d.forEach(C=>{s.removeConnection(C),s.addConnection(C.from,x.inputs[Q.get(C.to.id)])}),h.forEach(C=>{s.removeConnection(C),s.addConnection(x.outputs[Q.get(C.from.id)],C.to)}),l.forEach(C=>s.removeNode(C)),s.activeTransactions--,e.canExecuteCommand(c0)&&e.executeCommand(c0),n(b),t.value.panning={...s.panning},t.value.scaling=s.scaling};e.registerCommand(MG,{canExecute:r,execute:i})}function p7r(t){const e=t.reduce((i,o)=>{const s=o.position.x;return s{const s=o.position.y;return s{const s=o.position.x+o.width;return s>i?s:i},-1/0),xRight:e,yTop:n}}class Tk{constructor(e,n){this.type=e,e==="addNode"?this.nodeId=n:this.nodeState=n}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 n=e.editor.nodeTypes.get(this.nodeState.type);if(!n)return;const r=new n.type;e.addNode(r),r.load(this.nodeState),this.nodeId=r.id}removeNode(e){const n=e.nodes.find(r=>r.id===this.nodeId);n&&(this.nodeState=n.save(),e.removeNode(n))}}class mk{constructor(e,n){if(this.type=e,e==="addConnection")this.connectionId=n;else{const r=n;this.connectionState={id:r.id,from:r.from.id,to:r.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 n=e.findNodeInterface(this.connectionState.from),r=e.findNodeInterface(this.connectionState.to);if(!n||!r)return;const i=e.addConnection(n,r);i&&(i.id=this.connectionState.id),this.connectionId=i==null?void 0:i.id}removeConnection(e){const n=e.connections.find(r=>r.id===this.connectionId);n&&(this.connectionState={id:n.id,from:n.from.id,to:n.to.id},e.removeConnection(n))}}class h7r{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 n=this.steps.length-1;n>=0;n--)this.steps[n].undo(e)}redo(e){for(let n=0;n{if(!o.value)if(a.value)l.value.push(Q);else for(s.value!==i.value.length-1&&(i.value=i.value.slice(0,s.value+1)),i.value.push(Q),s.value++;i.value.length>r.value;)i.value.shift()},u=()=>{a.value=!0},d=()=>{a.value=!1,l.value.length>0&&(c(new h7r(l.value)),l.value=[])},h=()=>i.value.length!==0&&s.value!==-1,f=()=>{h()&&(o.value=!0,i.value[s.value--].undo(t.value),o.value=!1)},m=()=>i.value.length!==0&&s.value{m()&&(o.value=!0,i.value[++s.value].redo(t.value),o.value=!1)};return Er(t,(Q,_)=>{_&&(_.events.addNode.unsubscribe(n),_.events.removeNode.unsubscribe(n),_.events.addConnection.unsubscribe(n),_.events.removeConnection.unsubscribe(n)),Q&&(Q.events.addNode.subscribe(n,v=>{c(new Tk("addNode",v.id))}),Q.events.removeNode.subscribe(n,v=>{c(new Tk("removeNode",v.save()))}),Q.events.addConnection.subscribe(n,v=>{c(new mk("addConnection",v.id))}),Q.events.removeConnection.subscribe(n,v=>{c(new mk("removeConnection",v))}))},{immediate:!0}),e.registerCommand(tv,{canExecute:h,execute:f}),e.registerCommand(nv,{canExecute:m,execute:T}),e.registerCommand(mE,{canExecute:()=>!a.value,execute:u}),e.registerCommand(gE,{canExecute:()=>a.value,execute:d}),e.registerHotkey(["Control","z"],tv),e.registerHotkey(["Control","y"],nv),Zr({maxSteps:r})}const rv="DELETE_NODES";function m7r(t,e){e.registerCommand(rv,{canExecute:()=>t.value.selectedNodes.length>0,execute(){e.executeCommand(mE);for(let n=t.value.selectedNodes.length-1;n>=0;n--){const r=t.value.selectedNodes[n];t.value.removeNode(r)}e.executeCommand(gE)}}),e.registerHotkey(["Delete"],rv)}const OG="SWITCH_TO_MAIN_GRAPH";function g7r(t,e,n){e.registerCommand(OG,{canExecute:()=>t.value!==t.value.editor.graph,execute:()=>{e.executeCommand(c0),n(t.value.editor.graph)}})}function _7r(t,e,n){m7r(t,e),f7r(t,e,n),Bdr(t,e),g7r(t,e,n)}const iv="COPY",ov="PASTE",Q7r="CLEAR_CLIPBOARD";function v7r(t,e,n){const r=Symbol("ClipboardToken"),i=Ct(""),o=Ct(""),s=_t(()=>!i.value),a=()=>{i.value="",o.value=""},l=()=>{const d=t.value.selectedNodes.flatMap(f=>[...Object.values(f.inputs),...Object.values(f.outputs)]),h=t.value.connections.filter(f=>d.includes(f.from)||d.includes(f.to)).map(f=>({from:f.from.id,to:f.to.id}));o.value=JSON.stringify(h),i.value=JSON.stringify(t.value.selectedNodes.map(f=>f.save()))},c=(d,h,f)=>{for(const m of d){let T;if((!f||f==="input")&&(T=Object.values(m.inputs).find(Q=>Q.id===h)),!T&&(!f||f==="output")&&(T=Object.values(m.outputs).find(Q=>Q.id===h)),T)return T}},u=()=>{if(s.value)return;const d=new Map,h=JSON.parse(i.value),f=JSON.parse(o.value),m=[],T=[],Q=t.value;n.executeCommand(mE);for(const _ of h){const v=e.value.nodeTypes.get(_.type);if(!v){console.warn(`Node type ${_.type} not registered`);return}const y=new v.type,b=y.id;m.push(y),y.hooks.beforeLoad.subscribe(r,E=>{const x=E;return x.position&&(x.position.x+=100,x.position.y+=100),y.hooks.beforeLoad.unsubscribe(r),x}),Q.addNode(y),y.load({..._,id:b}),y.id=b,d.set(_.id,b);for(const E of Object.values(y.inputs)){const x=Qd();d.set(E.id,x),E.id=x}for(const E of Object.values(y.outputs)){const x=Qd();d.set(E.id,x),E.id=x}}for(const _ of f){const v=c(m,d.get(_.from),"output"),y=c(m,d.get(_.to),"input");if(!v||!y)continue;const b=Q.addConnection(v,y);b&&T.push(b)}return t.value.selectedNodes=m,n.executeCommand(gE),{newNodes:m,newConnections:T}};return n.registerCommand(iv,{canExecute:()=>t.value.selectedNodes.length>0,execute:l}),n.registerHotkey(["Control","c"],iv),n.registerCommand(ov,{canExecute:()=>!s.value,execute:u}),n.registerHotkey(["Control","v"],ov),n.registerCommand(Q7r,{canExecute:()=>!0,execute:a}),Zr({isEmpty:s})}const y7r="OPEN_SIDEBAR";function b7r(t,e){e.registerCommand(y7r,{execute:n=>{t.value.sidebar.nodeId=n,t.value.sidebar.visible=!0},canExecute:()=>!0})}function E7r(t,e){b7r(t,e)}const x7r={},S7r={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"},L7r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),C7r=g("path",{d:"M9 13l-4 -4l4 -4m-4 4h11a4 4 0 0 1 0 8h-1"},null,-1),A7r=[L7r,C7r];function w7r(t,e){return k(),H("svg",S7r,A7r)}const M7r=Wn(x7r,[["render",w7r]]),O7r={},R7r={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"},N7r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),D7r=g("path",{d:"M15 13l4 -4l-4 -4m4 4h-11a4 4 0 0 0 0 8h1"},null,-1),I7r=[N7r,D7r];function k7r(t,e){return k(),H("svg",R7r,I7r)}const P7r=Wn(O7r,[["render",k7r]]),H7r={},V7r={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"},B7r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),F7r=g("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1),$7r=g("line",{x1:"5",y1:"12",x2:"11",y2:"18"},null,-1),U7r=g("line",{x1:"5",y1:"12",x2:"11",y2:"6"},null,-1),G7r=[B7r,F7r,$7r,U7r];function q7r(t,e){return k(),H("svg",V7r,G7r)}const z7r=Wn(H7r,[["render",q7r]]),j7r={},W7r={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"},Y7r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),K7r=g("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),Z7r=g("rect",{x:"9",y:"3",width:"6",height:"4",rx:"2"},null,-1),X7r=[Y7r,K7r,Z7r];function J7r(t,e){return k(),H("svg",W7r,X7r)}const e8r=Wn(j7r,[["render",J7r]]),t8r={},n8r={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"},r8r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),i8r=g("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1),o8r=g("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),s8r=[r8r,i8r,o8r];function a8r(t,e){return k(),H("svg",n8r,s8r)}const l8r=Wn(t8r,[["render",a8r]]),c8r={},u8r={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"},d8r=g("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),f8r=g("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),p8r=g("circle",{cx:"12",cy:"14",r:"2"},null,-1),h8r=g("polyline",{points:"14 4 14 8 8 8 8 4"},null,-1),T8r=[d8r,f8r,p8r,h8r];function m8r(t,e){return k(),H("svg",u8r,T8r)}const g8r=Wn(c8r,[["render",m8r]]),_8r={},Q8r={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"},v8r=Fl('',6),y8r=[v8r];function b8r(t,e){return k(),H("svg",Q8r,y8r)}const E8r=Wn(_8r,[["render",b8r]]),x8r={},S8r={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"},L8r=Fl('',18),C8r=[L8r];function A8r(t,e){return k(),H("svg",S8r,C8r)}const w8r=Wn(x8r,[["render",A8r]]),M8r={},O8r={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"},R8r=Fl('',6),N8r=[R8r];function D8r(t,e){return k(),H("svg",O8r,N8r)}const I8r=Wn(M8r,[["render",D8r]]),k8r=ir({props:{command:{type:String,required:!0},title:{type:String,required:!0},icon:{type:Object,required:!1,default:void 0}},setup(){const{viewModel:t}=Ci();return{viewModel:t}}}),P8r=["disabled","title"];function H8r(t,e,n,r,i,o){return k(),H("button",{class:"baklava-toolbar-entry baklava-toolbar-button",disabled:!t.viewModel.commandHandler.canExecuteCommand(t.command),title:t.title,onClick:e[0]||(e[0]=s=>t.viewModel.commandHandler.executeCommand(t.command))},[t.icon?(k(),wt(Rd(t.icon),{key:0})):(k(),H(Ue,{key:1},[nt(le(t.title),1)],64))],8,P8r)}const V8r=Wn(k8r,[["render",H8r]]),B8r=ir({components:{ToolbarButton:V8r},setup(){const{viewModel:t}=Ci();return{isSubgraph:_t(()=>t.value.displayedGraph!==t.value.editor.graph),commands:[{command:iv,title:"Copy",icon:l8r},{command:ov,title:"Paste",icon:e8r},{command:rv,title:"Delete selected nodes",icon:I8r},{command:tv,title:"Undo",icon:M7r},{command:nv,title:"Redo",icon:P7r},{command:ru,title:"Box Select",icon:w8r},{command:MG,title:"Create Subgraph",icon:E8r}],subgraphCommands:[{command:c0,title:"Save Subgraph",icon:g8r},{command:OG,title:"Back to Main Graph",icon:z7r}]}}});function F8r(t,e,n,r,i,o){const s=pt("toolbar-button");return k(),H("div",{class:"baklava-toolbar",onContextmenu:e[0]||(e[0]=he(()=>{},["stop","prevent"]))},[(k(!0),H(Ue,null,ot(t.commands,a=>(k(),wt(s,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)),t.isSubgraph?(k(!0),H(Ue,{key:0},ot(t.subgraphCommands,a=>(k(),wt(s,{key:a.command,command:a.command,title:a.title,icon:a.icon},null,8,["command","title","icon"]))),128)):re("",!0)],32)}const $8r=Wn(B8r,[["render",F8r]]),U8r={class:"connections-container"},G8r=ir({__name:"Editor",props:{viewModel:{}},setup(t){const e=t,n=Symbol("EditorToken"),r=au(e,"viewModel");Cur(r);const i=Ct(null);Nl("editorEl",i);const o=_t(()=>e.viewModel.displayedGraph.nodes),s=_t(()=>e.viewModel.displayedGraph.nodes.map(M=>_G(au(M,"position")))),a=_t(()=>e.viewModel.displayedGraph.connections),l=_t(()=>e.viewModel.displayedGraph.selectedNodes),c=Aur(),u=wur(),d=Mur(r),h=Our(i),f=_t(()=>({...c.styles.value})),m=Ct(0);e.viewModel.editor.hooks.load.subscribe(n,M=>(m.value++,M));const T=M=>{c.onPointerMove(M),u.onMouseMove(M)},Q=M=>{if(M.button===0){if(h.onPointerDown(M))return;M.target===i.value&&(E(),c.onPointerDown(M)),u.onMouseDown()}},_=M=>{c.onPointerUp(M),u.onMouseUp()},v=M=>{M.key==="Tab"&&M.preventDefault(),e.viewModel.commandHandler.handleKeyDown(M)},y=M=>{e.viewModel.commandHandler.handleKeyUp(M)},b=M=>{["Control","Shift"].some(C=>e.viewModel.commandHandler.pressedKeys.includes(C))||E(),e.viewModel.displayedGraph.selectedNodes.push(M)},E=()=>{e.viewModel.displayedGraph.selectedNodes=[]},x=M=>{for(const C of e.viewModel.displayedGraph.selectedNodes){const A=o.value.indexOf(C),I=s.value[A];I.onPointerDown(M),document.addEventListener("pointermove",I.onPointerMove)}document.addEventListener("pointerup",L)},L=()=>{for(const M of e.viewModel.displayedGraph.selectedNodes){const C=o.value.indexOf(M),A=s.value[C];A.onPointerUp(),document.removeEventListener("pointermove",A.onPointerMove)}document.removeEventListener("pointerup",L)};return(M,C)=>(k(),H("div",{ref_key:"el",ref:i,tabindex:"-1",class:je(["baklava-editor",{"baklava-ignore-mouse":!!Bt(u).temporaryConnection.value||Bt(c).dragging.value,"--temporary-connection":!!Bt(u).temporaryConnection.value,"--start-selection-box":Bt(h).startSelection}]),onPointermove:he(T,["self"]),onPointerdown:Q,onPointerup:_,onWheel:C[1]||(C[1]=he((...A)=>Bt(c).onMouseWheel&&Bt(c).onMouseWheel(...A),["self"])),onKeydown:v,onKeyup:y,onContextmenu:C[2]||(C[2]=(...A)=>Bt(d).open&&Bt(d).open(...A))},[er(M.$slots,"background",{},()=>[oe(Dur)]),er(M.$slots,"toolbar",{},()=>[M.viewModel.settings.toolbar.enabled?(k(),wt($8r,{key:0})):re("",!0)]),er(M.$slots,"palette",{},()=>[M.viewModel.settings.palette.enabled?(k(),wt(Idr,{key:0})):re("",!0)]),(k(),H("svg",U8r,[(k(!0),H(Ue,null,ot(a.value,A=>(k(),H("g",{key:A.id+m.value.toString()},[er(M.$slots,"connection",{connection:A},()=>[oe(_dr,{connection:A},null,8,["connection"])])]))),128)),er(M.$slots,"temporaryConnection",{temporaryConnection:Bt(u).temporaryConnection.value},()=>[Bt(u).temporaryConnection.value?(k(),wt(ydr,{key:0,connection:Bt(u).temporaryConnection.value},null,8,["connection"])):re("",!0)])])),g("div",{class:"node-container",style:xn(f.value)},[oe(Ns,{name:"fade"},{default:He(()=>[(k(!0),H(Ue,null,ot(o.value,(A,I)=>er(M.$slots,"node",{key:A.id+m.value.toString(),node:A,selected:l.value.includes(A),dragging:s.value[I].dragging.value,onSelect:N=>b(A),onStartDrag:x},()=>[oe(ddr,{node:A,selected:l.value.includes(A),dragging:s.value[I].dragging.value,onSelect:N=>b(A),onStartDrag:x},null,8,["node","selected","dragging","onSelect"])])),128))]),_:3})],4),er(M.$slots,"sidebar",{},()=>[M.viewModel.settings.sidebar.enabled?(k(),wt(Ldr,{key:0})):re("",!0)]),er(M.$slots,"minimap",{},()=>[M.viewModel.settings.enableMinimap?(k(),wt(Cdr,{key:0})):re("",!0)]),er(M.$slots,"contextMenu",{contextMenu:Bt(d)},()=>[M.viewModel.settings.contextMenu.enabled?(k(),wt(TE,{key:0,modelValue:Bt(d).show.value,"onUpdate:modelValue":C[0]||(C[0]=A=>Bt(d).show.value=A),items:Bt(d).items.value,x:Bt(d).x.value,y:Bt(d).y.value,onClick:Bt(d).onClick},null,8,["modelValue","items","x","y","onClick"])):re("",!0)]),Bt(h).isSelecting?(k(),H("div",{key:0,class:"selection-box",style:xn(Bt(h).getStyles())},null,4)):re("",!0)],34))}});function q8r(t){const e=Ct([]),n=Ct([]);return{pressedKeys:e,handleKeyDown:s=>{e.value.includes(s.key)||e.value.push(s.key),!(document.activeElement&&gG(document.activeElement))&&n.value.forEach(a=>{var l,c;a.keys.every(u=>e.value.includes(u))&&((l=a.options)!=null&&l.preventDefault&&s.preventDefault(),(c=a.options)!=null&&c.stopPropagation&&s.stopPropagation(),t(a.commandName))})},handleKeyUp:s=>{const a=e.value.indexOf(s.key);a>=0&&e.value.splice(a,1)},registerHotkey:(s,a,l)=>{n.value.push({keys:s,commandName:a,options:l})}}}const z8r=()=>{const t=Ct(new Map),e=s=>t.value.has(s),n=(s,a)=>{if(t.value.has(s))throw new Error(`Command "${s}" already exists`);t.value.set(s,a)},r=(s,a=!1,...l)=>{if(!t.value.has(s)){if(a)throw new Error(`[CommandHandler] Command ${s} not registered`);return}return t.value.get(s).execute(...l)},i=(s,a=!1,...l)=>{if(!t.value.has(s)){if(a)throw new Error(`[CommandHandler] Command ${s} not registered`);return!1}return t.value.get(s).canExecute(l)},o=q8r(r);return Zr({hasCommand:e,registerCommand:n,executeCommand:r,canExecuteCommand:i,...o})},j8r=t=>!(t instanceof r6);function W8r(t,e){return{switchGraph:r=>{let i;if(j8r(r))i=new r6(t.value),r.createGraph(i);else{if(r!==t.value.graph)throw new Error("Can only switch using 'Graph' instance when it is the root graph. Otherwise a 'GraphTemplate' must be used.");i=r}e.value&&e.value!==t.value.graph&&e.value.destroy(),i.panning=i.panning??r.panning??{x:0,y:0},i.scaling=i.scaling??r.scaling??1,i.selectedNodes=i.selectedNodes??[],i.sidebar=i.sidebar??{visible:!1,nodeId:"",optionName:""},e.value=i}}}function Y8r(t,e){t.position=t.position??{x:0,y:0},t.disablePointerEvents=!1,t.twoColumn=t.twoColumn??!1,t.width=t.width??e.defaultWidth}const K8r=()=>({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 Z8r(t){const e=Ct(new vur),n=Symbol("ViewModelToken"),r=Ct(null),i=Bq(r),{switchGraph:o}=W8r(e,r),s=_t(()=>i.value&&i.value!==e.value.graph),a=Zr(K8r()),l=z8r(),c=T7r(i,l),u=v7r(i,e,l),d={renderNode:new Li(null),renderInterface:new Li(null)};return _7r(i,l,o),E7r(i,l),Er(e,(h,f)=>{f&&(f.events.registerGraph.unsubscribe(n),f.graphEvents.beforeAddNode.unsubscribe(n),h.nodeHooks.beforeLoad.unsubscribe(n),h.nodeHooks.afterSave.unsubscribe(n),h.graphTemplateHooks.beforeLoad.unsubscribe(n),h.graphTemplateHooks.afterSave.unsubscribe(n),h.graph.hooks.load.unsubscribe(n),h.graph.hooks.save.unsubscribe(n)),h&&(h.nodeHooks.beforeLoad.subscribe(n,(m,T)=>(T.position=m.position??{x:0,y:0},T.width=m.width??a.nodes.defaultWidth,T.twoColumn=m.twoColumn??!1,m)),h.nodeHooks.afterSave.subscribe(n,(m,T)=>(m.position=T.position,m.width=T.width,m.twoColumn=T.twoColumn,m)),h.graphTemplateHooks.beforeLoad.subscribe(n,(m,T)=>(T.panning=m.panning,T.scaling=m.scaling,m)),h.graphTemplateHooks.afterSave.subscribe(n,(m,T)=>(m.panning=T.panning,m.scaling=T.scaling,m)),h.graph.hooks.load.subscribe(n,(m,T)=>(T.panning=m.panning,T.scaling=m.scaling,m)),h.graph.hooks.save.subscribe(n,(m,T)=>(m.panning=T.panning,m.scaling=T.scaling,m)),h.graphEvents.beforeAddNode.subscribe(n,m=>Y8r(m,{defaultWidth:a.nodes.defaultWidth})),e.value.registerNodeType(AG,{category:"Subgraphs"}),e.value.registerNodeType(wG,{category:"Subgraphs"}),o(h.graph))},{immediate:!0}),Zr({editor:e,displayedGraph:i,isSubgraph:s,settings:a,commandHandler:l,history:c,clipboard:u,hooks:d,switchGraph:o})}const X8r=Zc({type:"PersonalityNode",title:"Personality",inputs:{request:()=>new Un("Request",""),agent_name:()=>new r7r("Personality","",so.state.config.personalities).setPort(!1)},outputs:{response:()=>new Un("Response","")},async calculate({request:t}){console.log(so.state.config.personalities);let e="";try{e=(await Qe.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),J8r=Zc({type:"RAGNode",title:"RAG",inputs:{request:()=>new Un("Prompt",""),document_path:()=>new i6("Document path","").setPort(!1)},outputs:{prompt:()=>new Un("Prompt with Data","")},async calculate({request:t,document_path:e}){let n="";try{n=(await Qe.get("/rag",{params:{text:t,doc_path:e}})).data}catch(r){console.error(r)}return{response:n}}}),gk=Zc({type:"Task",title:"Task",inputs:{description:()=>new i6("Task description","").setPort(!1)},outputs:{prompt:()=>new Un("Prompt")},calculate({description:t}){return{prompt:t}}}),_k=Zc({type:"TextDisplayNode",title:"TextDisplay",inputs:{text2display:()=>new Un("Input","")},outputs:{response:()=>new a7r("Text","")},async calculate({request:t}){}}),Qk=Zc({type:"LLMNode",title:"LLM",inputs:{request:()=>new Un("Request","")},outputs:{response:()=>new Un("Response","")},async calculate({request:t}){console.log(so.state.config.personalities);let e="";try{e=(await Qe.post("/generate",{params:{text:t}})).data}catch(n){console.error(n)}return{display:e,response:e}}}),e9r=Zc({type:"MultichoiceNode",title:"Multichoice",inputs:{question:()=>new Un("Question",""),outputs:()=>new i6("choices, one per line","","").setPort(!1)},outputs:{response:()=>new Un("Response","")}}),t9r=ir({components:{"baklava-editor":G8r},setup(){const t=Z8r(),e=new Sur(t.editor);t.editor.registerNodeType(X8r),t.editor.registerNodeType(gk),t.editor.registerNodeType(J8r),t.editor.registerNodeType(_k),t.editor.registerNodeType(Qk),t.editor.registerNodeType(e9r);const n=Symbol();e.events.afterRun.subscribe(n,a=>{e.pause(),yur(a,t.editor),e.resume()}),e.start();function r(a,l,c){const u=new a;return t.displayedGraph.addNode(u),u.position.x=l,u.position.y=c,u}const i=r(gk,300,140),o=r(Qk,550,140),s=r(_k,850,140);return t.displayedGraph.addConnection(i.outputs.prompt,o.inputs.request),t.displayedGraph.addConnection(o.outputs.response,s.inputs.text2display),{baklava:t,saveGraph:()=>{const a=e.export();localStorage.setItem("myGraph",JSON.stringify(a))},loadGraph:()=>{const a=JSON.parse(localStorage.getItem("myGraph"));e.import(a)}}}}),n9r={style:{width:"100vw",height:"100vh"}};function r9r(t,e,n,r,i,o){const s=pt("baklava-editor");return k(),H("div",n9r,[oe(s,{"view-model":t.baklava},null,8,["view-model"]),g("button",{onClick:e[0]||(e[0]=(...a)=>t.saveGraph&&t.saveGraph(...a))},"Save Graph"),g("button",{onClick:e[1]||(e[1]=(...a)=>t.loadGraph&&t.loadGraph(...a))},"Load Graph")])}const i9r=yt(t9r,[["render",r9r]]),o9r={},s9r={style:{width:"100vw",height:"100vh"}},a9r=["src"];function l9r(t,e,n,r,i,o){return k(),H("div",s9r,[g("iframe",{src:t.$store.state.config.comfyui_base_url,class:"m-0 p-0 w-full h-full"},null,8,a9r)])}const c9r=yt(o9r,[["render",l9r]]),u9r={},d9r={style:{width:"100vw",height:"100vh"}},f9r=["src"];function p9r(t,e,n,r,i,o){return k(),H("div",d9r,[g("iframe",{src:t.$store.state.config.sd_base_url,class:"m-0 p-0 w-full h-full"},null,8,f9r)])}const h9r=yt(u9r,[["render",p9r]]),T9r={name:"AppCard",props:{app:{type:Object,required:!0},isFavorite:{type:Boolean,default:!1}},methods:{formatDate(t){const e={year:"numeric",month:"short",day:"numeric"};return new Date(t).toLocaleDateString(void 0,e)}}},m9r={class:"app-card flex flex-col h-full"},g9r={class:"flex-grow"},_9r={class:"flex items-center mb-4"},Q9r=["src"],v9r={class:"font-bold text-xl text-gray-800"},y9r={class:"text-sm text-gray-600"},b9r={class:"text-sm text-gray-600"},E9r={class:"text-sm text-gray-600"},x9r={class:"text-sm text-gray-600"},S9r={class:"text-sm text-gray-600"},L9r={class:"mb-4"},C9r={class:"text-sm text-gray-600 h-20 overflow-y-auto"},A9r={class:"text-sm text-gray-600 mb-2"},w9r={key:0,class:"mb-4"},M9r={class:"text-xs text-gray-500 italic h-16 overflow-y-auto"},O9r={class:"mt-auto pt-4 border-t"},R9r={class:"flex justify-between items-center flex-wrap"},N9r=["title"],D9r=["fill"];function I9r(t,e,n,r,i,o){return k(),H("div",m9r,[g("div",g9r,[g("div",_9r,[g("img",{src:n.app.icon,alt:"App Icon",class:"w-16 h-16 rounded-full border border-gray-300 mr-4"},null,8,Q9r),g("div",null,[g("h3",v9r,le(n.app.name),1),g("p",y9r,"Author: "+le(n.app.author),1),g("p",b9r,"Version: "+le(n.app.version),1),g("p",E9r,"Category: "+le(n.app.category),1),g("p",x9r,"Creation date: "+le(o.formatDate(n.app.creation_date)),1),g("p",S9r,"Last update: "+le(o.formatDate(n.app.last_update_date)),1),g("p",{class:je(["text-sm",n.app.is_public?"text-green-600":"text-orange-600"])},le(n.app.is_public?"Public App":"Local App"),3)])]),g("div",L9r,[e[10]||(e[10]=g("h4",{class:"font-semibold mb-1 text-gray-700"},"Description:",-1)),g("p",C9r,le(n.app.description),1)]),g("p",A9r,"AI Model: "+le(n.app.model_name),1),n.app.disclaimer&&n.app.disclaimer.trim()!==""?(k(),H("div",w9r,[e[11]||(e[11]=g("h4",{class:"font-semibold mb-1 text-gray-700"},"Disclaimer:",-1)),g("p",M9r,le(n.app.disclaimer),1)])):re("",!0)]),g("div",O9r,[g("div",R9r,[g("button",{onClick:e[0]||(e[0]=he(s=>t.$emit("toggle-favorite",n.app.name),["stop"])),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:n.isFavorite?"Remove from favorites":"Add to favorites"},[(k(),H("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:n.isFavorite?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor"},e[12]||(e[12]=[g("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,D9r))],8,N9r),n.app.installed?(k(),H("button",{key:0,onClick:e[1]||(e[1]=he(s=>t.$emit("uninstall",n.app.folder_name),["stop"])),class:"text-red-500 hover:text-red-600 transition duration-300 ease-in-out",title:"Uninstall"},e[13]||(e[13]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)]))):n.app.existsInFolder?(k(),H("button",{key:1,onClick:e[2]||(e[2]=he(s=>t.$emit("delete",n.app.name),["stop"])),class:"text-yellow-500 hover:text-yellow-600 transition duration-300 ease-in-out",title:"Delete"},e[14]||(e[14]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)]))):(k(),H("button",{key:2,onClick:e[3]||(e[3]=he(s=>t.$emit("install",n.app.folder_name),["stop"])),class:"text-blue-500 hover:text-blue-600 transition duration-300 ease-in-out",title:"Install"},e[15]||(e[15]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)]))),n.app.installed?(k(),H("button",{key:3,onClick:e[4]||(e[4]=he(s=>t.$emit("edit",n.app),["stop"])),class:"text-purple-500 hover:text-purple-600 transition duration-300 ease-in-out",title:"Edit"},e[16]||(e[16]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)]))):re("",!0),g("button",{onClick:e[5]||(e[5]=he(s=>t.$emit("download",n.app.folder_name),["stop"])),class:"text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Download"},e[17]||(e[17]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)])),n.app.has_readme?(k(),H("button",{key:4,onClick:e[6]||(e[6]=he(s=>t.$emit("help",n.app),["stop"])),class:"text-gray-500 hover:text-gray-600 transition duration-300 ease-in-out",title:"Help"},e[18]||(e[18]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)]))):re("",!0),n.app.installed?(k(),H("button",{key:5,onClick:e[7]||(e[7]=he(s=>t.$emit("open",n.app),["stop"])),class:"text-indigo-500 hover:text-indigo-600 transition duration-300 ease-in-out",title:"Open"},e[19]||(e[19]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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)]))):re("",!0),n.app.has_server&&n.app.installed?(k(),H("button",{key:6,onClick:e[8]||(e[8]=he(s=>t.$emit("start-server",n.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]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14M12 5l7 7-7 7"})],-1)]))):re("",!0),n.app.has_update?(k(),H("button",{key:7,onClick:e[9]||(e[9]=he(s=>t.$emit("install",n.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]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[g("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),g("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)]))):re("",!0)])])])}const k9r=yt(T9r,[["render",I9r],["__scopeId","data-v-ae134649"]]),P9r={components:{AppCard:k9r},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 t=new Map(this.apps.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{t.has(e.name)||t.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(t.values())},categories(){return[...new Set(this.combinedApps.map(t=>t.category))]},filteredApps(){return this.combinedApps.filter(t=>{const e=t.name.toLowerCase().includes(this.searchQuery.toLowerCase())||t.description.toLowerCase().includes(this.searchQuery.toLowerCase())||t.author.toLowerCase().includes(this.searchQuery.toLowerCase()),n=this.selectedCategory==="all"||t.category===this.selectedCategory,r=this.showOnlyInstalled&&t.installed||this.showOnlyUnInstalled&&!t.installed||!this.showOnlyInstalled&&!this.showOnlyUnInstalled;return e&&n&&r})},sortedAndFilteredApps(){return[...this.filteredApps].sort((t,e)=>{let n=0;switch(this.sortBy){case"name":n=t.name.localeCompare(e.name);break;case"author":n=t.author.localeCompare(e.author);break;case"date":n=this.getDateValue(t.creation_date)-this.getDateValue(e.creation_date);break;case"update":n=this.getDateValue(t.last_update_date)-this.getDateValue(e.last_update_date);break}return this.sortOrder==="asc"?n:-n})},favoriteApps(){return this.combinedApps.filter(t=>this.favorites.includes(t.appName))}},methods:{getDateValue(t){if(!t)return 0;const e=new Date(t);return isNaN(e.getTime())?0:e.getTime()},toggleSortOrder(){this.sortOrder=this.sortOrder==="asc"?"desc":"asc"},toggleFavorite(t){console.log("Toggling favorite"),console.log(t);const e=this.favorites.indexOf(t);e===-1?this.favorites.push(t):this.favorites.splice(e,1),this.saveFavoritesToLocalStorage()},saveFavoritesToLocalStorage(){localStorage.setItem("appZooFavorites",JSON.stringify(this.favorites))},loadFavoritesFromLocalStorage(){const t=localStorage.getItem("appZooFavorites");console.log("savedFavorites",t),t&&(this.favorites=JSON.parse(t))},startServer(t){const e={client_id:this.$store.state.client_id,app_name:t};this.$store.state.messageBox.showBlockingMessage(`Loading server. +This may take some time the first time as some libraries need to be installed.`),Qe.post("/apps/start_server",e).then(n=>{this.$store.state.messageBox.hideMessage(),console.log("Server start initiated:",n.data.message),this.$notify({type:"success",title:"Server Starting",text:n.data.message})}).catch(n=>{var r,i;this.$store.state.messageBox.hideMessage(),console.error("Error starting server:",n),this.$notify({type:"error",title:"Server Start Failed",text:((i=(r=n.response)==null?void 0:r.data)==null?void 0:i.detail)||"An error occurred while starting the server"})})},triggerFileInput(){this.$refs.fileInput.click()},onFileSelected(t){this.selectedFile=t.target.files[0],this.message="",this.error="",this.uploadApp()},async uploadApp(){var e,n;if(!this.selectedFile){this.error="Please select a file to upload.";return}this.isUploading=!0,this.message="",this.error="";const t=new FormData;t.append("file",this.selectedFile),t.append("client_id",this.$store.state.client_id);try{const r=await Qe.post("/upload_app",t,{headers:{"Content-Type":"multipart/form-data"}});this.message=r.data.message,this.$refs.fileInput.value="",this.selectedFile=null}catch(r){console.error("Error uploading app:",r),this.error=((n=(e=r.response)==null?void 0:e.data)==null?void 0:n.detail)||"Failed to upload the app. Please try again."}finally{this.isUploading=!1}},async fetchApps(){this.loading=!0;try{const t=await Qe.get("/apps");this.apps=t.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 t=await Qe.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 t=await Qe.get("/github/apps");this.githubApps=t.data.apps,await this.fetchApps()}catch{this.showMessage("Failed to refresh GitHub apps.",!1)}finally{this.loading=!1}},async handleAppClick(t){if(t.installed){this.selectedApp=t;const e=await Qe.get(`/apps/${t.folder_name}/README.md`);this.appCode=dn(e.data)}else this.showMessage(`Please install ${t.folder_name} to view its code.`,!1)},backToZoo(){this.selectedApp=null,this.appCode=""},async installApp(t){this.loading=!0,this.$store.state.messageBox.showBlockingMessage(`Installing app ${t}`);try{await Qe.post(`/install/${t}`,{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(t){this.loading=!0;try{await Qe.post(`/uninstall/${t}`,{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(t){this.loading=!0;try{await Qe.post(`/delete/${t}`,{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(t){this.loading=!0;try{const e=await Qe.post("/open_app_in_vscode",{client_id:this.$store.state.client_id,app_name:t.folder_name});this.showMessage(e.data.message,!0)}catch{this.showMessage("Failed to open folder in VSCode.",!1)}finally{this.loading=!1}},async downloadApp(t){this.isLoading=!0,this.error=null;try{const e=await Qe.post("/download_app",{client_id:this.$store.state.client_id,app_name:t},{responseType:"arraybuffer"}),n=e.headers["content-disposition"],r=n&&n.match(/filename="?(.+)"?/i),i=r?r[1]:"app.zip",o=new Blob([e.data],{type:"application/zip"}),s=window.URL.createObjectURL(o),a=document.createElement("a");a.style.display="none",a.href=s,a.download=i,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(s),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(t){t.installed?window.open(`/apps/${t.folder_name}/index.html?client_id=${this.$store.state.client_id}`,"_blank"):this.showMessage(`Please install ${t.name} before opening.`,!1)},showMessage(t,e){this.message=t,this.successMessage=e,setTimeout(()=>{this.message=""},3e3)}},mounted(){this.fetchGithubApps(),this.loadFavoritesFromLocalStorage()}},H9r={class:"app-zoo background-color w-full p-6 pt-12 min-h-screen overflow-y-auto"},V9r={class:"panels-color shadow-lg rounded-lg p-4 max-w-4xl mx-auto mb-8"},B9r={class:"flex flex-wrap items-center justify-between gap-4"},F9r={class:"flex items-center space-x-4"},$9r=["disabled"],U9r={key:0},G9r={key:1,class:"error"},q9r={class:"relative flex-grow max-w-md"},z9r={class:"flex items-center space-x-4"},j9r=["value"],W9r={class:"flex items-center space-x-4"},Y9r={for:"installed-only",class:"font-semibold"},K9r={for:"installed-only",class:"font-semibold"},Z9r={class:"flex items-center space-x-4"},X9r={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},J9r={key:1,class:"pb-20"},efr={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-8"},tfr={class:"text-2xl font-bold mb-4"},nfr={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"},rfr={key:2,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},ifr={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},ofr={class:"flex justify-between items-center mb-4"},sfr={class:"text-2xl font-bold"},afr=["srcdoc"],lfr={key:1,class:"text-center text-red-500"};function cfr(t,e,n,r,i,o){const s=pt("app-card");return k(),H("div",H9r,[g("nav",V9r,[g("div",B9r,[g("div",F9r,[g("button",{onClick:e[0]||(e[0]=(...a)=>o.fetchGithubApps&&o.fetchGithubApps(...a)),class:"btn btn-primary","aria-label":"Refresh apps from GitHub"},e[11]||(e[11]=[g("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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),nt(" Refresh ")])),g("button",{onClick:e[1]||(e[1]=(...a)=>o.openAppsFolder&&o.openAppsFolder(...a)),class:"btn btn-secondary","aria-label":"Open apps folder"},e[12]||(e[12]=[g("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[g("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),nt(" Open Folder ")])),g("input",{type:"file",onChange:e[2]||(e[2]=(...a)=>o.onFileSelected&&o.onFileSelected(...a)),accept:".zip",ref:"fileInput",style:{display:"none"}},null,544),g("button",{onClick:e[3]||(e[3]=(...a)=>o.triggerFileInput&&o.triggerFileInput(...a)),disabled:i.isUploading,class:"btn-secondary text-green-500 hover:text-green-600 transition duration-300 ease-in-out",title:"Upload App"},le(i.isUploading?"Uploading...":"Upload App"),9,$9r)]),i.message?(k(),H("p",U9r,le(i.message),1)):re("",!0),i.error?(k(),H("p",G9r,le(i.error),1)):re("",!0),g("div",q9r,[J(g("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),[[we,i.searchQuery]]),e[13]||(e[13]=g("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"},[g("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))]),g("div",z9r,[e[15]||(e[15]=g("label",{for:"category-select",class:"font-semibold"},"Category:",-1)),J(g("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]=g("option",{value:"all"},"All Categories",-1)),(k(!0),H(Ue,null,ot(o.categories,a=>(k(),H("option",{key:a,value:a},le(a),9,j9r))),128))],512),[[pn,i.selectedCategory]])]),g("div",W9r,[g("label",Y9r,[J(g("input",{id:"installed-only",type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=a=>i.showOnlyInstalled=a),class:"mr-2"},null,512),[[ut,i.showOnlyInstalled]]),e[16]||(e[16]=nt(" Show only installed apps "))]),g("label",K9r,[J(g("input",{id:"uninstalled-only",type:"checkbox","onUpdate:modelValue":e[7]||(e[7]=a=>i.showOnlyUnInstalled=a),class:"mr-2"},null,512),[[ut,i.showOnlyUnInstalled]]),e[17]||(e[17]=nt(" Show only non installed apps "))])]),g("div",Z9r,[e[19]||(e[19]=g("label",{for:"sort-select",class:"font-semibold"},"Sort by:",-1)),J(g("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]=[g("option",{value:"name"},"Name",-1),g("option",{value:"author"},"Author",-1),g("option",{value:"date"},"Creation Date",-1),g("option",{value:"update"},"Last Update",-1)]),512),[[pn,i.sortBy]]),g("button",{onClick:e[9]||(e[9]=(...a)=>o.toggleSortOrder&&o.toggleSortOrder(...a)),class:"btn btn-secondary"},le(i.sortOrder==="asc"?"↑":"↓"),1)])])]),i.loading?(k(),H("div",X9r,e[20]||(e[20]=[g("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1),g("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)]))):(k(),H("div",J9r,[e[21]||(e[21]=g("h2",{class:"text-2xl font-bold mb-4"},"Favorite Apps",-1)),g("div",efr,[(k(!0),H(Ue,null,ot(o.favoriteApps,a=>(k(),wt(s,{key:a.appName,app:a,onToggleFavorite:o.toggleFavorite,onInstall:o.installApp,onUninstall:o.uninstallApp,onDelete:o.deleteApp,onEdit:o.editApp,onDownload:o.downloadApp,onHelp:o.handleAppClick,onOpen:o.openApp,onStartServer:o.startServer},null,8,["app","onToggleFavorite","onInstall","onUninstall","onDelete","onEdit","onDownload","onHelp","onOpen","onStartServer"]))),128))]),g("h2",tfr,le(o.currentCategoryName)+" ("+le(o.sortedAndFilteredApps.length)+")",1),g("div",nfr,[(k(!0),H(Ue,null,ot(o.sortedAndFilteredApps,a=>(k(),wt(s,{key:a.name,app:a,onToggleFavorite:o.toggleFavorite,onInstall:o.installApp,onUninstall:o.uninstallApp,onDelete:o.deleteApp,onEdit:o.editApp,onDownload:o.downloadApp,onHelp:o.handleAppClick,onOpen:o.openApp,onStartServer:o.startServer},null,8,["app","onToggleFavorite","onInstall","onUninstall","onDelete","onEdit","onDownload","onHelp","onOpen","onStartServer"]))),128))])])),i.selectedApp?(k(),H("div",rfr,[g("div",ifr,[g("div",ofr,[g("h2",sfr,le(i.selectedApp.name),1),g("button",{onClick:e[10]||(e[10]=(...a)=>o.backToZoo&&o.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?(k(),H("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,afr)):(k(),H("p",lfr,"Please install this app to view its code."))])])):re("",!0),i.message?(k(),H("div",{key:3,class:je(["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}])},le(i.message),3)):re("",!0)])}const ufr=yt(P9r,[["render",cfr]]),dfr={components:{PersonalityEntry:tU},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(t){this.$store.commit("setConfig",t)}},combinedApps(){this.personalities.map(e=>e.name);const t=new Map(this.personalities.map(e=>[e.name,{...e,installed:!0,existsInFolder:!0}]));return this.githubApps.forEach(e=>{t.has(e.name)||t.set(e.name,{...e,installed:!1,existsInFolder:!1})}),Array.from(t.values())},categories(){return[...new Set(this.combinedApps.map(t=>t.category))].sort((t,e)=>t.localeCompare(e))},filteredApps(){return this.combinedApps.filter(t=>{const e=t.name.toLowerCase().includes(this.searchQuery.toLowerCase())||t.author.toLowerCase().includes(this.searchQuery.toLowerCase())||t.description.toLowerCase().includes(this.searchQuery.toLowerCase()),n=this.selectedCategory==="all"||t.category===this.selectedCategory;return e&&n})},sortedAndFilteredPersonalities(){return[...this.filteredApps].sort((t,e)=>{let n=0;switch(this.sortBy){case"name":n=t.name.localeCompare(e.name);break;case"author":n=t.author.localeCompare(e.author);break;case"date":n=this.getDateValue(t.creation_date)-this.getDateValue(e.creation_date);break;case"update":n=this.getDateValue(t.last_update_date)-this.getDateValue(e.last_update_date);break}return this.sortOrder==="asc"?n:-n})},favoriteApps(){return this.combinedApps.filter(t=>this.favorites.includes(t.uid))}},methods:{getDateValue(t){if(!t)return 0;const e=new Date(t);return isNaN(e.getTime())?0:e.getTime()},async onPersonalitySelected(t){if(console.log("on pers",t),this.isLoading&&this.$store.state.toast.showToast("Loading... please wait",4,!1),this.isLoading=!0,console.log("selecting ",t),t){if(t.selected){this.$store.state.toast.showToast("Personality already selected",4,!0),this.isLoading=!1;return}let e=t.language==null?t.full_path:t.full_path+":"+t.language;if(console.log("pth",e),t.isMounted&&this.configFile.personalities.includes(e)){const n=await this.select_personality(t);console.log("pers is mounted",n),n&&n.status&&n.active_personality_id>-1?this.$store.state.toast.showToast(`Selected personality: `+t.name,4,!0):this.$store.state.toast.showToast(`Error on select personality: `+t.name,4,!1),this.isLoading=!1}else console.log("mounting pers"),this.mountPersonality(t);ze(()=>{feather.replace()})}},onModelSelected(t){if(this.isLoading){this.$store.state.toast.showToast("Loading... please wait",4,!1);return}t&&(t.isInstalled?this.update_model(t.model.name).then(e=>{console.log("update_model",e),this.configFile.model_name=t.model.name,e.status?(this.$store.state.toast.showToast(`Selected model: `+t.name,4,!0),ze(()=>{feather.replace(),this.is_loading_zoo=!1}),this.updateModelsZoo(),this.api_get_req("get_model_status").then(n=>{this.$store.commit("setIsModelOk",n)})):(this.$store.state.toast.showToast(`Couldn't select model: @@ -4079,4 +4079,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(t){await this.unmountPersonality(t),await this.mountPersonality(t)},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,console.log("Personality path:",t.personality.path),Qe.post("/reinstall_personality",{client_id:this.$store.state.client_id,name:t.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(t){await Qe.post("/open_personality_folder",{client_id:this.$store.state.client_id,personality_folder:t.personality.folder})},showMessage(t,e){this.message=t,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)}},ofr={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"},sfr={class:"panels-color shadow-lg rounded-lg p-4 max-w-4xl mx-auto mb-8"},afr={class:"flex flex-wrap items-center justify-between gap-4"},lfr={key:0},cfr={key:1,class:"error"},ufr={class:"relative flex-grow max-w-md"},dfr={class:"flex items-center space-x-4"},ffr=["value"],pfr={class:"flex items-center space-x-4"},hfr={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},Tfr={key:1},mfr={class:"container mx-auto px-4 flex flex-column pb-20"},gfr={key:0},_fr={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"},Qfr={class:"container mx-auto px-4 flex flex-column pb-20"},vfr={class:"text-2xl font-bold my-8"},yfr={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"},bfr={key:2,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 overflow-y-auto"},Efr={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},xfr={class:"flex justify-between items-center mb-4"},Sfr={class:"text-2xl font-bold"},Lfr=["srcdoc"],Cfr={key:1,class:"text-center text-red-500"};function Afr(t,e,n,r,i,o){const s=pt("personality-entry");return k(),H("div",ofr,[g("nav",sfr,[g("div",afr,[i.message?(k(),H("p",lfr,le(i.message),1)):re("",!0),i.error?(k(),H("p",cfr,le(i.error),1)):re("",!0),g("div",ufr,[J(g("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),[[we,i.searchQuery]]),e[5]||(e[5]=g("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"},[g("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))]),g("div",dfr,[e[7]||(e[7]=g("label",{for:"category-select",class:"font-semibold"},"Category:",-1)),J(g("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]=g("option",{value:"all"},"All Categories",-1)),(k(!0),H(Ue,null,ot(o.categories,a=>(k(),H("option",{key:a,value:a},le(a),9,ffr))),128))],512),[[pn,i.selectedCategory]])]),g("div",pfr,[e[9]||(e[9]=g("label",{for:"sort-select",class:"font-semibold"},"Sort by:",-1)),J(g("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]=[g("option",{value:"name"},"Name",-1),g("option",{value:"author"},"Author",-1),g("option",{value:"date"},"Creation Date",-1),g("option",{value:"update"},"Last Update",-1)]),512),[[pn,i.sortBy]]),g("button",{onClick:e[3]||(e[3]=(...a)=>o.toggleSortOrder&&o.toggleSortOrder(...a)),class:"btn btn-secondary"},le(i.sortOrder==="asc"?"↑":"↓"),1)])])]),i.loading?(k(),H("div",hfr,e[10]||(e[10]=[g("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1),g("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)]))):(k(),H("div",Tfr,[g("div",mfr,[o.favoriteApps.length>0&&!i.searchQuery?(k(),H("div",gfr,[e[11]||(e[11]=g("h2",{class:"text-2xl font-bold my-8"},"Favorite Apps",-1)),g("div",_fr,[(k(!0),H(Ue,null,ot(o.favoriteApps,a=>(k(),wt(s,{ref_for:!0,ref:"personalitiesZoo",key:a.uid,personality:a,select_language:!0,full_path:a.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(l=>l===a.full_path||l===a.full_path+":"+a.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-edit":o.editPersonality,"on-copy-to-custom":o.copyToCustom,"on-reinstall":o.onPersonalityReinstall,"on-settings":t.onSettingsPersonality,"on-copy-personality-name":t.onCopyPersonalityName,"on-copy-to_custom":t.onCopyToCustom,"on-open-folder":o.handleOpenFolder,"on-toggle-favorite":o.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))])])):re("",!0)]),g("div",Qfr,[g("h2",vfr,le(o.currentCategoryName)+" ("+le(o.sortedAndFilteredPersonalities.length)+")",1),g("div",yfr,[(k(!0),H(Ue,null,ot(o.sortedAndFilteredPersonalities,a=>(k(),wt(s,{ref_for:!0,ref:"personalitiesZoo",key:a.uid,personality:a,select_language:!0,full_path:a.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(l=>l===a.full_path||l===a.full_path+":"+a.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-edit":o.editPersonality,"on-copy-to-custom":o.copyToCustom,"on-reinstall":o.onPersonalityReinstall,"on-settings":t.onSettingsPersonality,"on-copy-personality-name":t.onCopyPersonalityName,"on-copy-to_custom":t.onCopyToCustom,"on-open-folder":o.handleOpenFolder,"toggle-favorite":o.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?(k(),H("div",bfr,[g("div",Efr,[g("div",xfr,[g("h2",Sfr,le(i.selectedApp.name),1),g("button",{onClick:e[4]||(e[4]=(...a)=>t.backToZoo&&t.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?(k(),H("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,Lfr)):(k(),H("p",Cfr,"Please install this app to view its code."))])])):re("",!0),i.message?(k(),H("div",{key:3,class:je(["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}])},le(i.message),3)):re("",!0),e[12]||(e[12]=g("div",{class:"h-20"},null,-1))])}const wfr=yt(ifr,[["render",Afr],["__scopeId","data-v-f8c39e0b"]]),Mfr=qK({history:EK("/"),routes:[{path:"/apps_view/",name:"AppsZoo",component:rfr},{path:"/personalities_view/",name:"PersonalitiesZoo",component:wfr},{path:"/auto_sd_view/",name:"AutoSD",component:a9r},{path:"/comfyui_view/",name:"ComfyUI",component:n9r},{path:"/playground/",name:"playground",component:aUn},{path:"/extensions/",name:"extensions",component:mUn},{path:"/help_view/",name:"help_view",component:sGn},{path:"/settings/",name:"settings",component:Bnr},{path:"/training/",name:"training",component:Jnr},{path:"/quantizing/",name:"quantizing",component:orr},{path:"/",name:"discussions",component:X1r},{path:"/interactive/",name:"interactive",component:our},{path:"/nodes/",name:"nodes",component:Z8r}]}),M9=Vj(GVn);function Ofr(t){const e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}const so=fW({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(t,e){const n=t.personalities.findIndex(r=>r.full_path===e.full_path);n!==-1?t.personalities[n]=e:console.log("Can't uipdate personality beceause it was Not found:",e.full_path)},setThemeVars(t,e){t.theme_vars=e},setLeftPanelCollapsed(t,e){t.leftPanelCollapsed=e,console.log(`Saving the status of left panel to ${e}`),localStorage.setItem("lollms_webui_left_panel_collapsed",e)},setRightPanelCollapsed(t,e){t.rightPanelCollapsed=e,console.log(`Saving the status of right panel to ${e}`),localStorage.setItem("lollms_webui_right_panel_collapsed",e)},setViewMode(t,e){t.view_mode=e,localStorage.setItem("lollms_webui_view_mode",e)},setpersonalitiesReady(t,e){t.personalities_ready=e},setisRTOn(t,e){t.is_rt_on=e},setLanguages(t,e){t.languages=e},setLanguage(t,e){t.language=e},setIsReady(t,e){t.ready=e},setIsConnected(t,e){t.isConnected=e},setIsModelOk(t,e){t.isModelOk=e},setIsGenerating(t,e){t.isGenerating=e},setConfig(t,e){t.config=e},setPersonalities(t,e){t.personalities=e},setMountedPers(t,e){t.mountedPers=e},setMountedPersArr(t,e){t.mountedPersArr=e},setbindingsZoo(t,e){t.bindingsZoo=e},setModelsArr(t,e){t.modelsArr=e},setselectedModel(t,e){t.selectedModel=e},setDiskUsage(t,e){t.diskUsage=e},setRamUsage(t,e){t.ramUsage=e},setVramUsage(t,e){t.vramUsage=e},setModelsZoo(t,e){t.modelsZoo=e},setCurrentBinding(t,e){t.currentBinding=e},setCurrentModel(t,e){t.currentModel=e},setDatabases(t,e){t.databases=e},setTheme(t){this.currentTheme=t}},getters:{getThemeVars(t){return t.theme_vars},getLeftPanelCollapsed(t){return t.leftPanelCollapsed},getRightPanelCollapsed(t){return t.rightPanelCollapsed},getViewMode(t){return t.view_mode},getpersonalitiesReady(t){return t.personalities_ready},getisRTOn(t){return t.is_rt_on},getLanguages(t){return t.languages},getLanguage(t){return t.language},getIsConnected(t){return t.isConnected},getIsModelOk(t){return t.isModelOk},getIsGenerating(t){return t.isGenerating},getConfig(t){return t.config},getPersonalities(t){return t.personalities},getMountedPersArr(t){return t.mountedPersArr},getMountedPers(t){return t.mountedPers},getbindingsZoo(t){return t.bindingsZoo},getModelsArr(t){return t.modelsArr},getDiskUsage(t){return t.diskUsage},getRamUsage(t){return t.ramUsage},getVramUsage(t){return t.vramUsage},getDatabasesList(t){return t.databases},getModelsZoo(t){return t.modelsZoo},getCyrrentBinding(t){return t.currentBinding},getCurrentModel(t){return t.currentModel}},actions:{async getVersion(){try{let t=await Qe.get("/get_lollms_webui_version",{});t&&(this.state.version=t.data)}catch{console.error("Coudln't get version")}},async refreshConfig({commit:t}){console.log("Fetching configuration");try{console.log("Fetching configuration with client id: ",this.state.client_id);const e=await RG("get_config",this.state.client_id);e.active_personality_id<0&&(e.active_personality_id=0);let n=e.personalities[e.active_personality_id].split("/");e.personality_category=n[0],e.personality_folder=n[1],console.log("Recovered config"),console.log(e),console.log("Committing config"),console.log(e),console.log(this.state.config),t("setConfig",e)}catch(e){console.log(e.message,"refreshConfig")}},async refreshDatabase({commit:t}){let e=await Oo("list_databases");console.log("databases:",e),t("setDatabases",e)},async fetchisRTOn({commit:t}){const n=(await Qe.get("/is_rt_on")).data.status;t("setisRTOn",n)},async fetchLanguages({commit:t}){console.log("get_personality_languages_list",this.state.client_id);const e=await Qe.post("/get_personality_languages_list",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("languages",n),t("setLanguages",n)},async fetchLanguage({commit:t}){console.log("get_personality_language",this.state.client_id);const e=await Qe.post("/get_personality_language",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("language",n),t("setLanguage",n)},async changeLanguage({commit:t},e){console.log("Changing language to ",e);let n=await Qe.post("/set_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await Qe.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",n);const r=n.data;console.log("languages",r),t("setLanguages",r),n=await Qe.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",n);const i=n.data;console.log("language",i),t("setLanguage",i),await this.dispatch("refreshMountedPersonalities"),console.log("Language changed successfully:",i)},async deleteLanguage({commit:t},e){console.log("Deleting ",e);let n=await Qe.post("/del_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await Qe.post("/get_personality_languages_list",{client_id:this.state.client_id});const r=n.data;t("setLanguages",r),n=await Qe.post("/get_personality_language",{client_id:this.state.client_id});const i=n.data;t("setLanguage",i)},async refreshPersonalitiesZoo({commit:t}){let e=[];const n=await Oo("get_all_personalities"),r=Object.keys(n);for(let i=0;i{let c=!1;for(const d of this.state.config.personalities)d.includes(o+"/"+l.folder)&&(c=!0);let u={};return u=l,u.category=o,u.full_path=o+"/"+l.folder,u.isMounted=c,u});e.length==0?e=a:e=e.concat(a)}e.sort((i,o)=>i.name.localeCompare(o.name)),t("setPersonalities",e),console.log("Done loading personalities")},refreshMountedPersonalities({commit:t}){this.state.config.active_personality_id<0&&(this.state.config.active_personality_id=0);let e=[];const n=[];for(let i=0;ia.full_path==o);if(s>=0){let a=Ofr(this.state.personalities[s]);a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(l=>l.full_path=="generic/lollms")])}else n.push(i),console.log("Couldn't load personality : ",o)}for(let i=n.length-1;i>=0;i--)this.state.config.personalities.splice(n[i],1),this.state.config.active_personality_id>n[i]&&(this.state.config.active_personality_id-=1);t("setMountedPersArr",e);const r=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: ",r),this.state.mountedPers=r},async refreshBindings({commit:t}){let e=await Oo("list_bindings");console.log("Loaded bindings zoo :",e),this.state.installedBindings=e.filter(r=>r.installed),console.log("Loaded bindings zoo ",this.state.installedBindings),t("setbindingsZoo",e);const n=e.findIndex(r=>r.name==this.state.config.binding_name);n!=-1&&t("setCurrentBinding",e[n])},async refreshModelsZoo({commit:t}){const n=(await Qe.get("/get_available_models")).data;t("setModelsZoo",n)},async refreshModelStatus({commit:t}){let e=await Oo("get_model_status");t("setIsModelOk",e.status)},async refreshModels({commit:t}){let e=await Oo("list_models"),n=await Oo("get_active_model");n!=null&&t("setselectedModel",n.model),t("setModelsArr",e),this.state.modelsZoo.map(i=>{i.isInstalled=e.includes(i.name)}),this.state.installedModels=this.state.modelsZoo.filter(i=>i.isInstalled);const r=this.state.modelsZoo.findIndex(i=>i.name==this.state.config.model_name);r!=-1&&t("setCurrentModel",this.state.modelsZoo[r])},async refreshDiskUsage({commit:t}){this.state.diskUsage=await Oo("disk_usage")},async refreshRamUsage({commit:t}){this.state.ramUsage=await Oo("ram_usage")},async refreshVramUsage({commit:t}){const e=await Oo("vram_usage"),n=[];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)}},ffr={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"},pfr={class:"panels-color shadow-lg rounded-lg p-4 max-w-4xl mx-auto mb-8"},hfr={class:"flex flex-wrap items-center justify-between gap-4"},Tfr={key:0},mfr={key:1,class:"error"},gfr={class:"relative flex-grow max-w-md"},_fr={class:"flex items-center space-x-4"},Qfr=["value"],vfr={class:"flex items-center space-x-4"},yfr={key:0,class:"flex justify-center items-center space-x-2 my-8","aria-live":"polite"},bfr={key:1},Efr={class:"container mx-auto px-4 flex flex-column pb-20"},xfr={key:0},Sfr={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"},Lfr={class:"container mx-auto px-4 flex flex-column pb-20"},Cfr={class:"text-2xl font-bold my-8"},Afr={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8 mb-12"},wfr={key:2,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 overflow-y-auto"},Mfr={class:"bg-white rounded-lg p-6 w-11/12 h-5/6 flex flex-col"},Ofr={class:"flex justify-between items-center mb-4"},Rfr={class:"text-2xl font-bold"},Nfr=["srcdoc"],Dfr={key:1,class:"text-center text-red-500"};function Ifr(t,e,n,r,i,o){const s=pt("personality-entry");return k(),H("div",ffr,[g("nav",pfr,[g("div",hfr,[i.message?(k(),H("p",Tfr,le(i.message),1)):re("",!0),i.error?(k(),H("p",mfr,le(i.error),1)):re("",!0),g("div",gfr,[J(g("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),[[we,i.searchQuery]]),e[5]||(e[5]=g("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"},[g("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))]),g("div",_fr,[e[7]||(e[7]=g("label",{for:"category-select",class:"font-semibold"},"Category:",-1)),J(g("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]=g("option",{value:"all"},"All Categories",-1)),(k(!0),H(Ue,null,ot(o.categories,a=>(k(),H("option",{key:a,value:a},le(a),9,Qfr))),128))],512),[[pn,i.selectedCategory]])]),g("div",vfr,[e[9]||(e[9]=g("label",{for:"sort-select",class:"font-semibold"},"Sort by:",-1)),J(g("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]=[g("option",{value:"name"},"Name",-1),g("option",{value:"author"},"Author",-1),g("option",{value:"date"},"Creation Date",-1),g("option",{value:"update"},"Last Update",-1)]),512),[[pn,i.sortBy]]),g("button",{onClick:e[3]||(e[3]=(...a)=>o.toggleSortOrder&&o.toggleSortOrder(...a)),class:"btn btn-secondary"},le(i.sortOrder==="asc"?"↑":"↓"),1)])])]),i.loading?(k(),H("div",yfr,e[10]||(e[10]=[g("div",{class:"animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-blue-500"},null,-1),g("span",{class:"text-xl text-gray-700 font-semibold"},"Loading...",-1)]))):(k(),H("div",bfr,[g("div",Efr,[o.favoriteApps.length>0&&!i.searchQuery?(k(),H("div",xfr,[e[11]||(e[11]=g("h2",{class:"text-2xl font-bold my-8"},"Favorite Apps",-1)),g("div",Sfr,[(k(!0),H(Ue,null,ot(o.favoriteApps,a=>(k(),wt(s,{ref_for:!0,ref:"personalitiesZoo",key:a.uid,personality:a,select_language:!0,full_path:a.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(l=>l===a.full_path||l===a.full_path+":"+a.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-edit":o.editPersonality,"on-copy-to-custom":o.copyToCustom,"on-reinstall":o.onPersonalityReinstall,"on-settings":t.onSettingsPersonality,"on-copy-personality-name":t.onCopyPersonalityName,"on-copy-to_custom":t.onCopyToCustom,"on-open-folder":o.handleOpenFolder,"on-toggle-favorite":o.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))])])):re("",!0)]),g("div",Lfr,[g("h2",Cfr,le(o.currentCategoryName)+" ("+le(o.sortedAndFilteredPersonalities.length)+")",1),g("div",Afr,[(k(!0),H(Ue,null,ot(o.sortedAndFilteredPersonalities,a=>(k(),wt(s,{ref_for:!0,ref:"personalitiesZoo",key:a.uid,personality:a,select_language:!0,full_path:a.full_path,selected:o.configFile.active_personality_id==o.configFile.personalities.findIndex(l=>l===a.full_path||l===a.full_path+":"+a.language),"on-selected":o.onPersonalitySelected,"on-mount":o.mountPersonality,"on-un-mount":o.unmountPersonality,"on-remount":o.remountPersonality,"on-edit":o.editPersonality,"on-copy-to-custom":o.copyToCustom,"on-reinstall":o.onPersonalityReinstall,"on-settings":t.onSettingsPersonality,"on-copy-personality-name":t.onCopyPersonalityName,"on-copy-to_custom":t.onCopyToCustom,"on-open-folder":o.handleOpenFolder,"toggle-favorite":o.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?(k(),H("div",wfr,[g("div",Mfr,[g("div",Ofr,[g("h2",Rfr,le(i.selectedApp.name),1),g("button",{onClick:e[4]||(e[4]=(...a)=>t.backToZoo&&t.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?(k(),H("iframe",{key:0,srcdoc:i.appCode,class:"flex-grow border-none"},null,8,Nfr)):(k(),H("p",Dfr,"Please install this app to view its code."))])])):re("",!0),i.message?(k(),H("div",{key:3,class:je(["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}])},le(i.message),3)):re("",!0),e[12]||(e[12]=g("div",{class:"h-20"},null,-1))])}const kfr=yt(dfr,[["render",Ifr],["__scopeId","data-v-f8c39e0b"]]),Pfr=qK({history:EK("/"),routes:[{path:"/apps_view/",name:"AppsZoo",component:ufr},{path:"/personalities_view/",name:"PersonalitiesZoo",component:kfr},{path:"/auto_sd_view/",name:"AutoSD",component:h9r},{path:"/comfyui_view/",name:"ComfyUI",component:c9r},{path:"/playground/",name:"playground",component:aUn},{path:"/extensions/",name:"extensions",component:mUn},{path:"/help_view/",name:"help_view",component:sGn},{path:"/settings/",name:"settings",component:jnr},{path:"/training/",name:"training",component:srr},{path:"/quantizing/",name:"quantizing",component:frr},{path:"/",name:"discussions",component:o2r},{path:"/interactive/",name:"interactive",component:fur},{path:"/nodes/",name:"nodes",component:i9r}]}),M9=Vj(GVn);function Hfr(t){const e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}const so=fW({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(t,e){const n=t.personalities.findIndex(r=>r.full_path===e.full_path);n!==-1?t.personalities[n]=e:console.log("Can't uipdate personality beceause it was Not found:",e.full_path)},setThemeVars(t,e){t.theme_vars=e},setLeftPanelCollapsed(t,e){t.leftPanelCollapsed=e,console.log(`Saving the status of left panel to ${e}`),localStorage.setItem("lollms_webui_left_panel_collapsed",e)},setRightPanelCollapsed(t,e){t.rightPanelCollapsed=e,console.log(`Saving the status of right panel to ${e}`),localStorage.setItem("lollms_webui_right_panel_collapsed",e)},setViewMode(t,e){t.view_mode=e,localStorage.setItem("lollms_webui_view_mode",e)},setpersonalitiesReady(t,e){t.personalities_ready=e},setisRTOn(t,e){t.is_rt_on=e},setLanguages(t,e){t.languages=e},setLanguage(t,e){t.language=e},setIsReady(t,e){t.ready=e},setIsConnected(t,e){t.isConnected=e},setIsModelOk(t,e){t.isModelOk=e},setIsGenerating(t,e){t.isGenerating=e},setConfig(t,e){t.config=e},setPersonalities(t,e){t.personalities=e},setMountedPers(t,e){t.mountedPers=e},setMountedPersArr(t,e){t.mountedPersArr=e},setbindingsZoo(t,e){t.bindingsZoo=e},setModelsArr(t,e){t.modelsArr=e},setselectedModel(t,e){t.selectedModel=e},setDiskUsage(t,e){t.diskUsage=e},setRamUsage(t,e){t.ramUsage=e},setVramUsage(t,e){t.vramUsage=e},setModelsZoo(t,e){t.modelsZoo=e},setCurrentBinding(t,e){t.currentBinding=e},setCurrentModel(t,e){t.currentModel=e},setDatabases(t,e){t.databases=e},setTheme(t){this.currentTheme=t}},getters:{getThemeVars(t){return t.theme_vars},getLeftPanelCollapsed(t){return t.leftPanelCollapsed},getRightPanelCollapsed(t){return t.rightPanelCollapsed},getViewMode(t){return t.view_mode},getpersonalitiesReady(t){return t.personalities_ready},getisRTOn(t){return t.is_rt_on},getLanguages(t){return t.languages},getLanguage(t){return t.language},getIsConnected(t){return t.isConnected},getIsModelOk(t){return t.isModelOk},getIsGenerating(t){return t.isGenerating},getConfig(t){return t.config},getPersonalities(t){return t.personalities},getMountedPersArr(t){return t.mountedPersArr},getMountedPers(t){return t.mountedPers},getbindingsZoo(t){return t.bindingsZoo},getModelsArr(t){return t.modelsArr},getDiskUsage(t){return t.diskUsage},getRamUsage(t){return t.ramUsage},getVramUsage(t){return t.vramUsage},getDatabasesList(t){return t.databases},getModelsZoo(t){return t.modelsZoo},getCyrrentBinding(t){return t.currentBinding},getCurrentModel(t){return t.currentModel}},actions:{async getVersion(){try{let t=await Qe.get("/get_lollms_webui_version",{});t&&(this.state.version=t.data)}catch{console.error("Coudln't get version")}},async refreshConfig({commit:t}){console.log("Fetching configuration");try{console.log("Fetching configuration with client id: ",this.state.client_id);const e=await RG("get_config",this.state.client_id);e.active_personality_id<0&&(e.active_personality_id=0);let n=e.personalities[e.active_personality_id].split("/");e.personality_category=n[0],e.personality_folder=n[1],console.log("Recovered config"),console.log(e),console.log("Committing config"),console.log(e),console.log(this.state.config),t("setConfig",e)}catch(e){console.log(e.message,"refreshConfig")}},async refreshDatabase({commit:t}){let e=await Oo("list_databases");console.log("databases:",e),t("setDatabases",e)},async fetchisRTOn({commit:t}){const n=(await Qe.get("/is_rt_on")).data.status;t("setisRTOn",n)},async fetchLanguages({commit:t}){console.log("get_personality_languages_list",this.state.client_id);const e=await Qe.post("/get_personality_languages_list",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("languages",n),t("setLanguages",n)},async fetchLanguage({commit:t}){console.log("get_personality_language",this.state.client_id);const e=await Qe.post("/get_personality_language",{client_id:this.state.client_id});console.log("response",e);const n=e.data;console.log("language",n),t("setLanguage",n)},async changeLanguage({commit:t},e){console.log("Changing language to ",e);let n=await Qe.post("/set_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await Qe.post("/get_personality_languages_list",{client_id:this.state.client_id}),console.log("response",n);const r=n.data;console.log("languages",r),t("setLanguages",r),n=await Qe.post("/get_personality_language",{client_id:this.state.client_id}),console.log("response",n);const i=n.data;console.log("language",i),t("setLanguage",i),await this.dispatch("refreshMountedPersonalities"),console.log("Language changed successfully:",i)},async deleteLanguage({commit:t},e){console.log("Deleting ",e);let n=await Qe.post("/del_personality_language",{client_id:this.state.client_id,language:e});console.log("get_personality_languages_list",this.state.client_id),n=await Qe.post("/get_personality_languages_list",{client_id:this.state.client_id});const r=n.data;t("setLanguages",r),n=await Qe.post("/get_personality_language",{client_id:this.state.client_id});const i=n.data;t("setLanguage",i)},async refreshPersonalitiesZoo({commit:t}){let e=[];const n=await Oo("get_all_personalities"),r=Object.keys(n);for(let i=0;i{let c=!1;for(const d of this.state.config.personalities)d.includes(o+"/"+l.folder)&&(c=!0);let u={};return u=l,u.category=o,u.full_path=o+"/"+l.folder,u.isMounted=c,u});e.length==0?e=a:e=e.concat(a)}e.sort((i,o)=>i.name.localeCompare(o.name)),t("setPersonalities",e),console.log("Done loading personalities")},refreshMountedPersonalities({commit:t}){this.state.config.active_personality_id<0&&(this.state.config.active_personality_id=0);let e=[];const n=[];for(let i=0;ia.full_path==o);if(s>=0){let a=Hfr(this.state.personalities[s]);a?e.push(a):e.push(this.state.personalities[this.state.personalities.findIndex(l=>l.full_path=="generic/lollms")])}else n.push(i),console.log("Couldn't load personality : ",o)}for(let i=n.length-1;i>=0;i--)this.state.config.personalities.splice(n[i],1),this.state.config.active_personality_id>n[i]&&(this.state.config.active_personality_id-=1);t("setMountedPersArr",e);const r=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: ",r),this.state.mountedPers=r},async refreshBindings({commit:t}){let e=await Oo("list_bindings");console.log("Loaded bindings zoo :",e),this.state.installedBindings=e.filter(r=>r.installed),console.log("Loaded bindings zoo ",this.state.installedBindings),t("setbindingsZoo",e);const n=e.findIndex(r=>r.name==this.state.config.binding_name);n!=-1&&t("setCurrentBinding",e[n])},async refreshModelsZoo({commit:t}){const n=(await Qe.get("/get_available_models")).data;t("setModelsZoo",n)},async refreshModelStatus({commit:t}){let e=await Oo("get_model_status");t("setIsModelOk",e.status)},async refreshModels({commit:t}){let e=await Oo("list_models"),n=await Oo("get_active_model");n!=null&&t("setselectedModel",n.model),t("setModelsArr",e),this.state.modelsZoo.map(i=>{i.isInstalled=e.includes(i.name)}),this.state.installedModels=this.state.modelsZoo.filter(i=>i.isInstalled);const r=this.state.modelsZoo.findIndex(i=>i.name==this.state.config.model_name);r!=-1&&t("setCurrentModel",this.state.modelsZoo[r])},async refreshDiskUsage({commit:t}){this.state.diskUsage=await Oo("disk_usage")},async refreshRamUsage({commit:t}){this.state.ramUsage=await Oo("ram_usage")},async refreshVramUsage({commit:t}){const e=await Oo("vram_usage"),n=[];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 879b67f6..ce6d6e69 100644 --- a/web/src/views/SettingsView.vue +++ b/web/src/views/SettingsView.vue @@ -1110,15 +1110,18 @@
- +
+ +
+ + +
+
+
@@ -1131,7 +1134,7 @@ Vectorize -
+ +
+ + +
+
+ + +
+
- +
+ @@ -1266,6 +1292,23 @@ Upload Files
+ + +